;--------------------------------------------------------------------
;コモン
;--------------------------------------------------------------------
;通常立ち
[Statedef 0]
type = S
physics = S
sprpriority = 0

[state ]
type = selfstate
trigger1 = !ishelper
value = 5150
ctrl = 0

[State ]
type = Helper
triggerall = ishelper(5150)
trigger1 = NumHelper(1) = 0
trigger1 = root,var(59)!=9999
trigger1 = root,life>0
trigger1 = roundstate=2
name = "damage"
id = 1
pos = 0,0
postype = p1
sprpriority = 0
stateno = 9999
Helpertype = player
keyctrl = 0
ownpal = 1
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = Helper
triggerall = numhelper(2)=0
trigger1 = roundstate >=2&&time=0
trigger1 = root,life>0
trigger1 = root,var(59)!=9999
name = "wall"
stateno = 8888
ID = 2
helpertype = player
pos = 0,0
postype = p2
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = Helper
triggerall = numhelper(3)=0
trigger1 = root,life>0
name = "death"
stateno = 5150
ID = 3
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[state ];記憶テスト
type = null;Helper
trigger1 = numhelper(987654321)=0
name = "kioku"
stateno = 987654321
ID = 987654321
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = VelSet
trigger1 = Time = 0
y = 0

[State ]
type = VelSet
trigger1 = (abs(Vel X) < 2)
trigger2 = Time = 4
trigger3 = (PrevStateNo = 20) && (Time = 0)
x = 0

[State ]
type = turn
trigger1 = fvar(0)<0

[State ]
type = posset
trigger1 = ishelper(5150)
y = 0

[State ]
type = velset
trigger1 = 1
x = 0
y = 0

[State ]
type = changeanim
trigger1 = ishelper(5150)
trigger1 = anim!=1
trigger1 = root,palno%2=0
trigger1 = root,palno%6!=5&&root,palno%6!=0
value = 1
[State ]
type = changeanim
trigger1 = ishelper(5150)
trigger1 = anim!=2
trigger1 = root,palno%2=1
trigger1 = root,palno%6!=5&&root,palno%6!=0
value = 2
[State ]
type = changeanim
trigger1 = ishelper(5150)
trigger1 = anim!=3
trigger1 = root,palno%6=5||root,palno%6=0
value = 3

[State ]
type = SelfState
triggerall = ishelper(5150)
trigger1 = roundstate = 0
trigger1 = roundno = 1
value = 190

[State ]
type = SelfState
triggerall = ishelper(5150)
trigger1 = roundstate = 4
trigger1 = WIN
value = 180

[State ]
type = SelfState
triggerall = ishelper(5150)
trigger1 = roundstate = 4
trigger1 = DRAWGAME
value = 175

[State ]
type = SelfState
triggerall = ishelper(5150)
trigger1 = roundstate = 4
trigger1 = LOSE
trigger1 = life>0 ;alive
trigger1 = !loseko
value = 170

[State ]
type = DestroySelf
trigger1 = root,var(59)=9999
trigger1 = roundstate=2
ignorehitpause = 1

;--------------------------------------------------------------------
;しゃがむ動作
[Statedef 10]
type    = C
physics = C
anim = 10

[State ]
type = posset
trigger1 = time = 0
Y = 0

[State ]
type = turn
trigger1 = fvar(0)<0

[State ]
type = velset
trigger1 = Time = 0
x = 0
y = 0

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = AnimTime = 0
trigger2 = command = "holddown"
value = 11

;--------------------------------------------------------------------
;しゃがみ
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0

[State ]
type = posset
triggerall = ishelper(5150)
trigger1 = time = 0
Y = 0

[State ]
type = velset
trigger1 = Time = 0
x = 0
y = 0

[State ]
type = turn
trigger1 = fvar(0)<0

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = Anim = 6 && AnimTime = 0
value = 11

[State ]
type = changestate
triggerall = ishelper(5150)
trigger1 = command != "holddown"
trigger1 = var(59)=0
trigger2 = var(59)!=0 && (var(9)=0||var(9)=2) ;自重or近距離
trigger2 = fvar(1)>-130||fvar(0)>60
value = 12

;--------------------------------------------------------------------
;立ち上がる動作
[Statedef 12]
type    = S
physics = S
anim = 12

[State ]
type = posset
trigger1 = time = 0
Y = 0

[State ]
type = velset
trigger1 = Time = 0
x = 0
y = 0

[State ]
type = turn
trigger1 = fvar(0)<0

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = AnimTime = 0
value = 0


;--------------------------------------------------------------------
;前進＆後退
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State ]
type = posset
triggerall = ishelper(5150)
trigger1 = time = 0
Y = 0

[State ];ある程度距離があると振り向く
type = turn
trigger1 = fvar(0)<-40

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = command = "holdfwd"
trigger1 = var(59)=0 ;AI無し
trigger2 = var(59)!=0 && (var(9)=0||var(9)=2) ;自重or近距離
trigger2 = fvar(0)>60 ;離れてるから近寄る
trigger2 = random>500
trigger3 = var(59)!=0 && (var(9)=0||var(9)=2) ;自重or近距離
trigger3 = fvar(0)<40 ;近いから離れる
trigger3 = BackEdgeBodyDist<50 ;壁際
trigger4 = var(59)!=0 && var(9)=1 ;遠距離砲台
trigger4 = fvar(0)<80 ;近いから離れる
trigger4 = BackEdgeBodyDist<60 ;壁際
trigger5 = var(59)!=0 && var(9)=3 ;自重無し
trigger5 = fvar(0)<50 ;近いから離れる
trigger5 = BackEdgeBodyDist<40 ;壁際
x = const(velocity.walk.fwd.x)

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = command = "holdback"
trigger1 = var(59)=0 ;AI無し
trigger2 = var(59)!=0 && (var(9)=0||var(9)=2) ;自重or近距離
trigger2 = fvar(0)<40 ;近いから離れる
trigger2 = random<=500
trigger3 = var(59)!=0 && var(9)=1 ;遠距離砲台
trigger3 = fvar(0)<80 ;近いから離れる
trigger3 = random<=500
trigger3 = BackEdgeBodyDist>60 ;壁際ではない
trigger4 = var(59)!=0 && var(9)=3 ;自重無し
trigger4 = fvar(0)<50 ;近いから離れる
trigger4 = random<=500
trigger4 = BackEdgeBodyDist>40 ;壁際ではない
x = const(velocity.walk.back.x)

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State ]
type = ChangeState
triggerall = ishelper(5150)
triggerall = roundstate = 2
trigger1 = var(59)=0
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger2 = var(59)!=0 && (var(9)=0||var(9)=2) ;自重or近距離
trigger2 = fvar(0)=[40,60] ;距離40-60
trigger2 = fvar(0)=[-60,-40] ;距離40-60
trigger3 = var(59)!=0 && var(9)=1 ;遠距離砲台
trigger3 = fvar(0)>80 ;距離80
trigger3 = fvar(0)<-80 ;距離80
trigger4 = var(59)!=0 && var(9)=3 ;自重無し
trigger4 = fvar(0)>50 ;距離50
trigger4 = fvar(0)<-50 ;距離50
value = 0

[State ]
type = changestate
triggerall = ishelper(5150)
triggerall = roundstate = 2
trigger1 = command = "holdup"
trigger1 = var(59)=0 ;AI無し
value = 40

;--------------------------------------------------------------------
;ジャンプ開始
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State ]
type = turn
trigger1 = fvar(0)<0

[State ]
type = VarSet
triggerall = ishelper(5150)
trigger1 = Time = 0
sysvar(1) = 0

[State ]
type = VarSet
triggerall = ishelper(5150)
trigger1 = command = "holdfwd"
trigger1 = var(59)=0
trigger2 = var(59)!=0 && (var(9)=0||var(9)=2) ;自重or近距離
sysvar(1) = 1

[State ]
type = VarSet
triggerall = ishelper(5150)
trigger1 = command = "holdback"
trigger1 = var(59)=0
sysvar(1) = -1

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = time = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = time = 0
value = 50
ctrl = 0
;--------------------------------------------------------------------
;ジャンプ
[Statedef 50]
type    = A
physics = A

[State ]
type = VarSet
triggerall = ishelper(5150)
trigger1 = Time = 0
sysvar(1) = 0

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

;--------------------------------------------------------------------
;ジャンプ後の下降
[Statedef 51]
type    = A
physics = A

[State ]
type = null
trigger1 = 1

;--------------------------------------------------------------------
;着地
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = time = 0
y = 0

[State ]
type = PosSet
triggerall = ishelper(5150)
trigger1 = time = 0
y = 0

[State ]
type = turn
trigger1 = fvar(0)<0

[State ]
type = CtrlSet
triggerall = ishelper(5150)
trigger1 = time = 1
value = 1

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------------------------------------------------
;ガード開始
[Statedef 120]
type = U
physics = U

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = Time = 0
value = 120 + (statetype = C) + (statetype = A)*2

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = Time = 0 && statetype = S
physics = S

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = Time = 0 && statetype = C
physics = C

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = Time = 0 && statetype = A
physics = A

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = AnimTime = 0
value = 130 + (statetype = C) + (statetype = A)*2

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;--------------------------------------------------------------------
;ガード受付（立ち）
[Statedef 130]
type    = S
physics = S

[State ]
type = posset
triggerall = ishelper(5150)
trigger1 = time = 0
Y = 0

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = Anim != 130
value = 130

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = command = "holddown"
value = 131

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140
;--------------------------------------------------------------------
;ガード受付（しゃがみ）
[Statedef 131]
type    = C
physics = C

[State ];地面に立ってろ
type = posset
triggerall = ishelper(5150)
trigger1 = time = 0
Y = 0

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = Anim != 131
value = 131

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = command != "holddown"
value = 130

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;--------------------------------------------------------------------
;ガード受付（空中）
[Statedef 132]
type    = A
physics = N

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = Anim != 132
value = 132

[State ]
type = VelAdd
triggerall = ishelper(5150)
trigger1 = 1
y = Const(movement.yaccel)

[State ]
type = VarSet
triggerall = ishelper(5150)
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = sysvar(0)
y = 0

[State ]
type = PosSet
triggerall = ishelper(5150)
trigger1 = sysvar(0)
y = 0

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = sysvar(0)
value = 52

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;--------------------------------------------------------------------
;ガード終了
[Statedef 140]
type = U
physics = U
ctrl = 1

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = Time = 0
value = 140 + (statetype = C) + (statetype = A)*2

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = Time = 0 && statetype = S
physics = S

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = Time = 0 && statetype = C
physics = C

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = Time = 0 && statetype = A
physics = A

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

;--------------------------------------------------------------------
;ガード硬直（立ち）
[Statedef 150]
type    = S
movetype= I
physics = N
velset = 0,0

[State ]
type = posset
triggerall = ishelper(5150)
trigger1 = time = 0
Y = 0

[State ]
type = ChangeAnim
trigger1 = ishelper(5150)
value = 150

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State ]
type = ForceFeedback
triggerall = ishelper(5150)
trigger1 = time = 0
waveform = square
time = 3

[State ]
type = selfstate
trigger1 = ishelper(5150)
trigger1 = pos Y >= 0
value = 0

[State ]
type = selfstate
trigger1 = ishelper(5150)
trigger1 = pos Y < 0
value = 52

;--------------------------------------------------------------------
;ガード硬直解除後の後退（立ち）
[Statedef 151]
type    = S
movetype= I
physics = S
anim = 150

[State ]
type = posset
triggerall = ishelper(5150)
trigger1 = time = 0
Y = 0

[State ]
type = HitVelSet
triggerall = ishelper(5150)
trigger1 = Time = 0
x = 1

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State ]
type = CtrlSet
triggerall = ishelper(5150)
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = HitOver
value = 130
ctrl = 1

;--------------------------------------------------------------------
;ガード硬直（しゃがみ）
[Statedef 152]
type    = C
movetype= I
physics = N
velset = 0,0

[State ]
type = posset
triggerall = ishelper(5150)
trigger1 = time = 0
Y = 0

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = 1
value = 151

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State ]
type = ForceFeedback
triggerall = ishelper(5150)
trigger1 = time = 0
waveform = square
time = 4

;--------------------------------------------------------------------
;ガード硬直解除後の後退（しゃがみ）
[Statedef 153]
type    = C
movetype= I
physics = C
anim = 151

[State ]
type = posset
triggerall = ishelper(5150)
trigger1 = time = 0
Y = 0

[State ]
type = HitVelSet
triggerall = ishelper(5150)
trigger1 = Time = 0
x = 1

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State ]
type = CtrlSet
triggerall = ishelper(5150)
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State ]
type = StateTypeSet
triggerall = ishelper(5150)
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = HitOver
value = 131
ctrl = 1

;--------------------------------------------------------------------
;ガード硬直（空中）
[Statedef 154]
type    = A
movetype= I
physics = N
velset = 0,0

[State ]
type = ChangeAnim
triggerall = ishelper(5150)
trigger1 = 1
value = 152

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = HitShakeOver
value = 155

[State ]
type = ForceFeedback
triggerall = ishelper(5150)
trigger1 = time = 0
waveform = square
time = 4

;--------------------------------------------------------------------
;ガード硬直解除後の後退（空中）
[Statedef 155]
type    = A
movetype= I
physics = N
anim = 152

[State ]
type = HitVelSet
triggerall = ishelper(5150)
trigger1 = Time = 0
x = 1
y = 1

[State ]
type = VelAdd
triggerall = ishelper(5150)
trigger1 = 1
y = Const(movement.yaccel)

[State ]
type = CtrlSet
triggerall = ishelper(5150)
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State ]
type = VarSet
triggerall = ishelper(5150)
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State ]
type = VelSet
triggerall = ishelper(5150)
trigger1 = sysvar(0)
y = 0

[State ]
type = PosSet
triggerall = ishelper(5150)
trigger1 = sysvar(0)
y = 0

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State ]
type = ChangeState
triggerall = ishelper(5150)
trigger1 = sysvar(0)
value = 52

;--------------------------------------------------------------------
;タイムオーバーで負けた時
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State ]
type = assertspecial
triggerall = name = "Crazy-Catastrophe"
trigger1 = roundstate >=3
flag = roundnotover
ignorehitpause = 1

[state ]
type = selfstate
trigger1 = !ishelper
trigger1 = roundstate <= 2
value = 5150
ignorehitpause = 1

[State ]
type = VarRandom
triggerall = ishelper(5150)
trigger1 = time = 0
trigger2 = !ishelper && var(59)=9999
trigger2 = time = 0
v = 3
range = 0,1

