;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;僉儞僌僋儕儉僝儞
;--------------------------------------------------
[StateDef 89011]
Type = S
movetype= I
Physics = S
SprPriority = 0
anim = ifelse(palno=12,21,anim)
ctrl = 0

[state a]
type = turn
triggerall = time = 0 && palno != 12
trigger1 = enemynear,facing = -facing
trigger1 = frontedgedist<enemynear,backedgedist
trigger2 = enemynear,facing = facing
trigger2 = frontedgedist<enemynear,frontedgedist

[state a]
type = varset
trigger1 = time = 0
var(20) = 0
ignorehitpause = 1

[State 20, VelSet]
Type = changeanim
trigger1 = palno != 12
Trigger1 = time = 2
value = 21
ignorehitpause = 1

[state a]
type = posset
triggerall = enemynear,pos x > pos x
trigger1 = time = 0 && palno = 12
trigger2 = time = 2 && palno != 12
x = enemynear,pos x -70
y = enemynear,pos y
ignorehitpause = 1

[state a]
type = posset
triggerall = enemynear,pos x <= pos x
trigger1 = time = 0 && palno = 12
trigger2 = time = 2 && palno != 12
x = enemynear,pos x +70
y = enemynear,pos y
ignorehitpause = 1

[state a]
type = varset
triggerall = time = 2 && palno != 12
trigger1 = backedgedist < 70
var(20) = 1
ignorehitpause = 1

[state a]
type = posadd
triggerall = time = 2 && palno != 12
trigger1 = var(20) = 1
x = abs(pos x - enemynear,pos x) +70
ignorehitpause = 1

[state a]
type = turn
triggerall = time = 2 && palno != 12
trigger1 = var(20) = 1
ignorehitpause = 1

[State 6900, Explod];1P懁僗儁儖僇乕僪柤
Type = Explod
Triggerall = TeamSide = 1
triggerall = numexplod(8905) = 0
trigger1 = palno = 12
Trigger1 = time = 0
trigger2 = palno != 12
Trigger2 = time = 2
Anim = 8905
ID = 8905
Pos = 20, 50
PosType = Left
SprPriority = 10
Facing = 1
BindTime = -1
OwnPal = 1
OnTop = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.2, 0.2
ignorehitpause = 1

[State 6900, Explod];2P懁僗儁儖僇乕僪柤
Type = Explod
Triggerall = TeamSide = 2
triggerall = numexplod(8905) = 0
trigger1 = palno = 12
Trigger1 = time = 0
trigger2 = palno != 12
Trigger2 = time = 2
Anim = 8905
ID = 8905
Pos = -120, 50
PosType = Right
SprPriority = 10
Facing = 1
BindTime = -1
OwnPal = 1
OnTop = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.2,0.2
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
trigger1 = palno = 12
Trigger1 = time = 2
trigger2 = palno != 12
Trigger2 = time = 4
Time = 50
MoveTime = 50
Anim = -1
Pos = 0,0
Sound = s100,12
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
triggerall = palno = 12
triggerall = numexplod(8909) = 0
trigger1 = Time = 1
anim = 8909
id = 8909
sprpriority = -10
postype = back
pos = 0,0
trans = add
BindTime = -1
removetime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

;偖偪傖
[State 3020, PlaySnd]
Type = PlaySnd
trigger1 = palno = 12
Trigger1 = time = 1
trigger2 = palno != 12
Trigger2 = time = 3
Value = S890,1
ignorehitpause = 1

;寣
[State 6300]
Type = Explod
trigger1 = palno = 12
Trigger1 = time = 1
trigger2 = palno != 12
Trigger2 = time = 3
Anim = 8904
ID = 8904
Pos = 50,-30
PosType = p1
Scale = 2,2
Facing = 1
SprPriority = 2
Trans = Add
Ownpal = 1
SuperMoveTime = 99
PauseMoveTime = 99
ignorehitpause = 1

[State 20, VelSet]
Type = VelSet
trigger1 = palno = 12
Trigger1 = time > 1
trigger2 = palno != 12
Trigger2 = time > 3
X = -0.8
Y = 0
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[State 10, ChangeState]
Type = ChangeState
Trigger1 = palno = 12
Trigger1 = time > 3
Value = 89012
ignorehitpause = 1

[State 10, ChangeState]
Type = ChangeState
Trigger1 = time > 90
Value = 50*(pos y < 0)
ctrl = 1
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;僉儞僌僋儕儉僝儞懕偒乮僩儉僉儔乕乯
;--------------------------------------------------
[StateDef 89012]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 8906
poweradd= 0
sprpriority = 1

[State 20, VelSet]
Type = VelSet
Trigger1 = time < 120
X = -0.8
ignorehitpause = 1

[State 20, VelSet]
Type = VelSet
Trigger1 = time >= 120
X = 0
ignorehitpause = 1

[State 10, ChangeState]
Type = ChangeState
Trigger1 = roundstate >= 3
Trigger1 = time > 90
Value = 0
ignorehitpause = 1

[State 20, VelSet]
Type = changeanim
Trigger1 = time >= 120
Trigger1 = anim != 8907
value = 8907
ignorehitpause = 1

[State reversal]
type = ReversalDef 
trigger1 = 1 
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,2
hitsound = S890,1
p1stateno = 89013
p2stateno = 1000044
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State 6300];寣
Type = Explod
triggerall = numtarget
triggerall = numexplod(8901)=0
trigger1 = enemynear,alive = 0
Anim = 8904+41*(random%2)
ID = 8901
Pos = ceil(fvar(13)),ceil(fvar(14))-20
random = 20,20
PosType = p1
Scale = 2.5,2.5
Facing = 1-2*(random%2)
SprPriority = 10
removetime = 23
Trans = Add
Ownpal = 1
persistent=0
SuperMoveTime = 99999
PauseMoveTime = 99999
ignorehitpause = 1

[state state];偍傑偗
type = targetstate
triggerall = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = roundstate = 3
value = 5150
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[State 10, ChangeState]
Type = ChangeState
trigger1 = numhelper(6900) = 0
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) = 2
trigger3 = time > 240
Value = 0
ctrl = 1
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;僉儞僌僋儕儉僝儞懕偒乮僩儉僉儔乕乯
;--------------------------------------------------
[StateDef 89013]
type = S
movetype = I 
physics = N 
velset = 0,0 
sprpriority = 1
ctrl = 0

[State 20, VelSet]
Type = changeanim
Trigger1 = anim != 8907
value = 8907
ignorehitpause = 1

[State reversal]
type = ReversalDef 
trigger1 = numhelper(6900)
trigger1 = helper(6900),var(42) < 90
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,2
p2stateno = 1000044
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state -1]
type = varset
trigger1 = numtarget > 0 && var(16) != 890
trigger1 = target,ishelper
var(16) = 890
ignorehitpause = 1

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

[state lifeadd];偍傑偗
type = targetlifeadd 
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
value = -2147483648
Absolute = 1
ignorehitpause = 1

[state power];偍傑偗
type = targetpoweradd
trigger1 = numtarget > 0
value = -2147483648
ignorehitpause = 1

[state state];偍傑偗
type = targetstate
triggerall = numhelper(6900)
triggerall = helper(6900),var(42) < 90
triggerall = numtarget > 0
triggerall = target,ishelper != 1
trigger1 = timemod = 30,0
trigger2 = target,alive = 0
value = 5150
ignorehitpause = 1

[State 6300];寣
Type = Explod
triggerall = numtarget
triggerall = numexplod(8901)=0
trigger1 = enemynear,alive = 0
Anim = 8904+41*(random%2)
ID = 8901
Pos = ceil(fvar(13)),ceil(fvar(14))-20
random = 20,20
PosType = p1
Scale = 2.5,2.5
Facing = 1-2*(random%2)
SprPriority = 10
removetime = 23
Trans = Add
Ownpal = 1
persistent=0
SuperMoveTime = 99999
PauseMoveTime = 99999
ignorehitpause = 1

[state state];偍傑偗
type = targetstate
triggerall = numtarget > 0
triggerall = target,ishelper != 1
trigger1 = roundstate = 3
trigger1 = target,alive = 0
value = 5150
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[state 1706]
type = changestate
trigger1 = numhelper(6900) = 0
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) = 2
trigger3 = time > 240
value = 0
ctrl = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
;僩儉僉儔乕
[statedef 89014] 
type = S
movetype = I 
physics = N 
anim = 8908+66*ishelper(1603)
velset = 0,0 
sprpriority = 7
ctrl = 0

[State -2];儔僀僼僶乕偼忺傝
type = Lifeset
triggerall = ishelper
trigger1 = root,life = [1,1000]
value = root,life
ignorehitpause = 1

[State -2]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag  = Noshadow

[State 1]
Type = ChangeState
Trigger1 = !ishelper
Value = 0
ctrl = 1
ignorehitpause = 1

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

[State change]
type = posset
trigger1 = 1
x = enemynear,pos x
y = enemynear,pos y -50
ignorehitpause = 1

[state 3]
type = Projectile
Trigger1 = ishelper(89014)
trigger1 = root,stateno = 89020
projanim = 8903
projremove = 1
projremovetime = 1
projpriority = 99999999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[State reversal]
type = ReversalDef 
trigger1 = !ishelper(1603)
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,2
p1stateno = 89015
p2stateno = 1000044+(root,stateno = 89020)+(root,stateno = 89027)
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state state];偍傑偗
type = targetstate
triggerall = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = roundstate = 3
value = 5150
ignorehitpause = 1

[State change] ;枙嶦姰椆
type = destroyself
Triggerall = ishelper(89014)
triggerall = numhelper(6900)
trigger1 = helper(6900),var(42) > 420
trigger2 = helper(6900),var(41) = 4
trigger2 = root,time < 10
trigger3 = helper(6900),var(41) = 7
trigger3 = root,time < 10 && root,stateno != 89027 && root,numexplod(8958) = 0
trigger4 = root,palno=6&&root,stateno!=89020&&root,stateno!=89027&&root,numexplod(8958)=0
ignorehitpause = 1

[State -2]
Type = AssertSpecial
trigger1 = roundstate != 2
IgnoreHitPause = 1
Flag  = invisible

[State 1]
Type = Changeanim
Trigger1 = ishelper(1603)
Trigger1 = anim != 8975
trigger1 = numhelper(193)
trigger1 = helper(193),var(21) = 890
Trigger1 = helper(193),numtarget
Trigger1 = helper(193),var(55) = 100
Value = 8975
ignorehitpause = 1

[State change] ;枙嶦姰椆
type = destroyself
Triggerall = ishelper(1603)
triggerall = numhelper(6900)
trigger1 = helper(6900),var(36) != 8901
ignorehitpause = 1

;---------------------------------------------------------------------------
;僩儉僉儔乕摉恎惉岟乮揋枙嶦乯
[statedef 89015] 
type = S 
movetype = H
physics = N 
anim = 8908
velset = 0,0 
sprpriority = 0 
ctrl = 0

[State -2]
Type = AssertSpecial
Trigger1 = 1
IgnoreHitPause = 1
Flag  = Noshadow

[State 1]
Type = ChangeState
Trigger1 = !ishelper
Value = 0
ctrl = 1
ignorehitpause = 1

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

[State change]
type = posset
trigger1 = 1
x = enemynear,pos x
y = enemynear,pos y -50
ignorehitpause = 1

