
;===========================================================================
;極星冥界陣(始動)
[statedef 4000]
type=s
movetype=a
physics=s
velset=0,0
anim=4000
ctrl=0
poweradd=ifelse(life<=0.3*lifemax,ifelse(var(1),-1000,-3000),-5000)

[state 4000,MAX状態終了]
type=varset
triggerall=!(var(0)&32)
trigger1=var(1)
trigger1=time=0
var(1)=0

[state 4000,無敵]
type=nothitby
trigger1=1
value=sca

[state 4000,暗転ヘルパー]
type=null;helper
trigger1=animelemtime(3)=0
helpertype=normal
name="super"
id=7030
pos=26,-104
postype=p1
stateno=7030
ownpal=0
supermovetime=2147483647

[state 4000,暗転]
type=superpause
trigger1=animelemtime(1)=0
Time = 34
movetime=34
anim=-1
darken=0
sound=s33,1
p2defmul=1


[State super effect]
Type = Helper
trigger1=animelemtime(1)=0
Stateno = 6016
Pos = 0,-48
OwnPal = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State super effect]
type = Helper
trigger1=animelemtime(1)=0
name = "super"
stateno = 34503
pos = 0,-92
ownpal = 1
supermovetime = 78

[state 4000,カットインヘルパー1]
type=null;helper
triggerall=!numhelper(40003)
trigger1=animelemtime(3)=4
name="H.Port"
id=40003
stateno=40003
pos=160,120
postype=left
supermovetime=2147483647
pausemovetime=2147483647
ignorehitpause=1

[state 4000,カットインヘルパー2]
type=null;helper
triggerall=!numhelper(40004)
trigger1=animelemtime(3)=4
name="Player 1"
id=40004
stateno=40004
pos=160,120
postype=left
supermovetime=2147483647
pausemovetime=2147483647
ignorehitpause=1

[state 4000,背景ヘルパー]
type=helper
triggerall=!numhelper(40001)
trigger1=animelemtime(3)=0
helpertype=normal
name="HSDM"
id=40001
stateno=40001
pos=160,120
postype=left
facing=1
keyctrl=0
ownpal=1
supermovetime=2147483647
pausemovetime=2147483647
ignorehitpause=1

[state 4000,残像]
type=afterimage
trigger1=time=0
time=57
trans=add1
timegap=2
framegap=2
length=6
palbright=0,0,0
palcontrast=256,256,256
palpostbright=0,0,0
paladd=0,0,0
palmul=1,1,1

[state 4000,声]
type=playsnd
trigger1=animelemtime(11)=0
value=200,0+random%5
channel=0

[state 4000,ボディブロー]
type=hitdef
triggerall=roundstate=2
trigger1=time=0
attr=s,ha
hitflag=mafd
priority=7,miss
sparkno = S6040+random%5 ;s7103
guard.sparkno = S8030;=s7112
sparkxy=-10,-70
hitsound=s1,6+random%3
guardsound=s2,10;
p2facing=1
id=4000
hitonce=1
getpower=0,0
givepower=15,15
pausetime=0,23
envshake.time=20
envshake.freq=120
envshake.ampl=-4
p1stateno=4010
p2stateno=4020

[state 4000,失敗]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

;---------------------------------------------------------------------------
;極星冥界陣(成功)
[statedef 4010]
type=s
movetype=a
physics=n
velset=0,0
anim=4010
ctrl=0
sprpriority=1

[state 4010,効果音]
type=playsnd
trigger1=animelemtime(5)=0
value=180,0

[state 2000,効果音]
type=playsnd
trigger1=animelemtime(24)=0
value=3,23

[state 2000,効果音]
type=playsnd
trigger1=animelemtime(60)=0
value=3,23




[state 4010,追撃不可フラグ]
type=varset
trigger1=1
var(9)=1

[state 4010,ガード認識距離]
type=attackdist
trigger1=1
value=0

[state 4010,残像継続]
type=afterimagetime
trigger1=time=0
time=-animtime

[state 4010,画面端]
type=width
trigger1=1
edge=150,0

[state 4010,対象のヘルパーも操る]
type=projectile
trigger1=time=1
attr=sca,aa,ap,at
hitflag=mafd
guard.dist=0
p2facing=1
p2stateno=4030
id=4001
numhits=0
sprpriority=-2
hitonce=0
projanim=4016