[State ]
Type = ChangeState
triggerall = ishelper(5150)
Trigger1 = Var(3) = 0
trigger2 = !ishelper && var(59)=9999
trigger2 = Var(3) = 0
Value = 171

[State ]
Type = ChangeState
triggerall = ishelper(5150)
Trigger1 = Var(3) = 1
trigger2 = !ishelper && var(59)=9999
trigger2 = Var(3) = 1
Value = 172

;--------------------------------------------------------------------
;タイムオーバーで引き分けた時
[Statedef 175]
type = S
ctrl = 0
velset = 0,0

[State ]
type = assertspecial
triggerall = name = "Crazy-Catastrophe"
trigger1 = roundstate >=3
flag = roundnotover
ignorehitpause = 1

[state ]
type = selfstate
trigger1 = !ishelper && var(59)!=9999
trigger1 = roundstate <= 2
value = 5150
ignorehitpause = 1

[State ]
type = VarRandom
trigger1 = ishelper(5150)
trigger1 = time = 0
trigger2 = !ishelper && var(59)=9999
trigger2 = time = 0
v = 3
range = 0,1

[State ]
Type = ChangeState
trigger1 = ishelper(5150)
Trigger1 = Var(3) = 0
trigger2 = !ishelper && var(59)=9999
trigger2 = Var(3) = 0
Value = 171

[State ]
Type = ChangeState
trigger1 = ishelper(5150)
Trigger1 = Var(3) = 1
trigger2 = !ishelper && var(59)=9999
trigger2 = Var(3) = 1
Value = 172

;--------------------------------------------------------------------
[Statedef 171];「下の下だな…」
type = S
ctrl = 0
anim = 172
velset = 0,0

[state ]
type = selfstate
trigger1 = !ishelper && var(59)!=9999
value = 5150
ignorehitpause = 1

[State ]
type = AssertSpecial
trigger1 = time <= 260
flag = roundnotover

[state ]
type = PlaySnd
trigger1 = animelem = 5
value = 190,1
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(54) = 10
value = 182, 0
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(55) = 0
value = 211,0
volume = 240
freqmul = 1
loop = 0

;--------------------------------------------------------------------
[Statedef 172];「天上天下」
type = S
ctrl = 0
anim = 181
velset = 0,0

[state ]
type = selfstate
trigger1 = !ishelper && var(59)!=9999
value = 5150
ignorehitpause = 1

[State ]
type = AssertSpecial
trigger1 = time <= 240
flag = roundnotover

[state ]
type = Explod
trigger1 = time = 0
anim = 182
ID = 182
pos = 0, 0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -1
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = time = 100
value = 181, 0
volume = 240
freqmul = 1
loop = 0

[State ]
type = AssertSpecial
trigger1 = time >= 200
flag = invisible

[State ]
type = removeexplod
trigger1 = time >= 200
ID=182

[state ]
type = PlaySnd
trigger1 = time = 200
value = 211,0
volume = 240
freqmul = 1
loop = 0

;--------------------------------------------------------------------
;勝利演出分岐
[Statedef 180]
type = S
ctrl = 0
velset = 0,0
sprpriority = 1

[State ]
type = assertspecial
triggerall = name = "Crazy-Catastrophe"
trigger1 = roundstate >=3
flag = roundnotover
ignorehitpause = 1

[state ]
type = selfstate
trigger1 = !ishelper
trigger1 = roundstate <= 2
value = 5150
ignorehitpause = 1

[state ];分岐
type = VarRandom
trigger1 = ishelper(5150)
trigger1 = time = 0
trigger2 = !ishelper && var(59)=9999
trigger2 = time = 0
v = 1
range = 2

[state ]
type = changestate
trigger1 = ishelper(5150)
trigger1 = Var(1) = 0
trigger2 = !ishelper && var(59)=9999
trigger2 = Var(1) = 0
value = 181

[state ]
type = changestate
trigger1 = ishelper(5150)
trigger1 = Var(1) = 1
trigger2 = !ishelper && var(59)=9999
trigger2 = Var(1) = 1
value = 182

[state ]
type = changestate
trigger1 = ishelper(5150)
trigger1 = Var(1) = 2
trigger2 = !ishelper && var(59)=9999
trigger2 = Var(1) = 2
value = 183
;--------------------------------------------------------------------
;勝利 その１
[Statedef 181]
Type = S
Ctrl = 0
VelSet = 0,0
anim = 181
sprpriority = 1

[state ]
type = selfstate
trigger1 = !ishelper && var(59)!=9999
value = 5150
ignorehitpause = 1

[state ]
type = selfstate
trigger1 = ishelper(5150) && stateno !=181
value = 181
ignorehitpause = 1

[state ]
type = changeanim
trigger1 = anim != 181
value = 181

[state ]
type = Explod
trigger1 = time = 0
anim = 182
ID = 182
pos = 0, 0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -1
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = time = 100
value = 181, 0
volume = 240
freqmul = 1
loop = 0

[State ]
type = AssertSpecial
trigger1 = time >= 200
flag = invisible

[State ]
type = removeexplod
trigger1 = time >= 200
ID=182

[state ]
type = PlaySnd
trigger1 = time = 200
value = 211,0
volume = 240
freqmul = 1
loop = 0

[state ];GAMEOVER
type = Explod
trigger1 = time=200
trigger1 = ishelper(5150)
anim = 4000
ID = 4000
pos = 0, 0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = 999999999999
ontop = 1
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ];GAMEOVER
type = PlaySnd
trigger1 = numexplod(4000)>0
trigger1 = time = 200
value = 1,1
volume = 240
freqmul = 1
loop = 0

[State ]
type = AssertSpecial
trigger1 = numexplod(4000)>0
flag = nobardisplay
flag2 = nomusic

[State ]
type = AssertSpecial
trigger1 = numexplod(4000)>0
trigger1 = roundstate =4
trigger1 = time <= 600
flag = roundnotover

[State ]
type = AssertSpecial
trigger1 = numexplod(4000)=0
trigger1 = roundstate =4
trigger1 = time <= 280
flag = roundnotover

;--------------------------------------------------------------------
;勝利 その２
[Statedef 182]
Type = S
Ctrl = 0
VelSet = 0,0
anim = 172
sprpriority = 1

[state ]
type = selfstate
trigger1 = !ishelper && var(59)!=9999
value = 5150
ignorehitpause = 1

[state ]
type = selfstate
trigger1 = ishelper(5150) && stateno !=182
value = 182
ignorehitpause = 1

[state ]
type = changeanim
trigger1 = anim != 172
value = 172

[state ]
type = PlaySnd
trigger1 = animelem = 5
value = 190,1
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(54) = 10
value = 182, 0
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(55) = 0
value = 211,0
volume = 240
freqmul = 1
loop = 0

[state ];GAMEOVER
type = Explod
trigger1 = time = 200
trigger1 = ishelper(5150)
anim = 4000
ID = 4000
pos = 0, 0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = 999999999999
ontop = 1
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ];GAMEOVER
type = PlaySnd
trigger1 = numexplod(4000)>0
trigger1 = time = 200
value = 1,1
volume = 240
freqmul = 1
loop = 0

[State ]
type = AssertSpecial
trigger1 = numexplod(4000)>0
flag = nobardisplay
flag2 = nomusic

[State ]
type = AssertSpecial
trigger1 = numexplod(4000)>0
trigger1 = roundstate =4
trigger1 = time <= 680
flag = roundnotover

[State ]
type = AssertSpecial
trigger1 = numexplod(4000)=00
trigger1 = roundstate =4
trigger1 = time <= 280
flag = roundnotover

;--------------------------------------------------------------------
;勝利 その３
[Statedef 183]
Type = S
Ctrl = 0
VelSet = 0,0
anim = 173
sprpriority = 1

[state ]
type = selfstate
trigger1 = !ishelper && var(59)!=9999
value = 5150
ignorehitpause = 1

[state ]
type = selfstate
trigger1 = ishelper(5150) && stateno !=183
value = 183
ignorehitpause = 1

[state ]
type = changeanim
trigger1 = anim != 173
value = 173

[State ]
type = AssertSpecial
trigger1 = roundstate =4
trigger1 = time <= 260
flag = roundnotover

[state ]
type = PlaySnd
trigger1 = animelemtime(2) = 1
value = 0,22
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(11) = 2
value = 0,23
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(14) = 1
value = 211,0
volume = 240
freqmul = 1
loop = 0

;--------------------------------------------------------------------
;イントロ準備
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State ];特殊イントロ
Type = SelfState
triggerall = ishelper(5150)
Trigger1 = Var(5) = 8901 ;VS鬼巫女
Value = 19000

[State ];VSファントム&イントロシンクロ
Type = SelfState
triggerall = ishelper(5150)
Trigger1 = Var(5) = 171010
Value = 194

[State ]
type = VarRandom
triggerall = ishelper(5150)
trigger1 = time = 0
trigger1 = var(5)=0 ;特殊イントロでは無い
v = 2
range = 3

[State ]
Type = SelfState
triggerall = ishelper(5150)
Trigger1 = Var(2) = 0
Value = 191

[State ]
Type = SelfState
triggerall = ishelper(5150)
Trigger1 = Var(2) = 1
Value = 192

[State ]
Type = SelfState
triggerall = ishelper(5150)
Trigger1 = Var(2) = 2
Value = 193

[State ]
Type = SelfState
triggerall = ishelper(5150)
Trigger1 = Var(2) = 3
Value = 194

;--------------------------------------------------------------------
;イントロ その１ 「……………倒してみせよ…………ｱﾘｴﾝ!」
[Statedef 191]
type = S
ctrl = 0
anim = 190

[State ]
type = AssertSpecial
trigger1 = anim = 190
flag = intro

[State ]
type = AngleDraw 
trigger1 = 1

[State ]
type = Angleadd
trigger1 = time = [282,401]
value = 30

[state ]
type = PlaySnd
trigger1 = animelem = 13
value = 190, 0
volume = 240
freqmul = 0.8
loop = 0

[state ]
type = PlaySnd
trigger1 = animtime = 0
value = 10,11
volume = 240
freqmul = 2.5
loop = 0

[state ]
type = Explod
trigger1 = animelem = 13
anim = 191
ID = 191
pos = 0, 0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = animelemtime(13) = 1
value = 190,1
volume = 240
freqmul = 1
loop = 0
[state ]
type = PlaySnd
trigger1 = animelem = 14
value = 190,2
volume = 240
freqmul = 1
loop = 0

[State ]
type = SelfState
trigger1 = ishelper(5150)
trigger1 = animTime = 0
value = 0

;--------------------------------------------------------------------
;イントロ その２　「血が…血が…ありえん！………倒してみせよ」
[Statedef 192]
type = S
ctrl = 0
anim = 192

[State ]
type = AssertSpecial
trigger1 = stateno = 192
flag = intro

[state ]
type = PlaySnd
trigger1 = time = 1
value = 2000,0
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(4) = 1
trigger2 = animelemtime(20) = 1
trigger3 = animelemtime(36) = 1
value = 1500,0
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(40) = 1
value = 10,10
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(10) = 1
trigger2 = animelemtime(26) = 1
value = 192,0
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(53) = 1
value = 190, 0
volume = 240
freqmul = 0.8
loop = 0

[state ]
type = Explod
trigger1 = animelemtime(35) = 0
anim = 193
ID = 193
pos = 0, 0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = Explod
trigger1 = animelem = 51
anim = 191
ID = 191
pos = 0, 0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = animelemtime(53) = 1
value = 190,1
volume = 240
freqmul = 1
loop = 0
[state ]
type = PlaySnd
trigger1 = animelemtime(54) = 1
value = 190,2
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelem = 5
trigger2 = animelem = 21
trigger3 = animelem = 37
value = 240,0
volume = 240
freqmul = 1
loop = 0

[State ]
type = SelfState
trigger1 = ishelper(5150)
trigger1 = animTime = 0
value = 0

;--------------------------------------------------------------------
;イントロ その３　caved!!!!
[Statedef 193]
type = S
ctrl = 0
anim = 194

[State ]
type = AssertSpecial
trigger1 = stateno = 193
flag = intro

[state ]
type = PlaySnd
trigger1 = animelemtime(5) = 1
value = 0,26
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(65) = 1
value = 0,27
volume = -200
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(67) = 1
value = 0,29
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(74) = 10
value = 0,30
volume = 240
freqmul = 1
loop = 0

[state ]
type = Explod
trigger1 = animelemtime(11) = 1
anim = 3
ID = 193
pos = 60, 0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 30,30,30
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = numexplod(193)=1
trigger1 = animelemtime(11) = 1
value = 211,0
volume = 240
freqmul = 1
loop = 0

[State ]
type = removeexplod
trigger1 = animelemtime(64)=4
ID=193

[state ]
type = Explod
trigger1 = animelemtime(64) = 4
anim = 5012
ID = 5012
pos = 60, 0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 30,30,30
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ];!
type = Explod
trigger1 = animelemtime(64) = 4
anim = 3033
ID = 3033
pos = 80, -130
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = 15
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 0,0,0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = numexplod(5012)=1
trigger1 = animelemtime(65) = 1
value = 2300,3
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = numexplod(5012)=1
trigger1 = animelemtime(65) = 1
value = 1,0
volume = 240
freqmul = 1
loop = 0

[State ]
type = removeexplod
trigger1 = animelemtime(67)=1
ID=5012

[state ]
type = Explod
trigger1 = animelemtime(67) = 1
anim = 5050
ID = 5050
pos = 60, 0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 45
scale = 1,1
vel = -7,-6.5
accel = 0,0.5
sprpriority = 1
ontop = 0
shadow = 30,30,30
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = numexplod(5050)=1
trigger1 = animelemtime(67) = 1
value = 10,10
volume = 240
freqmul = 1
loop = 0

[State ]
type = SelfState
trigger1 = ishelper(5150)
trigger1 = animTime = 0
value = 0

;--------------------------------------------------------------------
;イントロ その４　「因果を…感じるな(ｱﾘｴﾝ!)」
[Statedef 194]
type = S
ctrl = 0
anim = 195

[State ]
type = AssertSpecial
trigger1 = anim = 195
flag = intro

[state ]
type = PlaySnd
trigger1 = time=60
value = 191, 0
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = time=140
value = 191, 1
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = time=145
value = 2300,3
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = time=155
value = 10,10
volume = 240
freqmul = 1.5+((random%3)*0.1)
loop = 0

[State ]
type = EnvShake
trigger1 = animelemtime(4)=1
time = 20
ampl = -30
freq = 100
phase = 100

