;********************************************;******************************
;===========================================================================
;---------------------------------------------------------------------------
[Statedef -3]; 常時監視ステ?ト
;---------------------------------------------------------------------------
;===========================================================================
;***************************************************************************


[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 107 
trigger3 = stateno = 103 
value = 40, 0


[State -3, 2];ジャンプ音
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) <= 0
value = 40, 1

[State -3, 2];ジャンプ音
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) > 1
value = 40, 2

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 105 
value = 105, 0

[State -3, 3];?ッシュの音?め
type = stopSnd
trigger1 = stateno != 100
channel = 1


;?メ?ジ時のエフェクトの消去
[State 1]
type = removeexplod
trigger1 = MoveType = H
ID = 2405

;?メ?ジ時のエフェクトの消去
[State 1]
type = removeexplod
trigger1 = stateno != 0
ID = 22063


;?メ?ジ時のエフェクトの消去
[State 1]
type = removeexplod
trigger1 = MoveType = H
ID = 1000

;ニュ?トラル??ズ以外のエフェクト消去
[State 1]
type = removeexplod
trigger1 = anim != 0
ID = 22123

;[state a];残像消去
;type = afterimagetime
;trigger1 = movetype = H
;time = 0

[State 210, Width];画面?の押し戻し判定
type = Width
trigger1 = 1
edge = 5,0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ハイジャンプ処理
[State -3, 5];ハイジャンプ判定
type = varset
trigger1 = stateno = 10
trigger1 = time = 0
trigger2 = stateno = 100
v = 15
value = 20

[State -3, 5];ハイジャンプ消去
type = varset
trigger1 = stateno = 52
trigger1 = time = 0
v = 15
value = 0

; 小ジャンプ処理
[State -3, 5];小ジャンプ判定
type = varset
trigger1 = stateno = 40
trigger1 = command != "holdup"
v = 16
value = 1

[State -3, 5];小ジャンプ消去
type = varset
trigger1 = stateno = 40
trigger1 = command = "holdup"
v = 16
value = 0

[State -3, 5]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 42
trigger1 = time = 1
trigger1 = var(15) >= 1
x = 5
;y = -9

[State -3, 5]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 43
trigger1 = time = 1
trigger1 = var(15) >= 1
x = -5
;y = -9

[State -3, 5];小ジャンプ
type = veladd
trigger1 = stateno = 50
trigger1 = time = 1
trigger1 = var(16) = 1
y = 3

[State -3] 
type = varset 
trigger1 = 1 
var(3) = gametime 

;---------------------------------------------------------------------------
; HITG_SHAKE
;---------------------------------------------------------------------------

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

[state 5000]
type = destroyself
trigger1 = ishelper

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

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

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

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

[State 5000]
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5000]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 5001

[State 5000]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

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

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

[State 5000]
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= H
physics = S

[state 5001]
type = destroyself
trigger1 = ishelper

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

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

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

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

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

[State 5001]
type = ChangeState
trigger1 = HitOver
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HITC_SHAKE
;---------------------------------------------------------------------------

[Statedef 5010]
type    = C
movetype= H
physics = N
velset = 0,0

[state 5010]
type = destroyself
trigger1 = ishelper

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

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

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

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

[State 5010]
type = StateTypeSet
triggerall = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

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

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

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

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

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

;---------------------------------------------------------------------------
; HITC_SLIDE
;---------------------------------------------------------------------------

[Statedef 5011]
type    = C
movetype= H
physics = C

[state 5011]
type = destroyself
trigger1 = ishelper

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

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

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

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

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

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

;---------------------------------------------------------------------------
; HITA_SHAKE
;---------------------------------------------------------------------------

