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

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

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

[State 240, 4]
type = Explod
triggerall = numExplod(6751) = 0
trigger1 = 1
anim = 7200
postype = p1
pos = -5,-100
;sprprioritf = 3
sprpriority = -1
ownpal = 1
scale = 0.4,0.4
pausemovetime = 999999999999999
supermovetime = 999999999999999
ignorehitpause = 1

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

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

[State -2,コントロール可否]
type = Ctrlset
triggerall = !ishelper
triggerall = sysvar(3) > 100
triggerall = !NumPartner = 0
triggerall = !enemy,NumPartner = 0
trigger1 = Anim = 0
trigger2 = Anim = 7450
value = 1
ignorehitpause = 1


[State 191, 3]
type = varset
trigger1 = time = 0
var(3) = 0

[State 5040, 3]
type = null;CtrlSet
trigger1 = roundstate = 2
value = 1

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

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

[State 0, 1]
type = null;ChangeAnim
triggerall = anim != 9601
trigger1 = var(35)
trigger2 = palno = [7,12]
trigger2 = (enemynear,name = "W-Reimu"&&enemy,palno=12&&palno=12)
trigger2 = NumPartner = 0
trigger2 = enemy,NumPartner = 0
triggerall = Anim != 7450
;trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 7450

[State 0, 1]
type = null;ChangeAnim
triggerall = !(enemynear,name = "W-Reimu"&&enemy,palno=12&&palno=12)
triggerall = anim != 9601
triggerall = NumPartner = 0
triggerall = enemy,NumPartner = 0
;triggerall = !var(35) 
trigger1 = Anim != 0 ;&& Anim != 5
;trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 1]
type = null;ChangeAnim
triggerall = anim != 9601
triggerall = !NumPartner = 0
triggerall = !enemy,NumPartner = 0
triggerall = !var(35) 
trigger1 = Anim != 0 ;&& Anim != 5
;trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0



[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 0, ガード不能化]
type = Assertspecial
trigger1 = 1
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State 0, 振り向き＆歩き制御＆影消し]
type = Assertspecial
trigger1 = 1
flag = noautoturn
flag2 = nowalk
flag3 = noshadow
ignorehitpause = 1

[State 0, 速度]
type = Velset
trigger1 = 1
x = 0
y = 0
ignorehitpause = 1

[State 105, 軸]
type = posset
trigger1 = 1
y = 0

[State 0, アニメ変更]
type = Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = stateno
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1

[State 0, アニメ変更]
type = Changeanim
trigger1 = animtime = [-2, -1]
trigger2 = anim != stateno
value = stateno
elem = 2
ignorehitpause = 1


[State 0, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 0, 本体Explod化]
type = Explod
triggerall = anim = stateno
triggerall = RoundState = 2
trigger1 = animelemno(0) < 4
trigger1 = var(0) := 1
trigger2 = animelemno(0) = [5, 7]
trigger2 = var(0) := 2
trigger3 = animelemno(0) = [8, 10]
trigger3 = var(0) := 3
trigger4 = animelemno(0) = [11, 13]
trigger4 = var(0) := 4
trigger5 = animelemno(0) = [14, 16]
trigger5 = var(0) := 5
trigger6 = animelemno(0) = [17, 18]
trigger6 = var(0) := 6
trigger7 = animelemno(0) = [19, 20]
trigger7 = var(0) := 5
trigger8 = animelemno(0) = [21, 22]
trigger8 = var(0) := 4
trigger9 = animelemno(0) = [23, 25]
trigger9 = var(0) := 3
trigger10 = animelemno(0) = [26, 28]
trigger10 = var(0) := 2
anim = 100000000 + anim + var(0)
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 0, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[State 0, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 0, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 0, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 0, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 0, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1

[State -1, 勝利]
type = Changestate
triggerall = roundstate = 4
triggerall = !time
trigger1 = win
value = 180
ignorehitpause = 1

[State -1, 引き分け]
type = Changestate
triggerall = roundstate = 4
triggerall = !time
trigger1 = drawgame
value = 175
ignorehitpause = 1

[State -1, 判定負け]
type = Changestate
triggerall = roundstate = 4
triggerall = !time
trigger1 = losetime
value = 170
ignorehitpause = 1


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

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

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

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

[State -2, Player Only]
type = ChangeState
;triggerall = var(59)
trigger1 = 1
value = 0
ctrl = 1

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

[State 振り向き]
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 10, アニメ変更]
type = Changeanim
triggerall = anim != 9601
triggerall = !ishelper
;trigger1 = var(55) != 1
trigger1 = anim != 10
value = 10
ignorehitpause = 1