[state ]
type = Explod
trigger1 = animelemtime(1)=1
anim = 196
ID = 195
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[State ]
type = SelfState
trigger1 = ishelper(5150)
trigger1 = animTime = 0
value = 0

;--------------------------------------------------------------------
;特殊イントロその１　VS鬼巫女
[Statedef 19000]
type = S
ctrl = 0
anim = 19000
sprpriority = 2

[State ]
type = AssertSpecial
trigger1 = stateno = 19000
flag = intro

[state ]
type = PlaySnd
trigger1 = animelemtime(17) = 1
value = 0,26
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = time = 280
value = 2000,0
volume = 240
freqmul = 1
loop = 0
channel = 0
[state ]
type = PlaySnd
trigger1 = time = 370
value = 2000,1
volume = 240
freqmul = 1
loop = 0
channel = 0
[state ]
type = PlaySnd
trigger1 = time = 440
value = 2000,2
volume = 240
freqmul = 1
loop = 0
channel = 0

[State ]
type = Projectile
trigger1 = time = [360,600]
trigger1 = gametime%3
projID = 3015
projanim = 3015
projremanim = 3016
projscale = 0.4,0.4
projremove = 0
projremovetime = -1
velocity = 0,6
remvelocity = 0, 0
accel = 0, 0
velmul = 1, 1
projsprpriority = 1
projedgebound = 10000
projstagebound = 10000
projheightbound = -240, -60
offset = var(6),-250
postype = p1
projshadow = 0,0,0
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[State ]
type = Projectile
trigger1 = time = [360,600]
trigger1 = gametime%2
projID = 3015
projanim = 3015
projremanim = 3016
projscale = 0.4,0.4
projremove = 0
projremovetime = -1
velocity = 0,6
remvelocity = 0, 0
accel = 0, 0
velmul = 1, 1
projsprpriority = 1
projedgebound = 10000
projstagebound = 10000
projheightbound = -240, -60
offset = var(6),-250
postype = p1
projshadow = 0,0,0
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = time = [390,631]
value = 1,6
volume = -150
freqmul = 1
loop = 0
channel = 1

[state ]
type = Explod
trigger1 = animelemtime(105) = 110
trigger2 = animelemtime(105) = 150
anim = 3017
ID = 3017
pos = ifelse(teamside=1,30,150), -135
postype = p1
facing = ifelse(teamside=1,1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
removetime = 90
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[State ]
type = removeexplod
trigger1 = animelemtime(105)=130
trigger2 = animelemtime(106)=5
ID=3017

[state ]
type = PlaySnd
trigger1 = animelemtime(106) = 1
value = 10,10
volume = 240
freqmul = 1
loop = 0

[state ]
type = Explod
trigger1 = animelemtime(106) = 95
anim = 3005
ID = 3005
pos = 75, -50
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -0.1,-1.5
accel = -0.003,0
removetime = -1
scale = 1,1
sprpriority = 2
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = animelemtime(106) = 95
trigger1 = numexplod(3005)=1
value = 1,4
volume = 240
freqmul = 1
loop = 0

[State ]
type = removeexplod
trigger1 = animelemtime(106)=219
ID=3005

[state ]
type = Explod
trigger1 = animelemtime(106) = 220
anim = 3005
ID = 3005
pos = 10, -200
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0.57
accel = 0,0
removetime = -1
scale = 1,1
sprpriority = 2
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = animelemtime(106) = 220
trigger1 = numexplod(3005)=1
value = 0,28
volume = 240
freqmul = 1
loop = 0

[State ]
type = removeexplod
trigger1 = animelemtime(106)=540
ID=3005

[state ]
type = Explod
trigger1 = animelemtime(106) = 540
trigger1 = numhelper(5150)>0
anim = 3006
ID = 3006
pos = 10,-40
postype = p1
facing = ifelse(teamside=1,1,-1)
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
removetime = -2
scale = 1,1
sprpriority = 2
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = animelemtime(106) = 540
trigger1 = numexplod(3005)=0
value = 1,5
volume = 240
freqmul = 1
loop = 0

[state ]
type = Explod
trigger1 = animelemtime(119) = 1
anim = 191
ID = 191
pos = 0, 0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = PlaySnd
trigger1 = animelemtime(119) = 1
trigger1 = numexplod(191)=1
value = 190,1
volume = 240
freqmul = 1
loop = 0
[state ]
type = PlaySnd
trigger1 = animelemtime(120) = 1
value = 190,2
volume = 240
freqmul = 1
loop = 0

[state ]
type = PlaySnd
trigger1 = animelemtime(125) = 1
value = 0,31
volume = 240
freqmul = 1
loop = 0

[State ]
type = SelfState
trigger1 = ishelper(5150)
trigger1 = animTime = 0
value = 0

;--------------------------------------------------------------------
;コモンにあった共通食らいステート(不必要な為廃止、でもNullで残しておく)
[Statedef 5000]
[State ]
type = Null
trigger1 = 0
[Statedef 5001]
[State ]
type = Null
trigger1 = 0
[Statedef 5010]
[State ]
type = Null
trigger1 = 0
[Statedef 5011]
[State ]
type = Null
trigger1 = 0
[Statedef 5020]
[State ]
type = Null
trigger1 = 0
[Statedef 5030]
[State ]
type = Null
trigger1 = 0
[Statedef 5035]
[State ]
type = Null
trigger1 = 0
[Statedef 5040]
[State ]
type = Null
trigger1 = 0
[Statedef 5050]
[State ]
type = Null
trigger1 = 0
[Statedef 5070]
[State ]
type = Null
trigger1 = 0
[Statedef 5071]
[State ]
type = Null
trigger1 = 0
[Statedef 5080]
[State ]
type = Null
trigger1 = 0
[Statedef 5081]
[State ]
type = Null
trigger1 = 0
[Statedef 5100]
[State ]
type = Null
trigger1 = 0
[Statedef 5101]
[State ]
type = Null
trigger1 = 0
[Statedef 5110]
[State ]
type = Null
trigger1 = 0
[Statedef 5120]
[State ]
type = Null
trigger1 = 0
[Statedef 5200]
[State ]
type = Null
trigger1 = 0
[Statedef 5201]
[State ]
type = Null
trigger1 = 0
[Statedef 5210]
[State ]
type = Null
trigger1 = 0
;--------------------------------------------------------------------
;死亡ステート
[Statedef 5150]

[State ];論外モード
type=helper
trigger1=!ishelper
trigger1=name="Crazy-Catastrophe"
trigger1=var(58)!=0
id=58
stateno=5150
helpertype=player
ignorehitpause=1
supermovetime=999999999
pausemovetime=999999999

[state ];ループする
type=selfstate
trigger1=!ishelper
trigger1=var(0):=var(0)+1||1
trigger1=var(58)!=0
trigger1=var(0)<=100
value=5150
ignorehitpause=1
;--------------------------------------------------------------------
;その他処理
[State ]
type = destroyself
trigger1 = !ishelper(5150)  ;本体
trigger1 = !ishelper(3)     ;死誘
trigger1 = !ishelper(112233);時止め解除
trigger1 = !ishelper(2222)  ;OTHK被弾
trigger1 = !ishelper(2223)  ;混線被弾
trigger1 = !ishelper(4200)  ;文字演出
trigger1 = !ishelper(58)    ;ヘルパー独占

[state ]
type = ctrlset
trigger1 = 1
value = 0

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

[State ]
type = selfstate
trigger1 = ishelper(5150)
trigger1 = root,sysvar(4)!=5150
value = 0

;--------------------------------------------------------------------
;本体(通常)
[State ];ターゲット保持
type = ReversalDef
trigger1 = !ishelper
trigger1 = numtarget>0
trigger1 = target,ishelper=0
reversal.attr = SCA,AA,AP,AT
hitflag = M-
priority = 99999999
pausetime = 0,0
guard,dist = 0
numhits = 0
supermovetime = 999000
pausemovetime = 999000

[state ]
type = targetstate
trigger1 = !ishelper
trigger1 = roundstate>2
trigger1 = !win
trigger1 = !loseko
trigger1 = numtarget>0
trigger1 = target,ishelper=0
trigger1 = target,stateno!=200512
trigger1 = target,stateno!=512
trigger1 = target,stateno!=5150&&target,lose
trigger1 = target,alive
value = 200512

[state ]
type = statetypeset
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = var(59)!=9999
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[state ]
type = changeanim
trigger1 = name = "Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)!=9999
value = 9999

[State ]
type = assertspecial
triggerall = name = "Crazy-Catastrophe"
triggerall = !ishelper
triggerall = !LOSE
trigger1 = var(59)=9999
trigger1 = roundstate >=3
trigger2 = var(59)!=9999
trigger2 = roundstate >=3
trigger2 = numhelper(5150)>0
trigger2 = helper(5150),stateno!=[170,199]
flag = roundnotover
ignorehitpause = 1

[state ]
type = DisplayToClipboard
triggerall = numenemy>0
trigger1 = var(59)!=9999
trigger1 = !ishelper
trigger1 = !WIN
text="e-life:%d, e-state:%d, e-anim:%d, e-helper:%d, helper:%d"
params=(enemynear,life),(enemynear,stateno),(enemynear,anim),(enemynear,numhelper),(numhelper)
ignorehitpause=1

[state ]
type=AppendToClipboard
trigger1 = var(59)!=9999
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = numhelper(5150)=0
text="\n v59 %d,round %d,v4 %d,sv4 %d,sv3 %d"
params= (var(59)),(roundstate),(var(4)),(sysvar(4)),(sysvar(3))
ignorehitpause=1

[state ]
type=AppendToClipboard
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = numhelper(5150)>0
text="\n E-Dist X %f,E-Dist Y %f,hit %d,ctrl %d,mode %d"
params= (helper(5150),fvar(0)),(helper(5150),fvar(1)),(sysvar(3)),(helper(5150),sysvar(3)),(helper(5150),var(9))
ignorehitpause=1

[state ]
type = DisplayToClipboard
trigger1 = !ishelper
trigger1 = var(59)!=9999
trigger1 = name = "Crazy-Catastrophe"
trigger1 = WIN
text="WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN WIN"
ignorehitpause=1

[state ]
type=AppendToClipboard
trigger1 = !ishelper
trigger1 = var(59)!=9999
trigger1 = name = "Crazy-Catastrophe"
trigger1 = WIN
text="\n(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)(^_^)"
ignorehitpause=1

[state ]
type = DisplayToClipboard
trigger1 = !ishelper
trigger1 = var(59)!=9999
trigger1 = name = "Crazy-Catastrophe"
trigger1 = sysvar(4)=5150
trigger1 = numenemy>0
trigger1 = enemy,LOSE=0
text=" mizuchi is lose"
ignorehitpause=1

[state ]
type=AppendToClipboard
trigger1 = !ishelper
trigger1 = var(59)!=9999
trigger1 = name = "Crazy-Catastrophe"
trigger1 = sysvar(4)=5150
trigger1 = numenemy>0
trigger1 = enemy,LOSE=0
text="\n(/o`)oh no"
ignorehitpause=1

[state ]
type = DisplayToClipboard
trigger1 = !ishelper
trigger1 = name != "Crazy-Catastrophe"
trigger1 = LOSE
text=" LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE"
ignorehitpause=1

[state ]
type=AppendToClipboard
trigger1 = !ishelper
trigger1 = name != "Crazy-Catastrophe"
trigger1 = LOSE
text="\n LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE LOSE"
ignorehitpause=1

[state ];本体は無敵
type = nothitby
trigger1 = !ishelper && name = "Crazy-Catastrophe"
value = SCA
time = -1
ignorehitpause = 1

[State ]
type = turn
triggerall = !ishelper
trigger1 = fvar(0)<0
trigger1 = var(59)!=9999

[State ]
type = assertspecial
trigger1 = name = "Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)!=9999
flag = invisible
flag2 = noautoturn
flag3 = nokoslow
ignorehitpause = 1

[state ]
type = posset
trigger1 = numhelper(5150)=1
trigger1 = !ishelper
trigger1 = var(59)!=9999
trigger1 = name = "Crazy-Catastrophe"
x = helper(5150),pos X
y = helper(5150),pos Y

[State ]
type = Helper
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = NumHelper(5150) = 0
trigger1 = var(59)!=9999
trigger1 = roundstate =0
name = "CCMizuchi"
id = 5150
pos = 0,0
postype = p1
sprpriority = 0
stateno = 0
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 ]
type = Helper
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = NumHelper(1) = 1
trigger1 = Helper(1),gethitvar(damage)
trigger1 = numhelper(123)<1
trigger1 = var(52)=0 ;最後まで覚えたか
name = "Hitdef"
id = 123
pos = 0,0
postype = p1
sprpriority = 0
stateno = 123
Helpertype = player
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ];時止め解除
type = Helper
triggerall = !ishelper && name = "Crazy-Catastrophe"
trigger1 = NumHelper(112233)=0
trigger1 = NumHelper(5150)>0
trigger1 = (roundstate=0&&helper(5150),time>0)||roundstate>=1
trigger2 = NumHelper(112233)=0
trigger2 = var(59)=9999 ;裏
name = "kaijo"
id = 112233
pos = 0,0
postype = p1
sprpriority = 0
stateno = 5150
Helpertype = player
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = lifeset
trigger1 = !ishelper && name="Crazy-Catastrophe"
trigger1 = roundstate>=3
trigger1 = var(59)!=9999
trigger1 = sysvar(4)!=5150
value = lifemax

[State ];ライフバー「テンション上がってきたｗｗ」
type = lifeset
trigger1 = !ishelper
trigger1 = palno=[1,6]
trigger1 = roundstate=2
trigger1 = var(59)!=9999
trigger1 = numhelper(5150)>0
trigger1 = helper(5150),var(7)<lifemax ;自殺防止
trigger1 = sysvar(4)!=5150
value = lifemax-(helper(5150),var(7))

[State ];7〜11P 体力管理
type = lifeset
trigger1 = !ishelper
trigger1 = palno=[7,11]
trigger1 = roundstate=2
trigger1 = var(59)!=9999
trigger1 = numhelper(5150)>0
trigger1 = sysvar(4)!=5150
trigger1 = sysvar(3)<999
value = lifemax-(sysvar(3))

[state ];意味無いかも
type=selfstate
trigger1 = roundstate >1
trigger1 = numhelper>99999
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = var(59)!=9999
value=5150
ignorehitpause=1

