
[Statedef 14200]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 14200]
type = AssertSpecial
trigger1 = time <= 25
flag = invisible

[State 14200]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 14200]
type = ChangeAnim
Trigger1 = Time = 0
value = 5050

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

[State 14200]
type = velset
trigger1 = time = 0
x = 0
y = -60

[State 14200]
type = veladd
trigger1 = 1
y = 1.4

[State 14200]
type = lifeadd
triggerall = Vel Y > 0
trigger1 = Pos Y >= 0
value = -(ceil(0.06*const(data.life)))
ignorehitpause = 1

[State 14200]
type = lifeset
triggerall = vel Y > 0
trigger1 = pos Y >= 0
trigger1 = life <= (Ceil(0.1*Const(data.life)))
ignorehitpause = 1
value = 0

[State 14200]
type = powerset
trigger1 = life <= (Ceil(0.1*Const(data.life)))
ignorehitpause = 1
value = 0

[State 14200]
type = EnvShake
triggerall = Vel Y > 0
trigger1 = Pos Y >= 0
time = 10
ampl = -5
freq = 95
phase = 95

[State 14200]
type = SelfState
triggerall = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

[Statedef 9000]
type    = S
movetype= H
physics = N
velset = 0,0

[State 9000]
type = PalFX
trigger1 = GameTime%2
time = 1
add = 0,0,0
mul = 50,50,50
sinadd = 100,100,100,30
color = 0
invertall = 1

[State 9000]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 9000]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 9000]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype)

[State 9000]
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 9000]
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
value = a

[State 9000]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 9001

[State 9000]
type = ChangeState
trigger1 = HitShakeOver
value = 9030

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

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

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

;-------------------------------------------------------------------------------------------------------
[Statedef 9001]
type    = S
movetype= H
physics = S

[State 9001]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,0,0
mul = 50,50,50
sinadd = 100,100,100,30
color = 0
invertall = 1

[State 9001]
type = HitVelSet
trigger1 = Time = 0
x = 1

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

[State 9001]
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 9001]
type = VelSet
trigger1 = HitOver
x = 0

[State 9001]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 9001]
type = SelfState
trigger1 = HitOver
value = 0
ctrl = 1

;-------------------------------------------------------------------------------------------------------
[Statedef 9010]
type    = C
movetype= H
physics = N
velset = 0,0

[State 9010]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,0,0
mul = 50,50,50
sinadd = 100,100,100,30
color = 0
invertall = 1

[State 9010]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 9010]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 9010]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 9010]
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 9010]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 9011

[State 9010]
type = ChangeState
trigger1 = HitShakeOver
value = 9030

[State 9010]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

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

[State 9010]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;-------------------------------------------------------------------------------------------------------
[Statedef 9011]
type    = C
movetype= H
physics = C

[State 9011]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,0,0
mul = 50,50,50
sinadd = 100,100,100,30
color = 0
invertall = 1

[State 9011]
type = HitVelSet
trigger1 = Time = 0
x = 1

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

[State 9011]
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 9011]
type = VelSet
trigger1 = HitOver
x = 0

[State 9011]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 9011]
type = SelfState
trigger1 = HitOver
value = 11
ctrl = 1

;-------------------------------------------------------------------------------------------------------
[Statedef 9020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 9020]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,0,0
mul = 50,50,50
sinadd = 100,100,100,30
color = 0
invertall = 1

[State 9020]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 9020]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 9020]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype)

[State 9020]
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 9020]
type = ChangeState
trigger1 = HitShakeOver
value = 9030

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

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

[State 9020]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;-------------------------------------------------------------------------------------------------------
[Statedef 9030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 9030]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,0,0
mul = 50,50,50
sinadd = 100,100,100,30
color = 0
invertall = 1

[State 9030]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

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

[State 9030]
type = SelfState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0
trigger2 = Pos Y >= 10
value = 5040

[State 9030]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0
trigger2 = Pos Y >= 10
value = 9050

[State 9030]
type = ChangeState
trigger1 = AnimTime = 0
value = 9035

;-------------------------------------------------------------------------------------------------------
[Statedef 9035]
type    = A
movetype= H
physics = N

[State 9035]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,0,0
mul = 50,50,50
sinadd = 100,100,100,30
color = 0
invertall = 1

[State 9035]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059]
trigger1 = Anim != 5090
value = 5035

[State 9035]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 9035]
type = SelfState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = AnimTime = 0
trigger3 = Vel Y > 0
trigger3 = Pos Y >= 10
trigger4 = Time = 0
trigger4 = Anim != 5035
value = 5040

[State 9035]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = AnimTime = 0
trigger3 = Vel Y > 0
trigger3 = Pos Y >= 10
trigger4 = Time = 0
trigger4 = Anim != 5035.
value = 9050

;-------------------------------------------------------------------------------------------------------
[Statedef 9050]
type    = A
movetype= H
physics = N

[State 9050]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,0,0
mul = 50,50,50
sinadd = 100,100,100,30
color = 0
invertall = 1

[State 9050]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090
value = 5050

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

[State 9050]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 9050]
type = SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

[State 9050]
type = SelfState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

[State 9050]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100


