;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
;
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
[Statedef 10051]
type    = S
movetype= I
physics = S
anim = 1

[State 10051]
type = NotHitBy
trigger1 = time = 0
value = SCA,AA,AT,AP
time = 30+((palno=12)*30)

[State 10051]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 10051]
type = lifeadd
trigger1 = var(29) <= 1 && (var(30)=0||var(30)!=0&&palno!=12)
trigger1 = time = 0
value = -(lifemax*(((life>=0)*0.002)+((life>=lifemax*0.02)*0.004)+((life>=lifemax*0.1)*0.01)+((life>=lifemax*0.2)*0.065)))
absolute = 1

[State 10051]
type = lifeadd
trigger1 = var(29)<=1&&var(30)!=0&&palno=12&&(fvar(28)=[0,2])
trigger1 = time = 0
value = -(lifemax*(((life>=0)*(0.001+(0.001*fvar(28))))+((life>=lifemax*0.02)*(0.002+(0.001*fvar(28))))+((life>=lifemax*0.1)*(0.005+(0.004*fvar(28))))+((life>=lifemax*0.2)*(0.01+(0.045*fvar(28))))))
absolute = 1

[State 10051]
type = lifeadd
trigger1 = var(29)<=1&&var(30)!=0&&palno=12&&(fvar(28)=[1,2])&&enemy,life<enemy,lifemax*0.95
trigger1 = time = 0
value = -(lifemax*(((life>=0)*(0.002+(0.001*fvar(28))))+((life>=lifemax*0.02)*(0.003+(0.001*fvar(28))))+((life>=lifemax*0.1)*(0.004+(0.001*fvar(28))))))
absolute = 1

[State 10051]
type = poweradd
trigger1 = time = 0
value = (50+((palno!=12)*30))+((life<=lifemax*0.2)*(50+((palno!=12)*30)))+((var(29)>=1)*200)+((var(30)!=0&&fvar(28)=0)*150)

[state 10051]
type = varadd
trigger1 =palno=12&&time=0
fv = 26
value = 1

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

[State 10051, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = Time >= GetHitVar(hittime)
x = 0

[State 10051, 3]
type = ChangeState
trigger1 = Time >= 1
value = 0
ctrl = 1

;==========================================================================================
;==========================================================================================
[Statedef 18000]
type = S
movetype= A
physics = S
ctrl = 0
anim = 1888
velset = 0,0

[State 18000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 18000]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 18000, 1]
type = PlaySnd
trigger1 = time = 0
value = 2562,20

[State 18000, 2]
type = Explod
trigger1 = time = 0
anim = 1931
sprpriority = 0
postype = p1
pos = 0,-75
vel = 0,0
bindtime = -1
under = 0
ownpal = 1
PauseMoveTime = 9999999

[state 18000]
type = posset
trigger1 = animtime = 0
x = enemy,pos x

[state 18000]
type = changestate
trigger1 = animtime = 0
value = 18050

;==========================================================================================
;==========================================================================================
[Statedef 18050]
type = S
ctrl = 0
anim = 1889
velset = 0,0

[State 18050, 0]
type = NotHitBy
trigger1 = Time = 0
value = SCA, AA,AT,AP
Time = 15

[State 18050]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 18050, 1]
type = PlaySnd
trigger1 = time = 0
value = 2562,20

[State 18050, 2] 
type = turn 
trigger1 = p2dist x< 0 
value = 1

[State 18050, 3]
type = Explod
trigger1 = time = 0
anim = 1932
sprpriority = 0
postype = p1
pos = 0,-75
vel = 0,0
bindtime = -1
supermove = 0
under = 0
ownpal = 1

[State 18050, 4]
type = Explod
trigger1 = time = 0
anim = 22068
sprpriority = 0
postype = p1
pos = 40,0
vel = 0,0
bindtime = -1
under = 0
ownpal = 1
PauseMoveTime = 9999999

