



;-------------------------------------
;トキ
[Statedef 31000]
type = S
movetype = A
physics = S
anim = 11
ctrl = 0

;コンボ
[State -2]
type = varset
trigger1 = time = 0
v = 45
value = 0

[State -2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 400]
type = poweradd
trigger1 = time = 0
value = -5000

[State 12500, 4]
type = PlaySnd
trigger1 = time = 0
value = s127,0
channel = 9


[State 12000, 4]
type = Pause
trigger1 = time = 0
time = 188
movetime = 1

[State 12500, 4]
type = PlaySnd
trigger1 = time = 3
value = s120,0
channel = 9

;トキ
[State 1100]
type = Projectile
triggerall = enemynear,name != "Ayu Tukimiya"
trigger1 = time = 3
projID = 26502
projanim = 26502
projremovetime = 150
Projremove = 0
postype = p1
velocity = 0,-4
offset = 80,200
attr = S, SA
damage = 53000,1
animtype = med
hitflag = MA
guardflag = MA
pausetime = 0,0
sparkno = S7003
guard.sparkno = S7007
sparkxy = 20,50
guard.sparkno = 41
ground.type = High
ground.slidetime = 18
ground.velocity = 0,-9
air.velocity = 0,-9
guard.velocity = -6
sprpriority = 2 
p2stateno = 34000
fall = 1
fall.recover = 1
fall.recovertime = 50
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

;トキ
[State 1100]
type = Projectile
triggerall = enemynear,name = "Ayu Tukimiya"
trigger1 = time = 3
projID = 26502
projanim = 26502
projremovetime = 150
Projremove = 0
postype = p1
velocity = 0,-4
offset = 80,200
attr = S, SA
damage = 1,1
animtype = med
hitflag = MA
guardflag = MA
pausetime = 0,0
sparkno = S7003
guard.sparkno = S7007
sparkxy = 20,50
guard.sparkno = 41
ground.type = High
ground.slidetime = 18
ground.velocity = 0,-9
air.velocity = 0,-9
guard.velocity = -6
sprpriority = 2 
p2stateno = 34000
fall = 1
fall.recover = 1
fall.recovertime = 50
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

;ロードローラー
[State 1100]
type = Projectile
trigger1 = time = 3
projID = 26503
projanim = 26503
projremovetime = 130
Projremove = 0
postype = p1
velocity = 0,-4
offset = 80,200
attr = S, SP
damage = 20,15
animtype = med
hitflag = MA
guardflag = MA
pausetime = 0,0
sparkno = S7003
guard.sparkno = S7007
sparkxy = 20,50
guard.sparkno = 41
ground.type = High
ground.slidetime = 18
ground.velocity = 0,-9
air.velocity = 0,-9
guard.velocity = -6
sprpriority = 2 
fall = 1
fall.recover = 1
fall.recovertime = 50
supermove = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999


[State -2, 59]
type = VarSet
trigger1 = Projhit = 1
v = 27
value = 2



[State 1]
type = targetLifeAdd
triggerall = enemynear,name != "Ayu Tukimiya"
trigger1 = Var(27) = 2
value = -999999999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[state 1]
type = targetstate
trigger1 = Var(27) = 2
trigger1 = time >= 45
value = 170000

[State 1]
type = ReversalDef
trigger1 = Var(27) = 2
reversal.attr = SCA,AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,0
p2facing = 1
p2stateno = 34000




[State -2, 59]
type = VarSet
trigger1 = time = 119
v = 27
value = 1

[State ChangeState]
type = ChangeState
trigger1 = time >= 120
value = 0
ctrl = 1







;----------------------------------------------
;危険なステート
;
[Statedef 34000]
type = S
physics = S
ctrl = 1


;VSシン用自殺ステートへ
[State ChangeState]
type = ChangeState
trigger1 = name = "Ayu Tukumiya"
value = 60001

;危険な場所へ
[State 2637]
type = selfstate
trigger1 = name = "Ayu Tukumiya"
value = 60001