[state 4010,big1]
type=helper
trigger1=animelemtime(2)=0
name="Striker_big"
id=1500
stateno=4013
ownpal=1
pos=-50,0
postype=p1

[state 4010,対象の移動(両方)]
type=targetbind
trigger1=animelemtime(2)=[0,30]
pos=40,-animelemtime(2)

[state 4010,対象の固定(両方)1]
type=targetbind
trigger1=animelemtime(2)=[31,65]
pos=40,-30

[state 4010,効果音]
type=playsnd
trigger1=animelemtime(2)=66
value=4000,1

[state 4010,対象の移動(魂)]
type=targetbind
trigger1=animelemtime(2)=[66,95]
pos=40+(animelemtime(2)-65)*2,-30
id=4001

[state 4010,対象の固定(本体)]
type=targetbind
trigger1=animelemtime(2)>65
trigger1=animelemtime(67)<1
pos=40,-30
id=4000

[state 4010,対象の固定(魂)]
type=targetbind
trigger1=animelemtime(2)>95
trigger1=animelemtime(67)<32
pos=100,-30
id=4001

[state 4010,紫紀]
type=helper
trigger1=animelemtime(55)=0
name="Striker_shiki"
id=1400
stateno=4011
ownpal=1
pos=327,0
postype=p1

[state 4010,グルガン]
type=helper
trigger1=animelemtime(55)=0
name="Striker_Glugan"
id=1300
stateno=4012
ownpal=1
pos=120+12*26,-203
postype=p1
facing=-1

[state 4010,big2]
type=helper
trigger1=animelemtime(55)=0
name="Striker_big"
id=1500
stateno=4014
ownpal=1
pos=165,0
postype=p1
facing=-1

[state 4010,瞬獄殺(暗転)]
type=envcolor
trigger1=animelemno(0)=56
value=0,0,0

[state 4010,乱数1]
type=null;varrandom
trigger1=animelemtime(56)=[0,80]
trigger1=animelemtime(56)%6=0
v=12
range=-35,35

[state 4010,乱数2]
type=null;varrandom
trigger1=animelemtime(56)=[0,80]
trigger1=animelemtime(56)%6=0
v=13
range=-35,35

[state 4010,瞬獄殺(エフェクト)]
type=explod
trigger1=animelemtime(56)=[0,80]
trigger1=animelemtime(56)%6=[0,3]
anim=6040+animelemtime(56)%6
pos=80+random/25,-110+random/25
postype=p1
ontop=1
ownpal=1
id=4000

[state 4010,ヒット数]
type=hitadd
triggerall=animelemtime(56)=[0,80]
trigger1=animelemtime(56)%6=0
trigger2=animelemtime(56)%6=4
value=1

[state 4010,瞬獄殺(効果音)]
type=playsnd
triggerall=animelemtime(56)=[0,80]
trigger1=animelemtime(56)%6=0
;trigger2=animelemtime(56)%6=4
value=1,(random%4)*3

[state 4010,帰りなさい]
type=playsnd
trigger1=animelemtime(58)=0
value=4200,0
channnel=0

[state 4010,対象の移動(本体)]
type=targetbind
trigger1=animelemtime(67)=[1,31]
pos=40+(animelemtime(67)-1)*2,-30
id=4000

[state 4010,対象の固定(両方)2]
type=targetbind
trigger1=animelemtime(67)>31
trigger1=animelemtime(95)<0
pos=100,-30

[state 4010,対象の固定(両方)2]
type=targetbind
trigger1=animelemtime(67)>31
trigger1=animelemtime(95)<0
pos=100,-30
id=4000

[state 4010,対象の固定(両方)2]
type=targetbind
trigger1=animelemtime(67)>31
trigger1=animelemtime(95)<0
pos=100-2+random%3,-30-2+random%3
id=4001

[state 4010,エフェクト]
type=explod
trigger1=animelemtime(67)=31
anim=4015
pos=100,-70
postype=p1
sprpriority=2
ownpal=1

[state 4010,効果音]
type=playsnd
trigger1=animelemtime(67)=31
value=4000,2

[state 4010,ダメージ]
type=targetlifeadd
trigger1=animelemtime(95)=0
value=-floor((const(data.attack)*target(4000),const(data.life)/100000.0*367)+0.5)
absolute=1
id=4000