[State change] ;杮懱偠傖側偄or側偤偐僞乕僎僢僩偑柍偄
type = changestate
trigger1 = numtarget > 0
trigger1 = target,ishelper
trigger2 = numtarget = 0
value = 89014
ignorehitpause = 1

[state 3]
type = Projectile
Triggerall = ishelper(89014)
trigger1 = root,stateno = 89020
projanim = 8903
projremove = 1
projremovetime = 1
projpriority = 99999999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[state lifeadd] 
type = targetlifeadd 
triggerall = numtarget > 0
triggerall = target,ishelper != 1
Trigger1 = ishelper(89014)
trigger2 = time < 60
trigger3 = roundstate != 2
value = -214748364899
ignorehitpause = 1
Absolute = 1

[state power]
type = targetpoweradd
triggerall = numtarget > 0
Trigger1 = ishelper(89014)
trigger2 = time < 60
trigger3 = roundstate != 2
trigger4 = !gametime%300
value = -2147483648
ignorehitpause = 1

[state state]
type = targetstate
Triggerall = ishelper(89014)
triggerall = numtarget > 0
triggerall = target,ishelper != 1
trigger1 = time > 3
trigger1 = timemod = 30,0
value = 5150
ignorehitpause = 1

[state state]
type = targetstate
triggerall = numtarget > 0
triggerall = target,ishelper != 1
trigger1 = time = [4,70]
trigger1 = timemod = 30,0
trigger2 = target,alive = 0
value = 5150
ignorehitpause = 1

[state state];偍傑偗
type = targetstate
triggerall = numtarget > 0
triggerall = target,ishelper != 1
trigger1 = roundstate = 3
value = 5150
ignorehitpause = 1

[State -2]
type = SuperPause
triggerall = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = roundstate = 3
time = 3
movetime = 3
anim = -1
darken = 0
persistent = 4
ignorehitpause = 1

[State 6300];僄僼僃僋僩
Type = Explod
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = var(55) != 100
Anim = 8910
ID = 8910
Pos = ceil(frontedgedist-ifelse((facing=enemynear,facing),(enemynear,frontedgedist),(enemynear,backedgedist))),ceil((enemynear,pos y)-pos y)-50
PosType = p1
Scale = 1,1
Facing = 1
SprPriority = 3
Trans = Add
Ownpal = 1
SuperMoveTime = 99
PauseMoveTime = 99
ignorehitpause = 1

[State 2000, 6];僺僠儏乕儞
type = PlaySnd
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = var(55) != 100
value = s890,2
ignorehitpause = 1

[State 2000, 6];億乕僘
type = Pause
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = var(55) != 100
time = 31
movetime = 31
ignorehitpause = 1

[State -2]
type = SuperPause
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = var(55) != 100
time = 3
movetime = 0
anim = -1
darken = 0
ignorehitpause = 1

[state a];堦搙偩偗
type = varset
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
var(55) = 100
ignorehitpause = 1

[State reversal]
type = ReversalDef 
trigger1 = 1
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,2
p2stateno = 1000044+(root,stateno = 89020)+(root,stateno = 89027)
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State change] ;枙嶦姰椆
type = destroyself
Triggerall = ishelper(89014)
triggerall = numhelper(6900)
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = target,alive != 1
trigger2 = helper(6900),var(42) > 420
trigger3 = helper(6900),var(41) > 3
trigger3 = root,time < 10
trigger4 = helper(6900),var(41) = 7
trigger4 = root,time < 10 && root,numexplod(8958) = 0
trigger5 = root,palno=6&&root,stateno!=89020&&root,stateno!=89027&&root,numexplod(8958)=0
ignorehitpause = 1

[State -2]
Type = AssertSpecial
trigger1 = roundstate != 2
IgnoreHitPause = 1
Flag  = invisible

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;傾儅僥儔僗奐巒
;--------------------------------------------------
[StateDef 89016]
Type = S
MoveType = I
Physics = S
anim = 8914
Ctrl = 0
VelSet = 0, 0

[State 歑傝惡]
Type = PlaySnd
Trigger1 = Time = 2
Value = S891,1
ignorehitpause = 1

[State 192, pos]
Type = posadd
Trigger1 = Time = [49,72]
x = -2
y = -1
ignorehitpause = 1

[state -1]
type = targetdrop
trigger1 = numtarget > 0
ignorehitpause = 1

;--------------------慺怳傝壒
[State 1060, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 72
Value = S200, 4
Channel = 1
ignorehitpause = 1

;--------------------僿儖僷乕
[State 6900, Explod];1P懁僗儁儖僇乕僪柤
Type = Explod
Triggerall = TeamSide = 1
trigger1 = numexplod(8924) = 0
Trigger1 = time = 120
Anim = 8924
ID = 8924
Pos = 20, 50
PosType = Left
SprPriority = 10
Facing = 1
BindTime = -1
OwnPal = 1
OnTop = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.2, 0.2
ignorehitpause = 1

[State 6900, Explod];2P懁僗儁儖僇乕僪柤
Type = Explod
Triggerall = TeamSide = 2
trigger1 = numexplod(8924) = 0
Trigger1 = time = 120
Anim = 8924
ID = 8924
Pos = -100, 50
PosType = Right
SprPriority = 10
Facing = 1
BindTime = -1
OwnPal = 1
OnTop = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.2, 0.2
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
Trigger1 = time = 122
Time = 50
MoveTime = 50
Anim = -1
Pos = 0,0
Sound = s100,12
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 1000, 0]
Type = RemoveExplod
Trigger1 = numexplod(8909)
Trigger1 = Time = 121
ID = 8909
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = numexplod(8917) = 0
trigger1 = Time = 121
anim = 8917
id = 8917
sprpriority = -10
postype = back
pos = 0,0
trans = add
BindTime = -1
removetime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[state -1]
type = targetdrop
triggerall = numtarget > 0
trigger1 = target,ishelper
trigger2 = time = 179
ignorehitpause = 1

[State -2]
type = SuperPause
trigger1 = time = 5
time = 5
movetime = 0
anim = -1
darken = 0
ignorehitpause = 1

[State 23000]
type = ReversalDef
trigger1 = palno = 12
trigger1 = time > 10
reversal.attr = SCA,AT,AA,AP
priority = 7,hit
pausetime = 0,0
numhits = 0
hitsound = S890,1
p2stateno = 89023
ignorehitpause = 1
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

;--------------------廔椆
[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time = 179
Trigger1 = roundstate > 2
Value = 50
ctrl = 1
ignorehitpause = 1

[State 192]
Type = varset
Trigger1 = time = 180
var(52) = 1
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Triggerall = time
Trigger1 = time > 180
Trigger2 = time < 10 &&numhelper(6900)
Trigger2 = helper(6900),var(41) = 3
Value = 89017
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;傾儅僥儔僗峌寕
;--------------------------------------------------
[StateDef 89017]
Type = A
MoveType= I
Physics = N
Ctrl = 0
VelSet = 0, 0
Anim = 8925
SprPriority = 1

;--------------------懍搙愝掕
[State 1065, PosAdd]
Type = turn
Trigger1 = Time = 0
Trigger1 = random < 500
ignorehitpause = 1

[State 1065, VelSet]
Type = VelSet
Trigger1 = 1
X = 0
Y = 0
ignorehitpause = 1

[State 1065, PosAdd]
Type = Posset
Trigger1 = Time = 0
x = -100 + random%200
y = -random%120
ignorehitpause = 1

;--------------------慺怳傝壒
[State 1065, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 1
Value = S200, 2
Channel = 1
ignorehitpause = 1

;--------------------僿儖僷乕
;--------------------峌寕愝掕
[State 1065, 墛]
Type = PlaySnd
Trigger1 = AnimElem = 6, = 1
Value = S892, 0
Channel = 1
ignorehitpause = 1

[state a]
type = varset
Trigger1 = time = 29
var(57) = (numhelper(89018) = 0)
ignorehitpause = 1

[State 1065, 儃僀僗]
Type = PlaySnd
Trigger1 = AnimElem = 6, = 1
Value = S893, 0+random%3
Channel = 2
ignorehitpause = 1

[State 106]
type = Projectile
trigger1 = AnimElem = 6, = 1
trigger2 = AnimElem = 6, = 32
projanim = 8903+5*(AnimElem = 6, = 1)
projremove = 1
projremovetime = 30
projid = 8903
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S892, 2
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State 106]
type = Projectile
triggerall = numhelper(6900)
triggerall = helper(6900),var(41) = 0
trigger1 = AnimElem = 6, = 16
trigger2 = AnimElem = 6, = 48
projanim = 8903+5*(AnimElem = 6, = 16)
projremove = 1
projremovetime = 30
projid = 8904
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S892, 2
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State 1065]
type = Projectile
trigger1 = var(41) != 890
trigger1 = palno = 6 || palno = 12
trigger1 = gametime%4 = 0
projanim = 8908-5*(gametime%40=0)
projremove = 1
projremovetime = 3
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = S, NA
HitFlag = MAFD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 15,15
PauseTime = 10, 15
Ground.Type = low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 0, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State 1065, PosAdd]
Type = posadd
Trigger1 = time >= 88
x = 2
ignorehitpause = 1