[state 18050]
type = posset
trigger1 = time = 0
y = 0

[state 18050]
type = posadd
trigger1 = time = 0
x = 25

[state 18050]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;==========================================================================================
;==========================================================================================
[Statedef 38853]
type    = A
movetype= I
physics = N

[State 38853]
type = NotHitBy
trigger1 = time = 0
value = SCA,AA,AT,AP
time = 30+((palno=12)*30)

[State 38853]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 38853]
type = lifeadd
trigger1 = var(29) <= 1 && (var(30)=0||var(30)!=0&&palno!=12)
trigger1 = time = 0
value = -(lifemax*(((life>=0)*0.002)+((life>=lifemax*0.02)*0.004)+((life>=lifemax*0.1)*0.01)+((life>=lifemax*0.2)*0.065)))
absolute = 1

[State 38853]
type = lifeadd
trigger1 = var(29)<=1&&var(30)!=0&&palno=12&&(fvar(28)=[0,2])
trigger1 = time = 0
value = -(lifemax*(((life>=0)*(0.001+(0.001*fvar(28))))+((life>=lifemax*0.02)*(0.002+(0.001*fvar(28))))+((life>=lifemax*0.1)*(0.005+(0.004*fvar(28))))+((life>=lifemax*0.2)*(0.01+(0.045*fvar(28))))))
absolute = 1

[State 38853]
type = lifeadd
trigger1 = var(29)<=1&&var(30)!=0&&palno=12&&(fvar(28)=[1,2])&&enemy,life<enemy,lifemax*0.95
trigger1 = time = 0
value = -(lifemax*(((life>=0)*(0.002+(0.001*fvar(28))))+((life>=lifemax*0.02)*(0.003+(0.001*fvar(28))))+((life>=lifemax*0.1)*(0.004+(0.001*fvar(28))))))
absolute = 1

[State 38853]
type = poweradd
trigger1 = time = 0
value = (50+((palno!=12)*30))+((life<=lifemax*0.2)*(50+((palno!=12)*30)))+((var(29)>=1)*200)+((var(30)!=0&&fvar(28)=0)*150)

[state 38853]
type = varadd
trigger1 =palno=12&&time=0
fv = 26
value = 1

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

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

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

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

;==========================================================================================
;==========================================================================================
[Statedef 38852]
type    = A
movetype= I
physics = A

[State 38852]
type = NotHitBy
trigger1 = time = 0
value = SCA,AA,AT,AP
time = 30+((palno=12)*30)

[State 38852]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 38852]
type = lifeadd
trigger1 = var(29) <= 1 && (var(30)=0||var(30)!=0&&palno!=12)
trigger1 = time = 0
value = -(lifemax*(((life>=0)*0.002)+((life>=lifemax*0.02)*0.004)+((life>=lifemax*0.1)*0.01)+((life>=lifemax*0.2)*0.065)))
absolute = 1

[State 38852]
type = lifeadd
trigger1 = var(29)<=1&&var(30)!=0&&palno=12&&(fvar(28)=[0,2])
trigger1 = time = 0
value = -(lifemax*(((life>=0)*(0.001+(0.001*fvar(28))))+((life>=lifemax*0.02)*(0.002+(0.001*fvar(28))))+((life>=lifemax*0.1)*(0.005+(0.004*fvar(28))))+((life>=lifemax*0.2)*(0.01+(0.045*fvar(28))))))
absolute = 1

[State 38852]
type = lifeadd
trigger1 = var(29)<=1&&var(30)!=0&&palno=12&&(fvar(28)=[1,2])&&enemy,life<enemy,lifemax*0.95
trigger1 = time = 0
value = -(lifemax*(((life>=0)*(0.002+(0.001*fvar(28))))+((life>=lifemax*0.02)*(0.003+(0.001*fvar(28))))+((life>=lifemax*0.1)*(0.004+(0.001*fvar(28))))))
absolute = 1

