
;---------------------------------------------------------------------------
;投げられている相手1
;---------------------------------------------------------------------------

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

[State 1009]
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 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 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 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 2010

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

;---------------------------------------------------------------------------
;投げられている相手2
;---------------------------------------------------------------------------

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

[State 1009]
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 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 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 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 2011

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

;---------------------------------------------------------------------------
;投げられている相手3
;---------------------------------------------------------------------------

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

[State 1009]
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 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 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 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 2012

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

;---------------------------------------------------------------------------
;投げられている相手4
;---------------------------------------------------------------------------

[Statedef 2013]
type    = A
movetype= H
physics = N
velset = -7,-7

[State 1009]
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 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 820, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 5050

[State 820, 1]
type = ChangeAnim
Trigger1 = Time = 0
trigger1 = animexist(5052) = 1
value = 5052

[State 821, 1]
type = VelAdd
Trigger1 = 1
y = .3

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

[State 820, 1]
type = ChangeAnim
Trigger1 = Time = 15
trigger1 = animexist(5061) = 1
value = 5061

[State 820, 1]
type = ChangeAnim
Trigger1 = Time = 15
trigger1 = animexist(5062) = 1
value = 5062

[State 13121]
type = lifeadd
trigger1 = life <= 50
value = -9999999
absolute = 1

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

;---------------------------------------------------------------------------
; びーむ
;---------------------------------------------------------------------------

[Statedef 22075]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
poweradd= -1000
anim = 22075
ctrl = 0

[State 1009]
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 22075]
type = NotHitBy 
trigger1 = 1
value = SCA

[State 22075]
type = SuperPause
trigger1 = time = 0
time = 42
movetime = 42
anim = -1

[State 22075]
type = Explod
trigger1 = time = 10
anim = 22171
sprpriority = -4
postype = p1
pos = 1,-129
bindtime = -1
supermove = 1
under = 0
ownpal = 1

[State 22075]
type = Explod
trigger1 = time = 0
anim = 22169
sprpriority = -3
postype = p1
pos = 1,-129
bindtime = -1
supermove = 1
under = 0
ownpal = 1

[State 22075]
type = Explod
trigger1 = Time = 0
anim = 22170
sprpriority = 20
postype = p1
pos = 1,-129
bindtime = 1
supermove = 1
under = 0
ownpal = 1

[State 22075]
type = EnvColor
trigger1 = time = 0
persistent = 0
ignorehitpause = 1
time = 1
value = 255,255,255
under = 2

[State 22075]
type = EnvColor
trigger1 = time = 1
persistent = 0
ignorehitpause = 1
time = 50
value = 0,0,0
under = 2

[State 22075]
type = PlaySnd
trigger1 = Time = 2
value = 2562,2

[State 22075]
type = PlaySnd
trigger1 = Time = 1
value = 3000,3

[State 22075]
type = AssertSpecial
trigger1 = 1
flag= noBG
flag2= nobardisplay

[state 22075]
type = changestate
trigger1 = animtime = 0
value = 22076

;---------------------------------------------------------------------------
; 攻撃
;---------------------------------------------------------------------------

[Statedef 22076]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 0
anim = 22076
ctrl = 0

[State 1009]
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 22076]
type = AssertSpecial
trigger1 = 1
flag= noBG
flag2= noFG
flag3= nobardisplay

[State 22076]
type = EnvShake
trigger1 = (GameTime%3) = 1
time = 5
ampl = -3
freq = 95
phase = 95

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

[State 22076]
type = PlaySnd
trigger1 = animelem = 1
value = 2550, 0

[State 22076]
type = PlaySnd
trigger1 = animelem = 1
value = 2562, 24

[State 22076]
type = PlaySnd
trigger1 = animelem = 1
value = 2562, 25
volume = 150

[State 22076]
type = PlaySnd
trigger1 = animelem = 1
value = 2562, 17
volume = 150