[state ];イントロ用
type = lifeadd
triggerall = !ishelper
triggerall = numhelper(5150)>0
triggerall = helper(5150),stateno=192
triggerall = helper(5150),anim=192
trigger1 = helper(5150),animelem = 5
trigger2 = helper(5150),animelem = 21
trigger3 = helper(5150),animelem = 37
value = -333
absolute = 1
kill = 0
[state ];イントロ用
type = lifeadd
triggerall = !ishelper
triggerall = numhelper(5150)>0
triggerall = helper(5150),stateno=192
triggerall = helper(5150),anim=192
trigger1 = helper(5150),time=[522,644]
value = 9
absolute = 1
kill = 0

[state ];被弾回数
type = varadd
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = var(59)!=9999
trigger1 = numhelper(5150)>0
trigger1 = numhelper(1)>0
trigger1 = helper(1),gethitvar(damage)>0 ;1以上のダメージを受けた
trigger1 = numenemy>0
trigger1 = enemy,life>0 ;敵のライフが１以上
sysvar(3)=1

[state ];死亡条件
type = varset
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = palno=[1,4]
trigger1 = var(59)!=9999
trigger1 = numenemy>0
trigger1 = enemy,LOSE=0
trigger1 = numhelper(5150)>0
trigger1 = numhelper(1)>0
trigger1 = sysvar(3)>=4 ;被弾回数4以上
sysvar(4)=5150
[state ];死亡条件
type = varset
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = palno=[5,6]
trigger1 = var(59)!=9999
trigger1 = numenemy>0
trigger1 = enemy,LOSE=0
trigger1 = numhelper(5150)>0
trigger1 = numhelper(1)>0
trigger1 = sysvar(3)>=15 ;被弾回数15以上
sysvar(4)=5150
[state ];死亡条件
type = varset
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = palno=[7,10]
trigger1 = var(59)!=9999
trigger1 = numenemy>0
trigger1 = enemy,LOSE=0
trigger1 = numhelper(5150)>0
trigger1 = sysvar(3)=999
trigger1 = numhelper(1)>0
trigger1 = helper(1),gethitvar(damage)>0
sysvar(4)=5150

[State ];死亡条件を満たし　死亡
type = lifeset
trigger1 = !ishelper && name="Crazy-Catastrophe"
trigger1 = var(59)!=9999
trigger1 = sysvar(4)=5150
trigger1 = numhelper(5150)>0
trigger1 = helper(5150),stateno=5150
trigger1 = helper(5150),var(10)=0
trigger1 = helper(5150),anim =175
trigger1 = life>0
value = 1

[State ];死亡条件を満たし　死亡
type = lifeset
trigger1 = !ishelper && name="Crazy-Catastrophe"
trigger1 = var(59)!=9999
trigger1 = sysvar(4)=5150
trigger1 = numhelper(5150)>0
trigger1 = helper(5150),stateno=5150
trigger1 = helper(5150),var(10)=0
trigger1 = helper(5150),anim =175
trigger1 = helper(5150),animelemtime(22)=0
value = 0

[State ];死亡条件を満たし　死亡
type = lifeset
trigger1 = !ishelper && name="Crazy-Catastrophe"
trigger1 = var(59)!=9999
trigger1 = sysvar(4)=5150
trigger1 = numhelper(5150)>0
trigger1 = helper(5150),stateno=5150
trigger1 = helper(5150),var(10)=1
trigger1 = helper(5150),time<=180
value = 1

[State ];死亡条件を満たし　死亡
type = lifeset
trigger1 = !ishelper && name="Crazy-Catastrophe"
trigger1 = var(59)!=9999
trigger1 = sysvar(4)=5150
trigger1 = numhelper(5150)>0
trigger1 = helper(5150),stateno=5150
trigger1 = helper(5150),var(10)=1
trigger1 = helper(5150),time>180
value = 0

[state ];回復(11P)
type = varset
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = palno=11
trigger1 = var(59)!=9999
trigger1 = numhelper(5150)>0
trigger1 = numhelper(1)>0
trigger1 = sysvar(3)=999
sysvar(3)=500

;回復チェック
[state ];敵の現在体力を見る
type = varset
triggerall = !ishelper && name = "Crazy-Catastrophe"
triggerall = NumEnemy
trigger1 = enemy,alive
trigger1 = gametime%2!=0
v = 7
value = enemy,life
PauseMoveTime = 99999999
SuperMoveTime = 99999999
ignorehitpause = 1

[state ];敵の現在体力を見る２
type = varset
triggerall = !ishelper && name = "Crazy-Catastrophe"
triggerall = NumEnemy
trigger1 = enemy,alive
trigger1 = gametime%2=0
v = 8
value = enemy,life
PauseMoveTime = 99999999
SuperMoveTime = 99999999
ignorehitpause = 1

[state ];敵のダメージ値
type = varset
triggerall = !ishelper && name = "Crazy-Catastrophe"
triggerall = NumEnemy
trigger1 = enemy,alive
trigger1 = numhelper(5150)>0
v = 9
value = ifelse((enemy,life=var(7)),(enemy,life-var(8)),ifelse((enemy,life=var(8)),(enemy,life-var(7)),0))
PauseMoveTime = 99999999
SuperMoveTime = 99999999
ignorehitpause = 1

[state ];時間計測(敵体力不動)
type = varadd
triggerall = !ishelper && name = "Crazy-Catastrophe"
triggerall = NumEnemy
trigger1 = enemy,alive
trigger1 = numhelper(5150)>0
trigger1 = var(9)=0
v = 10
value = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
ignorehitpause = 1
[state ];時間計測(敵体力不動)
type = varset
triggerall = !ishelper && name = "Crazy-Catastrophe"
triggerall = NumEnemy
trigger1 = enemy,alive
trigger1 = numhelper(5150)>0
trigger1 = var(9)!=0 ;敵の体力が変動した
v = 10
value = 0
PauseMoveTime = 99999999
SuperMoveTime = 99999999
ignorehitpause = 1

[state ];被弾回数リセット(特殊能力:輪廻)
type = varset
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = palno=[1,6] ;低カラーのみ
trigger1 = var(59)!=9999
trigger1 = numhelper(5150)>0
trigger1 = numhelper(1)>0
trigger1 = numenemy>0
trigger1 = (enemy,life>var(7))||(enemy,life>var(8)) ;敵が回復した
sysvar(3)=0

[state ];被弾回数リセット(特殊能力:因果)
type = varset
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = palno=[1,6] ;低カラーのみ
trigger1 = var(59)!=9999
trigger1 = numhelper(5150)>0
trigger1 = numhelper(1)>0
trigger1 = var(10)>2000 ;2000フレーム経過
sysvar(3)=0

[State ];アニメ記憶
type = varset
triggerall = numhelper(123)>0
trigger1 = helper(123),movereversed
trigger1 = var(57)=0
v = 57
value = enemy,anim
ignorehitpause = 1

[State ];記憶
type = varset
triggerall = numhelper(123)>0
triggerall = helper(123),hitpausetime<1
triggerall = var(56)=0
trigger1 = helper(123),movereversed
var(56) = helper(123),stateno
ignorehitpause = 1

[State ];記憶
type = varset
triggerall = numhelper(123)>0
triggerall = helper(123),hitpausetime<1
triggerall = var(56)!=0
triggerall = var(55)=0
triggerall = helper(123),stateno!=var(56)
trigger1 = helper(123),movereversed
var(55) = helper(123),stateno
ignorehitpause = 1

[State ];記憶
type = varset
triggerall = numhelper(123)>0
triggerall = helper(123),hitpausetime<1
triggerall = var(56)!=0
triggerall = var(55)!=0
triggerall = var(54)=0
triggerall = helper(123),stateno!=var(56)
triggerall = helper(123),stateno!=var(55)
trigger1 = helper(123),movereversed
var(54) = helper(123),stateno
ignorehitpause = 1

[State ];記憶
type = varset
triggerall = numhelper(123)>0
triggerall = helper(123),hitpausetime<1
triggerall = var(56)!=0
triggerall = var(55)!=0
triggerall = var(54)!=0
triggerall = var(53)=0
triggerall = helper(123),stateno!=var(56)
triggerall = helper(123),stateno!=var(55)
triggerall = helper(123),stateno!=var(54)
trigger1 = helper(123),movereversed
var(53) = helper(123),stateno
ignorehitpause = 1

[State ];記憶
type = varset
triggerall = numhelper(123)>0
triggerall = helper(123),hitpausetime<1
triggerall = var(56)!=0
triggerall = var(55)!=0
triggerall = var(54)!=0
triggerall = var(53)!=0
triggerall = var(52)=0
triggerall = helper(123),stateno!=var(56)
triggerall = helper(123),stateno!=var(55)
triggerall = helper(123),stateno!=var(54)
triggerall = helper(123),stateno!=var(53)
trigger1 = helper(123),movereversed
var(52) = helper(123),stateno
ignorehitpause = 1

;--------------------------------------------------------------------
;本体ヘルパー　helper(5150)
[State ]
type = velset
triggerall = ishelper(5150)
triggerall = root,name = "Crazy-Catastrophe"
trigger1 = time = 0
x = 0
y = 0

[State ]
type = NotHitBy
triggerall = ishelper(5150)
triggerall = root,name = "Crazy-Catastrophe"
trigger1 = 1
value = SCA
time = 1

[state ];死亡演出
type = changeanim
trigger1 = ishelper(5150)
trigger1 = helper(5150),var(10)=0
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim !=175
value = 175

[state ]
type = posset
trigger1 = ishelper(5150)
trigger1 = helper(5150),var(10)=0
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim=175
y = 0

[State ]
type = PlaySnd
trigger1 = ishelper(5150)
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim =175
trigger1 = animelemtime(5)=0
trigger1 = helper(5150),var(10)=0
value = 0,32
freqmul = 1

[state ];白
type = Explod
trigger1 = ishelper(5150)
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim =175
trigger1 = animelemtime(22)=0
trigger1 = helper(5150),var(10)=0
trigger1 = numexplod(51504220)=0
anim = 4220
ID = 51504220
pos = -500,-500
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
removetime = 10
scale = 100,100
sprpriority = 99999
ontop = 1
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1

[State ]
type = PlaySnd
trigger1 = ishelper(5150)
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim =175
trigger1 = animelemtime(22)=0
trigger1 = helper(5150),var(10)=0
value = 1,3
freqmul = 1

[state ]
type = changeanim
trigger1 = ishelper(5150)
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim!=5015
trigger1 = helper(5150),var(10)=1
value = 5015

[State ]
type = assertspecial
trigger1 = ishelper(5150)
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim =5015
trigger1 = helper(5150),var(10)=1
flag = noshadow
ignorehitpause = 1

[State ]
type = PlaySnd
trigger1 = ishelper(5150)
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim =5015
trigger1 = time=1
trigger1 = helper(5150),var(10)=1
value = 1,13
freqmul = 1

[State ]
type = velset
triggerall = ishelper(5150)
triggerall = root,name = "Crazy-Catastrophe"
trigger1 = helper(5150),anim =5015
trigger1 = time =[40,55]
trigger1 = helper(5150),var(10)=1
x = 0
y = -4.6
[State ]
type = velset
triggerall = ishelper(5150)
triggerall = root,name = "Crazy-Catastrophe"
trigger1 = helper(5150),anim =5015
trigger1 = time >55
trigger1 = helper(5150),var(10)=1
x = 0
y = 4

[State ]
type = PlaySnd
trigger1 = ishelper(5150)
trigger1 = root,sysvar(4)=5150
trigger1 = helper(5150),anim =5015
trigger1 = time=180
trigger1 = helper(5150),var(10)=1
value = 10,11
freqmul = ifelse(random<=333,1,ifelse(random<=666,0.8,1.3))

[state ]
type = changeanim
triggerall = ishelper(5150)
triggerall = root,sysvar(4)=5150
triggerall = helper(5150),anim =5015
trigger1 = helper(5150),time>180
trigger1 = helper(5150),var(10)=1
value = 9999

;--------------------------------------------------------------------
;死の宣告ヘルパー(当身誘発型) helper(3)

[state ]
type = changeanim
trigger1 = ishelper(3)&&anim!=10000
value=10000

[State ]
type = ReversalDef
trigger1 = ishelper(3)
trigger1 = roundstate >= 3
reversal.attr = SCA,AP,AA,AT
hitflag = M-
priority = 99999999
pausetime = 2,10
guard,dist = 0
numhits = 0
p2stateno = 512 ;超即死OTHキラー
supermovetime = 999000
pausemovetime = 999000

[state ]
type = nothitby
trigger1 = ishelper(3)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = AssertSpecial
trigger1 = ishelper(3)
flag = Invisible
ignorehitpause = 1

[State ]
type = BindToRoot
trigger1 = ishelper(3)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(3)
value = 0
movecamera = 0,0

[State ]
type = Projectile
trigger1 = ishelper(3)
trigger1 = roundstate >= 3
trigger1 = !WIN
trigger1 = enemy,alive
trigger1 = root,life>0
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkno = -1
guard.sparkno = -1
sparkxy = 99999,99999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, SA
animtype = back
damage = 9999999999999999,9999999999999999
hitflag = MAFDP
guardflag = 
fall = 1
fall.recover = 0
fall.damage = 999999999999
p2stateno = 100512

[State ]
type = Projectile
trigger1 = ishelper(3)
trigger1 = roundstate >= 3
trigger1 = !WIN
trigger1 = enemy,alive
trigger1 = root,life>0
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkno = -1
guard.sparkno = -1
sparkxy = 99999,99999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, SP
animtype = back
damage = 9999999999999999,9999999999999999
hitflag = MAFDP
guardflag = 
fall = 1
fall.recover = 0
fall.damage = 999999999999
p2stateno = 100512

[State ]
type = Projectile
trigger1 = ishelper(3)
trigger1 = roundstate >= 3
trigger1 = !WIN
trigger1 = enemy,alive
trigger1 = root,life>0
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkno = -1
guard.sparkno = -1
sparkxy = 99999,99999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, ST
animtype = back
damage = 9999999999999999,9999999999999999
hitflag = MAFDP
guardflag = 
fall = 1
fall.recover = 0
fall.damage = 999999999999
p2stateno = 100512

[state ]
type = targetlifeadd
trigger1 = ishelper(3)
trigger1 = roundstate>2
trigger1 = !win
trigger1 = !loseko
value = -9999999999999999
absolute = 1

[state ]
type = targetstate
trigger1 = ishelper(3)
trigger1 = roundstate>2
trigger1 = !win
trigger1 = !loseko
trigger1 = numtarget>0
trigger1 = target,ishelper=0
trigger1 = enemy,stateno!= 200512
trigger1 = target,alive
value = 200512

