;---------------------------------------------------------------------------
;プルート
; 通常立ち状態
[Statedef 10000]
type = S
movetype = I
anim = 10000
velset = 0
sprpriority = 0

[State ];鬼巫女オーラ
type=Helper
triggerall=ishelper(8901)
trigger1=numhelper(8903)=0
trigger1=stateno=10000
name="ONI-MIKO-REIMU back"
id=8903
pos=0,0
postype=p1
sprpriority=1
stateno=8903
Helpertype=player
;keyctrl=1
ownpal=1
supermove=1
size.ground.back=0
size.ground.front=0
size.air.back=0
size.air.front=0
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause=1

[State 10000, var]
type = ParentVarset
trigger1 = 1
var(46)=1

[State 10000, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10000, Screen]
type = ScreenBound
trigger1 = 1
value = 0;1

[State 10000, Pos]
type = PosSet
trigger1 = Pos Y != 0
y = 0

[state 10000, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10000, victory];勝利ポーズ
type = Changestate
trigger1 = RoundState = 4 && win
value = 10180

[State 10000, lose];敗北ポーズ
type = Changestate
trigger1 = RoundState = 4 && lose
value = 10170


[State 10000, teamlose];チームモード専用敗北
type = Changestate
triggerall = numpartner
trigger1 = partner,alive = 1 && parent,life = 0
value = 10170

[State 10000, turn];振り向き
type = ChangeState
trigger1 = p2dist X < 0
value = 10005

[State 10000, walkfwd];前歩き
type = ChangeState
trigger1 = parentdist x > 45
value = 10020

[State 10000, walkback];後ろ歩き
type = ChangeState
triggerall = BackEdgeBodyDist >= 16
trigger1 = parentdist x < 15
value = 10021
;---------------------------------------------------------------------------
;Intro
[Statedef 10001]
type = S
movetype = I
anim = 10001
velset = 0
sprpriority = 0