[State 22076]
type = Projectile
triggerall = time <= 140
trigger1 = (GameTime%3) = 1
attr = S, HA
projanim = 22079
projhitanim = -1
projid = 22079
projpriority = 999999999
projsprpriority = 999999999
projremove = 1
projremovetime = 5
postype = p1
offset = 15,-85
velocity = 0
animtype  = diagup
damage  = Ceil((0.004+((palno=12)*0.01))*enemy,Const(data.life)),Ceil(0.0033 * enemy,Const(data.life))
getpower = 0,0
givepower = 0,0
guardflag = M
hitflag = MAFD
pausetime = 2,4
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6,-6.5
air.velocity = -6,-6.8
fall = 1
fall.recover = 0
juggle = 15
p2stateno = 220760

[state 22076]
type = targetstate
trigger1 = palno=12&&time<=140
trigger1 = (GameTime%3) = 1
trigger1 = !(enemy,moveguarded||(enemy,stateno=[120,155]))
value = 220760

[State 22076]
type = Explod
trigger1 = animelem = 1
anim = 22080
id = 211
sprpriority = 5
postype = p1
pos = 40,-85
bindtime = -1
removetime = 150
supermove = 0
under = 0
ownpal = 1

[State 22076]
type = Explod
trigger1 = animelem = 1
anim = 22074
id = 211
sprpriority = 99
postype = p1
pos = 15,-85
bindtime = -1
removetime = 150
supermove = 0
under = 0
ownpal = 1

[State 22076]
type = Explod
trigger1 = animelem = 1
anim = 22090
id = 211
sprpriority = 99
postype = p1
pos = 30,-85
bindtime = -1
removetime = 150
supermove = 0
under = 0
ownpal = 1

[State 22076]
type = Explod
trigger1 = animelem = 1
anim = 22081
sprpriority = 0
postype = p1
pos = 25,0
vel = 0,0
bindtime = -1
removetime = 150
supermove = 0
under = 0
ownpal = 1

[State 22076]
type = Explod
triggerall = time >= 0
trigger1 = (GameTime%2) = 1
anim = 22131
sprpriority = 10
postype = p1
pos = 0,var(53)
bindtime = 1
under = 0
ownpal = 1
persistent = 1
ignorehitpause = 1
vel = 8,-2 + (random%5)
SuperMoveTime = 9999
PauseMoveTime = 9999

[State 22076]
type = Explod
trigger1 = palno=12
trigger1 = target,stateno = 220760 && enemyNear,time = 0 || projhit22079 = 1
anim = 22109+var(35)
sprpriority = 120
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
facing = -1
ownpal = 1
ontop = 1

[State 22076]
type = HitAdd
trigger1 = palno=12
trigger1 = target,stateno = 220760 && enemyNear,time = 0
value = 1

[State 22076]
type = Envcolor
trigger1 = palno=12
trigger1 = target,stateno = 220760 && enemyNear,time = 0
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 5
supermove = 1

[state 22076]
type = changestate
trigger1 = time >= 150
value = 22077

;---------------------------------------------------------------------------
; 終了
;---------------------------------------------------------------------------

[Statedef 22077]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
anim = 2302
ctrl = 0

[State 1009]
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 = NotHitBy 
trigger1 = 1
value = SCA

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 22090
id = 22090
sprpriority = 99
postype = p1
pos = 30,-85
bindtime = -1
removetime = 15
supermove = 0
;ignorehitpause = 1
under = 0
ownpal = 1

[State a]
type = VarAdd
trigger1 = Time >= 1
var(40) = 1

[State a]
type = ModifyExplod
trigger1 = Time >= 1
ID = 22090
scale = 1.2-Var(40)/12.0 , 1.2-Var(40)/12.0

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

;---------------------------------------------------------------------------
;ビーム
;---------------------------------------------------------------------------

[Statedef 22078]
type = S
movetype = A
physics = N
anim = 22074
velset = 0,0
ctrl = 0
sprpriority = 99

[State 1009]
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 1010]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1010]
type = NotHitBy
trigger1 = time >= 0
value = SCA, AA, AT, AP

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2562, 24
volume = 100

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2562, 17