[state 4010,吹っ飛ぶ]
type=targetstate
trigger1=animelemtime(95)=0
value=4021
id=4000

[state 4010,終了]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

;---------------------------------------------------------------------------
;紫紀
[statedef 4011]
type=s
movetype=i
physics=n
anim = 9999
ctrl=0
sprpriority=3
velset=0,0




[State 200, 1]
type = Turn
trigger1 = time=0

[State 1105, 1]
type = Velset
trigger1 = 1
x = 7

[State 1100]
type = Varset
trigger1 = Time = 0
var(7) = -250



[state 4014,消去]
type=changestate
triggerall=ishelper
trigger1 = Time >=35
value=11310


[state 4014,消去]
type=changestate
triggerall=ishelper
trigger1=root,stateno!=4010
value=11350


;---------------------------------------------------------------------------
;紫紀2
[statedef 4015]
type=s
movetype=i
physics=n
anim=4011
ctrl=0
sprpriority=4
Facep2 = 1



[State -1]
Type = VarAdd
Trigger1 = Var(46) < 20
Trigger1 = Time = [0,48]
V = 46
Value = 2



[State -1]
Type = VelSet
Trigger1 = Time >= 0
X = 1.00*Var(46)/10

[State -1]
Type = VelSet
Trigger1 = AnimElemtime(8)>=0
X = 0





[state 4014,効果音]
type=playsnd
trigger1=time=0
value=4011,0


[state 4014,消去]
type=changestate
triggerall=ishelper
trigger1=animtime=0
trigger2=root,stateno!=4010
value=11350
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;グルガン
[statedef 4012]
type=s
movetype=i
physics=n
anim=4012
ctrl=0
sprpriority=2
velset=12,0

[state 4012,着地(停止)]
type=velset
trigger1=animelemtime(3)=0
x=0
y=0

[state 4012,着地(位置)]
type=posset
trigger1=animelemtime(3)=0
y=0

[state 4012,着地音]
type=playsnd
trigger1=animelemtime(3)=0
value=40,2

[state 4012,ｶﾞｵｰ]
type=playsnd
trigger1=animelemtime(11)=0
value=1110,0
channel=2

[state 4012,去る]
type=velset
trigger1=animelemtime(26)=0
x=-10
y=-14.4

[state 4012,重力]
type=veladd
trigger1=animelemtime(3)<0
trigger2=animelemtime(26)>=0
y=0.6

[state 4012,消去]
type=destroyself
triggerall=ishelper
trigger1=animelemtime(26)>=0
trigger1=pos x!=[-220,220]
trigger2=root,stateno!=4010

;---------------------------------------------------------------------------
;big1
[statedef 4013]
type=s
movetype=i
physics=n
anim=4013
ctrl=0
sprpriority=4


[State 1100]
type = Varset
trigger1 = Time = 0
var(7) = -250

[State 1100]
type = Varadd
trigger1 = Time >= 0
var(7) = 5

[State 3000,00]
type = Palfx
trigger1 = time >= 0
trigger1 = time <= 48
add = var(7),var(7),var(7)
time = 1



[State 1100]
type = Varset
trigger1 = animelemtime(12)=0
var(7) = -30

[State 1100]
type = Varadd
trigger1 = animelemtime(12) >= 0
var(7) = -40

[State 1100,00]
type = Palfx
trigger1 = animelemtime(12) >= 0

add = var(7),var(7),var(7)
time = 1

[state 4013,効果音]
type=playsnd
trigger1=time=0
value=4012,0

[state 4013,効果音]
type=playsnd
trigger1 = animelemtime(5)=0
value=4012,1

[state 4013,消去]
type=destroyself
triggerall=ishelper
trigger1=animtime=0
trigger2=root,stateno!=4010

;---------------------------------------------------------------------------
;big2
[statedef 4014]
type=s
movetype=i
physics=n
anim=4014
ctrl=0
sprpriority=4


[State 1100]
type = Varset
trigger1 = Time = 0
var(7) = -250

[State 1100]
type = Varadd
trigger1 = Time >= 0
var(7) = 5

[State 3000,00]
type = Palfx
trigger1 = time >= 0
trigger1 = time <= 48
add = var(7),var(7),var(7)
time = 1






[state 4014,効果音]
type=playsnd
trigger1=time=0
value=4012,2