[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

[state 5020]
type = destroyself
trigger1 = ishelper

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

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

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

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

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

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

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

[State 5020]
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
;---------------------------------------------------------------------------

[Statedef 5030]
type    = A
movetype= H
physics = N
ctrl = 0

[state 5030]
type = destroyself
trigger1 = ishelper

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

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

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

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

[State 5030]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
;---------------------------------------------------------------------------

[Statedef 5035]
type    = A
movetype= H
physics = N

[state 5035]
type = destroyself
trigger1 = ishelper

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

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

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

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

;---------------------------------------------------------------------------
; HITA_RECOV
;---------------------------------------------------------------------------

[Statedef 5040]
type    = A
movetype= H
physics = N

[state 5040]
type = destroyself
trigger1 = ishelper

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

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

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

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

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

[State 5040]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
; HITA_FALL
;---------------------------------------------------------------------------

[Statedef 5050]
type    = A
movetype= H
physics = N

[state 5050]
type = destroyself
trigger1 = ishelper

[State 5050]
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 5050]
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]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

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

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

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

;---------------------------------------------------------------------------
; HIT_TRIP (shaking)
;---------------------------------------------------------------------------

[Statedef 5070]
type    = A
movetype= H
physics = N
velset = 0,0

[state 5070]
type = destroyself
trigger1 = ishelper

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

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

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

;---------------------------------------------------------------------------
; HIT_TRIP2
;---------------------------------------------------------------------------

[Statedef 5071]
type    = A
movetype= H
physics = N

[state 5071]
type = destroyself
trigger1 = ishelper

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

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

[State 5071]
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HITL_SHAKE
;---------------------------------------------------------------------------

[Statedef 5080]
type    = L
movetype= H
physics = N
velset = 0,0

[state 5080]
type = destroyself
trigger1 = ishelper

[State 5080]
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)

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

[State 5080]
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080]
type = ChangeAnim
trigger1 = 1
value = sysvar(2)

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

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

;---------------------------------------------------------------------------
; HITL_SLIDE
;---------------------------------------------------------------------------

[Statedef 5081]
type    = L
movetype= H
physics = C

[state 5081]
type = destroyself
trigger1 = ishelper

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

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

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

[State 5081]
type = ChangeState
trigger1 = HitOver
value = 5110

;---------------------------------------------------------------------------
; HIT_BOUNCE
;---------------------------------------------------------------------------

[Statedef 5100]
type    = L
movetype= H
physics = N

[state 5100]
type = destroyself
trigger1 = ishelper

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

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

[State 5100]
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

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

[State 5100]
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

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

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

[State 5100]
type = VelMul
trigger1 = Time = 0
x = 0.75

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

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

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

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

[State 5100]
type = PosFreeze
trigger1 = 1

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

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

;---------------------------------------------------------------------------
; HIT_BOUNCE
;---------------------------------------------------------------------------

[Statedef 5101]
type    = L
movetype= H
physics = N

[state 5101]
type = destroyself
trigger1 = ishelper

[State 5101]
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101]
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101]
type = HitFallVel
trigger1 = Time = 0

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

[State 5101]
type = VelAdd
trigger1 = 1
y = .4

[State 5101]
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HIT_LIEDOWN
;---------------------------------------------------------------------------

[Statedef 5110]
type    = L
movetype= H
physics = N

[state 5110]
type = destroyself
trigger1 = ishelper

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

[State 5110]
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

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

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

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

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

[State 5110]
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]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110]
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
value = 5110 + (anim % 10)

[State 5110]
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
value = 5110

[State 5110]
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
trigger3 = Anim = [5110,5119]
value = 5150

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

[State 5110]
type = VelMul
trigger1 = 1
x = 0.85

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

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

;---------------------------------------------------------------------------
; HIT_GETUP
;---------------------------------------------------------------------------

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

[state 5120]
type = destroyself
trigger1 = ishelper

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

[State 5120]
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

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

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

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

[State 5120]
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 5120]
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

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

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 13121]
type = lifeset
trigger1 = prevstateno = 104010 && !alive
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
trigger1 = prevstateno = 104010 && !alive
ignorehitpause = 1
value = 0

[state a]
type = destroyself
trigger1 = ishelper

[State 5150, 1]
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4]
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 6]
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7]
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

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

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

[Statedef 169992]
type    = S
physics = S
anim = 22181

[State 169992]
type = BindToroot
trigger1 = 1

[State 169992]
type = PlayerPush
trigger1 = 1
value = 0

[State 169992]
type = PosSet
trigger1 = 1 
X = root, Pos X