[State 1000, 2]
type = Projectile
triggerall = time <= 140
trigger1 = (GameTime%3) = 1
attr = S, HA
projanim = 22079
projhitanim = -1
projid = 22079
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 5
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup 
damage = Ceil((0.004+((palno=12)*0.01))*enemy,Const(data.life)),Ceil(0.0033 * enemy,Const(data.life))
getpower = 0,0
givepower = 0,0
guardflag = M
hitflag = MAFD
pausetime = 2,4
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6,-6.5
air.velocity = -6,-6.8
fall = 1
fall.recover = 0
juggle = 15
p2stateno = 9000

[State 1010]
type = DestroySelf
trigger1 = time >= 150

;---------------------------------------------------------------------------
;やられ
;---------------------------------------------------------------------------

[Statedef 220760]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 1009]
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 220760]
type = destroyself
trigger1 = ishelper

[State 220760]
type = lifeadd
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(((0.005+((enemynear,palno=12)*0.007))*Const(data.life))))
absolute = 1

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

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

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

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

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

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

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

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

[State 220760]
type = NotHitBy
trigger1 = enemynear,name="Gold Orochi"&&!ishelper
trigger1 = enemynear,palno=12
value = SCA

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

[State 220760]
type = ChangeAnim
Trigger1 = Time = 0
value = 5070

[State 220760]
type = Trans
trigger1 = 1
trans = add1
alpha = 250,70

[State 220760] 
type = changestate
trigger1 = time >= 8
value = 220761

;---------------------------------------------------------------------------
;相手落下1
;---------------------------------------------------------------------------

[Statedef 220761]
type    = A
movetype= H
physics = N
sprpriority = 4

[State 1009]
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 220761]
type = destroyself
trigger1 = ishelper

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

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

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

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

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

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

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

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

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

[State 220761]
type = PlayerPush
trigger1 = 1
value = -1

[State 220761]
type = NotHitBy
trigger1 = enemynear,name="Gold Orochi"&&!ishelper
trigger1 = enemynear,palno=12
value = SCA

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

[State 220761]
type = ChangeAnim
trigger1 = time = 0
value = 5052

[state 220761]
type = velset
trigger1 = time = 0
x = IfElse((p2dist x< 0 ),6.32,-6.32)
y = -6.8

[State 220761]
type = VelAdd
Trigger1 = time > 0
y = .39

[State 220761]
type = selfstate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
; 光を降らす
;---------------------------------------------------------------------------

[Statedef 2999]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
poweradd= -1000
anim = 22061
ctrl = 0

[State 1009]
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 = Afterimage
;trigger1 = 1
;trans = add
;PalContrast =  250, 250, 250
;PalBright = 0,0,0
;time    =  0
;length  = 0
;TimeGap = 0
;FrameGap = 0

[State -2]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nofg
flag3 = nobg

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

[State 2000, 2]
type = SuperPause
trigger1 = time = 0
time = 32
movetime = 32
anim = -1

[State a]
type = helper
trigger1 = time = 12 || time = 16 || AnimElemTime(7) = 1 || AnimElemTime(9) = 2
id = 22101
persistent = 1
name = "wakka"
pos = 1,-129
postype = P1
stateno = 22101
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 1]
type = Explod
trigger1 = AnimElemTime(12) >= 2
anim = 22131
sprpriority = 6
postype = p1
pos = 0,-75
random = 60,60
removetime = 35
vel = -6 + (random%12),-6 + (random%12)
facing = -1
ownpal = 1
ontop = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = Explod
trigger1 = time = 10
anim = 22174
sprpriority = -4
postype = p1
pos = 1,-129
bindtime = -1
supermove = 1
under = 0
ownpal = 1

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 22172
sprpriority = -3
postype = p1
pos = 1,-129
bindtime = -1
supermove = 1
under = 0
ownpal = 1