[State ]
Type = SuperPause
trigger1 = ishelper(3)
trigger1 = numtarget>0
trigger1 = roundstate>2
trigger1 = target,stateno=200512
Time = 90
Anim = -1
Pos = 0,0
MoveTime = 90
Darken = 0
P2DefMul = 1
UnHittable = 0

[State ]
type = targetdrop
triggerall = numtarget>0
triggerall = ishelper(3)
trigger1 = Target,Ishelper
trigger2 = Target,alive=0
trigger3 = win
ignorehitpause = 1

[State ]
type = DestroySelf
triggerall = ishelper(3)
trigger1 = root,life<=0
trigger2 = ishelper(3)&&stateno !=5150
ignorehitpause = 1

;--------------------------------------------------------------------
;時止め解除ヘルパー helper(112233)
[state ]
type = changeanim
trigger1 = ishelper(112233)&&anim!=9999
value=9999

[state ]
type = nothitby
trigger1 = ishelper(112233)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[state ]
type = AssertSpecial
trigger1 = ishelper(112233)
flag = Invisible
ignorehitpause = 1

[state ]
type = BindToRoot
trigger1 = ishelper(112233)
trigger1 = var(0):=var(0)+1
ignorehitpause = 1

[state ]
type = screenbound
trigger1 = ishelper(112233)
value = 0
movecamera = 0,0
ignorehitpause = 1

[state ]
type = pause
triggerall = ishelper(112233)
triggerall = numenemy>0
triggerall = enemy,stateno!=200512
trigger1 = roundstate!=2
trigger2 = enemy,life>0 && roundstate=2
time = 0
movetime = 0
ignorehitpause = 1

[state ]
type = superpause
triggerall = ishelper(112233)
triggerall = numenemy>0
triggerall = enemy,stateno!=200512
trigger1 = roundstate!=2
trigger2 = enemy,life>0 && roundstate=2
anim = -1
time = 0
movetime = 0
darken = 0
ignorehitpause = 1

[state ]
type = DestroySelf
triggerall = ishelper(112233)
trigger1 = var(0)>10 ;10Fで消す
ignorehitpause = 1

;--------------------------------------------------------------------
;OTHキラー被弾 helper(2222)
[state ]
type = changeanim
trigger1 = ishelper(2222)&&anim!=10001
value=10001

[State ]
type = BindToRoot
trigger1 = ishelper(2222)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(2222)
value = 0
movecamera = 0,0

[State ]
type = AssertSpecial
trigger1 = ishelper(2222)
flag = invisible

[state ]
type = PlayerPush
trigger1 = ishelper(2222)
value = 0

[state ]
type = nothitby
trigger1 = ishelper(2222)
trigger1 = enemy,numprojid(512) = 0
value = SCA,AA,AP,AT

[state ]
type = hitby
trigger1 = ishelper(2222)
trigger1 = enemy,numprojid(512) > 0
value = A,ST

[state ]
type = destroyself
triggerall = ishelper(2222)
trigger1 = roundstate!=2
trigger2 = numhelper(5150)>0
trigger2 = helper(5150),stateno!=2200
trigger2 = helper(5150),stateno!=2500&&enemy,ctrl=1
trigger2 = helper(5150),stateno!=4501

;--------------------------------------------------------------------
;被弾(混線用) helper(2223)
[state ]
type = changeanim
trigger1 = ishelper(2223)&&anim!=10001
value=10001

[State ]
type = BindToRoot
trigger1 = ishelper(2223)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(2223)
value = 0
movecamera = 0,0

[State ]
type = AssertSpecial
trigger1 = ishelper(2223)
flag = invisible

[state ]
type = PlayerPush
trigger1 = ishelper(2223)
value = 0

[state ]
type = nothitby
trigger1 = ishelper(2223)
trigger1 = enemy,numprojid(512) = 0
value = SCA,AA,AP,AT

[state ]
type = hitby
trigger1 = ishelper(2223)
trigger1 = enemy,numprojid(512) > 0
value = A,ST

[state ]
type = destroyself
triggerall = ishelper(2223)
trigger1 = roundstate!=2
trigger2 = numhelper(214748364)=0

;--------------------------------------------------------------------
;文字演出 helper(4200)
[state ]
type = changeanim
trigger1 = ishelper(4200)&&anim!=9999
value=9999

[State ]
type = AssertSpecial
trigger1 = ishelper(4200)
flag = noshadow
flag2 = noBG
flag3 = noFG

[State ]
type = BindToRoot
trigger1 = ishelper(4200)
trigger1 = ishelper
ignorehitpause = 1

[state ];暗黒
type = Explod
trigger1 = ishelper(4200)
trigger1 = numexplod(4219)=0
trigger1 = root,anim!=4101
anim = 4219
ID = 4219
pos = -500,-500
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
removetime = -1
scale = 100,100
sprpriority = -3
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1

[State ];ランダム
type = VarRandom
trigger1 = ishelper(4200)
v = 7
range = 0,18

[state ];文字
type = Explod
triggerall = ishelper(4200)
triggerall = root,anim!=4101
trigger1 = gametime %80=0
trigger1 = roundstate=2
anim = 4200+(helper(4200),var(7))
ID = 4200
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
removetime = -2
scale = 1,1
random = 180,90
sprpriority = -2
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1

[state ]
type = removeexplod
triggerall = ishelper(4200)
trigger1 = roundstate>=3
trigger1 = numexplod(4200)=0
trigger2 = root,anim=4101
id = 4219

[State ]
type = screenbound
trigger1 = ishelper(4200)
value = 0
movecamera = 0,0

[State ]
type = AssertSpecial
trigger1 = ishelper(4200)
flag = invisible

[state ]
type = destroyself
trigger1 = ishelper(4200)
trigger1 = roundstate>=3
trigger1 = numexplod(4200)=0
trigger1 = numexplod(4219)=0

;--------------------------------------------------------------------
;裏モード 覚醒演出

[state ]
type = selfstate
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = Time!=0
triggerall = anim!=4101
triggerall = var(5)<=2 ;Lv3まで
triggerall = roundstate=2
triggerall = var(49)=0 ;専用対策OFF
trigger1 = var(6)>=10000 ;1万FでLvUP
value=5150

[state ]
type = changeanim
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = anim!=4101
triggerall = var(5)<=2 ;Lv3まで
triggerall = roundstate=2
trigger1 = time=0 ;試合開始の瞬間
trigger2 = var(6)>=10000 ;1万FでLvUP
trigger2 = var(49)=0 ;専用対策OFF
value=4101

[State ]
type = Helper
triggerall = !ishelper
triggerall = numhelper(3)=0
trigger1 = anim=4101&&time=0
name = "death"
stateno = 5150
ID = 3
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = Helper
triggerall = !ishelper
triggerall = numhelper(2222)=0
trigger1 = anim=4101&&time=0
name = "proj-hit"
stateno = 5150
ID = 2222
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = Helper
triggerall = !ishelper
triggerall = numhelper(4200)=0
trigger1 = anim=4101&&time=0
name = "moji"
stateno = 5150
ID = 4200
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = Helper
triggerall = !ishelper
triggerall = numhelper(7777)=0
triggerall = var(49)=3 ;VS禍霊夢 12P
trigger1 = anim=4101&&time=0
name = "hitdef"
stateno = 7777
ID = 7777
helpertype = player
pos = 0,0
postype = p2
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = AssertSpecial
triggerall = !ishelper
trigger1 = anim=4101
flag = nobardisplay
flag2 = nofg
flag3 = nobg
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State ]
type = EnvShake
triggerall = !ishelper
trigger1 = (GameTime%4) = 1
trigger1 = anim=4101
time = 10
ampl = -10
freq = 95
phase = 95

[State ]
type = PlaySnd
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = Time = 0
value = 1,9
volume = 0
freqmul = 1

[State ]
type = PlaySnd
triggerall = !ishelper
triggerall = anim=4101
triggerall = Time = 0
trigger1 = var(5)=0 || var(5)=2
value = 0,20+ifelse(random<=500,1,0)
freqmul = 1

[State ]
type = PlaySnd
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = Time = 0
trigger1 = var(5)=1
value = 2100,0
freqmul = 0.7
[State ]
type = PlaySnd
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = Time = 35
trigger1 = var(5)=1
value = 2100,1
freqmul = 0.7

[State ]
type = EnvColor
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = var(5)<=1
ignorehitpause = 1
value = 0,0,0
time = 1
under = 2

[State ]
type = Explod
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = Time = 1
trigger1 = var(5)<=1
anim = 4100
id = 4100
sprpriority = 999999999
postype = back
pos = -50,-50
bindtime = -1
supermove = 0
removetime = -2
under = 0
ownpal = 1
scale = 1.6,1.6
ontop = 1
trans = add
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[State ]
type = EnvColor
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = var(5)=2
ignorehitpause = 1
value = 255,255,255
time = 1
under = 2

[State ]
type = Explod
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = Time = 0
trigger1 = var(5)=2
anim = 4100
id = 4100
sprpriority = 999999999
postype = back
pos = -50,-50
bindtime = -1
supermove = 0
removetime = -2
under = 0
ownpal = 1
scale = 1.6,1.6
ontop = 1
trans = sub
supermove = 1
pausemovetime = 99999999999999999999
supermovetime = 99999999999999999999
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = anim=4101
v = 6
value = 0

[state ]
type = varset
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = numexplod(4100)>0
trigger1 = var(1)<=1
v = 1
value = numexplod(4100)

[state ]
type = varset
triggerall = !ishelper
triggerall = anim=4101
trigger1 = var(1)>=2
trigger2 = time=0
v=1
value = 2

[state ]
type = varadd
triggerall = !ishelper
trigger1 = anim=4101
trigger1 = animtime=0
v = 5
value = 1

[state ];演出終了
type = changeanim
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
trigger1 = anim=4101 && time>=196
value=10000

;--------------------------------------------------------------------
;専用対策リスト
[state ];アルシエル 12P
type = varset
triggerall = numenemy>0
triggerall = !ishelper&&var(59)=9999
trigger1 = (enemy,name ="ALSIEL"&&enemy,palno=12)
var(49)=1
[state ];Crazy-Catastrophe 7〜10P
type = varset
triggerall = numenemy>0
triggerall = !ishelper&&var(59)=9999
trigger1 = (enemy,name ="Crazy-Catastrophe"&&enemy,palno=[7,10])
var(49)=2
[state ];禍霊夢 12P
type = varset
triggerall = numenemy>0
triggerall = !ishelper&&var(59)=9999
trigger1 = (enemy,name ="M-Reimu"&&enemy,palno=12)
var(49)=3
;--------------------------------------------------------------------
;ヘルパー独占用 helper(58)
[state ]
type=assertspecial
trigger1=ishelper(58)
flag=invisible
flag2=intro
flag3=roundnotover
ignorehitpause=1
[state ]
type=superpause
trigger1=ishelper(58)
time=2147483647
movetime=2147483647
anim=-1
sound=-1
darken=0
unhittable=0
ignorehitpause=1
[state ]
type=pause
trigger1=ishelper(58)
time=2147483647
movetime=2147483647
ignorehitpause=1
[state ]
type=nothitby
trigger1=ishelper(58)
value=sca
time=1
ignorehitpause=1
;--------------------------------------------------------------------
;裏モード 51500

[State ];音楽
type = PlaySnd
trigger1 = !ishelper
trigger1 = var(59)=9999
trigger1 = var(11)!=0
value = S1,14
volume = 490
channel = 13
ignorehitpause = 1
loop = 1
loop = 1
supermove = 1
persistent = 1
lowpriority = 1
ignorehitpause = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[state ];心音
type = Explod
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = anim!=4101
triggerall = var(59)=9999
triggerall = var(1)>0
triggerall = numexplod(1016)=0
triggerall = gametime%120=0
trigger1 = var(5)=1
trigger1 = var(6)>=3000
trigger2 = var(5)=2
trigger2 = var(6)>=2000
trigger3 = var(5)=3
trigger3 = var(6)>=2500
trigger4 = var(49)>0
anim = 1016
ID = 1016
pos = 0,-50
postype = p2
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
removetime = 25
scale = 1,1
sprpriority = 3
ontop = 0
shadow = 0, 0, 0
ownpal = 1
supermove = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1

[State ];心音
type = PlaySnd
triggerall = !ishelper
trigger1 = numexplod(1016)>0
value = 1,10
freqmul = 1
persistent = 26

[State ]
type = ReversalDef
triggerall = !ishelper
triggerall = var(49)=0 ;専用対策OFF
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = var(5)<=2
reversal.attr = SCA,AP,AA,AT
hitflag = MAFDP
priority = 99999999
pausetime = 0,10
guard,dist = 0
numhits = 0
p2stateno = 512 ;超即死OTHキラー
supermovetime = 999000
pausemovetime = 999000

[State ]
type = ReversalDef
triggerall = !ishelper
triggerall = var(49)=0 ;専用対策OFF
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = var(5)>=3
reversal.attr = SCA,AP,AA,AT
hitflag = MAFDP
priority = 99999999
pausetime = 0,10
guard,dist = 0
numhits = 0
p2stateno = 461349010 ;変数弄り
supermovetime = 999000
pausemovetime = 999000

[state ];毒
type = targetlifeadd
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(49)=0 ;専用対策OFF
trigger1 = numtarget>0
trigger1 = target,ishelper=0
trigger1 = roundstate=3 && target,alive
trigger1 = var(59)=9999
value = -1
kill = 1
absolute=1

[state ];体力１にさせる
type = targetlifeadd
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(49)=0 ;専用対策OFF
trigger1 = numtarget>0
trigger1 = target,ishelper=0
trigger1 = roundstate=3 && target,alive
trigger1 = var(59)=9999
value = -2147483647
kill = 0
absolute=1

[state ];死の宣告
type = targetstate
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(49)=0 ;専用対策OFF
trigger1 = numtarget>0
trigger1 = target,ishelper=0
trigger1 = roundstate=3 && target,alive
trigger1 = var(59)=9999
trigger1 = var(5)<=2 ;攻撃Lv2
value = 200512

[state ];死の宣告
type = targetstate
triggerall = name = "Crazy-Catastrophe"
triggerall = !ishelper
triggerall = var(49)=0 ;専用対策OFF
trigger1 = numtarget>0
trigger1 = target,ishelper=0
trigger1 = roundstate=3 && target,alive
trigger1 = var(59)=9999
trigger1 = var(5)>=3 ;攻撃Lv3
value = 461349010