[State 3874]
type = nothitby
trigger1 =ishelper
value = SCA
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 3874]
type = hitby
trigger1 =ishelper
value = C,NP
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 2]
type = destroyself
trigger1 = root,stateno != 22050 || roundstate >= 3 || time>=50
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

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

[Statedef 169993]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22060
ownpal = 1

[State 169993]
type = BindToroot
trigger1 = 1
pos = 0,0

[State 169993]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA, AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,10
numhits = 0
sparkno = -1
hitsound = -1
p2stateno = 169995
getpower = 0

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

[state 169993]
type = destroyself
trigger1 = time >= 1

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

[Statedef 169995]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = 0,0

[State 169995]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0

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

[State 169995]
type = lifeset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 169995]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[state 169995]
type = varset
trigger1 = ishelper && time = 0
v = 2
value = prevstateno

[state 169995]
type = varset
trigger1 = ishelper && time = 0
v = 3
value = anim

[State 169995]
type = ChangeAnim
trigger1 = time = 0 && !ishelper
value = 5070

[state 169995]
type = changestate
trigger1 = IfElse((ishelper),(time>=1),(time>=2))
value = IfElse((ishelper),169994,0)

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

[Statedef 169994]
type    = U
movetype= I
physics = N
sprpriority = 4

[state 169994]
type = null;varset
trigger1 = ishelper&&root,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP
v = 4
value = root,stateno

[state 169994]
type = null;varset
triggerall = ishelper&&time<14
trigger1 =root,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP
v = 5
value = 1

[State 169994]
type = Projectile
trigger1 = time<=1&&enemynear,name="Alsiel Orochi"&&enemynear,fvar(38)!=0&&ishelper
attr = C,NP
projanim = var(3)
projhitanim = -1
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projid = 169994
projremovetime = 100
postype = p2
offset = 0,250
velocity = 0
animtype  = hard
damage    = 0
numhits = 0
getpower = 0,0
givepower = 0,0
hitflag = MAFLPD
guardflag = 
pausetime = 10,10
sparkno = -1
sparkxy = 0,0
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10,-10
air.velocity = -10,-10
fall = 1
air.fall = 1
fall.recover = 0
p1stateno = var(2)
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 169994]
type = Projectile
trigger1 = time>=30&&enemynear,name="Alsiel Orochi"&&enemynear,fvar(38)=1&&ishelper&&root,alive
trigger1 =!(root,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP)
attr = C,NP
projanim = var(3)
projhitanim = -1
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projid = 169994
projremovetime = 100
postype = p2
offset = 0,250
velocity = 0
animtype  = hard
damage    = 0
numhits = 0
getpower = 0,0
givepower = 0,0
hitflag = MAFLPD
guardflag = 
pausetime = 10,10
sparkno = -1
sparkxy = 0,0
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10,-10
air.velocity = -10,-10
fall = 1
air.fall = 1
fall.recover = 0
p1stateno = 40
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 169994]
type = Projectile
trigger1 =enemynear,time>=146&&enemynear,name="Alsiel Orochi"&&enemynear,fvar(38)=2&&ishelper&&root,alive
trigger1 =!(root,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT,AA,AT,AP)&&(root,stateno!=[40,52])
trigger1 =numprojid(169994)=0
attr = C,NP
projanim = var(3)
projhitanim = -1
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projid = 169994
projremovetime = 100
postype = p2
offset = 0,250
velocity = 0
animtype  = hard
damage    = 0
numhits = 0
getpower = 0,0
givepower = 0,0
hitflag = MAFLPD
guardflag = 
pausetime = 10,10
sparkno = -1
sparkxy = 0,0
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10,-10
air.velocity = -10,-10
fall = 1
air.fall = 1
fall.recover = 0
p1stateno = (enemynear,time>=148)*40
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 169994]
type = null;Projectile
trigger1 = ishelper&&roundstate<=2&&time<=10
projanim = 0
projremove = 1
projremovetime = 1
projpriority = 1
projsprpriority = 1
projid = var(4)
attr = S,NA
offset = 0,2500
hitflag = M
SuperMoveTime = 9999999
PauseMoveTime = 9999999

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