[State 1000, 5]
type = Explod
trigger1 = Time = 0
anim = 22173
sprpriority = 20
postype = p1
pos = 1,-129
bindtime = 1
supermove = 1
under = 0
ownpal = 1

[State 3040, 7]
type = EnvColor
trigger1 = time = 0
persistent = 0
ignorehitpause = 1
time = 1
value = 255,255,255
under = 2

[State 3040, 7]
type = EnvColor
trigger1 = time = 1
persistent = 0
ignorehitpause = 1
time = 50
value = 0,0,0
under = 2

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 2
value = 2562,2

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 1
value = 3000,3

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 8
value = 2563,2

[State 1000, 5]
type = Explod
trigger1 = time = 30
anim = 22067
sprpriority = 0
postype = p1
pos = 40,0
vel = 0,0
bindtime = -1
supermove = 0
under = 0
ownpal = 1

[State 1000, 5]
type = Explod
trigger1 = time = 30
anim = 1931
sprpriority = 0
postype = p1
pos = 0,-75
vel = 0,0
bindtime = -1
supermove = 0
under = 0
ownpal = 1

[State 2000, 6]
type = PlaySnd
trigger1 = time = 30
value = 2562,20

[state a]
type = changestate
trigger1 = animtime = 0
value = 22050

;---------------------------------------------------------------------------
; 攻撃
;---------------------------------------------------------------------------

[Statedef 22050]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
anim = 22060
ctrl = 0

[State 1009]
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 = varset
trigger1 = palno=12&&fvar(38)=2
trigger1 = time<150&&enemy,movereversed
fv = 18
value = 1
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State 1]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nofg
flag3 = nobg
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

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

[state 1]
type = targetstate
trigger1 = palno=12&&fvar(18)!=0&&fvar(38)=2
trigger1 = enemy,alive&&time<150
value = 169995

[State 1]
type = targetLifeAdd
trigger1 = palno=12&&(gametime%(1+((time<150)*7)))=1
value = -9999999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

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

[state a]
type = varset
trigger1 = time = 0
v = 19
value = 0

[State 3040, 7]
type = BGPalfx
trigger1 = 1
ignorehitpause = 1
time = 1
mul = var(19),var(19),var(19)
under = 2

[State 3040, 7]
type = EnvColor
trigger1 = 1
ignorehitpause = 1
value = 0,0,0
time = 200
under = 2

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 0
value = 190,1

[State 1000, 5]
type = Explod
trigger1 = Time = 0
anim = 2990
id = 2200
sprpriority = 99999
postype = back
scale = 1,1;1.0,1.0714285714285714285714285714286
pos = 0,0
bindtime = -1
under = 99
ownpal = 1
SuperMove = 0

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 30 || Time = 60 || Time = 74 || Time = 88 || Time = 96 || Time = 112 || Time = 120 || time = 126 || Time = 130 || Time = 140 || Time = 155 || Time = 170 || Time = 180 || Time = 202   
;trigger1 = (GameTime%6) = 1
value = 11,1

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 192   
value = 2562,1
volume = -40

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 30 || Time = 60 || Time = 74 || Time = 88 || Time = 96 || Time = 112 || Time = 120 || time = 126 || Time = 130 || Time = 140 || Time = 155 || Time = 170 || Time = 180 || Time = 202   
;trigger1 = (GameTime%6) = 1
value = 2562,14

;[State 1020, 4]
;type = EnvShake
;trigger1 = Time = 30 || Time = 60 || Time = 74 || Time = 88 || Time = 96 || Time = 112 || Time = 120 || time = 126 || Time = 130 || Time = 140 || Time = 155 || Time = 170 || Time = 180 || Time = 202
;;trigger1 = (GameTime%3) = 1
;time = 10
;ampl = -10
;freq = 95
;phase = 95

[State 3221, 0]
type = Pause
trigger1 = time >= 202
time = 1