[State 169995]
type = lifeset
trigger1 = name != "Ayu Tukimiya"
trigger1 = name != "Ayu Tukumiya"
ignorehitpause = 1
value = 0

;おまけ
[State 169995]
type = lifeset
trigger1 = name = "Ayu Tukimiya"
trigger2 = name = "Ayu Tukumiya"
ignorehitpause = 1
value = lifemax

;安全な場所へ
[State 2637]
type = selfstate
trigger1 = name = "Ayu Tukimiya"
value = prevstateno
ctrl = 1

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

[State 2637]
type = selfstate
trigger1 = !alive
value = 5150

[State 2637]
type = selfstate
trigger1 = time = 120
value = 0
ctrl = 1

[State 169994]
type = destroyself
trigger1 = time > 1

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




;-------------------------------------------------------
;名雪立ち
[Statedef 40000]
type    = S
movetype= I
physics = N
vel = 0,0
ctrl = 0
anim = 40000

[State 10000,0]
type = velset
trigger1 = time >= 0
x = 0

;
[State 10000,0]
type = changestate
trigger1 = time = 240
value = 40001
persistent = 0

[State 10000,0]
type = changestate
trigger1 = p2dist x< 0
value = 40005
persistent = 0

[State 169994]
type = destroyself
trigger1 = NumHelper(50012) = 1


[State 10000,0];歩き
type = changestate
trigger1 = rootDist X >= 100
trigger1 = rootDist X < 250
value = 40020

[State 10000,0];走り
type = changestate
trigger1 = rootDist X >= 250 
value = 40025

;--------------------------------------------------
[Statedef 40001]
type    = S
movetype= I
physics = N
vel = 0,0
ctrl = 0
anim = 26494

[State 10000,0]
type = velset
trigger1 = time >= 0
x = 0

;アンノン
[State 1100]
type = Projectile
trigger1 = roundstate = 2
trigger1 = time = 121
projID = 26496
projanim = 26496
projremovetime = 240
Projremove = 0
postype = p1
velocity = 6,0
offset = 0, 0
attr = S,NA
damage = 45,45
animtype = Hard
hitflag = MAF
guardflag = M
priority = 2,Hit
pausetime = 13,9
guard.pausetime = 11,9
sparkxy = 80,Const(size.mid.pos.y)
hitsound = s2,2
guardsound = s3,2
ground.type = High
ground.slidetime = 14
ground.hittime = 26
guard.slidetime = 12
guard.hittime = 19
ground.velocity = -5.6,0
guard.velocity = -9.6
air.velocity = -2.4,ifelse(enemy,Vel Y <= 0 ,-3.8,-1.6)
airguard.velocity = 0,0
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50*Fvar(0))
getpower = 100,100
ground.cornerpush.veloff = -8.6
guard.cornerpush.veloff = -9.6
air.cornerpush.veloff = 0
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 10000,0]
type = changestate
trigger1 = animtime = 0
value = 40000

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

;ターン
[Statedef 40005]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 40040

[State 10000,0]
type = turn
trigger1 = time = 0
persistent = 0

[State 10000,0]
type = velset
trigger1 = time >= 0
x = 0

[State 10000,0]
type = changestate
trigger1 = animtime = 0
value = 40000



[State 10000,0]
type = changestate
trigger1 = animtime = 0
trigger1 = rootDist X <= 100
value = 40020


;-----------------------------------------
;歩き
[Statedef 40020]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 40020

[State 10000,0]
type = velset
trigger1 = time >= 0
x = 3

[State ChangeState]
type = ChangeState
trigger1 = rootDist X = [-75,75]
value = 40000



[State 10000,0];走り
type = changestate
trigger1 = rootDist X >= 250 
value = 40025

;---------------------------------
;走り
[Statedef 40025]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 40100



[State 10000,0]
type = velset
trigger1 = time >= 0
x = 9