[state ]
type = statetypeset
trigger1 = !ishelper && name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[state ]
type = changeanim
triggerall = var(49)=0 ;専用対策OFF
trigger1 = name = "Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)=9999 && anim!=4101
trigger1 = roundstate=2
value = 10000

[State ]
type = turn
triggerall = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = fvar(0)<0
trigger1 = var(59)=9999
trigger1 = anim!=4101
[State ]
type = screenbound
triggerall = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = anim!=4101
value = 0
movecamera = 0,0
[state ]
type = posset
triggerall = var(49)!=3 ;VS禍霊夢 12P には背後に回らない
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = anim!=4101
trigger1 = roundstate=2
trigger1 = numenemy>0
trigger1 = enemy,facing = 1
trigger1 = var(5)>0
x = (enemy,pos X - 10)
y = (enemy,pos Y + 5)
[state ]
type = posset
triggerall = var(49)!=3 ;VS禍霊夢 12P には背後に回らない
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = anim!=4101
trigger1 = roundstate=2
trigger1 = numenemy>0
trigger1 = enemy,facing = -1
trigger1 = var(5)>0
x = (enemy,pos X + 10)
y = (enemy,pos Y + 5)
[state ]
type = posset
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = anim!=4101
trigger1 = roundstate>=3
trigger2 = anim=4101
y = 0

[state ];保険
type = HitOverride
triggerall = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
attr = SCA,AA,AT,AP
slot = 1
stateno = 5150
time = -1
forceair = 0

[State ]
type = assertspecial
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = !LOSE
trigger1 = var(59)=9999
trigger1 = roundstate =4
flag = roundnotover
ignorehitpause = 1

[State ]
type = assertspecial
trigger1 = !ishelper && name="Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = roundstate=0
flag = invisible
ignorehitpause = 1

[State ]
type = destroyself
triggerall = !ishelper
trigger1 = var(59)=9999
trigger1 = name = "Crazy-Catastrophe"

[state ]
type = PlayerPush
triggerall = !ishelper
trigger1 = var(59)=9999
trigger1 = name = "Crazy-Catastrophe"
value = 0

[State ]
type = turn
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = time = 0
triggerall = enemynear,alive || numenemy = 1
triggerall = var(59)=9999
triggerall = anim!=4101
trigger1 = enemynear,facing = -facing
trigger1 = frontedgedist<enemynear,backedgedist
trigger2 = enemynear,facing = facing
trigger2 = frontedgedist<enemynear,frontedgedist

[state ]
type = DisplayToClipboard
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = var(49)=0
text="e-life:%d, e-state:%d, e-anim:%d, e-helper:%d, helper:%d"
params=(enemynear,life),(enemynear,stateno),(enemynear,anim),(enemynear,numhelper),(numhelper)
ignorehitpause=1

[state ]
type=AppendToClipboard
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = numenemy>0
trigger1 = var(49)=0
trigger1 = var(6):=var(6)+1
text="\n Lv%d, exp %d,e-time %d,R2time %d"
params= (var(5)),(var(6)),(enemy,time),(var(4))
ignorehitpause=1

[state ]
type = DisplayToClipboard
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = var(49)=1 ;VSアルシエル 12P
text="VS ALSIEL,E-life %d"
params= (enemy,life)
ignorehitpause=1

[state ]
type = DisplayToClipboard
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = var(49)=2 ;VSCrazy-Catastrophe 7〜10P
text="VS Crazy-Catastrophe,E-life %d"
params= (enemy,life)
ignorehitpause=1

[state ]
type = DisplayToClipboard
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = var(49)=3 ;VS禍霊夢 12P
text="VS M-Reimu,E-life %d"
params= (enemy,life)
ignorehitpause=1

[state ]
type=AppendToClipboard
trigger1 = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = numenemy>0
trigger1 = var(49)!=0
trigger1 = var(6):=var(6)+1
text="\n Lv EXTRA  round2time %d"
params= (var(4))
ignorehitpause=1

[State ]
type = lifeset
triggerall = !ishelper
trigger1 = name = "Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = roundstate >=3
trigger1 = alive
value = lifemax
[State ];ライフシンクロ
type = lifeset
triggerall = !ishelper
triggerall = var(59)=9999
triggerall = numenemy>0
triggerall = enemynear,life>0
triggerall = name = "Crazy-Catastrophe"
triggerall = var(49)=0 ;専用対策OFF
trigger1 = roundstate <=2
value = ifelse(numenemy>0,(enemynear,life),lifemax)
[State ]自殺防止
type = lifeset
triggerall = !ishelper
triggerall = var(59)=9999
triggerall = numenemy>0
triggerall = enemynear,life<=0
triggerall = name = "Crazy-Catastrophe"
triggerall = var(49)=0 ;専用対策OFF
trigger1 = roundstate <=2
value = ifelse(numenemy>0,1,lifemax)

[State ];ライフ１にする
type = lifeset
triggerall = !ishelper
triggerall = var(59)=9999
triggerall = numenemy>0
triggerall = name = "Crazy-Catastrophe"
triggerall = roundstate =2
trigger1 = var(49)=1 ;VSアルシエル 12P
trigger2 = var(49)=3 ;VS禍霊夢 12P
value = 1
[State ];ライフシンクロ
type = lifeset
triggerall = !ishelper
triggerall = var(59)=9999
triggerall = numenemy>0
triggerall = name = "Crazy-Catastrophe"
triggerall = var(49)=2 ;VSCrazy-Catastrophe 7〜10P
trigger1 = roundstate =2
value = ifelse((enemy,life=0),1,(enemy,life))

[state ]
type = changeanim
trigger1 = name = "Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)=9999
trigger1 = anim != 0 && var(59)=9999 && anim!=4101
trigger1 = roundstate <=3
trigger1 = anim!=10000
value = 0

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=1
triggerall = var(49)=0 ;専用対策OFF
triggerall = gametime%3=0
trigger1 = anim!=4101
trigger1 = var(6)>=3000 ;var(4)>=3000
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, SA
animtype = light
damage = random*2000
hitflag = MAFDP-
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3,5
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=1
triggerall = gametime%3=1
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = var(6)>=3000 ;var(4)>=3000
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, SP
animtype = light
damage = 0
hitflag = MAFDP
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999
p2stateno = 5110
p2getp1state = 0

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=1
triggerall = gametime%3=2
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = var(6)>=3000 ;var(4)>=3000
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 1
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, ST
animtype = light
damage = random*2000
hitflag = MAFDP-
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999
p2stateno = 100512

[state ]
type = targetstate
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = numtarget>0
trigger1 = target,ishelper=0
trigger1 = roundstate=3 && target,alive
value = 200512

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=2
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = var(6)>=3000 ;var(4)>=13000
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S,SA
animtype = light
damage = random
hitflag = MAFDP-
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3,5
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=2
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = var(6)>=2000 ;var(4)>=13000
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S,SP
animtype = light
damage = random
hitflag = MAFDP-
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3,5
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=2
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = var(6)>=2000 ;var(4)>=13000
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S,ST
animtype = light
damage = random
hitflag = MAFDP-
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3,5
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999

[state ]
type = targetlifeadd
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = numtarget>0
trigger1 = var(5)=2
value = -500
kill=0
absolute=1

[state ]
type = targetlifeadd
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = numtarget>0
trigger1 = var(5)=2
value = -1
kill = 1
absolute=1

[state ]
type = targetlifeadd
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = numtarget>0
trigger1 = var(5)=2
value = -99999999
kill = 0
absolute=1

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=3
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = var(6)>=2500 ;var(4)>=22500
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, SA
animtype = light
damage = ifelse(random<=500,random*7,9999999999999999),9999999999999999
hitflag = MAFDP-
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3,5
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999
p2stateno = 461349010

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=3
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = var(6)>=2500 ;var(4)>=22500
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, SP
animtype = light
damage = ifelse(random<=500,random*7,9999999999999999),9999999999999999
hitflag = MAFDP-
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999
p2stateno = 461349010

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(5)=3
triggerall = gametime%2=0
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = var(6)>=2500 ;var(4)>=22500
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 1
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, ST
animtype = light
damage = ifelse(random<=500,random*7,9999999999999999),9999999999999999
hitflag = MAFDP-
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3
down.hittime = 10
down.bounce = 1
fall = 1
fall.kill = 1
fall.recover = 0
fall.damage = 999999999999
p2stateno = 461349010

[state ]
type = targetstate
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = numtarget>0
trigger1 = var(5)=3
value = 461349010

[state ]
type = targetlifeadd
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = numtarget>0
trigger1 = var(5)=3
value = -1
kill = 1
absolute=1

[state ]
type = targetlifeadd
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = var(49)=0 ;専用対策OFF
trigger1 = anim!=4101
trigger1 = numtarget>0
trigger1 = var(5)=3
value = -2147483647
kill = 0
absolute=1

[state ]
type = targetdrop
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = numtarget>0
triggerall = target,ishelper
triggerall = var(49)=0 ;専用対策OFF
trigger1 = numtarget>7
ignorehitpause = 1

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(49)=1 ;VSアルシエル 12P
trigger1 = anim!=4101
trigger1 = var(6)>0
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, SA
animtype = light
damage = ceil((enemynear,lifemax*0.05)*enemynear,const(data.defence)/100)
hitflag = MAFDP
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3,5
down.hittime = 10
down.bounce = 1

[State ]
type = Projectile
triggerall = !ishelper
triggerall = name = "Crazy-Catastrophe"
triggerall = var(59)=9999
triggerall = !WIN
triggerall = enemy,alive
triggerall = life>0
triggerall = var(1)>0
triggerall = var(49)=2 ;VSCrazy-Catastrophe 7〜10P
trigger1 = anim!=4101
trigger1 = var(6)>0
projID = 3
projanim = 10000
projremove = 0
projpriority = 99999999
projhitanim = -1
projremanim = -1
projsprpriority = 0
projshadow = 0,0,0
projmisstime = 0
projremovetime = 1
postype = p2
offset = 0,0
numhits = 0
sparkxy = 9999,9999
pausetime = 5,5
ground.velocity = -6,12
guard.velocity = 10
air.velocity = -7,14
attr = S, SA
animtype = light
damage = random*20
hitflag = MAFDP
guardflag = 
ground.type = High
air.type = High
airguard.velocity = -3
air.juggle = 0
sprpriority = 1
forcestand = 0
down.velocity = -3,5
down.hittime = 10
down.bounce = 1

;--------------------------------------------------------------------
;コンティニュー画面
[Statedef 5500]
type = S
ctrl = 0
anim = 5300
velset = 0,0