[State 2900, 1]
type = helper
trigger1 = time = 30
id = 2100
persistent = 0
name = "muni"
pos = 0,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 60
id = 2100
persistent = 0
name = "muni"
pos = -80,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 74
id = 2100
persistent = 0
name = "muni"
pos = 100,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 88
id = 2100
persistent = 0
name = "muni"
pos = -100,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 96
id = 2100
persistent = 0
name = "muni"
pos = 20,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 96
id = 2100
persistent = 0
name = "muni"
pos = -10,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 112
id = 2100
persistent = 0
name = "muni"
pos = -50,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 120
id = 2100
persistent = 0
name = "muni"
pos = -70,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 126
id = 2100
persistent = 0
name = "muni"
pos = 70,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 130
id = 2100
persistent = 0
name = "muni"
pos = 100,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 140
id = 2100
persistent = 0
name = "muni"
pos = 50,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 155
id = 2100
persistent = 0
name = "muni"
pos = 50,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 155
id = 2100
persistent = 0
name = "muni"
pos = 30,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 170
id = 2100
persistent = 0
name = "muni"
pos = -100,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 170
id = 2100
persistent = 0
name = "muni"
pos = -70,-240
postype = back
stateno = 22220
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 180
id = 2100
persistent = 0
name = "muni"
pos = 100,-240
postype = back
stateno = 22221
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2900, 1];
type = helper
trigger1 = time = 195
id = 2100
persistent = 0
name = "muni"
pos = 0,-240
postype = back
stateno = 22229
helpertype = normal
keyctrl = 0
ownpal = 1

[state a]
type = changestate
trigger1 = time >= 230
value = 22100

;---------------------------------------------------------------------------
; 終了
;---------------------------------------------------------------------------

[Statedef 22100]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
anim = 22062
ctrl = 0

[State 1009]
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 1000, 5]
type = Explod
trigger1 = time = 1
anim = 22068
sprpriority = 0
postype = p1
pos = 40,0
vel = 0,0
bindtime = -1
supermove = 0
under = 0
ownpal = 1

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

[State 2000, 6]
type = PlaySnd
trigger1 = time = 1
value = 2562,20

;[State 10000, sombras]
;type = Afterimage
;trigger1 = TIME = 12
;trans = add
;PalContrast =  250, 250, 250
;PalBright = 0,0,0
;time    =  -1
;length  = 13
;TimeGap = 1
;FrameGap = 1

[State -2]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
pausemovetime = 999
supermovetime = 999

[state a]
type = varadd
trigger1 = var(19) <= 255
v = 19
value = 15

[State 3040, 7]
type = BGPalfx
trigger1 = 1
ignorehitpause = 1
time = 1
mul = var(19),var(19),var(19)
under = 2

[State 3040, 7]
type = EnvColor
trigger1 = 1
ignorehitpause = 1
value = 0,0,0
time = 0
under = 2

[state a]
type = removeexplod
trigger1 = time = 0
is = 2220

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

;---------------------------------------------------------------------------
; ヘルパー
;---------------------------------------------------------------------------

[Statedef 22220]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3322

[State 1009]
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 0]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=1
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag = M
numhits = 1
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 49000

[State 1]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=0
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag = 
numhits = (root,palno!=12)
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 49000
ignorehitpause = 1

[State 0]
type = HitDef
triggerall = root,var(1)!=1&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag = M
hitflag = MAFD
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000

[State 1]
type = HitDef
triggerall = root,var(1)!=0&&root,palno!=12&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag = 
hitflag = MAFD
numhits = 1
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000
ignorehitpause = 1

[state 2901,1]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[state 2901,1]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1411

[state a]
type = destroyself
trigger1 = time >= 15
trigger2 = root,stateno != 22050
trigger3 = (moveguarded||hitcount>=1)&&root,var(1)!=1

;---------------------------------------------------------------------------
; ヘルパー
;---------------------------------------------------------------------------

[Statedef 22221]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3322

[State 1009]
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 0]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=1
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag = M
numhits = 1
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 49000

[State 1]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=0
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag = 
numhits = (root,palno!=12)
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 49000
ignorehitpause = 1