[State ChangeState]
type = ChangeState
trigger1 = rootDist X = [-75,75]
value = 40000

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

;天使あゆ
[Statedef 45000]
type = S
movetype = I
physics = N
anim = 45000
velset = 0,0
SprPriority = 2


[State 4000]
type = AssertSpecial
trigger1 = Pos Y > 0
flag = noshadow


[State 4000]
type = Turn
trigger1 = parent,facing = 1
trigger1 = facing = -1
trigger2 = parent,facing = -1
trigger2 = facing = 1

[State 10000,0]
type = changestate
triggerall = roundstate = 2
trigger1 = command = "Aayu2"
trigger2 = time = 240
value = 45001
persistent = 0





[State 4000]
type = VelSet
trigger1 = parentdist X = 40
x = 0

[State 4000]
type = VelSet
trigger1 = parentdist X = [41,45]
x = 0.5

[State 4000]
type = VelSet
trigger1 = parentdist X = [46,60]
x = 1.0

[State 4000]
type = VelSet
trigger1 = parentdist X = [61,75]
x = 1.6

[State 4000]
type = VelSet
trigger1 = parentdist X = [76,90]
x = 2.2

[State 4000]
type = VelSet
trigger1 = parentdist X > 90
x = 2.8

[State 4000]
type = VelSet
trigger1 = parentdist X = [34,39]
x = -0.5

[State 4000]
type = VelSet
trigger1 = parentdist X = [20,34]
x = -1.0

[State 4000]
type = VelSet
trigger1 = parentdist X = [5,19]
x = -1.6

[State 4000]
type = VelSet
trigger1 = parentdist X = [-10,5]
x = -2.2

[State 4000]
type = VelSet
trigger1 = parentdist X < -10
x = -2.8

[State 4000]
type = VelSet
trigger1 = parentdist Y = 80
y = 0

[State 4000]
type = VelSet
trigger1 = parentdist Y = [81,85]
y = 0.5

[State 4000]
type = VelSet
trigger1 = parentdist Y = [86,95]
y = 1.0

[State 4000]
type = VelSet
trigger1 = parentdist Y = [96,110]
y = 1.5

[State 4000]
type = VelSet
trigger1 = parentdist Y > 110
y = 2.0

[State 4000]
type = VelSet
trigger1 = parentdist Y = [75,79]
y = -0.5

[State 4000]
type = VelSet
trigger1 = parentdist Y = [65,74]
y = -1.0

[State 4000]
type = VelSet
trigger1 = parentdist Y = [50,64]
y = -1.5

[State 4000]
type = VelSet
trigger1 = parentdist Y < 50
y = -2.0

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

[Statedef 45001]
type = S
movetype = I
physics = N
anim = 45000
velset = 0,0
SprPriority = 2

[State 4000]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[State 10000,0]
type = changestate
trigger1 = time = 26
value = 45000
persistent = 0

;飛びあゆ
[State 1100]
type = Projectile
trigger1 = time = 0
projID = 26500
projanim = 26500
projremovetime = 27
Projremove = 0
postype = p1
velocity = 0,0
offset = 0, 0
attr = S,NA
damage = 45,45
animtype = Hard
hitflag = MAF
guardflag = M
priority = 2,Hit
pausetime = 13,9
guard.pausetime = 11,9
sparkno = s6800
sparkxy = 80,Const(size.mid.pos.y)
ground.type = High
ground.slidetime = 14
ground.hittime = 26
guard.slidetime = 12
guard.hittime = 19
ground.velocity = -5.6,0
guard.velocity = -9.6
air.velocity = -2.4,ifelse(enemy,Vel Y <= 0 ,-3.8,-1.6)
airguard.velocity = 0,0
air.fall = 1
fall.recover = 1
fall.recovertime = ceil(50*Fvar(0))
getpower = 65,21
ground.cornerpush.veloff = -8.6
guard.cornerpush.veloff = -9.6
air.cornerpush.veloff = 0
pausemovetime = 99999999999999
supermovetime = 99999999999999
hitsound          =s2,6
guardsound        =s3,2