;--------------------慺怳傝壒
[State 1061, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 103
Value = S200, 4
Channel = 3
ignorehitpause = 1

[State 1000, 0]
type = ModifyExplod
Trigger1 = numexplod(8917)
Trigger1 = Time = 103
ID = 8917
removetime = 1
ignorehitpause = 1

[State 1061, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 104
Value = S892, 1
Channel = 4
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = Time = 104
anim = 8918+random%6
id = 8917
sprpriority = -10
postype = back
pos = 0,0
trans = add
BindTime = -1
removetime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

;--------------------廔椆
[State 1065, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Trigger1 = roundstate=2
trigger1 = numhelper(6900)
trigger1 = helper(6900),var(41) = 4
Value = 89019
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Trigger1 = roundstate=2
Value = 89017
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Trigger1 = roundstate > 2
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) = 0
Trigger2 = time > 100
trigger3 = numhelper(6900) = 0
Trigger3 = time > 100
Value = 50
ctrl = 1
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;傾儅僥儔僗僄僼僃僋僩
;--------------------------------------------------
[StateDef 89018]
Type = A
MoveType = I
Physics = N
Anim = 8916
SprPriority = 100

[State -2];儔僀僼僶乕偼忺傝
type = Lifeset
triggerall = ishelper
trigger1 = root,life = [1,1000]
value = root,life
ignorehitpause = 1

[State 30021, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow
ignorehitpause = 1

[State 30021, Angle]
Type = Angleset
Trigger1 = time = 0
value = random%360
ignorehitpause = 1

[State 30021, Angle]
Type = Angleadd
Trigger1 = 1
value = 12-24*(ishelper(89018))
ignorehitpause = 1

;----------摟柧壔仌戝偒偝曄峏
[State 30021, AngleDraw]
Type = AngleDraw
Trigger1 = ishelper(89018)
Scale = 1.5,1.5
ignorehitpause = 1

[State 30021, AngleDraw]
Type = AngleDraw
Trigger1 = ishelper(89019)
Scale = 1.5+time/10,1.5+time/10
ignorehitpause = 1

[State 30021, Trans]
Type = Trans
Trigger1 = ishelper(89019)
Trans = Add
ignorehitpause = 1

[State 30021, Trans]
Type = Trans
Trigger1 = ishelper(89018)
Trans = Add1
ignorehitpause = 1

;----------徚柵忦審
[State 30021, DestroySelf]
Type = DestroySelf
Trigger1 = Time >= 60
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;傾儅僥儔僗廔椆丒巰嫸偄奐巒
;--------------------------------------------------
[StateDef 89019]
Type = A
MoveType= I
Physics = N
Ctrl = 0
VelSet = 0, 0
Anim = 10000
SprPriority = 1

[State -2, RemoveExplod];僗儁儖僇乕僪柤乮傾儅僥儔僗乯嶍彍
Type = RemoveExplod
Trigger1 = NumExplod(8924) > 0
ID = 8924
ignorehitpause = 1

[State 1061, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 30
Trigger2 = Time = 90
Trigger3 = Time = 150
Trigger4 = Time = 210
Value = S892, 1
Channel = 4
ignorehitpause = 1

[State 6900, Explod];1P懁僗儁儖僇乕僪柤
Type = Explod
Triggerall = TeamSide = 1
trigger1 = numexplod(8935) = 0
Trigger1 = time = 270
Anim = 8935
ID = 8935
Pos = 20, 50
PosType = Left
SprPriority = 10
Facing = 1
BindTime = -1
OwnPal = 1
OnTop = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.2, 0.2
ignorehitpause = 1

[State 6900, Explod];2P懁僗儁儖僇乕僪柤
Type = Explod
Triggerall = TeamSide = 2
trigger1 = numexplod(8935) = 0
Trigger1 = time = 270
Anim = 8935
ID = 8935
Pos = -90, 50
PosType = Right
SprPriority = 10
Facing = 1
BindTime = -1
OwnPal = 1
OnTop = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.2, 0.2
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
Trigger1 = time = 272
Time = 50
MoveTime = 50
Anim = -1
Pos = 0,0
Sound = s100,12
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 1000, 0]
Type = RemoveExplod
Trigger1 = numexplod(8909)
Trigger1 = Time = 271
ID = 8909
ignorehitpause = 1

[State 1000, 0]
Type = RemoveExplod
Trigger1 = numexplod(8917)
Trigger1 = Time = 271
ID = 8917
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = Time = 271
trigger1 = numexplod(8933) = 0
anim = 8933
id = 8933
sprpriority = -10
postype = back
pos = 0,0
trans = add
BindTime = -1
removetime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time = 329
Trigger1 = roundstate > 2
Value = 50
ctrl = 1
ignorehitpause = 1

[State 192]
Type = varset
Trigger1 = time = 330
var(52) = 2
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Triggerall = time
Trigger1 = time > 330
Trigger2 = time < 10 &&numhelper(6900)
Trigger2 = helper(6900),var(41) = 5
Value = 89020
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;巰嫸偄峌寕
;--------------------------------------------------
[StateDef 89020]
Type = A
MoveType= I
Physics = N
Ctrl = 0
VelSet = 0, 0
Anim = 8934
SprPriority = 1

;--------------------懍搙愝掕
[State 1065, PosAdd]
Type = turn
Trigger1 = Time = 0
Trigger1 = random%2 = 0
ignorehitpause = 1

[State 1065, VelSet]
Type = VelSet
Trigger1 = 1
X = 0
Y = 0
ignorehitpause = 1

[State 1065, PosAdd]
Type = Posset
Trigger1 = Time = 0
x = -100 + random%200
y = -random%120
ignorehitpause = 1

[state a];俇丒侾俀俹峌寕僷僞乕儞敾掕
type = varset
triggerall = palno = 12 || palno = 6
trigger1 = time = 3
var(30) = numhelper(89023) + 10*numhelper(89024)
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Triggerall = palno != 6
Triggerall = palno != 12
Triggerall = time = 79
triggerall = numhelper(6900)
triggerall = helper(6900),var(41) = 0
Triggerall = numhelper(890)
Trigger1 = helper(890),time < 60
Trigger1 = helper(890),var(35) = 0
Trigger2 = helper(890),time >= 60
Trigger2 = helper(890),var(35) != 0
Value = 50
ctrl = 1
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Triggerall = palno != 6
Triggerall = palno != 12
Triggerall = time = 79
Triggerall = numhelper(890)
Trigger1 = helper(890),time < 60
Trigger1 = helper(890),var(35) = 0
Trigger2 = helper(890),time >= 60
Trigger2 = helper(890),var(35) != 0
Value = 89021
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
triggerall = palno = 12 || palno = 6
triggerall = var(30) = [0,1]
trigger1 = Time = 80
anim = 8943
id = 8935
sprpriority = 10
postype = back
pos = 0,0
BindTime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1065, PosAdd];偨傑偵愙嬤
Type = Posset
triggerall = palno = 12 || palno = 6
Triggerall = time = 81
Triggerall = var(30) = 1
Trigger1 = random < 500
Trigger2 = numhelper(6900)
Trigger2 = helper(6900),var(40) < 500
x = enemynear,pos x
y = enemynear,pos y
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
Trigger1 = time = 80
Time = 50
Anim = -1
Pos = 0,0
Sound = s896,1
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
triggerall = palno = 12 || palno = 6
triggerall = var(30) = 0
Triggerall = time >= 80
Trigger1 = time%24 = 9
Trigger2 = time%24 = 10
Trigger3 = time%24 = 11
Trigger4 = time%24 = 12
Trigger5 = time%24 = 14
Trigger6 = time%24 = 16
Trigger7 = time%24 = 18
Time = 2
Anim = -1
Pos = 0,0
Sound = -1
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 1065, PlaySnd]
Type = PlaySnd
trigger1 = Time = 85
trigger2 = Time = 109
trigger3 = Time = 133
trigger4 = Time = 157
trigger5 = Time = 181
Value = S896, 2
Channel = 5
ignorehitpause = 1

[State 1065, PlaySnd]
Type = PlaySnd
triggerall = (enemynear,stateno = [89023,89024])||enemynear,life = 0||enemynear,alive = 0
triggerall = palno = 12 || palno = 6
triggerall = var(30) = [0,1]
trigger1 = Time = 87
trigger2 = Time = 111
trigger3 = Time = 135
trigger4 = Time = 159
trigger5 = Time = 183
Value = S896, 3
Channel = 6
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = Time = 85
anim = 8936
id = 8936
sprpriority = 10
postype = back
pos = 0,0
BindTime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = Time = 109
anim = 8937
id = 8937
sprpriority = 10
PosType = Right
Facing = -1
pos = 0,240
BindTime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = Time = 133
anim = 8936
id = 8938
sprpriority = 10
PosType = left
Facing = 1
pos = 0,0
BindTime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = Time = 157
anim = 8936
id = 8939
sprpriority = 10
PosType = Right
Facing = -1
pos = 0,0
BindTime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = Time = 181
anim = 8937
id = 8940
sprpriority = 10
PosType = left
Facing = 1
pos = 0,240
BindTime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
triggerall = palno = 12 || palno = 6
triggerall = var(30) = [0,1]
trigger1 = Time = 85
trigger2 = Time = 109
trigger3 = Time = 133
trigger4 = Time = 157
trigger5 = Time = 181
anim = 8938+random%5
id = 8941
sprpriority = 9
postype = back
pos = 160,210
Scale = 3.5,3.5
BindTime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 6300];寣
Type = Explod
triggerall = palno = 12 || palno = 6
triggerall = var(30) = 1
triggerall = enemynear,stateno = 89024||enemynear,life = 0||enemynear,alive = 0
trigger1 = Time = 87
trigger2 = Time = 111
trigger3 = Time = 135
trigger4 = Time = 159
trigger5 = Time = 183
Anim = 8904+41*(random%2)
ID = 8904
Pos = ceil(fvar(13)),ceil(fvar(14))-20
random = 20,20
PosType = p1
Scale = 2.5,2.5
Facing = 1-2*(random%2)
SprPriority = 10
removetime = 23
Trans = Add
Ownpal = 1
SuperMoveTime = 99999
PauseMoveTime = 99999
ignorehitpause = 1

[State 6300]
Type = Explod
triggerall = palno = 12 || palno = 6
triggerall = var(30) = 1
triggerall = enemynear,stateno = 89024||enemynear,life = 0||enemynear,alive = 0
trigger1 = Time = 87
trigger2 = Time = 111
trigger3 = Time = 135
trigger4 = Time = 159
trigger5 = Time = 183
Anim = 8944
ID = 8944
Pos = ceil(fvar(13)),ceil(fvar(14))-30
PosType = p1
Scale = 2,2
Facing = 1
SprPriority = 10
removetime = 23
Trans = Add
Ownpal = 1
SuperMoveTime = 99999
PauseMoveTime = 99999
ignorehitpause = 1

[State 23000]
type = Projectile
triggerall = time >= 81
triggerall = GameTime%3 = 1
trigger1 = palno != 6
trigger1 = palno != 12
trigger2 = palno = 12 || palno = 6
trigger2 = var(30) != 0
attr = S, NA
projanim = 8903
projid = 8903
projpriority = 9999999999
projremove = 1
projremovetime = 2
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
animtype  = hard
damage    = 9999999999999999
hitflag = MAFDP
pausetime = 6,6
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.75,-0.01
guard.velocity = -9.5
air.velocity = -0.75,-0.01
fall = 1
air.fall = 1
fall.recover = 0
getpower = 0, 0
p2stateno = 89023
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 23000]
type = Projectile
triggerall = time >= 81
trigger1 = palno != 6
trigger1 = palno != 12
trigger2 = palno = 12 || palno = 6
trigger2 = var(30) != 0
attr = S, SP
projanim = 8903
projid = 8903
projpriority = 999999999
projremove = 1
projremovetime = 2
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
animtype  = Light
damage    = 10,0
hitflag = MAFDP
pausetime = 8,8
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2
air.velocity = -2,-1
getpower = 0, 0
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 23000]
type = Projectile
triggerall = time >= 81
triggerall = GameTime%3 = 1
trigger1 = palno = 12 || palno = 6
trigger1 = var(30) = 0
attr = S, NA
projanim = 8903
projid = 8903
projpriority = 9999999999
projremove = 1
projremovetime = 2
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
animtype  = hard
damage    = 9999999999999999
hitflag = MAFDP
pausetime = 6,6
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.75,-0.01
guard.velocity = -9.5
air.velocity = -0.75,-0.01
fall = 1
air.fall = 1
fall.recover = 0
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 23000]
type = Projectile
triggerall = time >= 81
trigger1 = palno = 12 || palno = 6
trigger1 = var(30) = 0
attr = S, SP
projanim = 8903
projid = 8903
projpriority = 999999999
projremove = 1
projremovetime = 2
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
animtype  = Light
damage    = 99999999999999
hitflag = MAFDP
pausetime = 8,8
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2
air.velocity = -2,-1
getpower = 0, 0
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 23000]
type = Projectile
triggerall = time >= 81
triggerall = GameTime%3 = 2
trigger1 = palno = 12 || palno = 6
trigger1 = var(30) = 0
attr = S, NA
projanim = 8903
projid = 8904
projpriority = 9999999999
projremove = 1
projremovetime = 2
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
animtype  = hard
damage    = 10
hitflag = MAFDP
pausetime = 6,6
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -0.75,-0.01
guard.velocity = -9.5
air.velocity = -0.75,-0.01
fall = 1
air.fall = 1
fall.recover = 0
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 23000]
type = Projectile
triggerall = time >= 81
trigger1 = palno = 12 || palno = 6
trigger1 = var(30) = 0
attr = S, SP
projanim = 8903
projid = 8904
projpriority = 999999999
projremove = 1
projremovetime = 2
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
animtype  = Light
damage    = 10,0
hitflag = MAFDP
pausetime = 8,8
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2
air.velocity = -2,-1
getpower = 0, 0
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 23000]
type = ReversalDef
triggerall = time >= 81
trigger1 = numhelper(6900) = 0
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) != 0
trigger2 = palno != 1
trigger2 = palno != 7
trigger2 = palno != 6
trigger2 = palno != 12
trigger3 = palno = 12 || palno = 6
trigger3 = var(30) != [0,1]
reversal.attr = SCA,AT,AA,AP
priority = 7,hit
pausetime = 0,0
numhits = 0
p2stateno = 89023
ignorehitpause = 1