[State 38852]
type = poweradd
trigger1 = time = 0
value = (50+((palno!=12)*30))+((life<=lifemax*0.2)*(50+((palno!=12)*30)))+((var(29)>=1)*200)+((var(30)!=0&&fvar(28)=0)*150)

[state 38852]
type = varadd
trigger1 =palno=12&&time=0
fv = 26
value = 1

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

[State 38852]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 38852]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
;
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
[Statedef 288888]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22132
ownpal = 1

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

[State 288888]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s22133
hitsound = s2562,31
p1stateno = 288889-(power>=powermax*0.5&&(root,var(30)!=1||root,var(30)!=0&&root,fvar(28)=0))
p2stateno = IfElse((root,var(29)>=1),103999,13121)
getpower = (Const(data.power))/8

[state 288888]
type = targetdrop
trigger1 = root,alive=0||roundstate>=3&&enemy,alive=0

[state 288888]
type = null;targetstate
triggerall = root,var(29) >= 1
trigger1 = target,stateno != [103999,104007]
value = 103999

[State 288888]
type = targetLifeAdd
trigger1 = (gametime%10)=1
value = -(enemy,lifemax*(0.004+((enemy,movetype=A)*0.02)))
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 288888]
type = targetLifeAdd
trigger1 = enemy,life<=enemy,lifemax*0.3
value = -9999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

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

[State 288888]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 288888]
type = ChangeState
trigger1 = (root,stateno=2999||root,stateno=2205)
value = 288890+(root,stateno=2205)

;==========================================================================================
;==========================================================================================
[Statedef 288889]
type    = S
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22132
ownpal = 1

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

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

[State 288889]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[state 288889]
type = parentvarset
trigger1 = RoundState <= 2 && root,anim = 0 && root,ctrl = 0 && root,var(54) <= 40
fv = 25
value = 1
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 288889]
type = destroyself
trigger1 = time>=(root,var(54)<=40)

;==========================================================================================
;==========================================================================================
[Statedef 288890]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22177
ownpal = 1

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

[state 288890]
type = varset
trigger1 = numtarget&&target,ishelper=0||root,fvar(20)!=0
v = 10
value = (RoundState<=2)
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[state 288890]
type = varset
trigger1 = root,fvar(38)=2
trigger1 = root,time<150&&enemy,movereversed
trigger2 = root,time>=150
v = 11
value = (root,time<150)
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

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

[State 288890]
type = AttackDist
trigger1 = 1
value = 0

[State 288890]
type = targetpowerAdd
trigger1 = 1
value = -(enemy,Const(data.power))
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 288890]
type = targetLifeAdd
trigger1 = (gametime%(1+((root,time<150)*3)))=1
value = -9999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 288890]
type = targetstate
trigger1 = root,stateno=22050&&root,time>=150
value = 169995
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 288890]
type = targetstate
trigger1 = var(11)!=0&&root,fvar(38)=2
trigger1 = enemy,alive&&root,time<150
value = 169995
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 288890]
type = Projectile
trigger1 = root,palno=12&&root,stateno=22050&&(root,time=[30,170])&&var(10)!=0
trigger1 = (GameTime%6)=1
attr = S, NA
projanim = 22177
projhitanim = -1
projid = 22177
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projremovetime = 2
postype = p1
offset = 0,0
velocity = 0
animtype  = hard
numhits = 0
damage    = 21474836
getpower = 0,0
givepower = -(enemy,Const(data.power))
hitflag = MAFD
guardflag = 
pausetime = 2,1
guard.pausetime = 2,1
sparkno = -1
sparkxy = 40,-74
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -0.2,-0.5
air.velocity = -0.2,-0.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000
ignorehitpause = 1

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

[State 288890]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 288890]
type = ChangeState
trigger1 = !(root,stateno=22050||root,stateno=2999)
value = 288888