[State 169994]
type = PosSet
trigger1 = ishelper
Y = 2400

[State 169994]
type = ChangeState
trigger1 = !ishelper
value = 0

[State 169994]
type = destroyself
trigger1 = roundstate!=2||root,alive=0||enemynear,name="Alsiel Orochi"&&enemynear,stateno!=22050&&enemynear,fvar(38)=2
trigger2 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(38)=1&&time>=30

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

[Statedef 2229900]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = 0,0

[State 2229900]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0

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

[State 2229900]
type = PosSet
trigger1 = ishelper
Y = 2400

[State 2229900]
type = ChangeAnim
trigger1 = time=0&&!ishelper
value = 5070

[State 2229900]
type = Projectile
trigger1 = ishelper&&roundstate<=2&&time<=2
projanim = 0
projremove = 1
projremovetime = 1
projpriority = 1
projsprpriority = 1
projid = 96968484321
attr = S,NA
offset = 0,2500
hitflag = M
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 2229900]
type = null;helper
trigger1 = numhelper(96968484321)=0&&roundstate<=2&&time=0
id = 96968484321
persistent = 1
name = "flag"
pos = 0,0
postype = P1
stateno = 2229901
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[state 2229900]
type = changestate
trigger1 = IfElse((ishelper),enemynear,name="Alsiel Orochi"&&(enemynear,stateno=22050),(time>=1))
value = IfElse((ishelper),169994,13120)

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

[Statedef 2229901]
type    = A
movetype= I
physics = N
sprpriority = 4
velset = 0,0

[State 2229901]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0

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

[State 2229901]
type = PosSet
trigger1 = 1
Y = 2500

[State 2229901]
type = ChangeAnim
trigger1 = time=0
value = 0

[state 2229901]
type = destroyself
trigger1 =roundstate!=2||root,alive=0
trigger2 =enemynear,name="Alsiel Orochi"&&enemynear,stateno=22100

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

[Statedef 2229902]
type    = A
movetype= I
physics = N
sprpriority = 4
velset = 0,0

[State 2229902]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0

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

[State 2229902]
type = PosSet
trigger1 = 1
Y = 2500

[State 2229902]
type = powerset
trigger1 = 1
value = 0
ignorehitpause = 1

[State 2229902]
type = parentVarset
triggerall = time = 0
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1
trigger1 = (ishelper(1120)||ishelper(2000)||ishelper(2222))
trigger1 = root,var(46)>=1&&root,palno=12
var(42) = 2000

[State 2229902]
type = parentVaradd
triggerall = time >= 1
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1
trigger1 = (ishelper(1120)||ishelper(2000)||ishelper(2222))
trigger1 = root,var(46)>=1&&root,palno=12
trigger1 = (GameTime%10) = 1
var(47) = 1

[State 2229902]
type = ChangeAnim
trigger1 = time=0
value = 0

[state 2229902]
type = destroyself
trigger1 =roundstate!=2||root,alive=0

;---------------------------------------------------------------------------
;ワイヤ??メ?ジ
;---------------------------------------------------------------------------

[Statedef 10210];相手
type    = A
movetype= H
physics = N
velset = 0,0;-13,-.5

[State 13121]
type = lifeset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(4) = 0
IgnoreHitPause = 1

[State 1021,0]
type = turn
Trigger1 = frontedgedist <= 0
value = 1

[State 1021,0]
type = velset
trigger1 = time = 1
x = -13
y = -.6

[State 840, 2]
type = afterimage
trigger1 = time = 5
time = 13
length = 3
PalBright   =   0,  0,  0
PalContrast = 0,0,0
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 2
ignorehitpause = 1

[State 9000, 1]
type = ScreenBound
trigger1 = 1
movecamera = 1,0

[State 821, 1]
type = VelAdd
Trigger1 = time > 4
y = .14