[State 23000]
type = ReversalDef
triggerall = palno = 12 || palno = 6
trigger1 = time >= 81
trigger1 = var(30) = 1
trigger2 = var(30) = 0
reversal.attr = SCA,AT,AA,AP
priority = 7,hit
pausetime = 0,0
numhits = 0
p2stateno = 89024
ignorehitpause = 1

[state -1]
type = varset
trigger1 = numtarget > 0 && var(16) != 890
trigger1 = target,ishelper
var(16) = 890
ignorehitpause = 1

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

[state 23000]
type = targetstate
triggerall = numtarget > 0
triggerall = roundstate=2
triggerall = time >= 81
triggerall = (GameTime%3) = 1
trigger1 = palno != 6
trigger1 = palno != 12
trigger2 = palno = 12 || palno = 6
trigger2 = var(30) != [0,1]
value = 89023
ignorehitpause = 1

[state 23000]
type = targetlifeadd
triggerall = numtarget > 0
triggerall = roundstate=2
triggerall = time >= 81
trigger1 = (GameTime%6) = [0,2]
trigger1 = palno = 12 || palno = 6
trigger1 = var(30) = [0,1]
trigger2 = time <= 101
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) != 0
trigger2 = palno = 1 || palno = 7
value = -8901016835111111111
ignorehitpause = 1
absolute = 1

[state 23000]
type = targetstate
triggerall = numtarget > 0
triggerall = roundstate=2
triggerall = time >= 81
triggerall = (GameTime%3) = 0
trigger1 = palno = 12 || palno = 6
trigger1 = var(30) = [0,1]
value = 89024
ignorehitpause = 1

[state 23000]
type = targetstate
triggerall = numtarget > 0
triggerall = roundstate=2&&enemynear,alive
triggerall = time = [81,120]
trigger1 = palno != 6
trigger1 = palno != 12
trigger2 = palno = 12 || palno = 6
trigger2 = var(30) != [0,1]
value = 89023
ignorehitpause = 1

[State 23000]
type = HitAdd
trigger1 = numtarget > 0
trigger1 = enemynear,time = [0,1]
trigger1 = enemynear,stateno = [89023,89024]
trigger2 = enemynear,life = 0||enemynear,alive = 0
trigger2 = timemod = 6,0
value = 1
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time >= 201
Trigger1 = roundstate=2
Value = 89020
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time >= 201
Trigger1 = roundstate > 2
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) = 0
Trigger2 = time >= 200
trigger3 = numhelper(6900) = 0
Trigger3 = time >= 200
Value = 50
ctrl = 1
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;巰嫸偄峌寕拞抐
;--------------------------------------------------
[StateDef 89021]
Type = A
MoveType= I
Physics = N
Ctrl = 0
VelSet = 0, 0
Anim = 10000
SprPriority = 1

[State 1060, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 1
Value = S200, 4
Channel = 1
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time >= 50
Trigger1 = roundstate=2
Value = 89020
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time >= 50
Trigger1 = roundstate > 2
Value = 50
ctrl = 1
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;巰嫸偄僄僼僃僋僩
;--------------------------------------------------
[StateDef 89022]
Physics  = N
Anim     = 10000

[State -2];儔僀僼僶乕偼忺傝
type = Lifeset
triggerall = ishelper
trigger1 = root,life = [1,1000]
value = root,life
ignorehitpause = 1

[State 6056, 曄悢憹尭]
Type = VarAdd
Trigger1 = Time > 14
var(0) = 18

[State 6056, 曄悢憹尭]
Type = Varset
Trigger1 = time = 0
fvar(0) = 5
ignorehitpause = 1

[State 6056, 曄悢憹尭]
Type = Varset
Trigger1 = Time<14
fvar(0) = 0.8*fvar(0)
ignorehitpause = 1

[State 6056, 曄悢憹尭]
Type = Varset
Trigger1 = Time>=14
fvar(0) = 0.2*fvar(0)
ignorehitpause = 1

[State 6056, 怓]
Type = PalFX
Trigger1 = 1
Time = 1
Mul = 256-Var(0),256-Var(0),256-Var(0)
ignorehitpause = 1

[State 1065, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 1
Value = S896, 0
Channel = 1
ignorehitpause = 1

;************************
[State 6056, 僄僼僃僋僩]
Type = Explod
Triggerall = Time = 1
Trigger1 = ishelper(89022)
Trigger2 = ishelper(89023)
Trigger2 = root,palno = 12 || root,palno = 6
Anim = 30310
ID = 30310
Pos = 0,0
BindTime = -1
Scale =1,1
SprPriority = 5
removeTime = 600
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 6056, 僄僼僃僋僩]
Type = Explod
Trigger1 = Time = 1
Anim = 30300
ID = 30311
Pos = 0,0
BindTime = -1
Scale =2.5,2.5
SprPriority = 7
removeTime = 600
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 6056, 僄僼僃僋僩]
Type = Explod
Trigger1 = Time = 1
Anim = 30300
ID = 30312
Pos = 0,0
BindTime = -1
Scale =5,5
SprPriority = 7
removeTime = 600
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 6056, 僄僼僃僋僩]
Type = Explod
Triggerall = Time = 1
Trigger1 = ishelper(89022)
Trigger2 = ishelper(89023)
Trigger2 = root,palno = 12 || root,palno = 6
Anim = 30313
ID = 30313
Pos = 0,0
BindTime = 600
Scale =1,1
SprPriority = 6
removeTime = 600
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

;**************************************************
[State 6056, 僄僼僃僋僩憖嶌]
Type = ModifyExplod
Trigger1 = 1
ID = 30311
Scale = fvar(0)/2,fvar(0)/2
IgnoreHitPause = 1

[State 6056, 僄僼僃僋僩憖嶌]
Type = ModifyExplod
Trigger1 = 1
ID = 30312
Scale = fvar(0),fvar(0)
IgnoreHitPause = 1

[State 6056, 僄僼僃僋僩傪徚偡]
Type = RemoveExplod
Trigger1 = NumExplod(30310) > 0
Trigger1 = var(0) > 249
ID = 30310
ignorehitpause = 1

[State 6056, 僄僼僃僋僩傪徚偡]
Type = RemoveExplod
Trigger1 = NumExplod(30311) > 0
Trigger1 = var(0) > 249
ID = 30311
ignorehitpause = 1

[State 6056, 僄僼僃僋僩傪徚偡]
Type = RemoveExplod
Trigger1 = NumExplod(30312) > 0
Trigger1 = var(0) > 249
ID = 30312
ignorehitpause = 1

[State 6056, 僄僼僃僋僩傪徚偡]
Type = RemoveExplod
Trigger1 = NumExplod(30313) > 0
Trigger1 = var(0) > 249
ID = 30313
ignorehitpause = 1

;**************************************************
[State 6056, 僿儖僷乕傪徚偡]
Type = DestroySelf
Trigger1 = var(0) > 249
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;巰嫸偄僄僼僃僋僩帪
;--------------------------------------------------
[StateDef 89025]
Physics  = N
Anim     = 10000
SprPriority = -1

[State -2];儔僀僼僶乕偼忺傝
type = Lifeset
triggerall = ishelper
trigger1 = root,life = [1,1000]
value = root,life
ignorehitpause = 1

[State 1]
Type = bindtoroot
Trigger1 = 1
Pos = 0,-45
ignorehitpause = 1

[State 1]
Type = changeanim
Trigger1 = Time = 1
value = 8946
ignorehitpause = 1