[State 10171, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1700,0
volume = 0

[State 10000, walkback];後ろ歩き
type = ChangeState
trigger1=animtime=0
value = 10000

;------------------------------------------------------
; 　　　　　　　　　　　　　振り向き
;------------------------------------------------------
[Statedef 10005]
type = S
movetype = I
anim = 10005
sprpriority = 0

[State 10005, Screen]
type = ScreenBound
trigger1 = 1
value = 0;1

[state 10005, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10005, 2]
type = Turn
trigger1 = animTime = 0

[State 10005, var]
type = ParentVarset
trigger1 = 1
var(46)=0

[State 10005, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10005, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 10000

;------------------------------------------------------
; 　　　　　　　　　　　前に歩く
;------------------------------------------------------
[Statedef 10020]
type = S
movetype = I
anim = 10020
velset = 2.5,0
sprpriority = 0

[State 10020, Screen]
type = ScreenBound
trigger1 = 1
value = 0;1

[state 10020, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10020, var]
type = ParentVarset
trigger1 = 1
var(46)=1

[State 10020, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10020, dash]
type = ChangeState
trigger1 = parentdist x > 100
value = 10040

[State 10020, end]
type = ChangeState
trigger1 = parentdist x < 40
trigger2 = parentdist x < -40; && (facing = parent, facing)
value = 10000

;------------------------------------------------------
; 　　　　　　　　　　　後ろに歩く
;------------------------------------------------------
[Statedef 10021]
type = S
movetype = I
anim = 10021
velset = -2.5, 0
sprpriority = 0
facep2 = 0;1

[State 10021, Screen]
type = ScreenBound
trigger1 = 1
value = 1

[state 10021, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10021, var]
type = ParentVarset
trigger1 = 1
var(46)=1

[State 10021, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10021, dash]
type = ChangeState
trigger1 = parentdist x < -30
value = 10041

[State 10021, end]
type = ChangeState
trigger1 = parentdist x > 40
trigger2 = BackEdgeBodyDist <= 15
value = 10000

;------------------------------------------------------
; 　　　　　　　　　　　ダッシュはじめ
;------------------------------------------------------
[Statedef 10040]
type = S
movetype = I
anim = 10040
velset = 0, 0
sprpriority = 0

[state 10040, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10040, Screen]
type = ScreenBound
trigger1 = 1
value = 0;1

[State 10040, var]
type = ParentVarset
trigger1 = 1
var(46)=0

[State 10040, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10040, change]
type = ChangeState
trigger1 = animtime = 0
value = 10101


;------------------------------------------------------
; 　　　　　　　　　　バックダッシュはじめ
;------------------------------------------------------
[Statedef 10041]
type = S
movetype = I
anim = 10040
velset = 0, 0
sprpriority = 0

[state 10041, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10041, Screen]
type = ScreenBound
trigger1 = 1
value = 0;1

[State 10041, var]
type = ParentVarset
trigger1 = 1
var(46)=0

[State 10041, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10041, change]
type = ChangeState
trigger1 = animtime = 0
value = 10105


;------------------------------------------------------
; 　　　　　　　　　　　前ダッシュ
;------------------------------------------------------
[Statedef 10101]
type = S
movetype = I
anim = 10101
velset = 5.5, 0
sprpriority = 0

[State 10101, vel2]
type = Velset
trigger1 = time > 15
x = 8

[State 10101, Screen]
type = ScreenBound
trigger1 = 1
value = 0;1

[state 10101, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10101, var]
type = ParentVarset
trigger1 = 1
var(46)=0

[State 10101, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10101, walk]
type = ChangeState
trigger1 = parentdist x < 40
value = 10110


;------------------------------------------------------
; 　　　　　　　　　　　後ろダッシュ
;------------------------------------------------------

[Statedef 10105]
type = S
movetype = I
anim = 10000
velset = -5, 0
sprpriority = 0

[State 10101, vel2]
type = Velset
trigger1 = time > 15
x = -7.5

[State 10105, Screen]
type = ScreenBound
trigger1 = 1
value = 0;1

[state 10105, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10105, var]
type = ParentVarset
trigger1 = 1
var(46)=0

[State 10105, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10105, walk];後ろ歩き
type = ChangeState
trigger1 = parentdist x > 40
trigger2 = BackEdgeBodyDist <= 15
value = 10110


;------------------------------------------------------
; 　　　　　　　　　　　ダッシュブレーキ
;------------------------------------------------------

[Statedef 10110]
type = S
movetype = I
anim = 10110
velset = 0, 0
sprpriority = 0

[State 10110, Screen]
type = ScreenBound
trigger1 = 1
value = 0;1

[state 10110, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10110, var]
type = ParentVarset
trigger1 = 1
var(46)=1

[State 10110, losesprite]
type = sprpriority
trigger1 = lose
value = -3

[State 10110, change]
type = ChangeState
trigger1 = animtime = 0
value = 10000

;---------------------------------------------------
;                     敗北
;---------------------------------------------------
[Statedef 10170]
Type = S
MoveType = I
Physics = S
anim = 10070
sprpriority = 0
velset = 0,0
ctrl = 0

[State 10171, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1700,0
volume = 0

[State 10180, lose1]
type = ChangeAnim
triggerall = Matchover != 1
triggerall = Anim != 10170
trigger1 = lose && RoundState = 4
trigger2 = parent, StateNo = 170
value = 10170

[State 10180, sprpriority]
type = sprpriority
trigger1 = lose
value = -3

[State 10180, teamlose];チームモード専用敗北
type = ChangeAnim
triggerall = numpartner
trigger1 = partner,alive = 1 && parent,life = 0
value = 15000


;---------------------------------------------------
;                     勝利
;---------------------------------------------------
[Statedef 10180]
Type = S
MoveType = I
Physics = S
anim = 10080
sprpriority = 0
velset = 0,0
ctrl = 0

[State 10171, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1700,0
volume = 0

[State 10180, anim];勝利ポーズ
type = ChangeAnim
triggerall = win && RoundState = 4
trigger1 = parent, StateNo = 181
trigger1 = Anim != 10180
trigger2 = parent, StateNo = 182
trigger2 = Anim != 10180
trigger3 = parent, StateNo = 183
trigger3 = Anim != 10180
trigger4 = parent, StateNo = 184
trigger4 = Anim != 10180
value = 10180

;============================================================
;------------------------------ 挑発
;============================================================

[Statedef 10195]
type = S
movetype = I
physics = S
anim = 10195
velset = 0
ctrl = 0

[State 10195, var]
type = ParentVarset
trigger1 = 1
var(46)=0

[state 10195, nothit]
type = NotHitBy
trigger1 = 1
value = SCA

[State 10195, end]
type = ChangeState
trigger1 = parent, StateNo = 195 && animelem = 6
trigger2 = parent, StateNo != 195
value = 10000

;--------------------------------------------------------------------
;鬼巫女オーラ
[Statedef 8903]
sprpriority=4

[State ]
type=assertspecial
trigger1=ishelper(8903)
flag=noshadow
ignorehitpause=1

[state ]
type=posset
trigger1=ishelper(8903)
trigger1=numhelper(8901)
x=helper(8901),pos X
y=helper(8901),pos Y +30

[state ]
type=turn
trigger1=ishelper(8903)
trigger1=numhelper(8901)
trigger1=helper(8901),facing !=facing

[State ]
type=screenbound
trigger1=ishelper(8903)
trigger1=numhelper(8901)
trigger1=var(0):=var(0)+1||1
value=0
movecamera=0,0

[state ]
type=trans
trigger1=ishelper(8903)
trans=add
ignorehitpause=1

[state ]
type=changeanim
trigger1=ishelper(8903)
trigger1=numhelper(8901)
value=parent,anim
elem=parent,animelemno(0)
ignorehitpause=1

[state ]
type=palfx
trigger1=ishelper(8903)
trigger1=animelem=1
time=-1
add=100,-180,-180
sinadd=-80,-80,-80,10
color=0
invertall=1
ignorehitpause=1

[state ]
type=angledraw
trigger1=ishelper(8903)
scale=2.5+0.7*sin(Pi*(gametime%120)*0.1)*(gametime%120<11),2.5+0.7*sin(Pi*(gametime%120)*0.1)*(gametime%120<11)
ignorehitpause=1

[state ]
type=destroyself
trigger1=win

;--------------------------------------------------------------------
;賽銭箱
[Statedef 8902]
type=S
ctrl=0
anim=8906
sprpriority=6

[State ]
type=assertspecial
trigger1=ishelper(8902)
flag=noshadow
ignorehitpause=1

[state ]
type=sprpriority
trigger1=ishelper(8902)
trigger1=pos Y=0
value=1

[state ]
type=changeanim
trigger1=ishelper(8902)
trigger1=anim!=8906
value=8906

[State ]
type=screenbound
trigger1=ishelper(8902)
trigger1=var(0):=var(0)+1||1
value=0
movecamera=0,0

[state ]
type=velset
trigger1=ishelper(8902)
trigger1=pos Y !=0
y=5

[state ]
type=PlaySnd
trigger1=ishelper(8902)
trigger1=var(0)=1
value=1,20
volume=240
freqmul=1
loop=0

[state ]
type=velset
trigger1=ishelper(8902)
trigger1=pos Y=0
y=0

[state ]
type=posset
trigger1=ishelper(8902)
trigger1=pos Y >0
y=0

[state ]
type=PlaySnd
trigger1=ishelper(8902)
trigger1=var(0)=[663,943]
value=1,6
volume=-150
freqmul=1
loop=0
channel=1

[state ]
type=changeanim
trigger1=win
value=8907