[State 0]
type = HitDef
triggerall = root,var(1)!=1&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag = M
hitflag = MAFD
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000

[State 1]
type = HitDef
triggerall = root,var(1)!=0&&root,palno!=12&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag = 
hitflag = MAFD
numhits = (root,palno!=12)
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000
ignorehitpause = 1

[state 2901,1]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[state 2901,1]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1411

[state a]
type = destroyself
trigger1 = time >= 15
trigger2 = root,stateno != 22050
trigger3 = (moveguarded||hitcount>=1)&&root,var(1)!=1

;---------------------------------------------------------------------------
; ヘルパー
;---------------------------------------------------------------------------

[Statedef 22229]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3322

[State 1009]
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 0]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=1
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag = M
numhits = 1
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 49000

[State 1]
type = Projectile
trigger1 = animelem=1&&root,var(1)!=0
attr = S, HA
projanim = 3322
projhitanim = -1
projid = 20000
projpriority = 999999999
projsprpriority = 999999999
;projedgebound = 220
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1 * enemy,Const(data.power)),0
guardflag = 
numhits = (root,palno!=12)
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -1,-5
air.velocity = -1,-5
fall = 1
fall.recover = 0
p2stateno = 49000
ignorehitpause = 1

[State 0]
type = HitDef
triggerall = root,var(1)!=1&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836,(random<=40)*(random%250)
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag = M
hitflag = MAFD
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000

[State 1]
type = HitDef
triggerall = root,var(1)!=0&&root,palno!=12&&ishelper
trigger1 = time = 0
trigger2 = hitcount <= 1
attr = S, HA
animtype  = diagup
damage    = 21474836
getpower = 0,0
givepower = Ceil(-1*enemy,Const(data.power)),0
guardflag = 
hitflag = MAFD
numhits = (root,palno!=12)
pausetime = 2,1
sparkno = s22109 + root,var(35)
sparkxy = -2,floor(enemy,pos y)+180
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000
ignorehitpause = 1

[state 2901,1]
type = nothitby
trigger1 = 1
value = SCA
time = -1

[state 2901,1]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1411

[state a]
type = destroyself
trigger1 = time >= 15
trigger2 = root,stateno != 22050
trigger3 = (moveguarded||hitcount>=1)&&root,var(1)!=1

;---------------------------------------------------------------------------
;超必演出ヘルパ
;---------------------------------------------------------------------------

[Statedef 22101]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22175
ownpal = 1

[State 1009]
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 a]
type = nothitby
trigger1 = 1
value = SCA

[state a]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1

[State a]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State a]
type = Trans
trigger1 = 1
trans = add

[state a]
type = varset
trigger1 = time = 0
v = 56
value = 0

[State a]
type = VarAdd
trigger1 = Var(56) <= 40
var(56) = 1

[State a]
Type = AngleDraw
Trigger1 = Time >= 0
scale = 0.2 + Var(56)/10.0 , 0.2 + Var(56)/10.0

[State a]
Type = AngleAdd
Trigger1 = Time >= 0
Value = -3

[state a]
type = destroyself
trigger1 = Time >= 25

;---------------------------------------------------------------------------
;パワーアップ
;---------------------------------------------------------------------------

[Statedef 3250]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 8
poweradd= -1000
sprpriority = 1
anim = 3450
ctrl = 0

[State 1009]
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 = NotHitBy 
trigger1 = 1
value = SCA
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State -2]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nofg
flag3 = nobg
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 2000, 2]
type = SuperPause
trigger1 = time = (palno=12&&RoundState<=2&&var(54)<=50)
time = 25
movetime = 25
anim = -1