[State 30021, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow
ignorehitpause = 1

[State 30021, Angle]
Type = Angleset
Trigger1 = time = 0
value = random%360
ignorehitpause = 1

[State 30021, Angle]
Type = Angleadd
Trigger1 = 1
value = 1
ignorehitpause = 1

[State 6115, 摟柧搙]
Type = Trans
Trigger1 = 1
Trans = Add
ignorehitpause = 1

[State 310 , blink]
type = PalFX
trigger1 = time = 0
time = -1
add = -180,-180,100
sinadd = -80,-80,-80,10
color = 0 
invertall = 1
persistent = 30
ignorehitpause = 1

[State 30021, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Scale = 0.4,0.4
ignorehitpause = 1

[State 6056, 僿儖僷乕傪徚偡]
Type = DestroySelf
Trigger1 = root,stateno != [89020,89026]
Trigger2 = root,time != [2,200]
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;巰嫸偄廔椆丒慛寣偺寢枛奐巒
;--------------------------------------------------
[StateDef 89026]
Type = A
MoveType= I
Physics = N
Ctrl = 0
VelSet = 0, 0
Anim = 10000
SprPriority = 1

[state -1]
type = targetdrop
trigger1 = numtarget > 0
ignorehitpause = 1

[State -2, RemoveExplod];僗儁儖僇乕僪柤乮巰嫸偄乯嶍彍
Type = RemoveExplod
Trigger1 = NumExplod(8935) > 0
ID = 8935
ignorehitpause = 1

[State 1061, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 2
Value = S897, 0
Channel = 6
ignorehitpause = 1

[State 1061, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 360
Trigger2 = Time = 400
Trigger3 = Time = 440
Trigger4 = Time = 480
Trigger5 = Time = 500
Trigger6 = Time = 520
Value = S897, 1
Channel = 5

[State 3000, 曄悢]
Type = VarSet
Trigger1 = Time = 0
var(20) = random%3
ignorehitpause = 1

;寣
[State 6300]
Type = Explod
Trigger1 = Time = 360
Trigger2 = Time = 440
Trigger3 = Time = 500
Anim = 8949+(var(20)+time)%3
ID = 8949
Pos = 85,120
PosType = left
random = 75,90
Scale = 5,5
Facing = 1-2*(random%2)
VFacing = 1-2*(var(59)%2)
SprPriority = 6
Trans = Add
Ownpal = 1
ignorehitpause = 1

;寣
[State 6300]
Type = Explod
Trigger1 = Time = 400
Trigger2 = Time = 480
Trigger3 = Time = 520
Anim = 8949+(var(20)+time)%3
ID = 8949
Pos = -85,120
PosType = right
random = 75,90
Scale = 5,5
Facing = 1-2*(random%2)
VFacing = 1-2*(var(59)%2)
SprPriority = 6
Trans = Add
Ownpal = 1
ignorehitpause = 1

[State 6900, Explod];1P懁僗儁儖僇乕僪柤
Type = Explod
Triggerall = TeamSide = 1
trigger1 = numexplod(8948) = 0
Trigger1 = time = 560
Anim = 8948
ID = 8948
Pos = 20, 50
PosType = Left
SprPriority = 10
Facing = 1
BindTime = -1
OwnPal = 1
OnTop = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.2, 0.2
ignorehitpause = 1

[State 6900, Explod];2P懁僗儁儖僇乕僪柤
Type = Explod
Triggerall = TeamSide = 2
trigger1 = numexplod(8948) = 0
Trigger1 = time = 560
Anim = 8948
ID = 8948
Pos = -110, 50
PosType = Right
SprPriority = 10
Facing = 1
BindTime = -1
OwnPal = 1
OnTop = 1
RemoveTime = -1
SuperMove = 1
PauseMoveTime = 99999999
SuperMoveTime = 99999999
Scale = 0.2, 0.2
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
Trigger1 = time = 562
Time = 50
MoveTime = 50
Anim = -1
Pos = 0,0
Sound = s100,12
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 1000, 0]
Type = RemoveExplod
Trigger1 = numexplod(8909)
Trigger1 = Time = 561
ID = 8909
ignorehitpause = 1

[State 1000, 0]
Type = RemoveExplod
Trigger1 = numexplod(8933)
Trigger1 = Time = 561
ID = 8933
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = numexplod(8947) = 0
trigger1 = Time = 561
anim = 8947
id = 8947
sprpriority = -10
postype = back
pos = 0,0
trans = add
BindTime = -1
removetime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1000, 0]
Type = RemoveExplod
Trigger1 = numexplod(8949)
Trigger1 = Time >= 638
ID = 8949
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time = 639
Trigger1 = roundstate > 2
Value = 50
ctrl = 1
ignorehitpause = 1

[State 192]
Type = varset
Trigger1 = time = 640
var(52) = 3
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Triggerall = time
Trigger1 = time > 640
Trigger2 = time < 10 &&numhelper(6900)
Trigger2 = helper(6900),var(41) = 7
Value = 89028 + 6*(palno = 12)
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;慛寣偺寢枛侾乽柌憐晻報丒婼乿
;--------------------------------------------------
[Statedef 89027]
Type     = A
MoveType = I
Physics  = N
Anim     = 8956
Ctrl     = 0
VelSet   = 0,0

[State 1000, 0]
Type = varadd
Trigger1 = time = 1
var(27) = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
trigger1 = numexplod(8947) = 0
trigger1 = palno != 6
anim = 8947
id = 8947
sprpriority = -10
postype = back
pos = 0,0
trans = add
BindTime = -1
removetime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

[State 1065]
Type = turn
Trigger1 = Time = 0
Trigger1 = fvar(13) < 0
ignorehitpause = 1

[State 1065, PosAdd]
Type = Posset
Trigger1 = Time = 0
x = -100 + random%200
y = -random%120
ignorehitpause = 1

[State 3000, 曄悢]
Type = VarSet
Trigger1 = Time = 0
Trigger2 = projhittime(12009)=1
var(22) = time
ignorehitpause = 1

[State 3000, 曄悢]
Type = VarSet
Trigger1 = Time = 0
var(21) = 0
ignorehitpause = 1

[State 3000, 曄悢]
Type = VarSet
Trigger1 = Time = 0
var(20) = 0
ignorehitpause = 1

[State 3000, 壒]
Type = PlaySnd
Trigger1 = Time = 1
Value = s897,3
Channel = 1
ignorehitpause = 1

[State 3000, 曄悢憹尭]
Type = VarAdd
Trigger1 =  Time = [42,100]
var(21) = 45
Persistent = 8
ignorehitpause = 1

[State 3000, 曄悢憹尭]
Type = VarAdd
Trigger1 =  Time = [42,100]
var(20) = IfElse(var(20)=2,-2,1)
Persistent = 8
ignorehitpause = 1

[State 6300];寗娫
Type = Explod
trigger1 = time = 41
Anim = 8955
ID = 8955
Pos = -76,13
PosType = p1
scale = 2,1.2
SprPriority = 2
bindtime = -1
removetime = 60
Ownpal = 1
ignorehitpause = 1

[state 3]
type = Projectile
trigger1 = time > 30
trigger1 = gametime%6 < 3
trigger1 = palno = 6 || palno = 12
projanim = 8903
projremove = 1
projremovetime = 1
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 5
attr = C,NA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[state 3]
type = Projectile
trigger1 = time > 30
trigger1 = gametime%6 >= 3
trigger1 = palno = 6 || palno = 12
projanim = 8903
projremove = 1
projremovetime = 1
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 5
attr = C,NA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
p2stateno = 89033
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[state 3]
type = Projectile
trigger1 = time > 30
trigger1 = gametime%30 < 2
trigger1 = palno = 6 || palno = 12
projanim = 8903
projremove = 1
projremovetime = 1
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 7
attr = C,NA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = high
air.type = high
getpower = 0, 0
PauseTime = 0,10
Air.Velocity = 0,99999999999999999999999999
Fall = 1
Fall.Recover = 0
Fall.Damage = 99999
Fall.Kill = 1
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
Trigger1 = timemod = 4,1
Time = 2
Anim = -1
Pos = 0,0
Sound = -1
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Triggerall = palno != 6
Triggerall = palno != 12
Triggerall = time = [60,95]
Triggerall = numhelper(890)
Trigger1 = helper(890),var(34) = 890
Value = 89032
ignorehitpause = 1

;**************************************************
[State 3000, 壒]
Type = PlaySnd
Trigger1 = Time = 41
Value = s897,2
Channel = 1
ignorehitpause = 1

;**************************************************
[state target]
type = targetlifeadd
trigger1 = numtarget > 0
trigger1 = var(22) != 0
value = -1
ignorehitpause = 1
Absolute = 1

[state target]
type = targetfacing
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = gametime%60 = 0
value = 1-2*(random%2)
ignorehitpause = 1

[state target]
type = targetbind
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = pos x = [-50,50]
trigger1 = gametime%60 = 20
time = 1
pos = 50-random%100,-50-random%100
ignorehitpause = 1

[state target] 
type = targetvelset
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = gametime%60 = 40
value = 100-random%200,20-random%25
ignorehitpause = 1

;**************************************************
[state state]
type = varset
triggerall = !ishelper && enemynear,name = "genjitsu"
triggerall = numtarget && (palno = 6 || palno = 12)
trigger1 = target,name = "genjitsu"
var(46) = 5150
ignorehitpause = 1

[state state]
type = varset
triggerall = !ishelper && enemynear,name = "MUAHAHAHAHAHAHAHAHA"
triggerall = palno = 6 || palno = 12
trigger1 = enemynear,alive
var(46) = 944
ignorehitpause = 1

[state state]
type = targetstate
triggerall = !ishelper
triggerall = numtarget && (palno = 6 || palno = 12)
trigger1 = enemynear,name = "genjitsu"
trigger1 = target,name = "genjitsu"
trigger2 = palno = 12 || var(58) > 1
trigger2 = enemynear,name = "MUAHAHAHAHAHAHAHAHA"
trigger2 = enemynear,alive
value = 8901068
ignorehitpause = 1

[state -1]
type = targetdrop
Trigger1 = animtime = 0
trigger1 = numtarget > 0
trigger2 = palno = 6 || palno = 12
trigger2 = numtarget > 6
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = Changestate
Triggerall = animtime = 0
Triggerall = roundstate = 2
Triggerall = palno = 12 && numhelper(6900)
Trigger1 = var(27) > 15 || helper(6900),var(40) = [1,800]
Trigger1 = random%4 = 1
Trigger2 = enemynear,alive && enemynear,name = "MUAHAHAHAHAHAHAHAHA"
Trigger2 = random%2 = 1
Value = 8910
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = Changestate
Trigger1 = animtime = 0
Trigger1 = roundstate = 2
Value = 89028+6*(random%2)
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = animtime = 0
Trigger1 = roundstate > 2
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) = 0
Trigger2 = animelem = 15
trigger3 = numhelper(6900) = 0
Trigger3 = animelem = 15
Value = 50
ctrl = 1
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;慛寣偺寢枛俀乽恄敱乿
;--------------------------------------------------
[StateDef 89028]
Type = A
MoveType= I
Physics = N
Ctrl = 0
VelSet = 0, 0
Anim = 8959
SprPriority = 1

[State 1000, 0]
Type = varadd
Trigger1 = time = 1
var(27) = 1
ignorehitpause = 1

[State 3000, 曄悢]
Type = VarSet
Trigger1 = Time = 0
var(20) = 0
ignorehitpause = 1

[State 1000, 0]
Type = PlayerPush
Trigger1 = 1
Value = 0

[State 1000, 攚宨]
type = Explod
Trigger1 = numhelper(6900)
Trigger1 = helper(6900),var(41) != 0
Trigger1 = Time = 0
trigger1 = numexplod(8947) = 0
anim = 8947
id = 8947
sprpriority = -10
postype = back
pos = 0,0
trans = add
BindTime = -1
removetime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

;--------------------懍搙愝掕
[State 1065, PosAdd]
Type = turn
Trigger1 = Time = 0
Trigger1 = random < 500
ignorehitpause = 1

[State 1065, VelSet]
Type = VelSet
Trigger1 = 1
X = 0
Y = 0
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Triggerall = palno != 6
Triggerall = palno != 12
Triggerall = time = 70
Triggerall = numhelper(890)
Triggerall = numhelper(892)
Trigger1 = helper(890),anim = 10000
Value = 89032
ignorehitpause = 1

[State 1065, PosAdd]
Type = Posset
Trigger1 = Time <= 70
x = 0
y = 0
ignorehitpause = 1

[State 1065, PosAdd]
Type = Posset
Trigger1 = Time > 70
x = enemynear,pos x
y = enemynear,pos y
ignorehitpause = 1

;--------------------壒
[State 1065, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 1
Value = S897, 4
Channel = 5
ignorehitpause = 1

[State 1065, 儃僀僗]
Type = PlaySnd
Trigger1 = time = 71
Value = S897, 5+random%2
Channel = 2
ignorehitpause = 1

;--------------------峌寕愝掕
[State 1]
type = Projectile
Trigger1 = time >= 71
trigger1 = timemod = 40,1
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 30
projid = 8903
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State 10]
type = Projectile
Trigger1 = time >= 71 && gametime%60 = [20,30]
Trigger1 = palno = 6 || palno = 12
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 30
projid = 8903
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = C, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Fall.Damage = 999999999
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state 3]
type = Projectile
Trigger1 = time >= 71 && gametime%60 = [10,20]
Trigger1 = palno = 6 || palno = 12
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 1
projpriority = 99999999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[state 3]
type = Projectile
Trigger1 = time >= 71
trigger1 = gametime%60 <= 10
projanim = 8903
projremove = 1
projremovetime = 1
projpriority = 99999999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 2147483648
attr = A,NA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[State reversal]
type = ReversalDef 
trigger1 = numexplod(8958)
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,2
hitsound = S890,1
p1stateno = 89029
p2stateno = 1000044
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

;--------------------僄僼僃僋僩
[State 1000, 0]
type = ModifyExplod
Trigger1 = numexplod(8947)
Trigger1 = Time = 71
ID = 8947
removetime = 1
ignorehitpause = 1