[State 10, 2]
type = null;Changeanim
trigger1 = var(55) = 1
trigger1 = anim != 2500
value = 2500

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

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

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

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

[State -2,コントロール可否]
type = Ctrlset
triggerall = !ishelper
trigger1 = Anim = 11
value = 1
ignorehitpause = 1

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

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

[State 振り向き]
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 11, スプライト表示優先度]
type = Sprpriority
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

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

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

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

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

[State 振り向き]
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 12, 1]
type = Changestate
triggerall = !ishelper
trigger1 = 1
value = 0
ctrl = 1
ignorehitpause = 1

[State 12, 1]
type = Changeanim
triggerall = anim != 9601
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 20]
type    = S
physics = S
sprpriority = 0
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
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 = 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 21, 振り向き＆歩き制御＆影消し]
type = Assertspecial
trigger1 = 1
flag = noautoturn
flag2 = nowalk
flag3 = noshadow
ignorehitpause = 1

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


[State 20, アニメ変更]
type = Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = stateno
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1

[State 20, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 20, 本体Explod化]
type = Explod
triggerall = anim = stateno
trigger1 = 1
trigger1 = var(0) := 1
anim = 100000000 + anim + var(0)
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 20, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[State 20, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 20, 立ち摩擦補正]
type = Varset
trigger1 = 1
sysfvar(1) = vel x * ifelse(vel x * const(movement.stand.friction) > 1, const(movement.stand.friction), 0)
ignorehitpause = 1

[State 20, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 20, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 20, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1

[State 20, アニメ変更]
type = Changeanim
trigger1 = animtime = [-2, -1]
trigger2 = anim != stateno
value = stateno
elem = 2
ignorehitpause = 1

[State 20, 死亡時]
type = Changestate
trigger1 = !alive
value = 5050
persistent = 256
ignorehitpause = 1

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

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

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


[Statedef 21]
type    = S
physics = S
sprpriority = 0
movehitpersist = 1
hitdefpersist = 1
Ctrl = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
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 = 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 21, 振り向き＆歩き制御＆影消し]
type = Assertspecial
trigger1 = 1
flag = noautoturn
flag2 = nowalk
flag3 = noshadow
ignorehitpause = 1

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


[State 20, アニメ変更]
type = null;Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = stateno
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1

[State 20, アニメ変更]
type = Changeanim
trigger1 = animtime = [-2, -1]
trigger2 = anim != 21
value = 21
elem = 2
ignorehitpause = 1

[State 20, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 20, 本体Explod化]
type = Explod
triggerall = anim = stateno
trigger1 = 1
trigger1 = var(0) := 1
anim = 100010000 + anim + var(0)
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 20, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[State 20, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 20, 立ち摩擦補正]
type = Varset
trigger1 = 1
sysfvar(1) = vel x * ifelse(vel x * const(movement.stand.friction) > 1, const(movement.stand.friction), 0)
ignorehitpause = 1