[State ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = SelfAnimExist(5500)
value = 5500

;--------------------------------------------------------------------
;ラウンド開始前
[Statedef 5900]
type = S

[State ]
type = ChangeState
trigger1 = !ishelper
value = 5150

[State ]
type = VarRangeSet
trigger1 = roundsexisted = 0
value = 0

[State ]
type = VarRangeSet
trigger1 = roundsexisted = 0
fvalue = 0

[State ]
type = ChangeState
trigger1 = ishelper(5150)
trigger1 = roundsexisted = 0
value = 190

[State ]
type = ChangeState
trigger1 = ishelper(5150)
trigger1 = roundsexisted > 0
value = 0

;--------------------------------------------------------------------
;ヘルパーアーマー
[Statedef 9999]
type    = S
movetype= I
physics = S

[state ]
type = nothitby
trigger1 = ishelper(1)
trigger1 = root,palno=[1,4]
trigger1 = NumHelper(1) = 1
trigger1 = Helper(1),GetHitVar(Damage)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = 120

[state ]
type = nothitby
trigger1 = ishelper(1)
trigger1 = root,palno=[5,6]
trigger1 = NumHelper(1) = 1
trigger1 = Helper(1),GetHitVar(Damage)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = 360

[state ]
type = nothitby
trigger1 = numhelper(5150)>0
trigger1 = helper(5150),stateno=4300
trigger1 = helper(5150),time<=500
value = SCA,AA,AP,AT

[state ]
type = nothitby
trigger1 = ishelper(1)
trigger1 = root,palno=[7,10]
trigger1 = root,var(10)<5000
trigger1 = root,life<lifemax/2
trigger1 = NumHelper(1) = 1
trigger1 = Helper(1),GetHitVar(Damage)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = 240
[state ]
type = nothitby
trigger1 = ishelper(1)
trigger1 = root,palno=[7,10]
trigger1 = root,var(10)>=5000
trigger1 = root,life<lifemax/2
trigger1 = NumHelper(1) = 1
trigger1 = Helper(1),GetHitVar(Damage)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = 480

[state ]
type = nothitby
trigger1 = ishelper(1)
trigger1 = root,palno=11
trigger1 = root,life<lifemax/2
trigger1 = NumHelper(1) = 1
trigger1 = Helper(1),GetHitVar(Damage)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = 600

[state ]
type = nothitby
trigger1 = ishelper(1)
trigger1 = root,palno=11
trigger1 = root,life<lifemax/6
trigger1 = NumHelper(1) = 1
trigger1 = Helper(1),GetHitVar(Damage)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = 1200

[State ]
type = AssertSpecial
trigger1 = ishelper(1)
flag = Invisible
ignorehitpause = 1

[State ]
type = BindToParent
trigger1 = numhelper(5150)>0
trigger1 = ishelper(1)
ignorehitpause = 1

[State ]
type = HitOverride
trigger1 = ishelper(1)
time = -1
attr = SCA,AA,AP,AT
slot = 0
stateno = 9999
pausemovetime = 99999999
supermovetime = 99999999
ignorehitpause = 1

[State ]
type = ChangeAnim
trigger1 = ishelper(1)
value = parent,Anim
elem = parent,AnimElemNo(0)
ignorehitpause = 1

[State ]
type = Turn
trigger1 = Facing != parent,Facing
ignorehitpause = 1

[State ]
type = DestroySelf
triggerall = ishelper(1)
trigger1 = root,life <= 0
trigger2 = ishelper(1)&&stateno !=9999
trigger3 = roundstate >2
trigger4 = root,var(59)=9999
ignorehitpause = 1

;--------------------------------------------------------------------
;妨害ヘルパー
[Statedef 8888]
type    = S
movetype= I
physics = S
anim = 8888

[state ]
type = nothitby
trigger1 = roundstate !=3
value = SCA
time = 1

[state ]
type = hitby
trigger1 = roundstate =3
value = A,NP

[state ]
type = posset
trigger1 = P2Dist X < 0
x = enemy,pos x

[state ]
type = posset
trigger1 = P2Dist X > 100
x = enemy,pos x

[state ]
type = posadd
trigger1 = pos x = enemy,pos x
x = 10

[State ]
type = screenbound
trigger1 = ishelper(2)
value = 0
movecamera = 0,0

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

[State ]
type = velset
trigger1 = 1
x = -8

[State ]
type = turn
trigger1 = parentdist X < 10

[State ]
type = DestroySelf
trigger1 = root,life <= 0
trigger2 = ishelper(2)&&stateno !=8888
trigger3 = root,var(59)=9999
trigger4 = roundstate!=2
trigger5 = numhelper(5150)>0
trigger5 = helper(5150),stateno=[3750,3751]
ignorehitpause = 1

;--------------------------------------------------------------------
;当身用(無の光)
[Statedef 3000]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 10000
ownpal = 1

[State ]
type = ReversalDef
trigger1 = ishelper(3000)
reversal.attr = SCA,AP,AA,AT
hitflag = MAFDP
priority = 99999999
pausetime = 0,2
guard,dist = 0
numhits = 0
p2stateno = 512 ;超即死OTHKiller
supermovetime = 999000
pausemovetime = 999000

[State ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = noshadow
flag2 = Invisible

[state ]
type = nothitby
trigger1 = ishelper(3000)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = BindToRoot
trigger1 = ishelper(3000)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(3000)
value = 0
movecamera = 0,0

[state ];ステ抜けなんて遠慮せずにちゃんと無に還ろうよ
type = targetstate
trigger1 = ishelper(3000)
trigger1 = numtarget
trigger1 = target,stateno!=512
trigger1 = target,alive
value = 100512 ;死ね！

[state ];パワー０になってね
type = targetpoweradd
trigger1 = ishelper(3000)
trigger1 = numtarget
value = -2147483647
absolute=1
ignorehitpause=1

[state ]
type = destroyself
trigger1 = var(0)>60 ;１秒で消す

;--------------------------------------------------------------------
;当身用(オーバーデス)
[Statedef 3001]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 10000
ownpal = 1

[State ]
type = ReversalDef
trigger1 = ishelper(3001)
reversal.attr = SCA,AP,AA,AT
hitflag = MAFDP
priority = 99999999
pausetime = 2147483647,2147483647
guard,dist = 0
numhits = 0
p2stateno = 50512 ;凍結当身
supermovetime = 999000
pausemovetime = 999000
ignorehitpause=1

[State ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = noshadow
flag2 = Invisible
ignorehitpause=1

[state ]
type = nothitby
trigger1 = ishelper(3001)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = BindToRoot
trigger1 = ishelper(3001)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(3001)
value = 0
movecamera = 0,0
ignorehitpause=1

[state ];パワー０になってね
type = targetpoweradd
trigger1 = ishelper(3000)
trigger1 = numtarget
value = -2147483647
absolute=1
ignorehitpause=1

[state ];とりあえず死ね
type = targetlifeadd
trigger1 = ishelper(3001)
trigger1 = numtarget
value = -2147483647
absolute=1
kill=1
ignorehitpause=1

[state ]
type = targetstate
trigger1 = ishelper(3001)
trigger1 = numtarget
trigger1 = target,alive
trigger1 = target,stateno!=200512
trigger1 = target,stateno!=512
value = 200512
ignorehitpause=1

[state ]
type = targetdrop
trigger1 = numtarget
trigger1 = target,ishelper
ignorehitpause=1

[state ]
type = changeanim
trigger1 = numtarget>0
trigger1 = target,ishelper=0
value = 9999
ignorehitpause=1

[state ]
type = destroyself
trigger1 = numtarget=0
trigger1 = var(0)>60 ;１秒で消す
trigger2 = numtarget>0
trigger2 = target,ishelper=1
ignorehitpause=1

;--------------------------------------------------------------------
;七色の大罪１ 超即死
[Statedef 7702]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 10000
ownpal = 1

[State ]
type = ReversalDef
trigger1 = ishelper(7702)
reversal.attr = SCA,AP,AA,AT
hitflag = MAFDP
priority = 99999999
pausetime = 0,2
guard,dist = 0
numhits = 0
p2stateno = 511 ;超即死
supermovetime = 999000
pausemovetime = 999000

[State ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = noshadow
flag2 = Invisible

[state ]
type = nothitby
trigger1 = ishelper(7702)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = BindToRoot
trigger1 = ishelper(7702)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(7702)
value = 0
movecamera = 0,0

[state ];ライフ減らすよ
type = targetlifeadd
trigger1 = ishelper(7702)
trigger1 = numtarget
value = -2147483647
absolute=1
ignorehitpause=1

[state ];パワー０になってね
type = targetpoweradd
trigger1 = ishelper(7702)
trigger1 = numtarget
value = -2147483647
absolute=1
ignorehitpause=1

[state ]
type = targetdrop
trigger1 = numtarget
trigger1 = target,ishelper

[state ]
type = destroyself
trigger1 = var(0)>500
trigger2 = numtarget
trigger2 = target,alive=0
trigger3 = numhelper(7701)=0 ;七色の大罪

;--------------------------------------------------------------------
;七色の大罪２ 変数書き換え
[Statedef 7703]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 10000
ownpal = 1

[State ]
type = ReversalDef
trigger1 = ishelper(7703)
reversal.attr = SCA,AP,AA,AT
hitflag = MAFDP
priority = 99999999
pausetime = 0,2
guard,dist = 0
numhits = 0
p2stateno = 461349010 ;変数弄り
supermovetime = 999000
pausemovetime = 999000

[State ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = noshadow
flag2 = Invisible

[state ]
type = nothitby
trigger1 = ishelper(7703)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = BindToRoot
trigger1 = ishelper(7703)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(7703)
value = 0
movecamera = 0,0

[state ]
type = destroyself
trigger1 = var(0)>500
trigger2 = numtarget
trigger2 = target,alive=0
trigger3 = numhelper(7701)=0 ;七色の大罪

;--------------------------------------------------------------------
;七色の大罪３ 凍結超即死
[Statedef 7704]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 10000
ownpal = 1

[State ]
type = ReversalDef
trigger1 = ishelper(7704)
reversal.attr = SCA,AP,AA,AT
hitflag = MAFDP
priority = 99999999
pausetime = 2147483648,2147483648
guard,dist = 0
numhits = 0
p2stateno = 50512 ;凍結当身
supermovetime = 999000
pausemovetime = 999000
ignorehitpause = 1

[State ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = noshadow
flag2 = Invisible
ignorehitpause = 1

[state ]
type = nothitby
trigger1 = ishelper(7704)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = BindToRoot
trigger1 = ishelper(7704)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(7704)
value = 0
movecamera = 0,0
ignorehitpause = 1

[state ];ライフ減らすよ
type = targetlifeadd
trigger1 = ishelper(7704)
trigger1 = numtarget
value = -2147483647
absolute=1
ignorehitpause=1

[state ];パワー０になってね
type = targetpoweradd
trigger1 = ishelper(7704)
trigger1 = numtarget
value = -2147483647
absolute=1
ignorehitpause=1

[state ]
type = changeanim
trigger1 = numtarget
trigger1 = target,ishelper=0
value = 9999
ignorehitpause = 1

[state ]
type = targetdrop
trigger1 = numtarget
trigger1 = target,ishelper
ignorehitpause = 1

[state ]
type = destroyself
trigger1 = numtarget=0
trigger1 = var(0)>500
trigger2 = numtarget>0
trigger2 = target,ishelper=0
;trigger2 = target,hitpausetime=0
trigger3 = numtarget=0
trigger3 = numhelper(7701)=0 ;七色の大罪
ignorehitpause = 1

;--------------------------------------------------------------------
;七色の大罪５ Hitdef小ダメージ＆落下即死
[Statedef 7705]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 10000
ownpal = 1

[State ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = noshadow
flag2 = Invisible

[state ]
type = nothitby
trigger1 = ishelper(7705)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = BindToRoot
trigger1 = ishelper(7705)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(7705)
value = 0
movecamera = 0,0

[State ]
type = VarRandom
trigger1 = ishelper(7705)
v = 1
range = 1,200

[State ]
type = HitDef
trigger1 = ishelper(7705)
Attr = ,SA
Damage = var(1),var(1)
GetPower = 0
HitFlag = MAFDP
GuardFlag = 
Priority = 7,Hit
PauseTime = 0,2
HitSound = -1
sparkno = -1
GuardSound = -1
numhits = 0
fall = 1
fall.damage=2147483647
p2stateno = 5110
p2getp1state = 0

[State ]
type = HitDef
trigger1 = ishelper(7705)
Attr = ,ST
Damage = var(1),var(1)
GetPower = 0
HitFlag = MAFDP
GuardFlag = 
Priority = 7,Hit
PauseTime = 0,2
HitSound = -1
sparkno = -1
GuardSound = -1
numhits = 0
fall = 1
fall.damage=2147483647
p2stateno = 5110
p2getp1state = 0

[state ]
type = targetdrop
trigger1 = numtarget
trigger1 = target,ishelper

[state ]
type = destroyself
trigger1 = var(0)>500
trigger2 = numtarget
trigger2 = target,alive=0
trigger3 = numhelper(7701)=0 ;七色の大罪

;--------------------------------------------------------------------
;七色の大罪６ Hitdef大ダメージ＆超長時間硬直
[Statedef 7706]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 10000
ownpal = 1

[State ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = noshadow
flag2 = Invisible

[state ]
type = nothitby
trigger1 = ishelper(7706)
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = BindToRoot
trigger1 = ishelper(7706)
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(7706)
value = 0
movecamera = 0,0

[State ]
type = HitDef
trigger1 = ishelper(7706)
Attr = ,HA
Damage = random*3000,random*3000
GetPower = 0
HitFlag = MAFDP
GuardFlag = 
Priority = 7,Hit
PauseTime = 0,2147483648
HitSound = -1
sparkno = -1
GuardSound = -1
numhits = 0

[state ]
type = targetdrop
trigger1 = numtarget
trigger1 = target,ishelper

[state ]
type = destroyself
trigger1 = var(0)>500
trigger2 = numtarget
trigger2 = target,alive=0
trigger3 = numhelper(7701)=0 ;七色の大罪

;--------------------------------------------------------------------
;混線
[Statedef 214748364]
type    = A
movetype= I
physics = N
anim = 10000

[State ]
type = ReversalDef
trigger1 = ishelper(214748364)
trigger1 = numtarget>0
reversal.attr = SCA,AA,AT,AP
priority = 999999999999999999999999999
pausetime = 0,0
sparkno = -1
hitsound = -1
ignorehitpause = 1

[state ]
type = nothitby
trigger1 = ishelper(214748364)
trigger1 = var(0):=var(0)+1
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = BindToRoot
trigger1 = ishelper(214748364)
ignorehitpause = 1

[state ]
type = Helper
triggerall = numhelper(214748365)<8
trigger1 = helper(214748364),numtarget<8
name = "Catastrophe-Hit"
stateno = 214748365
ID = 214748365
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647

[state ]
type=changeanim
trigger1 = ishelper(214748364)
trigger1 = numtarget=0
trigger1 = numhelper(214748365)>0
value= 10000

[state ]
type=statetypeset
trigger1 = ishelper(214748364)
trigger1 = numtarget=0
trigger1 = numhelper(214748365)>0
type     = A
movetype = A
physics  = N

[state ]
type = hitdef
trigger1 = ishelper(214748364)
trigger1 = numtarget=0
trigger1 = numhelper(214748365)>0
attr = ,NA
damage = 0,0
numhits = 0
guardflag = 
hitflag = MAFDP
priority = 7, Hit
pausetime = 0,10
sparkno = 9999
guard.sparkno = 9999
animtype = hard
sparkxy = 9999,-9999
getpower = 0
givepower = -1
hitsound = -1
guardsound = -1
ground.type = high 
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = 0,0
airguard.velocity = 0,0
air.type = Low
air.velocity = 0,0
air.hittime = 5
fall = 0
ignorehitpause = 1
affectteam = F

[state ];パンドラキラーテスト
type=targetstate
trigger1=numenemy>0
trigger1=enemy,name="Fake"
trigger1=numtarget>0
trigger1=target,ishelper
value= 461349012

[state ]
type=targetstate
trigger1=numtarget>0
trigger1=gametime%4=[0,1]
trigger1=numenemy>0
trigger1=enemy,name!="Fake"
value= 461349010 ;変数弄り
[state ]
type=targetstate
trigger1=numtarget>0
trigger1=gametime%4=[2,3]
trigger1=numenemy>0
trigger1=enemy,name!="Fake"
value= 461349011 ;ステート返し

[State ]
type = Helper
trigger1 = numhelper(2223)=0
trigger1 = var(0)=1
name = "konsen-hit"
stateno = 5150
ID = 2223
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[state ]
type=changeanim
trigger1 = ishelper(214748364)
trigger1 = numtarget=8
value= 9999

[state ]
type=statetypeset
trigger1 = ishelper(214748364)
trigger1 = numtarget=8
type     = A
movetype = I
physics  = N

[state ]
type=destroyself
trigger1 = var(0)>1120
trigger1 = numenemy>0
trigger1 = enemy,name!="Fake"

;--------------------------------------------------------------------
;混線-食らい
[Statedef 214748365]
type    = S
movetype= H
physics = N
anim = 10001

[state ]
type = AssertSpecial
trigger1 = ishelper(214748365)
trigger1 = var(1):=var(1)+1
flag = invisible
flag2 = noshadow

[state ]
type=nothitby
trigger1 = ishelper(214748365)
trigger1 = numhelper(214748365)<8
value= SCA

[state ]
type=hitby
trigger1 = ishelper(214748365)
trigger1 = numhelper(214748365)=8
value= SCA,NA

[state ]
type = destroyself
trigger1 = numhelper(214748364)
trigger1 = helper(214748364),numtarget=8

;--------------------------------------------------------------------
;Hitdef
[statedef 123]
type = S
movetype = I
physics = N
anim = 10000

[state ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = invisible
flag2 = noshadow

[state ]
type = nothitby
trigger1 = ishelper(123)
value = SCA

[state ]
Type = hitdef
trigger1 = ishelper(123)
trigger1 = !movehit
Attr = S,NA
Damage = 0,0
GetPower = 0,0
HitFlag = 
GuardFlag = 
Priority = 7,Hit
PauseTime = 0,2
HitSound = -1
sparkno = -1
GuardSound = -1

[state ]
type = posset
trigger1 = ishelper(123)
x = enemy,pos x
y = enemy,pos y

[state ]
type = destroyself
trigger1 = stateno!=123
trigger2 = var(0)>2
ignorehitpause = 1

;--------------------------------------------------------------------
;Hitdef 判定-極小 割合ダメージ約半分
[statedef 7777]
type = S
movetype = A
physics = N
anim = 7777

[state ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[state ]
type = nothitby
trigger1 = ishelper(7777)
value = SCA
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(7777)
value = 0
movecamera = 0,0

[state ]
Type = hitdef
trigger1 = ishelper(7777)
Attr = ,NA
Damage = ceil((enemynear,lifemax*0.45)*enemynear,const(data.defence)/100)*20,0
GetPower = 0,0
HitFlag = MAFDP
GuardFlag = 
Priority = 7,Hit
PauseTime = 0,0
HitSound = -1
sparkno = -1
GuardSound = -1
ignorehitpause = 1

[state ]
type = posset
trigger1 = ishelper(7777)
trigger1 = numenemy>0
x = enemy,pos x +5
y = enemy,pos y -50
ignorehitpause = 1

[state ]
type = destroyself
trigger1 = stateno!=7777
;;trigger2 = var(0)>2
ignorehitpause = 1

;--------------------------------------------------------------------
;Hitdef 判定-小 割合ダメージ1%
[statedef 7778]
type = S
movetype = A
physics = N
anim = 7778

[state ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[state ]
type = nothitby
trigger1 = ishelper(7778)
value = SCA
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(7778)
value = 0
movecamera = 0,0

[state ]
Type = hitdef
trigger1 = ishelper(7778)
Attr = ,NA
Damage = ceil((enemynear,lifemax*0.01)*enemynear,const(data.defence)/100),0
GetPower = 0,0
HitFlag = MAFDP
GuardFlag = 
Priority = 7,Hit
PauseTime = 0,0
HitSound = -1
sparkno = -1
GuardSound = -1
ignorehitpause = 1

[state ]
type = posset
trigger1 = ishelper(7778)
x = enemy,pos x +5
y = enemy,pos y -50
ignorehitpause = 1

[state ]
type = destroyself
trigger1 = stateno!=7778
;;trigger2 = var(0)>2
ignorehitpause = 1

;--------------------------------------------------------------------
;Hitdef 判定-中 オーバーフロー＆アンダーフロー
[statedef 7779]
type = S
movetype = A
physics = N
anim = 7779

[state ]
type = AssertSpecial
trigger1 = var(0):=var(0)+1
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[state ]
type = nothitby
trigger1 = ishelper(7779)
value = SCA
ignorehitpause = 1

[State ]
type = screenbound
trigger1 = ishelper(7779)
value = 0
movecamera = 0,0

[state ]
Type = hitdef
trigger1 = ishelper(7779)
trigger1 = gametime%2=0
Attr = ,NA
Damage = 2147483647
GetPower = 0,0
HitFlag = MAFDP
GuardFlag = 
Priority = 7,Hit
PauseTime = 0,0
HitSound = -1
sparkno = -1
GuardSound = -1
ignorehitpause = 1

[state ]
Type = hitdef
trigger1 = ishelper(7779)
trigger1 = gametime%2!=0
Attr = S,NA
Damage = -2147483647
GetPower = 0,0
HitFlag = MAFDP
GuardFlag = 
Priority = 7,Hit
PauseTime = 0,2
HitSound = -1
sparkno = -1
GuardSound = -1
ignorehitpause = 1

[state ]
type = posset
trigger1 = ishelper(7779)
x = enemy,pos x +5
y = enemy,pos y -50
ignorehitpause = 1

[state ]
type = destroyself
trigger1 = stateno!=7779
;;trigger2 = var(0)>2
ignorehitpause = 1

;--------------------------------------------------------------------
;記憶
[statedef 987654321]
type    = S
movetype= I
physics = N
anim = 0

[state ]
type = nothitby
trigger1 = 1
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = AssertSpecial
trigger1 = ishelper(987654321)
flag = Invisible
ignorehitpause = 1

[State ]
type = BindToRoot
trigger1 = ishelper(987654321)
ignorehitpause = 1

[State ]
type = PlayerPush
trigger1 = ishelper(987654321)
value = 0

[State ]
type = HitOverride
trigger1 = ishelper(987654321)
time = -1
attr = SCA,AA,AP,AT
slot = 0
stateno = 987654321
pausemovetime = 99999999
supermovetime = 99999999
ignorehitpause = 1

[State ]
type = ChangeAnim
trigger1 = ishelper(987654321)
value = root,Anim
elem = root,AnimElemNo(0)
ignorehitpause = 1

[State ]
type = Turn
trigger1 = Facing != parent,Facing
ignorehitpause = 1

[state ];記憶テスト２
type = Helper
trigger1 = numhelper(444555666)=0
name = "kioku2"
stateno = 444555666
ID = 444555666
helpertype = player
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermove = 1
pausemovetime=2147483647
supermovetime=2147483647
ignorehitpause = 1

[State ]
type = DisplayToClipboard
trigger1 = numenemy>0
text = "e-hel %d,numhelper %d,e-state %d,e-anim %d,e-time %d"
params = (enemy,numhelper),(numhelper),(enemy,stateno),(enemy,anim),(enemy,time)
IgnoreHitPause = 1

[State ]
type = AppendToClipboard
trigger1 = ishelper(987654321)
trigger1 = time=[0,60]
text = "\n v0 %d,v1 %d,v2 %d,v3 %d,v4 %d"
params = (var(0)),(var(1)),(var(2)),(var(3)),(var(4))
IgnoreHitPause = 1
[State ]
type = AppendToClipboard
trigger1 = ishelper(987654321)
trigger1 = time=[0,60]
text = " v5 %d,v6 %d,v7 %d,v8 %d,v59 %d"
params = (var(5)),(var(6)),(var(7)),(var(8)),(var(59))
IgnoreHitPause = 1

[state ];time代わり
type = null
trigger1 = var(59):=var(59)+1||1
trigger1 = var(58):=var(58)+1||1

[state ];IDがこれ以上なさそうならリセット
type = varset
trigger1 = numhelper(444555666)
trigger1 = helper(444555666),ID < var(59)
var(59)=0

[state ];敵本体のID
type = varset
trigger1 = numenemy>0
trigger1 = var(0)=0
var(0)=Enemy,ID

[state ];検索
type = varset
trigger1 = playerIDexist(var(0)+var(59))
var(1)= var(0)+var(59)

[state ];敵本体のstateチェック
type = varset
trigger1 = playerIDexist(var(0))
trigger1 = var(0)!=0
trigger1 = playerID(var(0)),name!="Crazy-Catastrophe"
var(2)= playerID(var(0)),stateno

[state ];そのIDは敵のかどうか判別
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = playerID(var(1)),name!="Crazy-Catastrophe"
var(3)= 1

[state ];味方だった
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = playerID(var(1)),name="Crazy-Catastrophe"
var(3)= 0

[state ];ヘルパー総数
type = varset
trigger1 = 1
var(4)= numhelper+enemy,numhelper

[state ];ヘルパー総数(時間差計測)
type = varset
trigger1 = gametime%10=0
var(5)= numhelper+enemy,numhelper

[state ];攻撃命中したか？
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = playerID(var(1)),movehit=1
var(6) = 1
[state ];命中してない
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = playerID(var(1)),movehit=0
var(6) = 0

;こっから敵ヘルパーステート番号記憶
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(7)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
var(7)= playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(8)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
var(8)= playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(9)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
var(9) = playerID(var(1)),stateno

[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(10)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
var(10) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(11)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
var(11) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(12)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
trigger1 = var(11)!=playerID(var(1)),stateno
var(12) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(13)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
trigger1 = var(11)!=playerID(var(1)),stateno
trigger1 = var(12)!=playerID(var(1)),stateno
var(13) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(14)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
trigger1 = var(11)!=playerID(var(1)),stateno
trigger1 = var(12)!=playerID(var(1)),stateno
trigger1 = var(13)!=playerID(var(1)),stateno
var(14) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(15)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
trigger1 = var(11)!=playerID(var(1)),stateno
trigger1 = var(12)!=playerID(var(1)),stateno
trigger1 = var(13)!=playerID(var(1)),stateno
trigger1 = var(14)!=playerID(var(1)),stateno
var(15) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(16)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
trigger1 = var(11)!=playerID(var(1)),stateno
trigger1 = var(12)!=playerID(var(1)),stateno
trigger1 = var(13)!=playerID(var(1)),stateno
trigger1 = var(14)!=playerID(var(1)),stateno
trigger1 = var(15)!=playerID(var(1)),stateno
var(16) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(17)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
trigger1 = var(11)!=playerID(var(1)),stateno
trigger1 = var(12)!=playerID(var(1)),stateno
trigger1 = var(13)!=playerID(var(1)),stateno
trigger1 = var(14)!=playerID(var(1)),stateno
trigger1 = var(15)!=playerID(var(1)),stateno
trigger1 = var(16)!=playerID(var(1)),stateno
var(17) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(18)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
trigger1 = var(11)!=playerID(var(1)),stateno
trigger1 = var(12)!=playerID(var(1)),stateno
trigger1 = var(13)!=playerID(var(1)),stateno
trigger1 = var(14)!=playerID(var(1)),stateno
trigger1 = var(15)!=playerID(var(1)),stateno
trigger1 = var(16)!=playerID(var(1)),stateno
trigger1 = var(17)!=playerID(var(1)),stateno
var(18) = playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(19)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
trigger1 = var(10)!=playerID(var(1)),stateno
trigger1 = var(11)!=playerID(var(1)),stateno
trigger1 = var(12)!=playerID(var(1)),stateno
trigger1 = var(13)!=playerID(var(1)),stateno
trigger1 = var(14)!=playerID(var(1)),stateno
trigger1 = var(15)!=playerID(var(1)),stateno
trigger1 = var(16)!=playerID(var(1)),stateno
trigger1 = var(17)!=playerID(var(1)),stateno
trigger1 = var(18)!=playerID(var(1)),stateno
var(19) = playerID(var(1)),stateno

[state ]
type = selfstate
trigger1 = numhelper(444555666)
trigger1 = helper(444555666),ID > var(59)
trigger1 = var(59)!=0
trigger1 = var(58):=var(58)+1||1
trigger1 = var(58)<60
value = 987654321

[state ]
type = null;selfstate
triggerall = ishelper(987654321)
trigger1 = var(5)!=var(4)
trigger1 = time!=0 ;time=0でループしないように
trigger2 = var(1)!=var(0)+var(59) ;検索が止まった時再検索する
trigger2 = time!=0 ;time=0でループしないように
value = 987654321

;--------------------------------------------------------------------
;記憶２
[statedef 444555666]
type    = S
movetype= I
physics = N

[state ]
type = nothitby
trigger1 = 1
value = SCA,AA,AT,AP
ignorehitpause = 1
time = -1

[State ]
type = AssertSpecial
trigger1 = ishelper(444555666)
flag = Invisible
ignorehitpause = 1

[State ]
type = BindToRoot
trigger1 = ishelper(444555666)
ignorehitpause = 1

[State ]
type = PlayerPush
trigger1 = ishelper(444555666)
value = 0

[State ]
type = HitOverride
trigger1 = ishelper(444555666)
time = -1
attr = SCA,AA,AP,AT
slot = 0
stateno = 987654321
pausemovetime = 99999999
supermovetime = 99999999
ignorehitpause = 1

[State ]
type = ChangeAnim
trigger1 = ishelper(444555666)
value = root,Anim
elem = root,AnimElemNo(0)
ignorehitpause = 1

[State ]
type = Turn
trigger1 = Facing != parent,Facing
ignorehitpause = 1

[State ]
type = DisplayToClipboard
trigger1 = numenemy>0
text = "e-hel %d,numhelper %d,e-state %d,e-anim %d,e-time %d"
params = (enemy,numhelper),(numhelper),(enemy,stateno),(enemy,anim),(enemy,time)
IgnoreHitPause = 1

[State ]
type = AppendToClipboard
trigger1 = ishelper(444555666)
text = "\n v0 %d,v1 %d,v2 %d,v3 %d,v4 %d"
params = (var(0)),(var(1)),(var(2)),(var(3)),(var(4))
IgnoreHitPause = 1
[State ]
type = AppendToClipboard
trigger1 = ishelper(444555666)
text = " v5 %d,v6 %d,v7 %d,v8 %d,v59 %d"
params = (var(5)),(var(6)),(var(7)),(var(8)),(var(59))
IgnoreHitPause = 1

[state ];time代わり
type = null
trigger1 = ishelper(444555666)
trigger1 = var(59):=var(59)+1||1

[state ];ID
type = varset
trigger1 = ishelper(444555666)
var(0) = ID

[state ];IDがこれ以上なさそうならリセット
type = varset
trigger1 = numenemy>0
trigger1 = enemy,ID > (var(0)-var(59))
var(59)=0

[state ]
type = varset
trigger1 = ishelper(444555666)
trigger1 = playerIDexist(var(0)-(var(59)))
var(1) = var(0)-var(59)

[state ]
type = varset
trigger1 = ishelper(444555666)
trigger1 = numenemy>0
var(2) = enemy,ID

[state ]
type = varset
trigger1 = ishelper(444555666)
trigger1 = playerIDexist(var(0)-(var(59)))
trigger1 = playerIDexist(var(1))
trigger1 = playerID(var(1)),name!="Crazy-Catastrophe"
var(3) = 1

[state ]
type = varset
trigger1 = ishelper(444555666)
trigger1 = playerIDexist(var(0)-(var(59)))
trigger1 = playerIDexist(var(1))
trigger1 = playerID(var(1)),name="Crazy-Catastrophe"
var(3) = 0

[state ];攻撃命中したか？
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = playerID(var(1)),movehit=1
var(6) = 1
[state ];命中してない
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = playerID(var(1)),movehit=0
var(6) = 0

;こっから敵ヘルパーステート番号記憶
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(7)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
var(7)= playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(8)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
var(8)= playerID(var(1)),stateno
[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(9)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
var(9) = playerID(var(1)),stateno

[state ]
type = varset
trigger1 = playerIDexist(var(1))
trigger1 = var(1)!=0
trigger1 = var(10)=0
trigger1 = var(3)=1
trigger1 = var(6)=1
trigger1 = var(7)!=playerID(var(1)),stateno
trigger1 = var(8)!=playerID(var(1)),stateno
trigger1 = var(9)!=playerID(var(1)),stateno
var(10) = playerID(var(1)),stateno

[state ]
type = selfstate
trigger1 = var(59)!=0
trigger1 = var(58):=var(58)+1||1
trigger1 = var(58)<60
value = 444555666

[state ]
type = destroyself
trigger1 = var(58)>80
