;------------------------------------------------------------
;パイルドライバー　相手
[Statedef 8300]
type     = S
movetype = H
physics  = N
velset   = 0,0
ctrl     = 0
sprpriority = 2

[State 1102]
Type = ChangeAnim2
Trigger1 = Time = 0
Value = 4771

[State 1102]
Type = ScreenBound
Trigger1 = 1
Value = 0

[State 1101]
Type = Velset
Trigger1 = 1
y = 0
x = 0

;-------------------------------------------------
[StateDef 1512];スクリューパイルドライバられる相手解放
Type = A
MoveType = H
Physics = N
SprPriority = -1

[State 1103]
Type = ChangeAnim2
Trigger1 = Time = 0
Value = 5100

[State 1103]
Type = null;HitVelSet
Trigger1 = Time = 0
X = 1
Y = 1

[State 1103]
Type = Velset
Trigger1 = time = 0
Y = -4
X = -1

[State 1103]
Type = LifeAdd
Trigger1 = Time = 0 
Value = -200

[State 1103]
Type = SelfState
Trigger1 = time >=4
Value = 5050
;------------------------------------------------------------
;投げ1
[Statedef 3850]
type     = S
movetype = H
physics  = N
velset   = 0,0
anim     = 5030;5110
ctrl     = 0
sprpriority = 2

[State 1000, 0]
type = posset
trigger1 = time = 0
y = 0

[State 0]
type = selfState
triggerall = !ishelper
trigger1 = time >= 30 ||!alive
value = 5050;10203
ignorehitpause = 1

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

;パニッシュ　やられ
[Statedef 6124]
type     = S
movetype = H
physics  = N
ctrl     = 0
velset = 0,0

[State 1]
type = ChangeAnim
trigger1 = 1
value = 5010
ignorehitpause = 1

[State 1]
type = posset
trigger1 = pos y >0
y = -1

[State 1]
type = posadd
trigger1 = BackEdgeBodyDist <5
x = 1

[State 0]
type = SelfState
triggerall = !ishelper
trigger1 = !alive
trigger2 = time >=100
value = 5050
ignorehitpause = 1

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

;ローラー敵ステート
[Statedef 8209]
type     = U
movetype = H
physics  = N
ctrl     = 0
velset = 0,0

[State 1000, 0]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 1]
type = ChangeAnim
trigger1 = anim!=5150
value = 5150
ignorehitpause = 1

[State 1000, 0]
type = null;PosSet
trigger1 = time = 0
y = 0
x = enemy,pos x

[State 1000, 0]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT


[State 0]
type = SelfState
triggerall = !ishelper
trigger1 = time >=300
value = 5050
ignorehitpause = 1
;---------------------------------------------------------------------
;---------------------------------------------------------------------------
;壁ヒット1
[Statedef 8888555]
type = A
movetype = H
physics = N

[State 1]
type = ChangeAnim
trigger1 = time = 0
value = 5005
ignorehitpause = 1

[State 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1000, 0]
type = Turn
trigger1 = facing !=enemy,facing

[State 1]
type = VelSet
trigger1 = facing=1
x = 11.5
y = 0

[State 1]
type = VelSet
trigger1 = facing =-1
x = 11.5
y = 0

[State 1]
type = ChangeState
trigger1 = BackEdgeBodyDist< 1 || frontEdgeBodyDist < 1
trigger2 = time >=100 ;バグ対策
value = 8898

;---------------------------------------------------------------------------
;壁ヒット2
[Statedef 8898]
type = A
movetype = H
physics = N
velset = 0,0

[State 1]
type = PosAdd
trigger1 = Time < 2
x = 0

[State 1]
type = ChangeAnim
trigger1 = Time = 0
value = 5012

[State 1]
type = ChangeAnim
trigger1 = Time < 2
value = anim

[State 1]
type = ChangeAnim
trigger1 = time = 2
trigger1 = SelfAnimExist(5051)
value = 5051

[State 1]
type = ChangeAnim
trigger1 = time = 2
trigger1 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5050
persistent = 0

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

[State 1]
type = EnvShake
trigger1 = time = 0
time = 20

[State 1]
type = EnvShake
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 10

[State 1]
type = turn
trigger1 = backedgebodydist <= 0
trigger1 = time = 2

[State 1]
type = VelSet
trigger1 = time = 2
x = -3.5
y = -3.3

[State 1]
type = VelAdd
trigger1 = time > 4
y = .33

[State 1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 9199

;---------------------------------------------------------------------------
;壁ヒット3
[Statedef 9199]
type = A
movetype = H
physics = N
velset = 0,0

[State 1000, 0]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 1]
type = ChangeAnim
trigger1 = time = 0
value = 5100

[State 1]
type = ChangeAnim2
trigger1 = anim =5100 && animelem = 2
value = 5110

[State 1]
type = selfState
trigger1 = time = 50 && alive
value = 5120

[State 1]
type = selfState
trigger1 = time = 50 && !alive
value = 5150

;---------------------------------------------------------------------------
;クラッシュタイム　やられ
[Statedef 7100]
type = A
movetype = H
physics = N
velset = 0,0

[State 1]
type = ChangeAnim
trigger1 = time = 0
value = 5030
ignorehitpause= 1

[State 1]
type = selfState
trigger1 = time = 150 && alive
value = 5050

[State 1]
type = selfState
trigger1 = !alive
value = 5050