;------------------------------------------------------------
;まい
[Statedef 46000]
type = S
movetype = I
physics = N
anim = 46000
velset = 0,0
SprPriority = 2


[State 4000]
type = AssertSpecial
trigger1 = Pos Y > 0
flag = noshadow




[State 4000]
type = Turn
trigger1 = parent,facing = 1
trigger1 = facing = -1
trigger2 = parent,facing = -1
trigger2 = facing = 1


[State 230, 6]
type = PowerAdd
trigger1 = time = 0
value = 25




[State 4000]
type = VelSet
trigger1 = parentdist X = -40
x = 0

[State 4000]
type = VelSet
trigger1 = parentdist X = [-39,-25]
x = 1.0

[State 4000]
type = VelSet
trigger1 = parentdist X = [-26,-20]
x = 1.5

[State 4000]
type = VelSet
trigger1 = parentdist X = [-19,-15]
x = 2.1

[State 4000]
type = VelSet
trigger1 = parentdist X = [-14,10]
x = 2.7

[State 4000]
type = VelSet
trigger1 = parentdist X > 10
x = 3.3

[State 4000]
type = VelSet
trigger1 = parentdist X = [-46,-41]
x = -1.0

[State 4000]
type = VelSet
trigger1 = parentdist X = [-60,-47]
x = -1.5

[State 4000]
type = VelSet
trigger1 = parentdist X = [-75,-61]
x = -2.1

[State 4000]
type = VelSet
trigger1 = parentdist X = [-90,-75]
x = -2.7

[State 4000]
type = VelSet
trigger1 = parentdist X < -90
x = -3.3



[State 4000]
type = VelSet
trigger1 = parentdist Y = 80
y = 0

[State 4000]
type = VelSet
trigger1 = parentdist Y = [81,85]
y = 0.5

[State 4000]
type = VelSet
trigger1 = parentdist Y = [86,95]
y = 1.0

[State 4000]
type = VelSet
trigger1 = parentdist Y = [96,110]
y = 1.5

[State 4000]
type = VelSet
trigger1 = parentdist Y > 110
y = 2.0

[State 4000]
type = VelSet
trigger1 = parentdist Y = [75,79]
y = -0.5

[State 4000]
type = VelSet
trigger1 = parentdist Y = [65,74]
y = -1.0

[State 4000]
type = VelSet
trigger1 = parentdist Y = [50,64]
y = -1.5

[State 4000]
type = VelSet
trigger1 = parentdist Y < 50
y = -2.0


[State 6000]
type = HitOverride
trigger1 = 1
time = -1
attr = SCA,AA,AT,AP
slot = 0
stateno = 46003





;-----------------------------------------------------------
[Statedef 46003]
type = S
movetype = I
physics = N
anim = 46000
velset = 0,0
SprPriority = 2

[State 4600, 2]
type = VarRandom
trigger1 = time = 0
v = 11
range = -3,3

[State 1100]
type = Projectile
trigger1 = time = 0
ProjID = 26491
Projanim = 26491
projepriority = 3       ;優先度  
projremovetime = 120      ;表示する時間
Projremove = 0          ;相殺無し
offset = -250,-45          ;出す場所
velocity = 9, Var(11)         ;初速度
postype = p1
attr = S, SA              
damage = 40,5         
animtype = med         ;くらった相手の動作
hitflag = MAF       ;相手に当たる種類
guardflag = MA       ;ガードできる種類
pausetime = 0,0        
sparkno = -1                 ;ヒットエフェクトの選択
guard.sparkno = -1             ;ガードしたときのエフェクト  
sparkxy = 80,Const(size.mid.pos.y)               ;エフェクトを表示する座標           
hitsound = s141,1
guardsound = s145,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 24
ground.velocity = -5
air.velocity = -3,-5
air.fall = 1
fall.recover = 0
Projedgebound = 251