[state 4014,消去]
type=changestate
triggerall=ishelper
trigger1=animtime=0
trigger2=root,stateno!=4010
value=20020
;---------------------------------------------------------------------------
;極星冥界陣:対象側
[statedef 4020]
type=s
movetype=h
physics=n
velset=0,0
ctrl=0
sprpriority=-1

[state 4020,トラブル対策]
type=changestate
trigger1=ishelper
value=4030

[state 4020,カメラ]
type=screenbound
trigger1=1
movecamera=1,0

[state 4020,無敵]
type=nothitby
trigger1=1
value=sca

[state 4020,ヘルパー]
type=helper
trigger1=time=0
stateno=35313
pos=0,0
ownpal=1
name="!!!!!"
id=35313

[state 4020,残像禁止]
type=afterimagetime
trigger1=1
time=0

[state 4020,アニメ0-1]
type=changeanim
triggerall=selfanimexist(anim)
trigger1=!hitshakeover
value=anim
elem=animelemno(0)

[state 4020,アニメ0-2]
type=changeanim2
triggerall=!selfanimexist(anim)
triggerall=animexist(anim)
trigger1=!hitshakeover
value=anim
elem=animelemno(0)

[state 4020,アニメ1]
type=changeanim2
trigger1=hitshakeover
persistent=0
value=4020

[state 4020,透明]
type=assertspecial
trigger1=time=[177,467]
flag=invisible

;---------------------------------------------------------------------------
;壁まで吹っ飛ぶ
[statedef 4021]
type=a
movetype=h
physics=n
ctrl=0

[state 4021,無敵]
type=nothitby
trigger1=1
value=sca

[state 4021,アニメ変更1]
type=changeanim
trigger1=selfanimexist(5900)
value=5900

[state 4021,アニメ変更2]
type=changeanim2
trigger1=!selfanimexist(5900)
value=5410

[state 4021,横にまっすぐ飛ぶ]
type=velset
trigger1=1
x=-10
y=0

[state 4021,カメラ固定]
type=screenbound
trigger1=1
value=0

[state 4021,跳ね返りへ]
type=changestate
trigger1=backedgebodydist<10
value=4022

;---------------------------------------------------------------------------
;壁で跳ね返る
[statedef 4022]
type=a
movetype=h
physics=n

[state 4022,無敵]
type=nothitby
trigger1=1
value=sca

[state 4022,反転]
type=turn
trigger1=time=0

[state 4022,壁ぶつかったときの速度]
type=velset
trigger1=time=0
x=-1
y=-3

[state 4022,アニメ変更]
type=changeanim2
trigger1=time=0
value=5411

[state 4022,重力]
type=veladd
trigger1=1
y=0.4

[state 4022,地面に落下(終了)]
type=selfstate
trigger1=pos y>=0
trigger1=vel y>0
value=5100

;---------------------------------------------------------------------------
;極星冥界陣:対象側(ヘルパー)
[statedef 4030]
type=s
movetype=h
physics=n
velset=0,0
ctrl=0
sprpriority=-2

[state 4030,カメラ]
type=screenbound
trigger1=1
movecamera=1,0

[state 4030,無敵]
type=nothitby
trigger1=0
value=sca

[state 4030,透明]
type=assertspecial
trigger1=!root,hitshakeover
flag=invisible

[state 4030,アニメ]
type=changeanim2
trigger1=time=0
value=4020

[state 4030,色]
type=palfx
trigger1=1
time=1
add=64,64,64
mul=64,64,256

[state 4030,終了]
type=changestate
triggerall=ishelper
trigger1=root,stateno!=4020
value=4031

[state 4030,トラブル対策]
type=selfstate
trigger1=!ishelper
value=5050

;---------------------------------------------------------------------------
;極星冥界陣:対象側(ヘルパー2)
[statedef 4031]
type=s
movetype=i
physics=n
velset=0,0
ctrl=0
sprpriority=-2

[state 4031,消去]
type=destroyself
trigger1=ishelper
;┃━┏┃┃┓━┃
;---------------------------------------------------------------------------
[Statedef 35313]
anim=0

[state 透明]
type=assertspecial
trigger1=1
flag=invisible

[state *]
type=selfstate
trigger1=!ishelper
value=0
ctrl=1
;---------------------------------------------------------------------------