[State 20, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 20, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 20, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1



[State 20, 死亡時]
type = Changestate
trigger1 = !alive
value = 5050
persistent = 256
ignorehitpause = 1

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

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

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
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 = I
physics = N
movehitpersist = 1
hitdefpersist = 1

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

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

[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 != "OROCHI G3"
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 ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

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

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

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


[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
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 = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

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

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

[State 1020, 1]
type = PlaySnd
trigger1 = animelem = 1 && !sysvar(2) && !sysvar(3)
value = S0,21

[State 1020, 1]
type = PlaySnd
trigger1 = animelem = 1 && sysvar(2) && !sysvar(3)
value = S0,22

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

[State 50, AfterImage]
type = AfterImage
trigger1 = animelem = 1 && sysvar(2) && !sysvar(3); && vel x
time = 15
length = 9
framegap = 4
trans = add1
palcontrast = 100,100,100
;paladd = 0,0,0
palmul = 1,1,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 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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

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

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "OROCHI G3"
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 振り向き]
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 ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

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

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

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



[State 0, アニメ変更]
type = Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = 47
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1

[State 0, アニメ変更]
type = Changeanim
trigger1 = animtime = [-2, -1]
trigger2 = anim != 47
value = 47
elem = 2
ignorehitpause = 1


[State 0, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1
[State 100, 本体Explod化]
type = Explod
triggerall = anim = 47
trigger1 = animelemno(0) < 3
trigger1 = var(0) := 1
trigger2 = animelemno(0) = [4,5]
trigger2 = var(0) := 2
trigger3 = animelemno(0) = [6,7]
trigger3 = var(0) := 3
anim = 100000000 + anim + var(0)
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 0, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[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 振り向き]
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 52, ジャンプ回数リセット]
type = Varset
trigger1 = !ishelper
var(5) = 0
ignorehitpause = 1

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

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

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

[State 0, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 0, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 0, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 0, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 0, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1



[State 52, 4]
type = Changestate
triggerall = !ishelper
trigger1 = animelemno(0) = 6
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

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

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


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


[State 105, ガード不能化]
type = Assertspecial
trigger1 = 1
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State 105, 振り向き＆歩き制御＆影消し]
type = Assertspecial
trigger1 = 1
flag = noautoturn
flag2 = nowalk
flag3 = noshadow
ignorehitpause = 1


[State 105, アニメ変更]
type = Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = stateno
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1


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

[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 105, 本体Explod化]
type = Explod
triggerall = anim = stateno
trigger1 = 1
anim = stateno
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 105, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[State 170, 1]
type = NotHitBy
trigger1 = 1
trigger1 = var(5) = 1
value = SCA,AA,AP,AT
time = 2


[State 105, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 105, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 105, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 105, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 105, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1

[State 100, ステート変更]
type = ChangeState
trigger1 = 1
value = 103
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1


[Statedef 103]
type = A
physics = N
;anim = 106
ctrl = 0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


[State 170, 1]
type = NotHitBy
trigger1 = 1
trigger1 = var(5) = 1
value = SCA,AA,AP,AT
time = 2

[State 840, 2]
type = afterimage
trigger1 = AnimElem = 1
trigger1 = var(5) = 1
time = 20
length = 9
ignorehitpause = 1

[State 840, 2]
type = afterimagetime
trigger1 = var(5) = 1
trigger1 = 1
time = 2

[State -3, 5]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,23

[State 106, 0]
type = VelSet
trigger1 = var(5) = 0
trigger1 = AnimElem = 1
x = 9;-8
y = -4;-4.7

[State 106, 0]
type = null;VelSet
trigger1 = var(5) = 1
trigger1 = AnimElem = 1
x = 8
y = 5

[State 106, 1]
type = VelAdd
trigger1 = 1
;x = .-1;.3
y = .40;.45

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


[State 105, ガード不能化]
type = Assertspecial
trigger1 = 1
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State 105, 振り向き＆歩き制御＆影消し]
type = Assertspecial
trigger1 = 1
flag = noautoturn
flag2 = nowalk
flag3 = noshadow
ignorehitpause = 1


[State 105, アニメ変更]
type = Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = stateno
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1


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

[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 105, 本体Explod化]
type = Explod
triggerall = anim = stateno
trigger1 = 1
anim = 103
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 105, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[State 105, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 105, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 105, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 105, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 105, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1

[State 106, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 107
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 = Changestate
triggerall = !ishelper
triggerall = palno = 12
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1


;---------------------------------------------------------------------------
[Statedef 105];バックステップ
type = S
physics = S
;anim = 105
velset = 0
ctrl = 0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


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


[State 105, ガード不能化]
type = Assertspecial
trigger1 = 1
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State 105, 振り向き＆歩き制御＆影消し]
type = Assertspecial
trigger1 = 1
flag = noautoturn
flag2 = nowalk
flag3 = noshadow
ignorehitpause = 1


[State 105, アニメ変更]
type = Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = stateno
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1


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

[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 105, 本体Explod化]
type = Explod
triggerall = anim = stateno
trigger1 = 1
anim = stateno
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 105, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[State 170, 1]
type = NotHitBy
trigger1 = 1
trigger1 = var(5) = 1
value = SCA,AA,AP,AT
time = 2


[State 105, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 105, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 105, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 105, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 105, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1

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

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

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

[Statedef 106]
type = A
physics = N
;anim = 106
ctrl = 0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


[State 170, 1]
type = NotHitBy
trigger1 = 1
trigger1 = var(5) = 1
value = SCA,AA,AP,AT
time = 2

[State 840, 2]
type = afterimage
trigger1 = AnimElem = 1
trigger1 = var(5) = 1
time = 20
length = 9
ignorehitpause = 1

[State 840, 2]
type = afterimagetime
trigger1 = var(5) = 1
trigger1 = 1
time = 2

[State -3, 5]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,23

[State 106, 0]
type = VelSet
trigger1 = var(5) = 0
trigger1 = AnimElem = 1
x = -7;-8
y = -6;-4.7

[State 106, 0]
type = null;VelSet
trigger1 = var(5) = 1
trigger1 = AnimElem = 1
x = -8
y = -3

[State 106, 1]
type = VelAdd
trigger1 = 1
x = .1;.3
y = .40;.45

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


[State 105, ガード不能化]
type = Assertspecial
trigger1 = 1
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State 105, 振り向き＆歩き制御＆影消し]
type = Assertspecial
trigger1 = 1
flag = noautoturn
flag2 = nowalk
flag3 = noshadow
ignorehitpause = 1


[State 105, アニメ変更]
type = Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = stateno
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1


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

[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 105, 本体Explod化]
type = Explod
triggerall = anim = stateno
trigger1 = 1
anim = 106
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 105, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[State 105, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 105, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 105, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 105, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 105, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1

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

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

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

[Statedef 107]
type = S
physics = S
;anim = 107
velset = 0,0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1



[State 105, アニメ変更]
type = Changeanim
triggerall = animtime != [-2, -1]
trigger1 = anim = stateno
value = anim
elem = animelemno(0) + 1
ignorehitpause = 1


[State 105, アニメ変更]
type = Changeanim
trigger1 = anim != stateno
value = stateno
elem = 2
ignorehitpause = 1

[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 105, 本体Explod化]
type = Explod
triggerall = anim = stateno
trigger1 = animelemno(0) < 1
trigger1 = var(0) := 1
trigger2 = animelemno(0) = 2
trigger2 = var(0) := 2
trigger3 = animelemno(0) = 3
trigger3 = var(0) := 3
anim = 100000000 + anim + var(0)
ID = 1
postype = left
pos = ceil(160 + pos x), ceil(screenpos y)
facing = facing
scale = const(size.xscale), const(size.yscale)
ownpal = 0
sprpriority = 7
ontop = 1
removetime = -1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 105, 透明化]
type = Assertspecial
trigger1 = numexplod(1)
flag = invisible
ignorehitpause = 1

[State 105, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 105, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 105, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 105, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 105, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
ignorehitpause = 1


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

[State 107, 2]
type = ChangeState
trigger1 = animelemno(0) = 3
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 = Changestate
triggerall = !ishelper
triggerall = palno = 12
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

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

[State 120, 自キャラ以外だった場合]
type = null;Changestate
trigger1 = name != "OROCHI G3"
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
triggerall = Enemy,name != "Hastur"
trigger1 = name != "OROCHI G3"
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 ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
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 != "OROCHI G3"
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 ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
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 != "OROCHI G3"
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 ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
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 140]
type = U
movetype = U
physics = U
movehitpersist = 1
hitdefpersist = 1

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

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

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


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

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

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

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

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

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

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

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

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

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

[State 152, 準ステート固定基準]
type = Null
trigger1 = !ishelper
ignorehitpause = 1
;タイムオーバー（負けた時）
[Statedef 170]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 170, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "OROCHI G3"
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
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 != "OROCHI G3"
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 ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

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

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
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 != "OROCHI G3"
value = 45000
ignorehitpause = 1

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

[State 191, 1]
type = varrandom
trigger1 = 1
triggerall = var(58) = 0
v = 4
range = 1,3

[State 191, 1]
type = varrandom
trigger1 = 1
triggerall = var(58) = 1
v = 4
range = 1,3

[State 191, 3]
type = ChangeState
trigger1 = var(4) = 1
value = 181

[State 191, 3]
type = ChangeState
trigger1 = var(4) = 2
value = 182

[State 191, 3]
type = ChangeState
trigger1 = var(4) = 3
value = 183


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

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

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

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

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


[State 191, 1]
type = playsnd
trigger1 = AnimElem = 7
value = S0,4
volume = 100

[State 240, 4]
type = Explod
trigger1 = AnimElem = 1
;trigger1 = time = 194
anim = 183
postype = p1
pos = -7,0
sprpriority = -1
removetime = 999999
ownpal = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[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 0, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 0, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 0, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 0, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 0, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 0, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 182];ガイアと共に有り
type = U
movetype = U
physics = N
velset = 0,0
movehitpersist = 1
hitdefpersist = 1

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

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

[State 191, 1]
type = playsnd
trigger1 = AnimElem = 1
value = S0,2
volume = 100

[State 191, 1]
type = playsnd
trigger1 = AnimElem = 15
value = S0,3
volume = 100

[State 240, 4]
type = Explod
trigger1 = AnimElem = 1
;trigger1 = time = 194
anim = 183
postype = p1
pos = -5,0
sprpriority = -1
removetime = 999999
ownpal = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

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

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


[State 0, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 0, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 0, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 0, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 0, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 0, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1


;----------------------------------
[Statedef 183];win3
type = U
movetype = U
physics = N
sprpriority = 1
velset = 0,0
movehitpersist = 1
hitdefpersist = 1

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

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

[State 240, 4]
type = Explod
trigger1 = AnimElem = 3
triggerall = palno != 6 && palno != 6
;trigger1 = time = 194
anim = 185
postype = p1
pos = 0,0
sprpriority = 8
ownpal = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 4100,1]
type = Helper
trigger1 = AnimElem = 3
triggerall = palno = 6 || palno = 12
ID = 900
name = "blood"
postype = p1
pos = 0,0
sprpriority = 8
stateno = 188
helpertype = player
keyctrl = 0
ignorehitpause = 1
ownpal = 1
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999

[State 240, 4]
type = Explod
trigger1 = AnimElem = 1
;trigger1 = time = 194
anim = 183
postype = p1
removetime = -1
pos = 0,0
sprpriority = -1
ownpal = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999


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

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


[State 0, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 0, 向き保存]
type = Varset
trigger1 = 1
sysfvar(0) = facing
ignorehitpause = 1

[State 0, Ｘ速度保存]
type = Varset
trigger1 = 1
sysfvar(1) = vel x
ignorehitpause = 1

[State 0, Ｙ速度保存]
type = Varset
trigger1 = 1
sysfvar(2) = vel y
ignorehitpause = 1

[State 0, Ｘ位置保存]
type = Varset
trigger1 = 1
sysfvar(3) = pos x
ignorehitpause = 1

[State 0, Ｙ位置保存]
type = Varset
trigger1 = 1
sysfvar(4) = pos y
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
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 != "OROCHI G3"
value = 45000
ignorehitpause = 1

[State 10, 2]
type = Changeanim
trigger1 = var(55) != 1
trigger1 = anim != 190
value = 190

[State 10, 2]
type = Changeanim
trigger1 = var(55) = 1
trigger1 = anim != 2530
value = 2530


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

[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 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
triggerall = !ishelper
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

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

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

[State 191, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 191, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "OROCHI G3"
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 = Changestate
triggerall = !ishelper
triggerall = palno = [7,12]
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= I
physics = N
velset = 0,0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = Enemy,anim != 2101 
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1



[State 140, 魂つぶし]
type = veladd
triggerall = name != "OROCHI G3"
Triggerall = P2BodyDist Y > -35
trigger1 = Enemy,anim = 2101
trigger1 = Enemy,animelemno(0) > 100
y=1
ignorehitpause = 1
[State 140, 魂つぶし]
type = veladd
triggerall = name != "OROCHI G3"
Triggerall = P2BodyDist Y < -35
trigger1 = Enemy,anim = 2101
trigger1 = Enemy,animelemno(0) > 100
y=-1
ignorehitpause = 1
[State 140, 魂つぶし]
type = veladd
triggerall = name != "OROCHI G3"
Triggerall = P2BodyDist X > -27
trigger1 = Enemy,anim = 2101
trigger1 = Enemy,animelemno(0) > 100
x = 1
ignorehitpause = 1
[State 140, 魂つぶし]
type = veladd
triggerall = name != "OROCHI G3"
Triggerall = P2BodyDist X < -27
trigger1 = Enemy,anim = 2101
trigger1 = Enemy,animelemno(0) > 100
x = -1
ignorehitpause = 1

[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5000, 6]
type = ChangeState
trigger1 = name = "OROCHI G3"
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 5001 ;HITG_SLIDE

[State 5000, 7]
type = ChangeState
trigger1 = name = "OROCHI G3"
trigger1 = HitShakeOver
value = 5030

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

; HITG_SLIDE
[Statedef 5001]
type    = S
movetype= I
physics = S

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = name = "OROCHI G3"
trigger1 = HitOver
value = 0
ctrl = 1

; HITC_SHAKE
[Statedef 5010]
type    = C
movetype= I
physics = N
velset = 0,0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5010, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 5010, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5010, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5010, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5010, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
triggerall = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 5011 ;HITC_SLIDE

[State 5010, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

; HITC_SLIDE
[Statedef 5011]
type    = C
movetype= I
physics = C

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5011, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

[State 5011, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5011, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5011, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5011, 6]
type = ChangeState
trigger1 = HitOver
value = 11
ctrl = 1

; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= I
physics = N
velset = 0,0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= I
physics = N
ctrl = 0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

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

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;HITA_UP (transition)

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

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[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

; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= I
physics = N

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State 105, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

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

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


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

[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[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

; HIT_TRIP (shaking)
[Statedef 5070]
type    = A
movetype= I
physics = N
velset = 0,0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5070, 1]
type = ChangeAnim 
trigger1 = 1
value = 5070

[State 5070, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 5071

[State 5070, 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140

; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= I
physics = N

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5071, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5071, 2] ;Acceleration
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5110

; HITL_SHAKE
[Statedef 5080]
type    = L
movetype= I
physics = N
velset = 0,0

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5080, 1] ;Set default anim
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)

[State 5080, 2]
type = VarAdd
trigger1 = time = 0
trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
sysvar(2) = anim % 10

[State 5080, 3] ;If 5090 doesn't exist, default to 5030
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080, 3] ;Freeze
type = ChangeAnim
trigger1 = 1
value = sysvar(2)

[State 5080, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5081 ;HITL_SLIDE

[State 5080, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) != 0
value = 5030 ;HITA_UP

; HITL_SLIDE
[Statedef 5081]
type    = L
movetype= I
physics = C

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5081, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5081, 2]
type = VelSet
trigger1 = HitOver
x = 0

[State 5081, 3] ;Don't show hit ground frame
type = VarSet
trigger1 = Time = 0
sysvar(0) = 1

[State 5081, 4]
type = ChangeState
trigger1 = HitOver
value = 5110 ;HIT_LIEDOWN

; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= I
physics = N

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

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

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

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

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 5101

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type    = L
movetype= I
physics = N

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
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, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

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

[State 5101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 5110

; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= I
physics = N

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1


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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

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

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

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

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5110, 7]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

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

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

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

[Statedef 5120]
type    = L
movetype= I
physics = N

[State 0, 自キャラ以外]
type = Changestate
trigger1 = name != "OROCHI G3"
value = 45000
ignorehitpause = 1

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


[State ]
type = Statetypeset
trigger1 = palno = 6
trigger1 = !var(46)
movetype = H
ignorehitpause = 1


[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

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

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = SCA
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

[State 5120, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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


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

[state 5150]
type = playsnd
trigger1 = animelem = 1
value = 11,8

[State -2, Explod初期化]
type = Removeexplod
trigger1 = numexplod(1)
ID = 1
ignorehitpause = 1

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

[state 5150]
type = Lifeset
trigger1 = name !="OROCHI G3"
value = 0
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 != "OROCHI G3"
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 != "OROCHI G3"
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 != "OROCHI G3"
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 != "OROCHI G3"
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 = !(enemynear,name = "W-Reimu"&&enemy,palno=12&&palno=12)
trigger1 = NumPartner = 0
trigger1 = enemy,NumPartner = 0
trigger2 = !NumPartner = 0
trigger2 = !enemy,NumPartner = 0
triggerall = roundno != 1
value = 2015
ignorehitpause = 1

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