[State 1000, 僀儞僨傿僌僱僀僔儑儞]
type = Explod
trigger1 = Time = 71
anim = 8958
id = 8958
sprpriority = 9999999999999999
postype = back
pos = 0,0
BindTime = -1
trans = sub
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
Triggerall = time >= 71
Trigger1 = gametime%24 = 1
Trigger2 = gametime%24 = 5
Trigger3 = gametime%24 = 9
Trigger4 = gametime%24 = 13
Trigger5 = gametime%24 = 17
Trigger6 = gametime%24 = 21
Time = 2
Anim = -1
Pos = 0,0
Sound = -1
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 23000]
type = HitAdd
trigger1 = enemynear,time = [0,1]
trigger1 = enemynear,stateno = 0
trigger1 = enemynear,ctrl = 0
trigger2 = enemynear,life = 0||enemynear,alive = 0
trigger2 = timemod = 6,0
trigger3 = enemynear,movetype = H
value = 2
ignorehitpause = 1

;**************************************************
[state target]
type = targetlifeadd
trigger1 = numtarget > 0
value = -1
ignorehitpause = 1
Absolute = 1

[state target]
type = targetfacing
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = gametime%60 = 0
value = 1-2*(random%2)
ignorehitpause = 1

[state target]
type = targetbind
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = pos x < 50
trigger1 = gametime%60 = 20
time = 1
pos = 50-random%100,-50-random%100
ignorehitpause = 1

[state target] 
type = targetvelset
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = gametime%60 = 40
value = 100-random%200,20-random%25
ignorehitpause = 1

;**************************************************
[state state]
type = varset
triggerall = !ishelper && enemynear,name = "genjitsu"
triggerall = numtarget = 1 && (palno = 6 || palno = 12)
trigger1 = target,name = "genjitsu"
var(46) = 5150
ignorehitpause = 1

[state state]
type = targetstate
triggerall = !ishelper && enemynear,name = "genjitsu"
triggerall = numtarget = 1 && (palno = 6 || palno = 12)
trigger1 = target,name = "genjitsu"
value = 8901068
ignorehitpause = 1

[state -1]
type = targetdrop
Triggerall = time > 210
Triggerall = numexplod(8958) = 0
trigger1 = numtarget > 0
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

;--------------------廔椆
[State 1065, ChangeState]
Type = ChangeState
Triggerall = time > 210
Triggerall = numexplod(8958) = 0
Trigger1 = roundstate > 2
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) = 0
trigger3 = numhelper(6900) = 0
Value = 50
ctrl = 1
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = Changestate
Triggerall = time > 210
Triggerall = numexplod(8958) = 0
Triggerall = roundstate = 2
Triggerall = palno = 12 && numhelper(6900)
Trigger1 = var(27) > 15 || helper(6900),var(40) = [1,800]
Trigger1 = random%4 = 1
Trigger2 = enemynear,alive && enemynear,name = "MUAHAHAHAHAHAHAHAHA"
Trigger2 = random%2 = 1
Value = 8910
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = Changestate
Trigger1 = time > 210
Trigger1 = numexplod(8958) = 0
Trigger1 = roundstate = 2
Value = 89027+7*(random%2)
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;恄敱乮僩儉僉儔乕乯
;--------------------------------------------------
[StateDef 89029]
type = S
movetype = I 
physics = N 
velset = 0,0 
sprpriority = 1
ctrl = 0

[State -2];儔僀僼僶乕偼忺傝
type = Lifeset
triggerall = ishelper
trigger1 = root,life = [1,1000]
value = root,life
ignorehitpause = 1

[State -2];柍揋
type = NotHitBy
trigger1 = ishelper
value = SCA
time = -1
ignorehitpause = 1

[State 0]
type = statetypeset
trigger1 = !ishelper
movetype = I
physics = N
ignorehitpause = 1

[State 0]
type = statetypeset
trigger1 = ishelper
movetype = A
physics = N
ignorehitpause = 1

[State 20, VelSet]
Type = changeanim
triggerall = !ishelper
Trigger1 = anim != 8907
value = 8907
ignorehitpause = 1

[State 20]
Type = changeanim
triggerall = ishelper
Trigger1 = anim != 8967
value = 8967
ignorehitpause = 1

[State -2]
type = AttackMulSet
trigger1 = ishelper
value = ceil(0.00001*ifelse(enemynear,const(data.defence)>0,enemynear,const(data.defence),100)*ifelse(enemynear,lifemax>0,enemynear,lifemax,1000))
ignorehitpause = 1

[State 1065, PosAdd]
Type = Posset
Trigger1 = 1
x = enemynear,pos x + (gametime%20)*ishelper
y = enemynear,pos y + (9959+time%20)*ishelper
ignorehitpause = 1

;--------------------峌寕愝掕
[State 1065]
type = Projectile
triggerall = !ishelper
trigger1 = gametime%40 = 0
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 30
projid = 8903
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[State 1065]
type = Projectile
triggerall = !ishelper
Trigger1 = gametime%60 = [20,30]
Trigger1 = palno = 6 || palno = 12
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 30
projid = 8903
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = C, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Fall.Damage = 999999999
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[state 3]
type = Projectile
triggerall = !ishelper
Trigger1 = gametime%60 = [10,20]
Trigger1 = palno = 6 || palno = 12
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 1
projpriority = 99999999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[state 3]
type = Projectile
triggerall = !ishelper
trigger1 = gametime%60 <= 10
projanim = 8903
projremove = 1
projremovetime = 1
projpriority = 99999999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[State 1065]
type = hitdef
triggerall = ishelper
triggerall = root,numexplod(8958)
Trigger1 = time >= 11 && gametime%60 = 0
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State 1065]
type = hitdef
triggerall = ishelper
triggerall = root,numexplod(8958)
Trigger1 = time >= 11 && gametime%60 = [20,29]
Attr = C, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Fall.Damage = 999999999
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state 3]
type = hitdef
triggerall = ishelper
triggerall = root,numexplod(8958)
Trigger1 = time >= 11 && gametime%60 = [10,19]
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
ignorehitpause = 1

[state 3]
type = hitdef
triggerall = ishelper
triggerall = root,numexplod(8958)
Trigger1 = time >= 11 && gametime%60 = [1,9]
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1

[State reversal]
type = ReversalDef 
trigger1 = !ishelper
trigger2 = ishelper
Trigger2 = gametime%60 >= 30
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,2
p2stateno = 1000044
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state -1]
type = varset
triggerall = !ishelper
trigger1 = numtarget > 0 && var(16) != 890
trigger1 = target,ishelper
var(16) = 890
ignorehitpause = 1

[state state]
type = varset
triggerall = !ishelper && enemynear,name = "genjitsu"
triggerall = numtarget = 1 && (palno = 6 || palno = 12)
trigger1 = target,name = "genjitsu"
var(46) = 5150
ignorehitpause = 1

[state state]
type = targetstate
triggerall = numtarget = 1 && enemynear,name = "genjitsu"
triggerall = target,name = "genjitsu"
trigger1 = !ishelper
trigger1 = palno = 6 || palno = 12
trigger2 = ishelper
trigger2 = root,palno = 6 || root,palno = 12
value = 8901068
ignorehitpause = 1

[state -1]
type = targetdrop
triggerall = !ishelper
triggerall = numtarget > 0
trigger1 = target,ishelper
trigger2 = var(20) >= 270
ignorehitpause = 1

[state lifeadd];偍傑偗
type = targetlifeadd 
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
value = -2147483648
Absolute = 1
ignorehitpause = 1

[state power];偍傑偗
type = targetpoweradd
trigger1 = numtarget > 0
value = -2147483648
ignorehitpause = 1

[state state];偍傑偗
type = targetstate
triggerall = !ishelper
triggerall = numtarget > 0
triggerall = target,ishelper != 1
trigger1 = timemod = 30,1
trigger2 = target,alive = 0
value = 5150
ignorehitpause = 1

[State 23000]
type = HitAdd
triggerall = !ishelper
trigger1 = enemynear,time = [0,1]
trigger1 = enemynear,stateno = 0
trigger1 = enemynear,ctrl = 0
trigger2 = enemynear,life = 0||enemynear,alive = 0
trigger2 = timemod = 6,0
trigger3 = enemynear,movetype = H
value = 2
ignorehitpause = 1

[state state];偍傑偗
type = targetstate
triggerall = !ishelper
triggerall = numtarget > 0
trigger1 = roundstate = 3
trigger1 = target,ishelper != 1
value = 5150
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
triggerall = !ishelper
Trigger1 = gametime%24 = 1
Trigger2 = gametime%24 = 5
Trigger3 = gametime%24 = 9
Trigger4 = gametime%24 = 13
Trigger5 = gametime%24 = 17
Trigger6 = gametime%24 = 21
Time = 2
Anim = -1
Pos = 0,0
Sound = -1
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

;--------------------廔椆
[State 1065, ChangeState]
Type = ChangeState
triggerall = !ishelper
Triggerall = numexplod(8958) = 0
trigger1 = numhelper(6900)
trigger1 = helper(6900),var(41) = 0
trigger2 = numhelper(6900) = 0
Trigger3 = roundstate > 2
Value = 50
ctrl = 1
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = Changestate
triggerall = !ishelper
Trigger1 = numexplod(8958) = 0
Trigger1 = roundstate = 2
Trigger1 = palno = 12 && numhelper(6900)
Trigger1 = var(27) > 15 || helper(6900),var(40) = [1,800]
Trigger1 = random%4 = 1
Value = 8910
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = Changestate
triggerall = !ishelper
Trigger1 = numexplod(8958) = 0
Trigger1 = roundstate = 2
Value = 89027+7*(random%2)
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = destroyself
triggerall = ishelper && time
Trigger1 = root,numexplod(8958) = 0
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;慛寣偺寢枛侾乽柌憐晻報丒婼乿丒抏
;--------------------------------------------------
[Statedef 89030]
MoveType = I
Physics  = N
Anim     = IfElse(IsHelper(12007),8952,IfElse(IsHelper(12008),8953,8954))
SprPriority = 5

[State -2];儔僀僼僶乕偼忺傝
type = Lifeset
triggerall = ishelper
trigger1 = root,life = [1,1000]
value = root,life
ignorehitpause = 1

[State 1]
Type = ChangeState
Trigger1 = !ishelper
Value = 0
ctrl = 1
ignorehitpause = 1

;峌寕椡
[State -2]
type = AttackMulSet
trigger1 = 1
value = ceil(0.00001*ifelse(enemynear,const(data.defence)>0,enemynear,const(data.defence),100)*ifelse(enemynear,lifemax>0,enemynear,lifemax,1000))
ignorehitpause = 1

[State 2008, 曄悢]
Type = VarSet
Trigger1 = time=25
fvar(13) = frontedgedist-ifelse((facing=enemynear,facing),(enemynear,frontedgedist),(enemynear,backedgedist))
ignorehitpause = 1

[State 2008, 曄悢]
Type = VarSet
Trigger1 = time=25
fvar(14) = (enemynear,pos y)-pos y
ignorehitpause = 1

[State 2008, 曄悢]
Type = VarSet
Trigger1 = Time = 25
fvar(0) = .5*(fvar(13)/(Abs(fvar(13))+Abs(fvar(14)+(EnemyNear,Const(Size.Mid.Pos.Y)))+.0000001))
ignorehitpause = 1