[State a]
type = helper
trigger1 = time = 12 || time = 16 ||  time = 22 || time = 30
id = 22101
persistent = 1
name = "wakka"
pos = 1,-115
postype = P1
stateno = 22101
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 1000, 5]
type = Explod
trigger1 = time = 10
anim = 22174
sprpriority = -2
postype = p1
pos = 1,-115
bindtime = -1
under = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 1000, 5]
type = Explod
trigger1 = time = (palno=12&&RoundState<=2&&var(54)<=50)
anim = 22172
sprpriority = -3
postype = p1
pos = 1,-115
bindtime = -1
under = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 1000, 5]
type = Explod
trigger1 = Time = (palno=12&&RoundState<=2&&var(54)<=50)
anim = 22173
sprpriority = -2
postype = p1
pos = 1,-115
bindtime = 1
under = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State -1]
type = Explod
trigger1 = time = 20
anim = 22154
id = 22154
sprpriority = 0
postype = p1
pos = 0,0
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State a]
type = Explod
triggerall = time >= 20
trigger1 = (GameTime%3) = 1
anim = 22131
sprpriority = 10
postype = p1
pos = -70 + (random%140),0 - (random%40)
bindtime = 1
under = 0
ownpal = 1
persistent = 1
vel = -2 + (random%4),-7
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 3040, 7]
type = EnvColor
trigger1 = time = 0
persistent = 0
time = 1
value = 255,255,255
under = 2
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 3040, 7]
type = EnvColor
trigger1 = time = 1
persistent = 0
time = 75
value = 0,0,0
under = 2
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 2
value = 2562,2
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 1
value = 3000,3
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 8
value = 2563,2
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 15
value = 2200,2
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 0]
type = Projectile
triggerall = var(1)!=1
trigger1 = AnimElem = 20 || AnimElem = 22 || AnimElem = 24 || AnimElem = 26 || AnimElem = 28 || AnimElem = 30 || AnimElem = 32 || AnimElem = 34 || AnimElem = 36 || AnimElem = 38
trigger2 = AnimElem = 40 || AnimElem = 42 || AnimElem = 44 || AnimElem = 46 || AnimElem = 48 || AnimElem = 50 || AnimElem = 52 || AnimElem = 54
attr = C, HA
projanim = 22156
projhitanim = -1
projid = 35904
projpriority = 999999999
projsprpriority = 999999999
projremovetime = 4
postype = p1
offset = 0,0
velocity = 0
animtype  = hard
damage    = Ceil(0.002 * enemy,Const(data.life)) ,0
getpower = 0,0
givepower = 0,0
guardflag = M
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = (enemy,const(size.mid.pos.x)),(enemy,const(size.mid.pos.y))
hitsound   = -1
guard.sparkno = s22113
guardsound = -1
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.5,-10
air.velocity = -0.5,-10
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 19000

[State 1]
type = Projectile
triggerall = var(1)!=0
trigger1 = AnimElem = 20 || AnimElem = 22 || AnimElem = 24 || AnimElem = 26 || AnimElem = 28 || AnimElem = 30 || AnimElem = 32 || AnimElem = 34 || AnimElem = 36 || AnimElem = 38
trigger2 = AnimElem = 40 || AnimElem = 42 || AnimElem = 44 || AnimElem = 46 || AnimElem = 48 || AnimElem = 50 || AnimElem = 52 || AnimElem = 54
attr = C, HA
projanim = 22156
projhitanim = -1
projid = 35904
projpriority = 999999999
projsprpriority = 999999999
projremovetime = 4
postype = p1
offset = 0,0
velocity = 0
animtype  = hard
damage    = Ceil(0.002 * enemy,Const(data.life)) ,0
getpower = 0,0
givepower = 0,0
guardflag = 
hitflag = MAFD
pausetime = 2,1
sparkno = -1
sparkxy = -7, -85
hitsound   = -1
guard.sparkno = s22113
guardsound = s120,0
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.5,-10
air.velocity = -0.5,-10
yaccel = .5
fall = 1
fall.recover = 0
p2stateno = 19000