;==========================================================================================
;==========================================================================================
[Statedef 288891]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22177
ownpal = 1

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

[State 1]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s22133
hitsound = s2562,31
p2stateno = 2636

[State 1]
type = AttackDist
trigger1 = 1
value = 0

[State 1]
type = targetpowerAdd
trigger1 = 1
value = -(enemy,Const(data.power))
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1]
type = targetLifeAdd
trigger1 = root,stateno=2205&&(root,time=[20,220])
value = -9999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 1]
type = targetstate
trigger1 = root,stateno=2205&&(root,time=[20,220])&&(GameTime%3) = 1
value = 2636
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

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

[State 1]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 1]
type = ChangeState
trigger1 = root,stateno!=2205
value = 288888


;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
;相手状態
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


[Statedef 103999]
type    = A
movetype= I
physics = N
sprpriority = 4
velset = -2,-6

[State 1]
type = lifeadd
triggerall = prevstateno != [19000,19035]
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.1 * Const(data.life)))
absolute = 1

[state a]
type = destroyself
trigger1 = ishelper

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

[State 10385]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

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

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

[State -2]
type = SelfState
trigger1 = time >= 200
value = 0
ctrl = 1

[State 821, 4]
type = changeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 104000

;---------------------------------------------------------------------------
;相手制御
;相手地面
;---------------------------------------------------------------------------

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

[state a]
type = destroyself
trigger1 = ishelper

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

[State ]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

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

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

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

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

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

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

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

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

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

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

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

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

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

[State 10382]
type = PosFreeze
trigger1 = 1

[State -2]
type = SelfState
trigger1 = time >= 300
value = 0
ctrl = 1

[State 10382]
type = ChangeState
trigger1 = AnimTime = 0
value = 104001

;---------------------------------------------------------------------------
;相手地面
;---------------------------------------------------------------------------

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

[state a]
type = destroyself
trigger1 = ishelper

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

[State ]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

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

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

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

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

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

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

[State 10383]
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 104002

;---------------------------------------------------------------------------
;相手地面
;---------------------------------------------------------------------------

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

[state a]
type = destroyself
trigger1 = ishelper

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

[State ]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[State 10384]
type = ChangeState
triggerall = alive
trigger1 = Time >= 30
value = 104004

[State -2]
type = SelfState
trigger1 = time >= 300
value = 0
ctrl = 1

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

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

;---------------------------------------------------------------------------
;相手起き上がり
;---------------------------------------------------------------------------

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

[state a]
type = destroyself
trigger1 = ishelper

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

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

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

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

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

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

[State ]
type=nothitby
triggerall = name = "Gold Orochi"
triggerall= palno = 12
trigger1=1
value=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
value2=sca,na,sa,ha,np,sp,hp,nt,st,ht,aa,ap,at
time=2147483647
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

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

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

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

[State -2]
type = SelfState
trigger1 = time >= 300
value = 0
ctrl = 1

[State 10385]
type = ChangeState
trigger1 = AnimTime = 0
value = 104005
ctrl = 0

;---------------------------------------------------------------------------
; 立ち
;---------------------------------------------------------------------------

[Statedef 104005]
type = S
physics = S
sprpriority = 0
movetype = I
ctrl = 0

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

[state a]
type = destroyself
trigger1 = ishelper

[State 1] 
type = turn 
trigger1 = p2dist x< 0 
value = 1

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

[State a]
type = PalFX
trigger1 = (GameTime%2) = 1
time = 1
add = 100,100,180
ignorehitpause = 1

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

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

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

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

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

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

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 1]
type = lifeset
trigger1 = command = "holdup" || command = "holddown" && Random <= 25
ignorehitpause = 1
value = life - (Ceil((IfElse((command = "holdup"),0.004,1.0)) * Const(data.life)))

[State 1]
type = lifeset
trigger1 = alive
ignorehitpause = 1
value = life - (Ceil(0.002 * Const(data.life)))