[State 370, 3]
type = ChangeState
trigger1 = time = 1
value = 46000

[State -1, 無敵にする]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1


;-------------------------------------------------------------
;さゆターン
[Statedef 46499]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 31554

[State 10000,0]
type = turn
trigger1 = time = 0
persistent = 0

[State 10000,0]
type = velset
trigger1 = time >= 0
x = 0

[State 10000,0]
type = changestate
trigger1 = time = 3
value = 46500



[State 10000,0]
type = changestate
trigger1 = time = 3
trigger1 = rootDist X <= 80
value = 46501

;---------------------------------------------------------------------------
;さゆ立ち
[Statedef 46500]
type    = S
movetype= I
physics = N
vel = 0,0
ctrl = 0
anim = 31554


[State 10000,0]
type = changestate
trigger1 = !ishelper
value = 0
ctrl = 1


[State 10000,0]
type = velset
trigger1 = time >= 0
x = 0
y = 0


[State 10000,0];歩き
type = changestate
trigger1 = rootDist X >= 80
value = 46501

[State 10000,0]
type = changestate
triggerall = roundstate = 2
trigger1 = command = "AI4"
trigger2 = command = "AI5"
trigger3 = command = "AI3"
trigger4 = command = "AI2"
trigger5 = command = "AI7"
value = 46502
persistent = 0

[State 10000,0]
type = changestate
trigger1 = command = "sayuri2"
trigger1 = roundstate = 2
value = 46502
persistent = 0

[State 10000,0]
type = changestate
trigger1 = p2dist x< 0
value = 46499
persistent = 0



;-----------------------------------------------------
;歩き
[Statedef 46501]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 31560

[State 10000,0]
type = velset
trigger1 = time >= 0
x = 2

[State 10000,0]
type = changestate
trigger1 = !ishelper
value = 0
ctrl = 1

[State 10000,0]
type = changestate
triggerall = roundstate = 2
trigger1 = command = "AI4"
trigger2 = command = "AI5"
trigger3 = command = "AI3"
value = 46502
persistent = 0

[State ChangeState]
type = ChangeState
trigger1 = rootDist X = [-40,40]
value = 46500


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

;マジカルP発動
[Statedef 46502]
type = S
movetype = A
physics = S
anim = 31555
ctrl = 0
poweradd = 100

