;---------------------------------------------------------------------------
; ファントムスフィアA
; CNS レベル: 中級

[Statedef 8082]
type     = S
movetype = A
physics  = S
juggle   = 5
poweradd = 0
velset   = 0,0
anim     = 9721
ctrl     = 0
sprpriority = 1

[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 6
value = s8080,0
channel = 4

[State 1000, ヘルパーを出す]
type = Helper
trigger1 = AnimElem = 6
name = "FS Helper1"
stateno = 3421
ID = 1301
helpertype = player
pos = 0,-20
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1000, ヘルパーを出す]
type = Helper
trigger1 = AnimElem = 6
name = "FS Helper2"
stateno = 1311
ID = 1311
helpertype = player
pos = 0,-180
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1000, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;==========================================================================================
;==========================================================================================
;玉
;==========================================================================================
;==========================================================================================
[Statedef 3421]
type     = A
movetype = A
physics  = N
ctrl     = 0
anim     = 13100
sprpriority = 5

[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -7+ (random%14),-7 + (random%14)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647

pausemovetime = 2147483647
[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -6+ (random%12),-6 + (random%12)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -5+ (random%10),-5 + (random%10)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1001, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = NoShadow ;影を消す

[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 8
trigger2 = AnimElem = 32
value = s8,10
volume = -180
channel = 5

[State 1000, 音を鳴らす]
type = StopSnd
trigger1 = Movehit
trigger2 = numHelper(1301) = 0
channel = 5

[State 2001, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AT, AP

[State 1000, 軸位置移動]
type = Veladd
trigger1 = time >= 0
x = .02
y = 0

[State 1000, 軸位置移動]
type = Veladd
trigger1 = time >= 40
x = .005
y = -.02

[State 1000, 軸位置移動]
type = Velset
trigger1 = MoveHit
x = 0
y = 0

[State 2110, 相手と重なった時の処理]
type = PlayerPush
trigger1 = 1
value = 0

[State 3000]
type = Projectile
trigger1 = AnimElem = 1
trigger2 = AnimElem = 3
trigger3 = AnimElem = 5
projID = 1316
projanim = 13101
projremove = 0
projpriority = 10
projhitanim = -1
projremanim = -1
projsprpriority = 8
projshadow = 0,0,0
projremovetime = 2
offset = 0,0
velocity = 0,0
attr = S, SP
getpower = 100
damage = 140, 10
animtype = up
guardflag = M
hitflag = MA
priority = 3, Hit
pausetime = 2, 10
guard.sparkno = s4120
sparkno = s7002
sparkxy = -20,0
hitsound   = s10000,48
guard.sparkno = s7011
guardsound = s120,0
ground.type = High
ground.slidetime = 21
ground.hittime  = 21
ground.velocity = -4.2,-4.6
air.type = High
air.velocity = -4.2,-4.6
air.juggle = 8
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0

[State 1000, ステート変更]
type = ChangeAnim
trigger1 = MoveHit = 1
value = 1315

[State 1001, このヘルパーを消す]
type = DestroySelf
triggerall = Root,Anim != [120,155]
trigger1 = Root,MoveType = H

[State 1001, このヘルパーを消す]
type = DestroySelf
trigger1 = FrontEdgeDist > 320
trigger2 = FrontEdgeDist < -320
trigger3 = Pos Y < -300
trigger4 = Anim = 1315
trigger4 = AnimTime = 0

[Statedef 1311]
type     = A
movetype = A
physics  = N
ctrl     = 0
anim     = 13100
sprpriority = 5

[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -7+ (random%14),-7 + (random%14)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647

pausemovetime = 2147483647
[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -6+ (random%12),-6 + (random%12)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -5+ (random%10),-5 + (random%10)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 1001, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = NoShadow ;影を消す

[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 8
trigger2 = AnimElem = 32
value = s8,10
volume = -180
channel = 5

[State 1000, 音を鳴らす]
type = StopSnd
trigger1 = Movehit
trigger2 = numHelper(1311) = 0
channel = 5

[State 2001, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AT, AP

[State 1000, 軸位置移動]
type = Veladd
trigger1 = time >= 0
x = .02
y = .03

[State 1000, 軸位置移動]
type = Veladd
trigger1 = time >= 40
x = .005
y = -.03

[State 1000, 軸位置移動]
type = Velset
trigger1 = MoveHit
x = 0
y = 0

[State 2110, 相手と重なった時の処理]
type = PlayerPush
trigger1 = 1
value = 0

[State 3000]
type = Projectile
trigger1 = AnimElem = 1
trigger2 = AnimElem = 3
trigger3 = AnimElem = 5
projID = 1316
projanim = 13101
projremove = 0
projpriority = 10
projhitanim = -1
projremanim = -1
projsprpriority = 8
projshadow = 0,0,0
projremovetime = 2
offset = 0,0
velocity = 0,0
attr = S, SP
getpower = 100
damage = 140, 10
animtype = up
guardflag = M
hitflag = MA
priority = 3, Hit
pausetime = 2, 10
guard.sparkno = s4120
sparkno = s7002
sparkxy = -20,0
hitsound   = s10000,48
guard.sparkno = s7011
guardsound = s120,0
ground.type = High
ground.slidetime = 21
ground.hittime  = 21
ground.velocity = -4.2,-4.6
air.type = High
air.velocity = -4.2,-4.6
air.juggle = 8
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0

[State 1000, ステート変更]
type = ChangeAnim
trigger1 = MoveHit = 1
value = 1315

[State 1001, このヘルパーを消す]
type = DestroySelf
triggerall = Root,Anim != [120,155]
trigger1 = Root,MoveType = H

[State 1001, このヘルパーを消す]
type = DestroySelf
trigger1 = FrontEdgeDist > 320
trigger2 = FrontEdgeDist < -320
trigger3 = Pos Y > 50
trigger4 = Anim = 1315
trigger4 = AnimTime = 0

;--------------------------------------------------------------------------
;=================================================================================
;=================================================================================
レールフォース
;=================================================================================
;=================================================================================
[Statedef 1080]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 10000
sprpriority = 2

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

[State 1000, 1]
type = PlaySnd
trigger1 = time = 20
value = 2563,4

[State 1000, 1]
type = PlaySnd
trigger1 = time = 18
value = 801,1

[State 1000, 1]
type = PlaySnd
trigger1 = time = 20
value = 11,1

[State 240, 4]
type = Explod
trigger1 = time = 30
anim = 10100
id = 10004
removetime = 40
scale = 0.6,0.6
pos = 30,-93
ownpal = 1
trans =sub
sprpriority = 999
supermovetime = 2147483647
pausemovetime = 2147483647

[State 240, 4]
type = Explod
trigger1 = time = 30
anim = 10110
id = 10004
removetime = 40
scale = 0.6,0.6
pos = 30,-93
ownpal = 1
sprpriority = 999
supermovetime = 2147483647
pausemovetime = 2147483647

[State 240, 4]
type = ModifyExplod
trigger1 = time > 30
trigger1 = time <= 40
id = 10004
scale = 0.09*(time-30),1

[State 240, 4]
type = ModifyExplod
trigger1 = time > 50
id = 10004
scale = 0.6,0.05*(70-time)

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 32600
sprpriority = 8
postype = p1
pos = -2,-60
bindtime = 1
supermove = 1
under = 0
ownpal = 1
scale = .5,.5
supermovetime = 2147483647
pausemovetime = 2147483647

[State 2]
type = Projectile
trigger1 = time = 20
attr = S, SP
animtype  = hard
damage    = Ceil(0.03 * enemy,Const(data.life)),Ceil(0.003 * enemy,Const(data.life))
getpower = 61,61
guardflag = M
projanim = 10050
projhitanim = -1
projid = 10050
projpriority = 2147483647
projsprpriority = 2147483647
projremove = 0
projremovetime = 35
postype = p1
offset = 10,-90
velocity = 0
numhits = 1
pausetime = 16,16
sparkno = -1
sparkxy = -7,-40
hitsound   = s225,1
guard.sparkno = -1
guardsound = s121,0
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4,-6
air.velocity = -4,-6.5
fall = 1
air.fall = 1
fall.recover = 0
SuperMoveTime = 2147483647
PauseMoveTime = 2147483647

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

;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;---------------------------------------------------------------------------
; フォトンスフィア
;---------------------------------------------------------------------------
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
[Statedef 11101]
type    = S
movetype= I
physics = N
juggle  = 8
poweradd= 0
velset = 0,0
anim = 1001
ctrl = 0

[State 11101]
type = NotHitBy
trigger1 = animelem=4,<=0
value = SCA

[state 11101]
type = playsnd
trigger1 = animelem = 7
value = 1050,0
volume= 255

[State 1000, 6]
type = PlaySnd
trigger1 = time = 7
trigger2 = time = 9
trigger3 = time = 11
trigger4 = time = 13
trigger5 = time = 15
trigger6 = time = 17
value = s10000,31
volume = -255

[State 2000, 6]
type = PlaySnd
trigger1 = time = 7
value = 10000,13
volume = -255

[State 2000, 6]
type = PlaySnd
trigger1 = time = 7
value = 10000,14
volume = -255

[State 11101]
type = helper
triggerall = !ishelper
trigger1 = Animelem = 8
id = 11100
persistent = 0
name = "koukyu"
pos =110,-130
postype = P1
stateno = 11100
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11101]
type = helper
triggerall = !ishelper
trigger1 = Animelem = 8
id = 11100
persistent = 0
name = "koukyu"
pos = 70,-40
postype = P1
stateno = 11100
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11101]
type = helper
triggerall = !ishelper
trigger1 = Animelem = 8
id = 11100
persistent = 0
name = "koukyu"
pos = 30,-130
postype = P1
stateno = 11100
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

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

;==========================================================================================
;==========================================================================================
;玉
;==========================================================================================
;==========================================================================================

[Statedef 11100]
type    = S
movetype= I
physics = N
anim = 13100
velset = 0,0
ctrl = 0
sprpriority = 2

[State 1000, 5]
type = NotHitBy 
trigger1 = 1
value = SCA
ignorehitpause = 11

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

[State 1110]
type = trans
trigger1 = 1
trans = sub
ignorehitpause = 1

[State 1]
type = AngleDraw
trigger1 = 1
scale = 1.0,1.0

[State 1]
type = AngleAdd
trigger1 = 1
value = -7

[State a]
type = varset
trigger1 = enemy,pos x=[-320,320]
trigger1 = enemy,pos y=[-480,60]
trigger1 = enemy,pos x-pos x<0
trigger2 = enemy,pos x!=[-320,320]
trigger2 = enemy,pos y!=[-480,60]
trigger2 = enemynear,pos x-pos x<0
v = 0
value = 1
ignorehitpause = 1

[State a]
type = varset
trigger1 = enemy,pos x=[-320,320]
trigger1 = enemy,pos y=[-480,60]
trigger1 = enemy,pos x-pos x>=0
trigger2 = enemy,pos x!=[-320,320]
trigger2 = enemy,pos y!=[-480,60]
trigger2 = enemynear,pos x-pos x>=0
v = 0
value = 0
ignorehitpause = 1

[State 1]
Type = Turn
Trigger1 = facing = -1
ignorehitpause = 1

[State 1]
type = VelSet
trigger1 = var(0)=0
x = time%40 * 0.2

[State 1]
type = VelSet
trigger1 = var(0) =1
x = -time%40 * 0.2

[State 1]
type = VelSet
trigger1 = p2bodydist Y <= 0
y = Sin((-gameTime*3)*Pi/180) - 1

[State 1]
type = VelSet
trigger1 = p2bodydist Y > 0
y = -Sin((gameTime*3)*Pi/180) + 1 

[state 11100]
type = posset
trigger1 = !ishelper
y = 0

[state 11100]
type = changestate
trigger1 = !ishelper
value = 0
ctrl = 1

[state a]
type = changestate
trigger1 = MoveContAct = 1
value = 11125

[state a]
type = changestate
trigger1 = time >= 80
trigger2 = p2bodydist X<20&&p2bodydist X>-20
trigger2 = p2bodydist Y<20&&p2bodydist Y>-20
value = 11125

;==========================================================================================
;衝突
;==========================================================================================

[Statedef 11125]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22162
ownpal = 1

[state 11125]
type = playsnd
trigger1 = time = 0
value = 10000,48
volume = 255
[state 11125]
type = PlaySnd
trigger1 = time = 0
value = 10000,49
[state 11125]
type = PlaySnd
trigger1 = time = 0
value = 10000,40
[state 11125]
type = PlaySnd
trigger1 = time = 0
value = 10000,28
volume = -255
[state 11125]
type = PlaySnd
trigger1 = time = 0
value = 10000,27
volume = -255

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

[State 11125]
type = Explod
trigger1 = 1
anim = 11103
sprpriority = 5
postype = p1
pos = 0,0
random = 30,30
vel = -7+ (random%14),-7 + (random%14)
facing = -1
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11125]
type = Explod
trigger1 = 1
anim = 11103
sprpriority = 6
postype = p1
pos = 0,0
random = 30,30
vel = -6+ (random%12),-6 + (random%12)
facing = -1
scale = 0.3,0.3
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11125]
type = Explod
trigger1 = 1
anim = 11103
sprpriority = 6
postype = p1
pos = 0,0
random = 30,30
vel = -5+ (random%10),-5 + (random%10)
facing = -1
scale = 0.5,0.5
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -7+ (random%14),-7 + (random%14)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647

pausemovetime = 2147483647
[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -6+ (random%12),-6 + (random%12)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11125]
type = Explod
trigger1 = 1
anim = 22131
postype = p1
pos = 0,0
vel = -5+ (random%10),-5 + (random%10)
facing = -1
id = 22131
scale = 0.25,0.25
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11125]
type = Explod
trigger1 = time = 0
anim = 22138
sprpriority = 7
postype = p1
pos = 0,0
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 11125]
type = Projectile
trigger1 = time = 0
attr = S, NA
projanim = 13101
projhitanim = -1
projid = 35902
projpriority = 2147483647
projsprpriority = 2147483647
projremove = 1
projremovetime = 10
postype = p1
offset = 0,0
velocity = 0
animtype  = diagup
damage    = Ceil(0.025 * enemy,Const(data.life)),Ceil(0.002 * enemy,Const(data.life))
getpower = 20,20
givepower = 0,0
guardflag = M
hitflag = MAF
pausetime = 0,4
sparkno = s22138
sparkxy = 0,0
hitsound   = s10000,43
guard.sparkno = s22184
guardsound = s120,0
ground.type = hard
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6,-6.5
air.velocity = -6,-6.5
fall = 1
fall.recover = 0
juggle = 15
supermovetime = 2147483647
pausemovetime = 2147483647

[state 11125]
type = destroyself
trigger1 = animtime = 0
ignorehitpause = 1
;---------------------------------------------------------------------------
; セルフ
;---------------------------------------------------------------------------

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

[state 0]
type = destroyself
trigger1 = ishelper