[State 1]
type = lifeadd
trigger1 = palno != 12 && time = 0
value = lifemax/(4-(var(1)*2))
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[state a]
type = targetstate
triggerall = palno = 12
triggerall = target,stateno = [19000,19035]
trigger1 = animelemtime(52) >= 0
value = 103999
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[state a]
type = varset
trigger1 = time = 2
v = 29
value = ((var(1)=1)*400)+400+(((var(54)>=5700)*1700)+((fvar(24)>=2150&&var(54)>=2150)*1700))
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State 1]
type = varset
trigger1 = var(1) = 1 && palno != 12 && time = 1
fv = 39
value = life
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

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

;---------------------------------------------------------------------------
;やられ
;---------------------------------------------------------------------------

[Statedef 2635]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 1009]
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 2635]
type = destroyself
trigger1 = ishelper

[State 2635]
type = lifeset
trigger1 = time = 0
ignorehitpause = 1
value = life - (Ceil(0.007 * Const(data.life)))

[State 2635]
type = powerset
trigger1 = time = 0
ignorehitpause = 1
value = power - (Ceil(0.005 * Const(data.power)))

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

[State 2635]
type = ChangeAnim
Trigger1 = Time = 0
value = 5070

[State 2635]
type = Trans
trigger1 = 1
trans = add1
alpha = 250,70

[State 2635] 
type = changestate
trigger1 = time >= 8
value = 2637

;---------------------------------------------------------------------------
;やられ
;---------------------------------------------------------------------------

[Statedef 2636]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 1009]
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 2636]
type = lifeset
trigger1 = 1
ignorehitpause = 1
value = 0

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

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

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

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

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

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

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

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(1) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(2) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(3) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(4) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(5) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(6) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(7) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(8) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(9) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(10) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(11) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(12) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(13) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(14) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(15) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(16) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(17) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(18) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(19) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(20) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(21) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(22) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(23) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(24) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(25) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(26) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(27) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(28) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(29) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(30) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(31) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(32) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(33) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(34) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(35) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(36) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(37) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(38) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(39) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(40) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(41) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(42) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(43) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(44) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(45) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(46) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(47) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(48) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(49) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(50) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(51) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(52) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(53) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(54) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(55) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(56) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(57) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(58) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
var(59) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(1) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(2) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(3) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(4) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(5) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(6) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(7) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(8) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(9) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(10) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(11) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(12) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(13) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(14) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(15) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(16) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(17) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(18) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(19) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(20) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(21) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(22) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(23) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(24) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(25) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(26) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(27) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(28) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(29) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(30) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(31) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(32) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(33) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(34) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(35) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(36) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(37) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(38) = 0

[State 2636]
type = parentVarSet
trigger1 = enemynear,name="Gold Orochi"&&enemynear,fvar(37)=1&&enemynear,palno=12&&ishelper
fvar(39) = 0

[State 2636]
type = AssertSpecial
trigger1 = ishelper
flag = invisible

[State 2636]
type = PlayerPush
trigger1 = 1
value = -1

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

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

[State 2636]
type = ChangeAnim
Trigger1 = Time = 0
value = 5070

[State 2636]
type = Trans
trigger1 = 1
trans = add1
alpha = 250,70

[state 2636]
type = destroyself
trigger1 = ishelper&&time>=1

[State 2636] 
type = changestate
trigger1 = !ishelper&&time >= 8
value = 2637

;---------------------------------------------------------------------------
;相手落下1
;---------------------------------------------------------------------------

[Statedef 2637]
type    = A
movetype= H
physics = N
sprpriority = 4

[State 1009]
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 2637]
type = destroyself
trigger1 = ishelper

[State 2637]
type = lifeset
trigger1 = time = 0
ignorehitpause = 1
value = life - (Ceil(0.035 * Const(data.life)))

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

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

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

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

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

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

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

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

[State 2637]
type = PlayerPush
trigger1 = 1
value = -1

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

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

[State 2637]
type = ChangeAnim
trigger1 = time = 0
value = 5050

[state 2637]
type = velset
trigger1 = time = 0
x = IfElse((p2dist x< 0 ),3.32,-3.32)
y = -2.8

[State 2637]
type = VelAdd
Trigger1 = time > 0
y = .39

[State 2637]
type = selfstate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100