[State 1400, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 46500

[State 1400, ChangeState]
type = ChangeState
trigger1 =  moveHit 
value = 46503
ignorehitpause = 1

[State 1400, Hitdef]
type = Hitdef
triggerall = ishelper
trigger1 = AnimElemTime(5) = 0
attr = S,SA
hitflag = MAF
guardflag = M
animtype = back
air.animtype = back
fall.animtype = back
ground.type = high
air.type = high
damage = ceil(fvar(0)*0),5
getpower = 70,20
givepower = 25,12
pausetime = 0,10
guard.pausetime = 5,10
sparkno = S6600
guard.sparkno = S6600
sparkxy = -30+random%20,-55+random%20
hitsound = s2,3
guardsound = s3,2
ground.slidetime = 10
ground.hittime = 22
guard.hittime = 20
air.hittime = 22
guard.ctrltime = 20
airguard.ctrltime = 20
ground.velocity = 0,0
guard.velocity = -4
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
airguard.cornerpush.veloff = 0
fall.recover = 0
fall.recovertime = ceil(10000*fvar(0)*0.75)
forcestand = 0
fall = 1
air.fall = 1
kill = 1
guard.kill = 0
p2facing = 1



[State 1400, VelSet]
type = VelSet
trigger1 = AnimElemTime(5) >= 0
trigger1 = AnimElemTime(14) < 0
x = 6.25

[State 1400, VelSet]
type = VelSet
trigger1 = AnimElemTime(14) >= 0
trigger1 = AnimElemTime(16) < 0
x = 3.5

[State 1400, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(5) = 0
physics = N

[State 1400, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(13) = 0
physics = S



;----------------------------------------------------
;運び
[Statedef 46503]
type = S
movetype = A
physics = N
anim = 31556
ctrl = 0
velset = 6.25,0



[State 1401, TargetState]
type = TargetState
trigger1 = NumTarget > 0
trigger1 = Time = 0
value = 40506
ignorehitpause = 1


[State 1401, TargetBind]
type = TargetBind
trigger1 = 1
pos = 10,0

[State 1401, ChangeState]
type = ChangeState
trigger1 = FrontEdgeBodyDist <= 0
trigger2 = Time > 200
value = 46504

;--------------------------------------------------
;叩きつけ
[Statedef 46504]
type = S
movetype = A
physics = S
anim = 31557
ctrl = 0
velset = 0,0



[State 1402, TargetState]
type = TargetState
trigger1 = Time = 0
value = 40507

[State 900, 7]
type = PlaySnd
trigger1 = time = 0
value = s4,1

[State 1402, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Time = 0
value = -60
absolute = 0
kill = 1

[State 1402, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = -40

[State 1402, TargetBind]
type = TargetBind
trigger1 = 1
pos = 40,-10


[State 1402, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 46505

;------------------------------------------------
;とびのき
[Statedef 46505]
type = A
movetype = A
physics = N
anim = 31561
ctrl = 0
velset = -4,-5



[State 46505]
type = TargetState
trigger1 = Time = 0
value = 40508

[State 46505]
type = Gravity
trigger1 = Time > 1

[State 46505]
type = ChangeState
trigger1 = Time > 3
trigger1 = Pos Y >= 0
value = 46500

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

;敵やられ1
[Statedef 46506]
type = S
movetype = H
physics = N

[State -1, 無敵にする]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State 46506]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 2020, 制御した相手（現在は自分）のアニメ変更]
type = ChangeAnim
Trigger1 = 1;Time = 1
value = 9020

[State 2020, ブリス対応していなかったら、通常ダメージに変更]
type = ChangeAnim2
Trigger1 = anim != 9020
value = 5030

[State 46506]
type = DestroySelf
trigger1 = IsHelper



;-----------------------------------------------
;敵やられ2
[Statedef 40507]
type = S
movetype = H
physics = N

[State -1, 無敵にする]
Type = NotHitBy
Trigger1 = 1
Value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State 40507]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 40507]
type = ChangeAnim
trigger1 = Time = 0
value = 5030

[State 40507]
type = DestroySelf
trigger1 = IsHelper



[State 40508]
type = ChangeState
trigger1 = Time > 300
value = 40508



;-------------------------------------------------------
;敵やられ3
[Statedef 40508]
type = A
movetype = H
physics = N
velset = 0,-2

[State 40508]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 1,1

[State 40508]
type = ChangeAnim
trigger1 = SelfAnimExist(5060)
trigger1 = Time = 0
value = 5060

[State 40508]
type = ChangeAnim
trigger1 = SelfAnimExist(5035)
trigger1 = Time = 0
value = 5035

[State 40508]
type = ChangeAnim
trigger1 = SelfAnimExist(5035)
trigger1 = SelfAnimExist(5050)
trigger1 = Anim = 5035
trigger1 = AnimTime = 0
value = 5050

[State 40508]
type = VelAdd
trigger1 = Time > 1
y = Const(Movement.yaccel)

[State 40508]
type = SelfState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = 5100

;---------------------------------------------------------------
;ネロ立ち
[Statedef 40509]
type = S
movetype = I
physics = N
anim = 31564
velset = 0,0
SprPriority = 2
ctrl = 0

[State -2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 230, 6]
type = PowerAdd
trigger1 = time = 0
value = 25

[State 4000]
type = VelSet
trigger1 = parentdist X < 289
trigger2 = parentdist X > -289
x = 0


[State 4000]
type = VelSet
trigger1 = parentdist X > 290
x = 3.3

[State 6000]
type = HitOverride
trigger1 = 1
time = -1
attr = SCA,AA,AT,AP
slot = 0
stateno = 40509

[State 4000]
type = VelSet
trigger1 = parentdist X < -290
x = -3.3

[State 10000,0]
type = changestate
triggerall = P2BodyDist X = [-20,20]
trigger1 = random < 9
value = 40512


[State 10000,0]
type = changestate
trigger1 = random < 9
value = 40510
persistent = 0

[State 10000,0]
type = changestate
trigger1 = random < 10
value = 40511
persistent = 0

[State 4000]
type = posSet
trigger1 = 1
y = 0

;---------------------------------------------------
;歩行
[Statedef 40510]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 31566

[State -2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 10000,0]
type = changestate
triggerall = P2BodyDist X = [-20,20]
trigger1 = random < 9
value = 40512

[State 6000]
type = HitOverride
trigger1 = 1
time = -1
attr = SCA,AA,AT,AP
slot = 0
stateno = 40509

[State 10000,0]
type = changestate
trigger1 = animtime = 0
value = 40509

[State 10000,0]
type = velset
trigger1 = time >= 0
x = 1

;----------------------------------------------------------
;ターン
[Statedef 40511]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 31565

[State -2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 10000,0]
type = turn
trigger1 = time = 0
persistent = 0

[State 10000,0]
type = changestate
triggerall = P2BodyDist X = [-20,20]
trigger1 = random < 9
value = 40512

[State 10000,0]
type = changestate
trigger1 = animtime = 0
value = 40509
;----------------------------------------------------------
;bom
[Statedef 40512]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 31564

[State -2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 181]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[State 3200, 5]
type = PlaySnd
trigger1 = time = 0
value = S2,5
;
[State 1100]
type = Projectile
trigger1 = time = 0
projID = 6901
projanim = 6901
projremovetime = 30
Projremove = 0
postype = p1
velocity = 0,0
offset = 0, -40
attr = A, SA
damage    = 120, 4
priority  = 5
hitflag = MAF
guardflag = MA
pausetime = 0,15
sparkxy = 0,0
sparkno = 3
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = 0,-13
guard.velocity = -7
air.velocity = 0,-13
envshake.time = 20           ;ヒットした時に画面を揺らす時間
envshake.ampl = 5            ;ヒットした時の画面の振幅
envshake.freq = 170          ;ヒットした時に画面が揺れる速度
fall = 1
hitsound          =s4,0
guardsound        =s3,2


[State 169994]
type = destroyself
trigger1 = time = 1



;--------------------------------------------
;星管理
[Statedef 45755]
type    = S
movetype= I
physics = N
vel = 0,0
ctrl = 0

[State -2]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

;ステート奪われている時間をカウント
[state kunt]
type = varset
trigger1 =1
v = 4
value =(roundstate=2)*(root,var(54)!=gametime+235)*(var(4)+1)
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999


;ライフの管理
[state life]
type = varset
trigger1 =roundstate=2&&(gametime%10=0&&var(40)-root,life<root,lifemax*0.1)||roundstate!=2
v = 40
value =(roundstate<=2)*(ifelse((roundstate<2),root,lifemax,root,life))
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999



[State 6000]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[state 2]
type = bindtoroot
trigger1 = 1
pos = 0,0
ignorehitpause = 1
SuperMoveTime = 99999999999
PauseMoveTime = 99999999999

[state 2]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1
SuperMoveTime = 99999999999
PauseMoveTime = 99999999999


[State -2,VarSet]
type = parentvarset
trigger1 = RoundNo = 1
trigger1 = time = 0
v = 20
value = 7

[State -2,VarSet]
type = parentvarset
trigger1 = Parent,Var(49) = 1
trigger1 = time = 0
v = 20
value = 7

[State -2,VarSet]
type = parentvarset
trigger1 = time = 10
v = 49
value = 0

[State -2,VarSet]
type = parentvaradd
trigger1 = time = 1
trigger2 = Parent,palno = 12
trigger2 = GameTime%500 = 1
v = 20
value = 2

;リセット
[State -2,VarSet]
type = parentvarset
trigger1 = time = 0
v = 14
value = 0


;
[State -2]
type = parentvarset
triggerall = TeamMode = single
trigger1 = roundstate=2
trigger1 = GameTime%10 = 1
trigger1 = EnemyNear,life-root,Var(15) < 0
trigger2 = time = 0
v = 15
value = EnemyNear,life


;リセット
[State -2,VarSet]
type = null;parentvarset
trigger1 = time = 0
v = 15
value = 0


[state -2]
type = assertspecial
trigger1 =root,MoveReversed = 1
flag = noko
ignorehitpause = 1
SuperMoveTime = 99999999
PauseMoveTime = 99999999









;-----------------------------------------------------
;救出ヘルパー
;自分に攻撃当てて好きなステートに飛ばせる
;
[Statedef 45766]
type    = S
movetype= A
physics = N
anim = 26528
ctrl = 0
velset = 0,0

[State 4]
type = DestroySelf
triggerall = root,palno != [11,12]
trigger1 = root,movetype!= H
trigger2 = RoundState != 2
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999


[State 6000]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[state 2]
type = bindtoroot
trigger1 = 1
pos = 0,0
ignorehitpause = 1
SuperMoveTime = 99999999999
PauseMoveTime = 99999999999

[state 2]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1
SuperMoveTime = 99999999999
PauseMoveTime = 99999999999

[State 4555]
type = Hitby
triggerall =root,palno = [11,12]
trigger1 =root,MoveReversed = 1
trigger1 =root,hitpausetime>120
trigger1 = gametime%60 = 1
value = SCA,SA
time = 1

[State 4555]
type = HitDef
triggerall =root,palno = [11,12]
trigger1 =root,MoveReversed = 1
trigger1 =root,hitpausetime>120
animtype  = Hard
attr = , HA
pausetime = 0,0
numhits = 0
ground.type = High
sparkno = -1
sparkxy = -30,-999
getpower = 0
givepower = 0
AffectTeam = F
p2stateno = 140

[State 4555]
type = HitDef
triggerall =root,palno = [11,12]
trigger1 =root,MoveReversed = 1
trigger1 =root,hitpausetime>120
attr = , HA
animtype = Hard
damage = 0
pausetime = 0,0
numhits = 0
getpower = 0
givepower = 0
ground.type = High
sparkno = -1
sparkxy = -30,-999
AffectTeam = F
p2stateno = 140

[State 220, 1]
type = null;Hitdef
triggerall =root,palno = [11,12]
trigger1 =root,MoveReversed = 1
trigger1 =root,hitpausetime>120
attr = S,NA
damage = 0,0
animtype = Hard
hitflag = MAF
guardflag = M
priority = 2,Hit
pausetime = 0,0
guard.pausetime = 11,9
sparkno = s7100
guard.sparkno = s7100
sparkxy = -30,Const(size.mid.pos.y)
hitsound = s3,2
guardsound = s3,2
ground.type = High
ground.slidetime = 14
ground.hittime = 26
guard.slidetime = 12
guard.hittime = 19
ground.velocity = -5.6,0
guard.velocity = -9.6
air.velocity = -2.4,ifelse(enemy,Vel Y <= 0 ,-3.8,-1.6)
airguard.velocity = 0,0
air.fall = 1
fall.recover = 1
fall.recovertime = 30
getpower = 65,21
ground.cornerpush.veloff = -8.6
guard.cornerpush.veloff = -9.6
air.cornerpush.veloff = 0
AffectTeam = F
p2stateno = 140

[State 6000]
type = HitOverride
trigger1 = 1
time = -1
attr = SCA,AA,AT,AP
slot = 0
stateno = 45766