[State 2008, 曄悢]
Type = VarSet
Trigger1 = Time = 25
fvar(1) = .5*((fvar(14)+(EnemyNear,Const(Size.Mid.Pos.Y)))/(Abs(fvar(13))+Abs(fvar(14)+(EnemyNear,Const(Size.Mid.Pos.Y)))+.0000001))
ignorehitpause = 1

[State 2008, 曄悢]
Type = VarSet
Trigger1 = Time = 0
fvar(2) = 3
ignorehitpause = 1

[State 2008, 堏摦懍搙]
Type = VelSet
Trigger1 = Time = 0
X = 10*Cos(Root,var(21)*(Pi/180.0))
Y = -10*Sin(Root,var(21)*(Pi/180.0))
ignorehitpause = 1

[State 2008, 懍搙忔嶼]
Type = VelMul
Trigger1 = (Time = [1,25])
X = .89
Y = .89
ignorehitpause = 1

[State 2008, 堏摦懍搙]
Type = VelSet
Trigger1 = (Time = [1,25]) && (Vel X = [-.8,.8]) && (Vel Y = [-.8,.8])
Trigger2 = (Time > 25) && (var(0) = 1)
Trigger3 = (Time > 25) && (var(1) > 0)
X = 0
Y = 0
ignorehitpause = 1

[State 2008, 懍搙壛嶼]
Type = VelAdd
Trigger1 = Time > 25
X = fvar(0)
Y = fvar(1)
ignorehitpause = 1

;**************************************************
[State 2008, 摿庩岠壥]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow
IgnoreHitPause = 1

[State 6115, 摟柧搙]
Type = Trans
Trigger1 = !ishelper(12008)
Trans = Add1
ignorehitpause = 1

;**************************************************
[State 2008, 妏搙]
Type = AngleAdd
Trigger1 = 1
Value = -8
ignorehitpause = 1

[State 2008, 妏搙傪桳岠]
Type = AngleDraw
Trigger1 = 1
Scale = IfElse(IsHelper(12007),1,IfElse(IsHelper(12008),0.4,1.4)),IfElse(IsHelper(12007),1,IfElse(IsHelper(12008),0.4,1.4))
ignorehitpause = 1

;**************************************************
[State 1604]
type = Projectile
Triggerall = ishelper(12007)
Trigger1 = time = 0
Trigger2 = Timemod = 15,14
Attr              = S, HP
Damage            = 8901016,8901016
givePower         = -999999999999990
getpower = 0,0
AnimType          = Hard
HitFlag           = MAFPD
projanim = 8957
ProjHitAnim       = 10000
ProjRemanim       = 10000
projremovetime = 5
projid = 12007+time
projpriority = 199999999999999999
projsprpriority = 5
projedgebound = 220
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
PauseTime         = 0,2
Guard.SparkNo     = -1
HitSound          = s902,1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 19
Ground.HitTime    = 19
Air.HitTime       = 19
ground.velocity = 100-random%200,-random%5
airguard.velocity = 100-random%200,20-random%25
air.velocity = 100-random%200,20-random%25
EnvShake.Time = 6
EnvShake.Ampl = 3
EnvShake.Freq = 60
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ID = 12007
ignorehitpause = 1

[State 1604]
type = Projectile
Triggerall = ishelper(12008)
Trigger1 = time = 0
Trigger2 = Timemod = 15,14
Attr              = S, NA
Damage            = 33,33
givePower         = -999999999999990
getpower = 0,0
AnimType          = Hard
HitFlag           = MAFPD
projanim = 8957
ProjHitAnim       = 10000
ProjRemanim       = 10000
projremovetime = 5
projid = 12008+time
projpriority = 1999999999999999
projsprpriority = 5
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
PauseTime         = 0,40
Guard.SparkNo     = -1
HitSound          = s902,1
GuardSound        = -1
Ground.Type       = none
Air.Type          = none
Ground.SlideTime  = 19
Ground.HitTime    = 19
Air.HitTime       = 19
ground.velocity = 100-random%200,-random%5
airguard.velocity = 100-random%200,20-random%25
air.velocity = 100-random%200,20-random%25
p2stateno = 89031
EnvShake.Time = 6
EnvShake.Ampl = 3
EnvShake.Freq = 60
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ID = 12008
ignorehitpause = 1

[State 1604]
type = Projectile
Triggerall = ishelper(12009)
Triggerall = gametime%44 < 22
Trigger1 = time = 0
Trigger2 = Timemod = 15,14
Attr              = S, SA
reversal.attr = SCA,AA,AT,AP
Damage            = 99,99
givePower         = -999999999999990
getpower = 0,0
AnimType          = Hard
HitFlag           = MAFPD
projanim = 8957
ProjHitAnim       = 10000
ProjRemanim       = 10000
projremovetime = 15
projid = 12009+time
projpriority = 1
projsprpriority = 5
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
PauseTime         = 0,20
Guard.SparkNo     = -1
HitSound          = s902,1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 19
Ground.HitTime    = 19
Air.HitTime       = 19
ground.velocity = 100-random%200,-random%5
airguard.velocity = 100-random%200,20-random%25
air.velocity = 100-random%200,20-random%25
EnvShake.Time = 6
EnvShake.Ampl = 3
EnvShake.Freq = 60
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ID = 12009
ignorehitpause = 1

[State 1604]
type = Projectile
Triggerall = ishelper(12009)
Triggerall = gametime%44 >= 22
Trigger1 = time = 0
Trigger2 = Timemod = 15,14
Attr              = S, SA
reversal.attr = SCA,AA,AT,AP
Damage            = 99,99
givePower         = -999999999999990
getpower = 0,0
AnimType          = Hard
HitFlag           = MAFPD
projanim = 8957
ProjHitAnim       = 10000
ProjRemanim       = 10000
projremovetime = 15
projid = 12009+time
projpriority = 1
projsprpriority = 5
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
PauseTime         = 0,30
Guard.SparkNo     = -1
HitSound          = s890,1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 19
Ground.HitTime    = 19
Air.HitTime       = 19
ground.velocity = 100-random%200,-random%5
airguard.velocity = 100-random%200,20-random%25
air.velocity = 100-random%200,20-random%25
p2stateno = 89031
EnvShake.Time = 6
EnvShake.Ampl = 3
EnvShake.Freq = 60
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ID = 12009
ignorehitpause = 1

[state target]
type = targetlifeadd
trigger1 = numtarget > 0
value = -1
ignorehitpause = 1
Absolute = 1

[state target]
type = targetlifeadd
triggerall = numtarget > 0
triggerall = gametime%60 = [15,45]
trigger1 = root,palno = 6 || root,palno = 12
value = -100000000000000000000000000000000000000000000000
ignorehitpause = 1
Absolute = 1

[state target]
type = targetstate
triggerall = numtarget > 0
triggerall = gametime%60 = [28,32]
trigger1 = target,ishelper != 1
trigger1 = root,palno != 6 && root,palno != 12
value = 89031
ignorehitpause = 1

[state target]
type = targetfacing
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = gametime%21 = 0
value = 1-2*(gametime%2)
ignorehitpause = 1

[state target]
type = targetbind
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = pos x < 50
trigger1 = gametime%60 = 20
time = 1
pos = 50-random%100,-50-random%100
ignorehitpause = 1

[state target] 
type = targetvelset
trigger1 = roundstate = 2
trigger1 = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = gametime%60 = 40
value = 100-random%200,20-random%25
ignorehitpause = 1

[State reversal]
type = ReversalDef
trigger1 = root,palno != 6 && root,palno != 12
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,2
HitSound          = s890,1
p2stateno = 1000045
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state target]
type = targetstate
triggerall = numtarget > 0
trigger1 = root,palno = 6 || root,palno = 12
value = 20007 + (gametime%60<20) + (gametime%60<40)
ignorehitpause = 1

[State reversal]
type = ReversalDef
trigger1 = root,palno = 6 || root,palno = 12
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,0
HitSound          = s890,1
p2stateno = 20007 + (gametime%60<20) + (gametime%60<40)
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

;**************************************************
[State 2008, 僿儖僷乕傪徚偡]
Type = DestroySelf
Trigger1 = (fvar(2) <= -2)
Trigger2 = (FrontEdgeDist < -100) || (BackEdgeDist < -100)
Trigger3 = (Pos Y > 150) || (ScreenPos Y < -300)
Trigger4 = time > 200
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;慛寣偺寢枛峌寕拞抐
;--------------------------------------------------
[StateDef 89032]
Type = A
MoveType= I
Physics = N
Ctrl = 0
VelSet = 0, 0
Anim = 10000
SprPriority = 1

[State 1060, PlaySnd]
Type = StopSnd
Trigger1 = Time = 0 && prevstateno = 89034
Channel = 7
ignorehitpause = 1