[State 820, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 5010

[state 190]
type = changestate
Trigger1 = backedgedist <= 0
Trigger2 = frontedgedist <= 0
value = 10220

[Statedef 10220];相手2
type    = A
movetype= H
physics = N
velset = 3.5,-8.2

[State 820, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 5030

[State 9000, 1]
type = null;ScreenBound
trigger1 = 1
movecamera = 1,0

[State 9000, 1]
type = turn
trigger1 = time = 0
value = 1

[State 821, 1]
type = VelAdd
Trigger1 = time > 3
y = .5
x = .05

[State 821, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

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

[Statedef 13121]
type    = A
poweradd = 0
ctrl = 0
velset = 0,0
sprpriority = -1
movetype = H

[State 13121]
type = lifeadd
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.1 * Const(data.life)))
absolute = 1

[State 13121]
type = lifeset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(4) = 0
IgnoreHitPause = 1

[State 1]
type = changestate
triggerall = time = 0
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1
trigger1 = (ishelper(1120)||ishelper(2000)||ishelper(2222))
trigger1 = root,var(46)>=1&&root,palno=12
value = 2229902

[State 1]
type = statetypeset
trigger1 = time = 0
trigger1 = pos y = 0
value = S

[State 812,4]
type = changeanim
trigger1 =!ishelper
trigger1 = selfanimexist(anim)
value = anim
elem = animelemno(-1)

[state 1]
type = varset
trigger1 = ishelper&&time=0&&enemynear,name="Alsiel Orochi"&&enemynear,fvar(38)=2
v = 2
value = prevstateno

[state 1]
type = varset
trigger1 = ishelper&&time=0&&enemynear,name="Alsiel Orochi"&&enemynear,fvar(38)=2
v = 3
value = anim

[state 1]
type = destroyself
trigger1 = ishelper&&time>=1&&enemynear,name="Alsiel Orochi"&&enemynear,fvar(19)!=0&&enemynear,fvar(38)=2
trigger2 = ishelper&&time>=1&&enemynear,name="Alsiel Orochi"&&enemynear,fvar(38)=1
trigger3 = ishelper&&time>=5

[state 1]
type = changestate
trigger1 = ishelper&&time>=1&&enemynear,name="Alsiel Orochi"&&enemynear,fvar(19)!=1&&enemynear,fvar(38)=2
value = 2229900

[State 1]
type = changestate
trigger1 = time >=1&&!ishelper
value = 10380

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

[Statedef 13120]
type    = A
poweradd = 0
ctrl = 0
velset = 0,0
sprpriority = -1
movetype = H

[state 1]
type = destroyself
trigger1 = ishelper

[State 1]
type = PalFX
trigger1 = time = 0
time = 3
color = 0
add = 0,0,0
ignorehitpause = 1

[State 1]
type = PalFX
trigger1 = time = 3
time = 3
color = 0
add = 40,40,40
ignorehitpause = 1

[State 1]
type = PalFX
trigger1 = time = 5
time = 3
color = 0
add = 60,60,60
ignorehitpause = 1

[State 1]
type = statetypeset
trigger1 = time = 0
trigger1 = pos y = 0
value = S

[State 1]
type = PalFX
trigger1 = time >= 7
trigger1 = Time < 100
time = 2
color = 0
add = 35,35,35
ignorehitpause = 1

[State 812,4]
type = changeanim
trigger1 = selfanimexist(anim)
value = anim
elem = animelemno(-1)

[State 4000, PalFX]
type = PalFX
trigger1 = Time % 3 = 0
trigger1 = Time >= 100
time = 1
color = 0
add = 35,35,35
ignorehitpause = 1

[State 103]
type = changestate
trigger1 = time = 120
value = 10380

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

[Statedef 10380]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = -4,-6

[state a]
type = destroyself
trigger1 = ishelper

[State 13121]
type = lifeset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 5050, 1]
type = ChangeAnim
trigger1 = time=0
value = 5070

[State 821, 1]
type = VelAdd
Trigger1 = time > 0
y = .39

[State 821, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

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

[Statedef 104010]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = 0,80

[State a] 
type = Afterimage
trigger1 = 1
trans = add
PalContrast =  0, 0, 0
PalBright = 0,0,0
time    =  0

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

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

[state a]
type = destroyself
trigger1 = ishelper

[State 13121]
type = lifeset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 5050, 1]
type = ChangeAnim
trigger1 = time = 0
value = 5070