[State 1]
type = lifeset
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

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

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

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] 
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

[State 0, 4]
type = ChangeState
triggerall = alive
trigger1 = command = "holdfwd" || command = "holdback"
value = 104006
ctrl = 0

[State 0, 4]
type = selfState
triggerall = alive
trigger1 = time >= 500
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 歩き
;---------------------------------------------------------------------------

[Statedef 104006]
type    = S
physics = N
sprpriority = 0
movetype = I
ctrl = 0

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

[state a]
type = destroyself
trigger1 = ishelper

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

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

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

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

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

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

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

[State a]
type = PalFX
trigger1 = (GameTime%2) = 1
time = 1
add = 100,100,180
ignorehitpause = 1

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 1]
type = lifeset
trigger1 = command = "holdup" || command = "holddown" && Random <= 25
ignorehitpause = 1
value = life - (Ceil((IfElse((command = "holdup"),0.004,1.0)) * Const(data.life)))

[State 1]
type = lifeset
trigger1 = (GameTime%4) = 1
ignorehitpause = 1
value = life - (Ceil(0.001 * Const(data.life)))

[State 1]
type = lifeset
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

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

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21
value = 21

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

[State 0, 4]
type = ChangeState
triggerall = alive
trigger1 = !(command = "holdfwd" || command = "holdback")
value = 104005
ctrl = 0

[State 0, 4]
type = selfState
triggerall = alive
trigger1 = time >= 500
value = 0
ctrl = 1




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

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

[State 169992]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[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 169992]
type = nothitby
trigger1 = ishelper(169992)
value = SCA

[State 169992]
type = helper
trigger1 = numhelper(1699920) = 0 && roundstate <= 2
id = 1699920
persistent = 1
name = "Gold Orochi"
pos = 0,0
postype = P1
stateno = 169992
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 2]
type = destroyself
trigger1 = root,stateno != 22050 || roundstate >= 3; || enemy,numprojid(169994)=0

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

[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 = AssertSpecial
trigger1 = 1
flag = invisible

[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 = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[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 = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[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="Gold Orochi"&&enemynear,fvar(38)!=0&&ishelper
attr = S, NA
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="Gold 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 = S, NA
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="Gold 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 = S, NA
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="Gold Orochi"&&enemynear,stateno!=22050&&enemynear,fvar(38)=2
trigger2 = enemynear,name="Gold 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 = AssertSpecial
trigger1 = ishelper
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[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="Gold 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 = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

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

[state 2229901]
type = destroyself
trigger1 =roundstate!=2||root,alive=0
trigger2 =enemynear,name="Gold 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="Gold 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="Gold 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 = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[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="Gold Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

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

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

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

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

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

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

[State 1]
type = VarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Gold 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 = 255,255,255
;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="Gold Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

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

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

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

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

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

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

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

[State 1]
type = changestate
triggerall = time = 0
trigger1 = enemynear,name="Gold 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 = AssertSpecial
trigger1 = ishelper
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[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="Gold Orochi"&&enemynear,fvar(38)=2
v = 2
value = prevstateno

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

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

[state 1]
type = changestate
trigger1 = ishelper&&time>=1&&enemynear,name="Gold 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="Gold Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Gold 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 1]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[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 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="Gold 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="Gold 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="Gold Orochi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Gold 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="Gold Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Gold Orochi"
value = 0

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

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

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

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

[State 1]
type = VarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Gold 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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12
flag = invisible

[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="Gold Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Gold Orochi"
value = 0

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

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

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

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

[State 1]
type = VarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Gold 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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12
flag = invisible

[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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12
flag = invisible

[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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12
flag = invisible

[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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12
flag = invisible

[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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12
flag = invisible

[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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12
flag = invisible

[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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12
flag = invisible

[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 = AssertSpecial
trigger1 = enemynear,name="Gold Orochi"&&enemynear,palno=12&&(gametime%3)=1
flag = invisible

[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 