[State 1060, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 1
Value = S200, 4
Channel = 1
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
triggerall = numhelper(6900)
trigger1 = helper(6900),var(41) = 0
Value = 50
ctrl = 1
ignorehitpause = 1

[State -2]
Type = VarRandom
Trigger1 = time >= 50
Trigger1 = roundstate=2
V = 59
Range = 0,599
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time >= 50
Trigger1 = roundstate=2
Value = IfElse(var(59)<200,89027,IfElse(var(59)>399,89028,89034))
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Trigger1 = time >= 50
Trigger1 = roundstate > 2
Value = 50
ctrl = 1
ignorehitpause = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;慛寣偺寢枛丂揤抧曵夡
;--------------------------------------------------
[StateDef 89034]
Type = A
MoveType= I
Physics = N
Ctrl = 0
VelSet = 0, 0
Anim = 8972
SprPriority = 1

[State 1000, 0]
Type = varadd
Trigger1 = time = 1
var(27) = 1
ignorehitpause = 1

[State 1000, 0]
Type = PlayerPush
Trigger1 = 1
Value = 0
ignorehitpause = 1

[State -2];柍揋
type = NotHitBy
trigger1 = ishelper
value = SCA
time = -1
ignorehitpause = 1

[State 0]
type = statetypeset
trigger1 = ishelper
movetype = A
physics = N
ignorehitpause = 1

[State 20, VelSet]
Type = changeanim
triggerall = ishelper
Trigger1 = anim != 8967
value = 8967
ignorehitpause = 1

[State -2]
type = AttackMulSet
trigger1 = ishelper
value = ceil(0.00001*ifelse(enemynear,const(data.defence)>0,enemynear,const(data.defence),100)*ifelse(enemynear,lifemax>0,enemynear,lifemax,1000))
ignorehitpause = 1

[State 3000, 曄悢]
Type = VarSet
triggerall = !ishelper
Trigger1 = Time = 0
var(20) = 0
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
triggerall = !ishelper
Trigger1 = numhelper(6900)
Trigger1 = helper(6900),var(41) != 0
Trigger1 = Time = 0
trigger1 = numexplod(8947) = 0
anim = 8947
id = 8947
sprpriority = -10
postype = back
pos = 0,0
trans = add
BindTime = -1
removetime = -1
supermovetime = 999999999999
pausemovetime = 999999999999
ownpal = 1
ignorehitpause = 1

;--------------------懍搙愝掕
[State 1065, PosAdd]
Type = turn
triggerall = !ishelper
Trigger1 = Time = 0
Trigger1 = random < 500
ignorehitpause = 1

[State 1065, VelSet]
Type = VelSet
Trigger1 = 1
X = 0
Y = 0
ignorehitpause = 1

[State 1065, PosAdd]
Type = Posset
triggerall = !ishelper
Trigger1 = Time <= 110 || palno = 6 || palno = 12
x = -70*facing
y = 0
ignorehitpause = 1

[State 1065, PosAdd]
Type = Posset
trigger1 = !ishelper
Trigger1 = Time > 110 && palno != 6 && palno != 12
Trigger2 = ishelper
x = enemynear,pos x + (gametime%20)*ishelper
y = enemynear,pos y + (9959+time%20)*ishelper
ignorehitpause = 1

;--------------------壒
[State 1065, PlaySnd]
Type = PlaySnd
triggerall = !ishelper
Trigger1 = Time = 1
Value = S200, 2
Channel = 1
ignorehitpause = 1

[State 1065, PlaySnd]
Type = PlaySnd
triggerall = !ishelper
Trigger1 = Time = 22
Value = S901, 0
Channel = 7
ignorehitpause = 1

[State 1065, PlaySnd]
Type = PlaySnd
triggerall = !ishelper
Trigger1 = Time = 111
Value = S901, 1
Channel = 6
ignorehitpause = 1

;--------------------僄僼僃僋僩
[State 1000, 0]
type = ModifyExplod
triggerall = !ishelper
Trigger1 = numexplod(8947)
Trigger1 = Time = 22
ID = 8947
removetime = 1
ignorehitpause = 1

[State 1000, 媴懱]
type = Explod
triggerall = !ishelper
trigger1 = Time = 22
anim = 8970
id = 8970
sprpriority = 9999999999999999
postype = back
scale = 1.0,1.0714285714285714285714285714286
pos = 0,0
BindTime = -1
trans = add
ontop = 1
ownpal = 1

[State 1000, 曵夡]
type = Explod
triggerall = !ishelper
trigger1 = Time = 111
anim = 8971
id = 8971
sprpriority = 9999999999999999
postype = back
scale = 1.0,1.0714285714285714285714285714286
pos = 0,0
BindTime = -1
trans = add
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
triggerall = !ishelper
trigger1 = Time = 80
anim = 8943
id = 8935
sprpriority = 10
postype = back
pos = 0,240*(gametime%2)
Scale =1+(random%20)/10,1+(random%20)/10
vfacing = 1-2*(gametime%2)
BindTime = -1
removetime = 29
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
triggerall = !ishelper
trigger1 = Time = 90
anim = 8943
id = 8936
sprpriority = 10
postype = back
pos = 0,240*(gametime%2)
Scale =1+(random%25)/10,1+(random%25)/10
vfacing = 1-2*(gametime%2)
BindTime = -1
removetime = 19
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 1000, 攚宨]
type = Explod
triggerall = !ishelper
trigger1 = Time = 100
anim = 8943
id = 8937
sprpriority = 10
postype = back
pos = 0,240*(gametime%2)
Scale =1+(random%15)/10,1+(random%15)/10
vfacing = 1-2*(gametime%2)
BindTime = -1
removetime = 9
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 3000, 挻昁帪娫巭傔]
Type = SuperPause
triggerall = !ishelper
Trigger1 = gametime%24 = 1
Trigger2 = gametime%24 = 5
Trigger3 = gametime%24 = 9
Trigger4 = gametime%24 = 13
Trigger5 = gametime%24 = 17
Trigger6 = gametime%24 = 21
Time = 2
Anim = -1
Pos = 0,0
Sound = -1
Darken = 0
P2Defmul = 1
ignorehitpause = 1

[State 1000, 0]
Type = EnvShake
triggerall = !ishelper
Trigger1 = time >= 111
Trigger1 = timemod = 30,0
Time = 30
Freq = 60
Ampl = -20
ignorehitpause = 1

[State 1]
type = Projectile
triggerall = !ishelper
trigger1 = time >= 111
trigger1 = timemod = 20,1
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 30
projid = 8903
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[State 10]
type = Projectile
triggerall = !ishelper
triggerall = time >= 111
trigger1 =  palno != 6 && palno != 12 && gametime%60 = [24,49]
trigger2 =  (palno = 6 || palno = 12) && gametime%55 = [12,37]
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 30
projid = 8903
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p1
offset = fvar(13),fvar(14)-60
Attr = C, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Fall.Damage = 999999999
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[state 3]
type = Projectile
triggerall = !ishelper
triggerall = time >= 111
trigger1 =  palno != 6 && palno != 12 && gametime%60 = [12,37]
trigger2 =  (palno = 6 || palno = 12) && gametime%55 = [12,37]
projanim = 8903+5*(random%2)
projremove = 1
projremovetime = 1
projpriority = 99999999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[state 3]
type = Projectile
triggerall = !ishelper
triggerall = time >= 111
trigger1 =  palno != 6 && palno != 12 && gametime%60 < 25
trigger2 =  (palno = 6 || palno = 12) && gametime%55 = [12,37]
projanim = 8903
projremove = 1
projremovetime = 1
projpriority = 99999999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1
pausemovetime = 99990000000
supermovetime = 99990000000

[State 1065]
type = hitdef
triggerall = ishelper
triggerall = root,numexplod(8971) && time < 98 && root,time < 209
Trigger1 = time >= 5 && gametime%60 = [30,39]
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = -50, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State 106]
type = hitdef
triggerall = ishelper
triggerall = root,numexplod(8971) && time < 98 && root,time < 209
Trigger1 = time >= 5 && gametime%60 = [20,29]
Attr = C, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S-1
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 1
Air.Fall = 1
Fall.Recover = 0
Fall.Damage = 999999999
getpower = 0, 0
GivePower = -110, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state 3]
type = hitdef
triggerall = ishelper
triggerall = root,numexplod(8971) && time < 98 && root,time < 209
Trigger1 = time >= 5 && gametime%60 = [10,19]
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
GivePower = -150, -5120
ignorehitpause = 1

[state 3]
type = hitdef
triggerall = ishelper
triggerall = root,numexplod(8971) && time < 98 && root,time < 209
Trigger1 = time >= 5 && gametime%60 = [1,9]
damage = 2147483648
attr = A,AA
hitflag = MAFPD
sparkno = -1
hitsound = -1
ground.type = none
air.type = none
getpower = 0, 0
p2stateno = 89024
ignorehitpause = 1

[State reversal]
type = ReversalDef 
trigger1 = ishelper
Trigger1 = time >= 98 || root,time >= 209 || gametime%60 >= 40
trigger2 = !ishelper
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,2
p2stateno = ifelse(ishelper,1000045,89024)
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[state -1]
type = varset
trigger1 = numtarget > 0 && var(16) != 890
trigger1 = target,ishelper
var(16) = 890
ignorehitpause = 1

[state state]
type = varset
triggerall = !ishelper && enemynear,name = "genjitsu"
triggerall = numtarget && (palno = 6 || palno = 12)
trigger1 = target,name = "genjitsu"
var(46) = 5150
ignorehitpause = 1

[state state]
type = varset
triggerall = !ishelper && enemynear,name = "MUAHAHAHAHAHAHAHAHA"
triggerall = palno = 6 || palno = 12
trigger1 = enemynear,alive
var(46) = 944
ignorehitpause = 1

[state state]
type = varset
triggerall = !ishelper && enemynear,const(data.liedown.time) =53 && enemynear,numhelper(2192)
triggerall = palno = 6 || palno = 12
triggerall = enemynear,alive
trigger1 = enemynear,life > enemynear,lifemax*0.1*(7+2*(roundno!=1))
trigger1 = numhelper(6900)
trigger1 = helper(6900),var(45) > 5555
var(47) = 5590
ignorehitpause = 1

[state state]
type = targetstate
triggerall = !ishelper
triggerall = numtarget && (palno = 6 || palno = 12)
trigger1 = enemynear,name = "genjitsu"
trigger1 = target,name = "genjitsu"
trigger2 = palno = 12 || var(58) > 1
trigger2 = enemynear,name = "MUAHAHAHAHAHAHAHAHA"
trigger2 = enemynear,alive
value = 8901068
ignorehitpause = 1

[state -1]
type = targetdrop
triggerall = numtarget > 0
trigger1 = palno != 6 && palno != 12
trigger1 = target,ishelper
trigger2 = time > 200
trigger3 = numtarget > 6
ignorehitpause = 1

[state lifeadd];偍傑偗
type = targetlifeadd 
trigger1 = numtarget > 0
value = -2147483648
Absolute = 1
ignorehitpause = 1

[state power];偍傑偗
type = targetpoweradd
trigger1 = numtarget > 0
value = -2147483648
ignorehitpause = 1

[state state];偍傑偗
type = targetstate
triggerall = !ishelper
triggerall = numtarget > 0 && palno != 6 && palno != 12
triggerall = target,ishelper != 1
trigger1 = timemod = 30,1
trigger2 = target,alive = 0
value = 5150
ignorehitpause = 1

[State 23000]
type = HitAdd
triggerall = !ishelper
trigger1 = enemynear,time = [0,1]
trigger1 = enemynear,stateno = 0
trigger1 = enemynear,ctrl = 0
trigger2 = enemynear,life = 0||enemynear,alive = 0
trigger2 = timemod = 6,0
trigger3 = enemynear,movetype = H
value = 2

[state state];偍傑偗
type = targetstate
triggerall = numtarget > 0
trigger1 = target,ishelper != 1
trigger1 = roundstate = 3
value = 5150
ignorehitpause = 1

[state -1];曐尟
type = lifeadd
triggerall = name ="ONI-MIKO-REIMU"
triggerall = !ishelper
triggerall = life = 0
trigger1 = numhelper(6900) = 1
trigger1 = helper(6900),var(4) != 890106
trigger2 = numhelper(6900) != 1
value = 1
kill = 0
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
Triggerall = palno != 6
Triggerall = palno != 12
Triggerall = time = [70,80]
Triggerall = numhelper(890)
Trigger1 = helper(890),var(33) = 890
Value = 89032
ignorehitpause = 1

[State 1065, ChangeState]
Type = ChangeState
triggerall = !ishelper
Triggerall = time > 210
Triggerall = numexplod(8971) = 0
Trigger1 = roundstate > 2
trigger2 = numhelper(6900)
trigger2 = helper(6900),var(41) = 0
trigger3 = numhelper(6900) = 0
Value = 50*(pos y < 0)
ctrl = 1
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = Changestate
triggerall = !ishelper
Triggerall = time > 210
Triggerall = numexplod(8971) = 0
Triggerall = roundstate = 2
Triggerall = palno = 12 && numhelper(6900)
Trigger1 = var(27) > 15 || helper(6900),var(40) = [1,800]
Trigger1 = random%4 = 1
Trigger2 = enemynear,alive && enemynear,name = "MUAHAHAHAHAHAHAHAHA"
Trigger2 = random%2 = 1
Value = 8910
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = Changestate
triggerall = !ishelper
Trigger1 = time > 210
Trigger1 = numexplod(8971) = 0
Trigger1 = roundstate = 2
Value = 89027+random%2
ignorehitpause = 1

[State 3000, 僗僥乕僩曄峏]
Type = destroyself
triggerall = ishelper
Trigger1 = time > 100 || root,time > 211 || root,numexplod(8971) = 0
Trigger2 = roundstate != 2
ignorehitpause = 1