[State 821, 1]
type = VelAdd
Trigger1 = time > 0
y = .39

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5150

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; ?れ
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

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

[State 13121]
type = lifeadd
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.01 * Const(data.life)))
absolute = 1

[State 13121]
type = lifeset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = lifeadd
trigger1 = life <= (Ceil(0.05 * Const(data.life)))
value = -9999999
absolute = 1

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(4) = 0
IgnoreHitPause = 1

[state a]
type = destroyself
trigger1 = ishelper

[State 9000, 1]
type = ScreenBound
trigger1 = stateno = 2999
trigger1 = 1
movecamera = 0,0

[State 9000, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

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

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

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

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

[State 9000, FFB Hard]
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 9000, 1]
type = ScreenBound
trigger1 = stateno = 2999
trigger1 = 1
movecamera = 0,0

[State 9001, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

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

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

[State 9000, 1]
type = ScreenBound
trigger1 = stateno = 2999
trigger1 = 1
movecamera = 0,0

[State 9010, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

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

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

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

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

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

[State 9000, 1]
type = ScreenBound
trigger1 = stateno = 2999
trigger1 = 1
movecamera = 0,0

[State 9011, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

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

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

[State 9000, 1]
type = ScreenBound
trigger1 = stateno = 2999
trigger1 = 1
movecamera = 0,0

[State 9020, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

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

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

[State 9020, 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

[Statedef 9030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 9000, 1]
type = ScreenBound
trigger1 = stateno = 2999
trigger1 = 1
movecamera = 0,0


[State 9030, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

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

[State 9000, 1]
type = ScreenBound
trigger1 = stateno = 2999
trigger1 = 1
movecamera = 0,0

[State 9035, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

[State 9035, 4]
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, 5]
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 9000, 1]
type = ScreenBound
trigger1 = stateno = 2999
trigger1 = 1
movecamera = 0,0

[State 9050, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

[State 9050, 2]
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, 3]
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, 4]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

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

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

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

;---------------------------------------------------------------------------
; ?れ2
;---------------------------------------------------------------------------

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

[state a]
type = destroyself
trigger1 = ishelper

[State 13121]
type = lifeadd
trigger1 = time = 0
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,var(5)=1&&!ishelper&&enemynear,numhelper(22121)>=1&&enemynear,palno=12
ignorehitpause = 1
value = -(Ceil(0.0005 * Const(data.life)))
absolute = 1

[State 13121]
type = lifeadd
trigger1 = time = 0
trigger1 = !(enemynear,name="Alsiel Orochi"&&enemynear,var(5)=1&&!ishelper&&enemynear,numhelper(22121)>=1&&enemynear,palno=12)
ignorehitpause = 1
value = -(Ceil(0.01 * Const(data.life)))
absolute = 1

[State 13121]
type = lifeset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Alsiel Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = lifeadd
trigger1 = life <= (Ceil(0.05 * Const(data.life)))
value = -9999999
absolute = 1

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(4) = 0
IgnoreHitPause = 1

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

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

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

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

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

[State 9000, 7]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 19001

[State 9000, 8]
type = ChangeState
trigger1 = HitShakeOver
value = 19030

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

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

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

[Statedef 19001]
type    = S
movetype= H
physics = S

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

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

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

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

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

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

[Statedef 19010]
type    = C
movetype= H
physics = N
velset = 0,0


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

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

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

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

[State 9010, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 19011

[State 9010, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 19030

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

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

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

[Statedef 19011]
type    = C
movetype= H
physics = C

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

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

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

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

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

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

[Statedef 19020]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

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

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

[State 9020, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 19030

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

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

[State 9020, 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

[Statedef 19030]
type    = A
movetype= H
physics = N
ctrl = 0


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

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

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

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

[State 9030, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 19035

[Statedef 19035]
type    = A
movetype= H
physics = N

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

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

[State 9035, 4]
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, 5]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = AnimTime = 0
trigger3 = Vel Y > 0
trigger3 = Pos Y >= 10
trigger4 = Time = 0
trigger4 = Anim != 5035.
value = 19050

[Statedef 19050]
type    = A
movetype= H
physics = N

[State 9050, 2]
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, 3]
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, 4]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

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

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

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

;---------------------------------------------------------------------------
; ?れ3
;---------------------------------------------------------------------------

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

[state a]
type = destroyself
trigger1 = ishelper

[State 1]
type = lifeadd
trigger1 = 1
value = -9999999999
absolute = 1

[State 1]
type = lifeset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 1]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Alsiel Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Alsiel Orochi"
sysvar(4) = 0
IgnoreHitPause = 1

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

[State 9000, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

[State 9000, 7]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 49001

[State 9000, 8]
type = ChangeState
trigger1 = HitShakeOver
value = 49030

[state a]
type = Changestate
trigger1 = !alive
value = 104010

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

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

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

[Statedef 49001]
type    = S
movetype= H
physics = S

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

[State 9001, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

[state a]
type = Changestate
trigger1 = !alive
value = 104010

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

[Statedef 49010]
type    = C
movetype= H
physics = N
velset = 0,0

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

[State 9010, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

[State 9010, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 49011

[State 9010, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 49030

[state a]
type = Changestate
trigger1 = !alive
value = 104010

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

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

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

[Statedef 49011]
type    = C
movetype= H
physics = C

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

[State 9011, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

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

[state a]
type = Changestate
trigger1 = !alive
value = 104010

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

[Statedef 49020]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 9020, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

[State 9020, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 49030

[state a]
type = Changestate
trigger1 = !alive
value = 104010

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

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

[State 9020, 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

[Statedef 49030]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 9030, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

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

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

[State 9030, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 49035

[state a]
type = Changestate
trigger1 = !alive
value = 104010

[Statedef 49035]
type    = A
movetype= H
physics = N

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

[State 9035, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

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

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

[State 9035, 4]
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, 5]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = AnimTime = 0
trigger3 = Vel Y > 0
trigger3 = Pos Y >= 10
trigger4 = Time = 0
trigger4 = Anim != 5035.
value = 49050

[state a]
type = Changestate
trigger1 = !alive
value = 104010

[Statedef 49050]
type    = A
movetype= H
physics = N

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

[State 9050, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

[State 9050, 2]
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, 3]
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, 4]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

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

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

[state a]
type = Changestate
trigger1 = !alive
value = 104010

[State 9050, 7]
type = ChangeState
triggerall = alive = 1
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 15100

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

;---------------------------------------------------------------------------
; ?ウン
;---------------------------------------------------------------------------

[Statedef 15100]
type    = L
movetype= H
physics = N

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

[State 1020, 4];画面シェイク
type = EnvShake
trigger1 = time = 0
time = 6
ampl = -6
freq = 95
phase = 95

[State 106, 3]
type = MakeDust
trigger1 = Time = 0
pos = -5,-2
spacing = 1

[State 106, 3]
type = MakeDust
trigger1 = Time = 5
pos = -5,-2
spacing = 1

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
trigger1 = time = 0
value = 5100

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
trigger1 = time = 5
value = 5110

[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.002

[State 5100, 7]
type = SelfState
trigger1 = Time >= 110
value = 5120 

;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
;変数記憶ヘルパ?用
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

[State -3] 
type = varset 
trigger1 = 1 
v = 24
value = gametime 
ignorehitpause = 1
superMoveTime = 999999999
pauseMoveTime = 999999999

[state -3];舞のヤツ
type = varset
trigger1 = 1
var(58) = gametime+1000
ignorehitpause = 1
supermovetime = 999999999
pausemovetime = 999999999

[State -3];変数記憶ヘルパ?用
type = varset 
trigger1 = 1 
v = 1
value = gametime 
ignorehitpause = 1
superMoveTime = 999999999
pauseMoveTime = 999999999

[State -3];ヘルパ?保護
type = varset 
trigger1 = 1 
var(36) = gametime 

[State -3];ステ?ト抜け用
type = varset 
trigger1 = 1 
v = 40
value = gametime 
ignorehitpause = 1
superMoveTime = 999999999999999
pauseMoveTime = 999999999999999

[State -3];超即?用
type = VarSet
trigger1 = 1
v = 42
value = GameTime
ignorehitpause = 1
supermovetime = 3600
pausemovetime = 3600
