[Statedef -2]
[State ]
type = Null
triggerall = !ishelper
trigger1 = roundstate = 0
trigger1 = var(5) := ifelse(var(12) && roundsexisted != 0, lifemax, 0) || 1
trigger1 = var(7) := lifemax || 1
trigger1 = var(8) := lifemax || 1
trigger1 = var(9) := 0 || 1
trigger1 = var(10) := (var(10) | 8) || 1
trigger1 = var(13) := (var(13) & 1 + 2 + 4) || 1
trigger1 = fvar(7) := 0 || 1
trigger1 = fvar(8) := 0 || 1
trigger1 = fvar(10) := 0 || 1
ignorehitpause = 1

[State ]
type = Null
triggerall = !ishelper
triggerall = roundstate = 2
triggerall = !sysfvar(4)
triggerall = var(12)
triggerall = sysvar(4) != [3800,3804]
trigger1 = numhelper(112001) && ((floor(fvar(9)) & 8) || var(5) > lifemax * 2)
trigger1 = var(5) <= lifemax * 0.5 || var(5) > lifemax * 2 || helper(112001),sysfvar(0) > 70
trigger1 = fvar(5) < 10
trigger1 = fvar(5) := 10 || 1
trigger2 = numhelper(112001)
trigger2 = helper(112001),sysfvar(0) >= 30
trigger2 = fvar(5) < 8
trigger2 = fvar(5) := 8 || 1
trigger3 = var(5) && !alive
trigger3 = stateno = 5150 && sysvar(3) > 2333
trigger3 = fvar(5) < 10
trigger3 = fvar(5) := 10 || 1
ignorehitpause = 1


[State ]
type = Selfstate
triggerall = ishelper
triggerall = name != "b(￣▽￣)d"
trigger1 = 1
value = 1111000236
persistent = 256
ignorehitpause = 1


[State ]
type = Varset
trigger1 = !ishelper
trigger1 = (palno != [1,11]) || (fvar(5) != [1,11]) || numhelper(111005)
trigger1 = sysfvar(4) != 1
sysfvar(4) = 1
ignorehitpause = 1

[State 开幕前保护处理]
type = Varset
triggerall = !ishelper
triggerall = var(10) & 8
trigger1 = roundstate = 2 && ctrl
trigger2 = movetype = A && sysvar(2) = gametime + 450 * 100
trigger3 = !var(5)
trigger3 = abs(gethitvar(damage)) > lifemax || abs(gethitvar(fall.damage)) > lifemax
trigger3 = var(10) := (var(10) | 16) && 0
trigger4 = !var(5)
trigger4 = stateno != sysvar(4) || sysvar(2) != gametime + 450 * 100
trigger4 = sysvar(4) = 2000 || var(6)
trigger4 = var(10) := (var(10) | 16) && 0
var(10) = var(10) ^ 8
ignorehitpause = 1

[State ]
type = Null
trigger1 = var(3) = [1000,1020]
trigger1 = var(3) := var(3) + 1 || 1
ignorehitpause = 1

[State ]
type = PlaySnd
trigger1 = var(3) = [1015,1020]
trigger1 = var(3) % 3 = 0 
value = S400, 17
freqmul = 0.8
volume = -80
ignorehitpause = 1

[State ]
type = PlaySnd
trigger1 = var(3) = [1015,1020]
trigger1 = var(3) % 3 = 0 
value = S400, 16
freqmul = 0.8
volume = -80
ignorehitpause = 1


[State ]
type = EnvColor
triggerall = !sysfvar(4)
trigger1 = numprojid(12100)
trigger1 = projhit12100 = 1
trigger1 = !var(4)
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

[State ]
type = Explod
triggerall = !sysfvar(4)
trigger1 = numprojid(12100)
trigger1 = projhit12100 = 1
trigger1 = var(0) := -30 + random % 60 || 1
trigger1 = var(1) := -60 + random % 20 || 1
id = 8600
anim = ifelse(var(12), 8001, 8600)
postype = p2
pos = var(0),var(1)
ownpal = 1
trans = sub
scale = 1.3,1.3
ontop = 1
ignorehitpause = 1

[State ]
type = Explod
triggerall = !sysfvar(4)
trigger1 = numprojid(12100)
trigger1 = projhit12100 = 1
id = 8000
anim = ifelse(var(12), 8001, 8000)
postype = p2
pos = var(0),var(1)
ownpal = 1
scale = 0.7,0.7
trans = add
ontop = 1
ignorehitpause = 1

[State ]
type = PlaySnd
triggerall = !sysfvar(4)
trigger1 = numprojid(12100)
trigger1 = projhit12100 = 1
trigger1 = !var(4)
trigger1 = var(4) := 1 || 1
trigger2 = !numprojid(12100)
trigger2 = var(4)
trigger2 = var(4) := 0 && 0
value = S500,1
ignorehitpause = 1

[State ]
type = Explod
triggerall = sysfvar(4) != 2
triggerall = !ishelper
trigger1 = var(5)
trigger1 = gametime % 40 = 0
trigger1 = movetype = I
trigger1 = sysvar(4) != 180
trigger1 = sysvar(4) != [3100,3102]
trigger1 = sysvar(4) != [3200,3201]
trigger1 = sysvar(4) != [3300,3302]
trigger1 = sysvar(4) != [3400,3401]
trigger1 = sysvar(4) != [3700,3702]
trigger1 = sysvar(4) != [3800,3804]
trigger1 = sysvar(4) != [3900,3902]
anim = 60006
id = 60006
postype = p1
pos = -40 + random % 80, -80 + random % 70
ownpal = 1
ontop = 1
trans = sub
scale = 0.17,0.17
facing = ifelse(random % 2, 1, -1)
vfacing = ifelse(random % 2, 1, -1)
pausemovetime = 2147483647 
supermovetime = 2147483647 
ignorehitpause = 1

[State ]
type = Explod
triggerall = sysfvar(4) != 2
triggerall = !ishelper
trigger1 = var(5)
trigger1 = gametime % 40 = 20
trigger1 = movetype = I
trigger1 = sysvar(4) != 180
trigger1 = sysvar(4) != [3100,3102]
trigger1 = sysvar(4) != [3200,3201]
trigger1 = sysvar(4) != [3300,3302]
trigger1 = sysvar(4) != [3400,3401]
trigger1 = sysvar(4) != [3700,3702]
trigger1 = sysvar(4) != [3800,3804]
trigger1 = sysvar(4) != [3900,3902]
anim = 60007
id = 60007
postype = p1
pos = -40 + random % 80, -80 + random % 70
ownpal = 1
ontop = 1
trans = sub
scale = 0.15,0.15
facing = ifelse(random % 2, 1, -1)
vfacing = ifelse(random % 2, 1, -1)
pausemovetime = 2147483647 
supermovetime = 2147483647 
ignorehitpause = 1

[State ]
type = AfterImage
triggerall = sysfvar(4) != 2
triggerall = !ishelper
trigger1 = var(5)
trigger1 = sysvar(3) = 0
trigger1 = !var(12)
time = -1
trans = sub
length = 10
timegap = 1
framegap = 1
palbright = 100,100,100
palcontrast = 0,100,100
paladd = 0,0 ,0
palmul = 0.90,0.90,0.90
color = 1
ignorehitpause = 1

[State ]
type = AfterImage
triggerall = sysfvar(4) != 2
triggerall = !ishelper
trigger1 = var(5)
trigger1 = sysvar(3) = 0 && roundstate > 0
trigger1 = var(12)
trigger1 = sysvar(4) != [3800,3804]
time = -1
trans = add1
timegap = 1
framegap = 1
length = 10
palbright = 12,12,12
palcontrast = 12,12,12
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
ignorehitpause = 1

[State ]
type = Removeexplod
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = var(5)
triggerall = numexplod(60008)
trigger1 = sysvar(4) = [3100,3102]
trigger1 = anim = 1000 && animelemtime(8) = 0
trigger2 = 0;sysvar(4) = [3200,3201]
trigger3 = sysvar(4) = [3300,3302]
trigger4 = sysvar(4) = [3400,3401]
trigger5 = sysvar(4) = [3700,3702]
trigger6 = sysvar(4) = 180 && animelemtime(12) >= 0 && anim = 181
trigger7 = !alive
trigger8 = movetype = H
trigger8 = sysvar(4) = [3800,3804];sysvar(4) < 3100 || 
trigger8 = anim != 1045; || sysvar(4) < 3100
trigger9 = sysvar(4) = [3900,3902]
trigger9 = anim = 40004 || anim = 110001
id = 60008
ignorehitpause = 1

[State ]
type = Explod
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = var(5)
triggerall = !numexplod(60008)
trigger1 = movetype != H
trigger1 = sysvar(4) = 0
trigger2 = sysvar(4) = 3804 || sysvar(4) = 3902
trigger2 = anim = 1045
anim = 60008
id = 60008
postype = p1
pos = 0,0
ownpal = 1
ontop = 1
trans = sub
scale = 0.5,0.5
bindtime = -1
removetime = -1
pausemovetime = 2147483647 
supermovetime = 2147483647 
ignorehitpause = 1


;[State ]
;type = helper
;triggerall = !ishelper
;triggerall = var(12)
;triggerall = roundstate < 3
;triggerall = sysvar(4) = [3600,3604]
;triggerall = numhelper(16028) < 10
;trigger1 = projhit = 1
;id = 16028
;name = "╮(￣▽￣)╭"
;helpertype = player
;stateno = 16028
;pos = -10 + (random % 10),-60 + (random % 20)
;postype = P2
;ownpal = 1
;pausemovetime = 2147483647 * ishelper(110000)
;supermovetime = 2147483647 * ishelper(110000)
;ignorehitpause = 1

;[State ]
;type = helper
;triggerall = !ishelper
;triggerall = var(12)
;triggerall = roundstate < 3
;triggerall = sysvar(4) = [3600,3604]
;triggerall = numhelper(16028) < 10
;trigger1 = projhit = 1
;id = 16029
;name = "╮(￣▽￣)╭"
;helpertype = player
;stateno = 16028
;pos = -10 + (random % 10),-60 + (random % 20)
;postype = P2
;ownpal = 1
;pausemovetime = 2147483647 * ishelper(110000)
;supermovetime = 2147483647 * ishelper(110000)
;ignorehitpause = 1


[State AI记录相关]
type = Null
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = var(59)
trigger1 = !var(5) && lose
trigger1 = enemynear,life >= enemynear,lifemax * 0.75
trigger1 = var(11) * 1.0 / powermax >= enemynear,life * 0.8 / enemynear,lifemax
trigger1 = !(var(13) & 1)
trigger1 = var(13) := (var(13) | 1) || 1
trigger2 = !var(5) && lose
trigger2 = enemynear,life >= enemynear,lifemax * 0.75
trigger2 = var(7) - life >= lifemax * 0.75 && var(11) >= powermax * 0.55
trigger2 = !(var(13) & 1)
trigger2 = var(13) := (var(13) | 1) || 1
trigger3 = !var(5) && lose
trigger3 = abs(gethitvar(damage)) > lifemax * 1000 || abs(gethitvar(fall.damage)) > lifemax * 1000
trigger3 = !(var(13) & 4)
trigger3 = var(13) := (var(13) | 4) || 1
trigger4 = var(5) > lifemax * 10 || var(9) > lifemax * 10
trigger4 = roundstate > 2 && !(var(13) & 2) && (lose || var(5) > lifemax * 100)
trigger4 = var(13) := (var(13) | 2) || 1
trigger5 = var(5) > lifemax * 10 || var(9) > lifemax * 10
trigger5 = roundstate > 2 && !(var(13) & 4) && !(var(13) & 2)
trigger5 = var(13) := (var(13) | 4) || 1
trigger6 = !var(5) && lose
trigger6 = var(7) - life >= lifemax * 0.5 && var(11) >= powermax
trigger6 = !(var(13) & 1 + 2 + 4 + 8)
trigger6 = var(13) := (var(13) | 8) || 1
ignorehitpause = 1




[State ]
type = Null
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = var(5)
triggerall = alive
triggerall = roundstate < 3
trigger1 = (projcontacttime(0) = 1 || movecontact = 1) && projcontacttime(12100) != 1
trigger1 = !gethitvar(damage)
trigger1 = var(9) := floor(var(9) * ifelse(abs(var(9)) > 9000, 0.9999, ifelse((numtarget || enemynear,movetype = H) && !var(12), 0.5, 0.7))) && 0
trigger2 = abs(var(9)) > 300
trigger2 = gametime % 10 = 0
trigger2 = var(5) := var(5) + floor(abs(var(9)) / (1300 + 2700 * !!var(12))) * ifelse(fvar(10) < 8000, 1, floor(fvar(10) / 1500)) && 0
trigger3 = gethitvar(damage) || gethitvar(fall.damage)
trigger3 = abs(gethitvar(fall.damage)) > lifemax * 100000 || abs(gethitvar(damage)) > lifemax * 1000000
trigger3 = var(9) := var(9) + 200 || 1
trigger4 = gethitvar(damage) || gethitvar(fall.damage)
trigger4 = abs(gethitvar(fall.damage)) > lifemax || abs(gethitvar(damage)) > lifemax
trigger4 = var(9) := var(9) + 50 || 1
trigger5 = sysvar(4) = [3100,3800]
trigger5 = (sysvar(4) != [3600,3604]) || !var(12)
trigger5 = gametime % 2
trigger5 = var(9) := var(9) + 1 || 1
ignorehitpause = 1

[State ]
type = Lifeset
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = var(5)
triggerall = !var(12)
triggerall = alive
triggerall = (sysvar(4) != [3500,3501]) || !life
triggerall = var(5) := ifelse(life > var(5), life, var(5)) || 1
triggerall = var(5) := ifelse(abs(gethitvar(damage)), ifelse(var(5) >= lifemax, var(5) + floor(abs(gethitvar(damage)) * 0.2), var(5) + abs(floor(gethitvar(damage) * 0.7))), var(5)) || 1
triggerall = var(5) := ifelse(!var(5) && var(7), var(7), var(5)) || 1
trigger1 = life < abs(var(5))
value = ifelse(abs(var(5)) > lifemax * 2, lifemax, abs(var(5)))
ignorehitpause = 1

[State ]
type = Lifeset
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = var(5)
triggerall = var(12)
triggerall = alive
triggerall = (sysvar(4) != [3500,3501]) || !life
triggerall = var(5) := ifelse(life > var(5), life, var(5)) || 1
triggerall = var(9) := ifelse(gethitvar(damage) && abs(var(9)) < 900, abs(var(9)) + abs(gethitvar(damage) * ifelse(floor(fvar(9)) & 16, 1, 0)), abs(var(9))) || 1
triggerall = var(5) := ifelse(var(9) < 400 && (enemynear,life <= enemynear,lifemax * 0.4 || life > lifemax * (0.3 * (floor(fvar(9)) & 16))), var(5) - ceil(gethitvar(damage) * 1), var(5)) || 1
triggerall = var(5) := ifelse(!var(5) && var(7), var(7), var(5)) || 1
trigger1 = var(5) := ifelse(var(5) = 1, 2, var(5)) || 1
trigger1 = var(5) := ifelse((var(5) = [-10,0]), 1 + (enemynear,life >= enemynear,lifemax), abs(var(5))) || 1
value = ifelse(var(5) = 1, 0, ifelse(abs(var(5)) > lifemax * 2, lifemax, abs(var(5))))
ignorehitpause = 1

[State ]
type = Lifeadd
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = var(5)
triggerall = !var(12)
triggerall = alive
triggerall = roundstate = 2
triggerall = stateno = sysvar(4) && sysvar(2) = gametime + 450 * 100
triggerall = movetype != H && !gethitvar(damage) && !gethitvar(fall.damage)
triggerall = var(9) = [0,5000]
trigger1 = (gametime % 2 = 0 && life > 1) || sysvar(4) != [3100,3102]
trigger1 = (gametime % 2 = 0 && life > 1) || sysvar(4) != [3200,3201]
trigger1 = (gametime % 3 = 0 && life > 1) || sysvar(4) != [3300,3302]
trigger1 = (gametime % 3 = 0 && life > 1) || sysvar(4) != [3400,3401]
trigger1 = (gametime % 5 = 0 && life > 1) || sysvar(4) != [3700,3702]
trigger1 = sysvar(4) != [3500,3501]
trigger1 = !hitpausetime; && gametime % 2
trigger1 = var(5) := abs(var(5)) - 1 || 1
trigger1 = var(5) := ifelse(!var(5), 1, var(5)) || 1
value = ifelse((var(5) = [1,lifemax]), -1, 0)
ignorehitpause = 1

[State ]
type = Poweradd
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = movetype = H
triggerall = !var(5)
trigger1 = life < var(8)
value = (var(8) - life) * ceil(powermax / lifemax * (0.3 + 0.2 * (fvar(5) >= 2) + 0.15 * (fvar(5) >= 4) + 0.5 * ((var(8) - life) * 1.0 / lifemax)))
ignorehitpause = 1

[State ]
type = Varadd
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = movetype = H
triggerall = !var(5)
triggerall = var(11) < powermax
trigger1 = life < var(8)
var(11) = (var(8) - life) * ceil(powermax / lifemax * (0.4 + 0.2 * (fvar(5) >= 2) + 0.3 * (fvar(5) >= 4) + 0.5 * ((var(8) - life) * 1.0 / lifemax)))
ignorehitpause = 1

[State ]
type = Powerset
triggerall = !ishelper
triggerall = sysfvar(4)
trigger1 = 1
value = powermax
ignorehitpause = 1

[State ]
type = Attackmulset
triggerall = !sysfvar(4)
triggerall = !ishelper
trigger1 = fvar(5) = 8
value = 2
ignorehitpause = 1

[State ]
type = Defencemulset
triggerall = !sysfvar(4)
triggerall = !ishelper
triggerall = !var(5)
triggerall = alive
trigger1 = movetype != H
trigger1 = fvar(4) := 1 && 0
trigger2 = movetype = H && stateno = [150,155]
trigger2 = time = 0
trigger2 = fvar(4) := fvar(4) - 0.01 || 1
;trigger3 = movetype = H
;trigger3 = var(7) - var(8) >= lifemax * 0.6
;trigger3 = fvar(4) := (life * 1.0 / lifemax) || 1
value = ifelse(fvar(4) < 0, 0, fvar(4))
ignorehitpause = 1

[State ]
type = Varset
triggerall = !ishelper
triggerall = roundstate = 2
trigger1 = movetype != H && sysvar(2) = gametime + 450 * 100
trigger2 = var(12)
var(7) = ifelse(life < var(8) && !var(5), var(8), life)
ignorehitpause = 1

[State ]
type = Varset
triggerall = !ishelper
triggerall = roundstate < 3 || !alive
trigger1 = movetype = H
var(8) = life
ignorehitpause = 1

[State Life保护]
type = Lifeset
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = alive
triggerall = life < abs(var(7)) || !life
trigger1 = sysvar(4) = [3100,3102]
trigger2 = sysvar(4) = [3200,3201]
trigger3 = sysvar(4) = [3300,3302]
trigger4 = sysvar(4) = [3400,3401]
trigger5 = sysvar(4) = [3500,3501]
trigger6 = sysvar(4) = [3600,3604]
trigger6 = var(5) != 1
trigger7 = sysvar(4) = [3700,3702]
trigger8 = var(6) && sysvar(4) != 2000
trigger9 = sysvar(4) = [3900,3902]
trigger10 = roundstate < 2
trigger11 = sysvar(4) = [4200,4202]
value = ifelse(abs(var(7)) > lifemax * 2, lifemax, var(7) + lifemax * !life)
ignorehitpause = 1

[State ]
type = Lifeadd
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = alive
triggerall = roundstate = 2
trigger1 = fvar(5) = 5
trigger1 = life < 300
trigger1 = gametime % (20 + 145 * !!var(5)) = 0
trigger2 = fvar(5) = 6
trigger2 = life < 300
trigger2 = gametime % (15 + 145 * !!var(5)) = 0
trigger3 = fvar(5) > 6
trigger3 = life < 300
trigger3 = gametime % 200 = 0
trigger4 = var(12)
trigger4 = life < 300
trigger4 = sysvar(4) = 3902
trigger4 = gametime % 100 = 0
value = 15
ignorehitpause = 1

[State ]
type = Poweradd
triggerall = !sysfvar(4)
triggerall = !ishelper
triggerall = alive
triggerall = roundstate = 2
triggerall = stateno != 3702
trigger1 = var(5) && fvar(5) < 7
trigger1 = var(11) := var(11) + 8 || 1
value = 8
ignorehitpause = 1

[State ]
type = Poweradd
triggerall = !sysfvar(4)
triggerall = !ishelper
triggerall = alive
triggerall = roundstate = 2
triggerall = stateno != 3702
trigger1 = fvar(5) = 5
trigger1 = gametime % 20 + (!!var(5) * 20) = 0
trigger1 = var(11) := var(11) + 55 + 5 * (fvar(5) >= 7) || 1
trigger2 = fvar(5) = 6
trigger2 = gametime % 10 + (!!var(5) * 20) = 0
trigger2 = var(11) := var(11) + 55 + 5 * (fvar(5) >= 7) || 1
trigger3 = fvar(5) = [7,8]
trigger3 = gametime % 8 = 0
trigger3 = var(11) := var(11) + 55 + 5 * (fvar(5) >= 7) || 1
trigger4 = fvar(5) = [9,10]
trigger4 = gametime % 5 = 0
trigger4 = var(11) := var(11) + 55 + 5 * (fvar(5) >= 7) || 1
trigger5 = var(5) && !var(12)
trigger5 = var(5) <= 120
trigger5 = enemynear,life > life
trigger5 = fvar(5) < 7 || gametime % 3 = 0
trigger5 = var(11) := var(11) + 55 + 5 * (fvar(5) >= 7) || 1
trigger6 = var(5) && !var(12)
trigger6 = fvar(10) >= 5200
trigger6 = gametime % 10 < floor(fvar(10) / 2200)
value = 55 + 5 * (fvar(5) >= 7)
ignorehitpause = 1

[State ]
type = Varset
triggerall = !ishelper
trigger1 = power > var(11)
var(11) = power
ignorehitpause = 1

[State ]
type = Powerset
triggerall = !ishelper
triggerall = var(5) || roundstate < 2
trigger1 = var(11) > powermax
trigger1 = var(11) := powermax && 0
trigger2 = power < var(11)
value = var(11)
ignorehitpause = 1

[State ]
type = Lifeset
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = alive
triggerall = roundstate > 2
trigger1 = life < var(7)
trigger2 = !life
value = ifelse(abs(var(7)) > lifemax * 2, lifemax, var(7) + (!var(7)))
ignorehitpause = 1

[State ]
type = AssertSpecial
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = roundstate < 3
triggerall = alive
triggerall = movetype = H || sysvar(2) != gametime + 450 * 100
triggerall = !winko
trigger1 = var(7) >= lifemax * 0.5
trigger1 = var(5)
trigger2 = var(7) >= lifemax * 0.5
trigger2 = var(5)
trigger2 = gethitvar(damage) >= lifemax * 0.5 || gethitvar(fall.damage) >= lifemax * 0.5
trigger3 = fvar(5) = 2
trigger3 = var(7) >= lifemax - 1
trigger4 = fvar(5) = 3
trigger4 = var(7) >= lifemax * 0.5
trigger5 = fvar(5) = 4
trigger5 = var(7) >= lifemax * 0.4
trigger6 = fvar(5) = 5
trigger6 = var(7) >= lifemax * 0.6
trigger7 = fvar(5) = 6
trigger7 = var(7) >= lifemax * 0.45
flag = noko
ignorehitpause = 1

[State R3 Life异常NOKO]
type = AssertSpecial
triggerall = !ishelper
triggerall = sysfvar(4) != 2
triggerall = roundstate > 2
triggerall = alive
trigger1 = !life
flag = noko
ignorehitpause = 1

[state 二阶段时战斗时间延长]
type = AssertSpecial
triggerall = !ishelper
trigger1 = var(12)
trigger1 = gametime % 2 = 0
flag = timerfreeze
ignorehitpause = 1



[State ]
type = Helper
triggerall = !ishelper
trigger1 = !numhelper(110000)
ID = 110000
name = "(～￣▽￣)～"
stateno = 110000
pos = 0,0
postype = P1
helpertype = player
ownpal = 1
keyctrl = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1

[State ]
type = Helper
triggerall = !ishelper || ishelper(111001)
trigger1 = !numhelper(111000)
ID = 111000
name = "(～￣▽￣)～"
stateno = 111000
pos = 0,0
postype = P1
helpertype = player
ownpal = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1

[State ]
type = Helper
triggerall = !ishelper
trigger1 = !numhelper(111001)
ID = 111001
name = "(～￣▽￣)～"
stateno = 111000
pos = 0,0
postype = P1
helpertype = player
ownpal = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1

[State ]
type = Helper
triggerall = !numhelper(111005)
trigger1 = !ishelper
trigger1 = sysfvar(4) = 1 || palno = 12 || fvar(5) = 12
ID = 111005
name = "(～￣▽￣)～"
stateno = 111000
pos = 0,0
postype = P1
helpertype = player
ownpal = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1


[State 时止启动判断]
type = Null
triggerall = !ishelper
trigger1 = roundstate > 2 || sysfvar(4) || (palno != [1,10]) || (fvar(5) != [1,10])
trigger1 = fvar(8) = 1
trigger1 = fvar(8) := 2 && 0
trigger2 = fvar(7) != gametime - 1
trigger2 = fvar(8) := 0 || 1
trigger2 = fvar(7) := gametime || 1
trigger3 = fvar(7) := gametime || 1
time = 2147483647
movetime = 2147483647
ignorehitpause = 1

[State 时止]
type = Pause
triggerall = !ishelper
trigger1 = roundstate > 2 || sysfvar(4) || (palno != [1,10]) || (fvar(5) != [1,10])
trigger1 = fvar(8) = 0
time = 2147483647
movetime = 2147483647
ignorehitpause = 1

[State 时止]
type = SuperPause
triggerall = !ishelper
trigger1 = roundstate > 2 || sysfvar(4) || (palno != [1,10]) || (fvar(5) != [1,10])
trigger1 = fvar(8) = 0
trigger1 = fvar(8) := 1 || 1
anim = -1
darken = 0
p2defmul = 1
unhittable = 0
time = 2147483647
movetime = 2147483647
ignorehitpause = 1

[State 经过时间记录]
type = Varadd
trigger1 = !ishelper
trigger1 = roundstate = 2
fvar(10) = 1
ignorehitpause = 1

[State ]
type = Nothitby
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = var(5)
trigger1 = stateno = [5000,5100]
value = SCA,AA,AT,AP
time = 1
ignorehitpause = 1

[State ]
type = HitOverride
triggerall = sysfvar(4) != 2
triggerall = !ishelper
triggerall = var(5)
trigger1 = 1;stateno != [120,155]
time = 1
attr = SCA,AA,AT,AP
slot = 0
ignorehitpause = 1

[State Alive异常处理]
type = Selfstate
triggerall = name = "b(￣▽￣)d"
trigger1 = roundstate > 2 && loseko
trigger1 = !ishelper
trigger1 = var(5) || var(12) || fvar(5) > 6
trigger1 = var(5) != 1
trigger1 = fvar(5) := 12 || 1
trigger2 = roundstate > 2 && loseko
trigger2 = ishelper
trigger2 = !ishelper(111000) && !ishelper(111001)
trigger2 = root,var(5) || root,var(12) || root,fvar(5) > 6
trigger2 = root,var(5) != 1
trigger2 = !numhelper(111005)
trigger2 = root,stateno != [1111000231,1111000234]
trigger3 = !ishelper
trigger3 = roundstate > 2 && loseko
trigger3 = sysvar(4) >= 3100 && sysvar(4) != [3600,3604]
trigger3 = fvar(5) := 12 || 1
value = 1111000231
ignorehitpause = 1

[State Roundstate异常处理]
type = Selfstate
triggerall = name = "b(￣▽￣)d"
trigger1 = roundstate > 2 && winko
trigger1 = !ishelper && fvar(5) < 12 && !numhelper(111005)
trigger1 = var(12) && (var(5) > lifemax * 100 || var(9) > lifemax * 100)
trigger1 = sysvar(4) = 180 && sysvar(3) > 1300
trigger1 = fvar(5) := 12 || 1
trigger2 = roundstate != [0,4]
trigger2 = !ishelper && fvar(5) < 12 && !numhelper(111005)
trigger2 = fvar(5) := 12 || 1
value = 1111000231
ignorehitpause = 1

[State 冻结解除]
type = Selfstate
triggerall = !ishelper
;triggerall = sysfvar(4) != 2
trigger1 = alive
trigger1 = roundstate > 2
trigger1 = hitpausetime
value = 1110002233
ignorehitpause = 1

[State ]
type = Selfstate
triggerall = !ishelper
triggerall = sysfvar(4) != 2
trigger1 = alive
trigger1 = roundstate > 3
trigger1 = !sysvar(4) || ((sysvar(4) = [170,180]) && sysvar(4) != 170 + win * 10)
value = 170 + win * 10
ignorehitpause = 1

[State R3 State固]
type = Selfstate
triggerall = !ishelper
triggerall = sysfvar(4) != 2
trigger1 = alive
trigger1 = roundstate > 2
value = sysvar(4)
ignorehitpause = 1

[State ]
type = Selfstate
triggerall = !ishelper
triggerall = sysfvar(4) != 2
triggerall = fvar(5) > 6 || (floor(fvar(9)) & 1) || sysfvar(4)
trigger1 = roundstate = 1 || ctrl
trigger1 = stateno != 5900 || time
trigger1 = sysvar(4) = 0 || sysvar(4) = 5900
trigger1 = !var(5)
trigger1 = var(5) := lifemax || 1
value = 3500
ctrl = 0
ignorehitpause = 1

[State ]
type = Selfstate
triggerall = !ishelper
triggerall = sysfvar(4) != 2
trigger1 = var(5)
trigger1 = (floor(fvar(9)) & 2) || sysfvar(4) = 1
trigger1 = (var(5) = 1 && !life)
trigger1 = var(12) != 1
value = 3800
ignorehitpause = 1

[State 变数异常处理]
type = Selfstate
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = !var(5)
trigger1 = (sysvar(4) != [0,6000]) || (abs(sysvar(3)) > 9999 && var(59)) || var(12) < 0 || var(7) < 0 || var(8) < 0
trigger1 = var(5) := 214748364 || 1
trigger1 = var(9) := 214748364 || 1
trigger1 = var(12) := 1 || 1
trigger1 = var(13) := (var(13) | 2) || 1
value = 3500
ctrl = 0
ignorehitpause = 1

[State ESC押处理]
type = Selfstate
triggerall = !ishelper
triggerall = sysfvar(4)
triggerall = stateno != sysvar(4) && sysvar(2) = gametime + 450 * 100
triggerall = stateno = sysvar(4) + 1
triggerall = !numexplod(20004)
triggerall = sysvar(3) > 50
trigger1 = sysvar(4) = 3100 || sysvar(4) = 3200 || sysvar(4) = 3300
trigger2 = sysvar(4) = 3400 || sysvar(4) = 3500 || sysvar(4) = 3700
trigger3 = sysvar(4) = 3900 || sysvar(4) = 4200
trigger4 = sysvar(4) = 3301 && anim = 40004 && sysvar(3) > 320 && animelemtime(1) > 320
value = sysvar(4) + 1
ignorehitpause = 1

[State 11,12PState固]
type = Selfstate
triggerall = !ishelper
triggerall = sysfvar(4)
triggerall = stateno != sysvar(4) || sysvar(2) != gametime + 450 * 100
trigger1 = sysvar(2) != gametime + 450 * 100
trigger2 = stateno != 20 && (stateno != 5900 || roundstate > 1) && stateno
trigger3 = sysvar(4) > 100 && sysvar(4) != 5900
value = sysvar(4)
ctrl = (sysvar(4) < 100)
ignorehitpause = 1

[State 开幕前保护]
type = Selfstate
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = alive
triggerall = movetype = H || sysvar(2) != gametime + 450 * 100 || !life
trigger1 = var(10) & 8
value = 2000
ignorehitpause = 1

[State 异常状态脱离]
type = Selfstate
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = alive
triggerall = stateno != sysvar(4) || sysvar(2) != gametime + 450 * 100
trigger1 = sysvar(4) = [3100,3102]
trigger2 = sysvar(4) = [3200,3201]
trigger3 = sysvar(4) = [3300,3302]
trigger4 = sysvar(4) = [3400,3401]
trigger5 = sysvar(4) = [3500,3501]
trigger6 = sysvar(4) = [3600,3604]
trigger7 = sysvar(4) = [3700,3702]
trigger8 = sysvar(4) = 2000 || var(6)
trigger9 = var(5)
trigger9 = (stateno > 100 && stateno != 5900) || sysvar(2) != gametime + 450 * 100
trigger10 = sysvar(4) = [3800,3804]
trigger11 = sysvar(4) = [3900,3902]
trigger12 = sysvar(4) = [4200,4202]
value = sysvar(4)
ctrl = (sysvar(4) < 100)
ignorehitpause = 1

[State 手操用脱离]
type = Selfstate
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = !var(59)
triggerall = alive
triggerall = power >= powermax
triggerall = command = "x"
triggerall = command = "y"
trigger1 = movetype = H || sysvar(2) != gametime + 450 * 100
trigger1 = var(10) := (var(10) | 1 + 2) || 1
value = 2000
ignorehitpause = 1

[State 脱离]
type = Selfstate
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = var(5)
triggerall = alive
triggerall = movetype = H || sysvar(2) != gametime + 450 * 100
trigger1 = gethitvar(hitcount) >= 30
trigger1 = var(10) := (var(10) | 1) || 1
trigger2 = var(7)
trigger2 = var(7) - var(8) >= lifemax * 0.5
trigger2 = var(10) := (var(10) | 1) || 1
trigger3 = gethitvar(damage) >= lifemax * 0.5 || gethitvar(fall.damage) >= lifemax * 0.5
trigger3 = var(10) := (var(10) | 1) || 1
trigger4 = stateno = 5110
value = 2000
ignorehitpause = 1

[State 脱离]
type = Selfstate
triggerall = !ishelper
triggerall = !sysfvar(4)
triggerall = alive
triggerall = !var(5)
triggerall = movetype = H || sysvar(2) != gametime + 450 * 100 || !life
trigger1 = fvar(5) = 2
trigger1 = var(7) - var(8) >= lifemax - 1 || gethitvar(damage) >= lifemax - 1
trigger1 = var(10) := (var(10) | 4) || 1
trigger2 = fvar(5) = 3
trigger2 = var(7) - var(8) >= lifemax * 0.5
trigger2 = var(8) := var(7) - floor(lifemax * 0.5) || 1
trigger2 = var(10) := (var(10) | 32) || 1
trigger3 = fvar(5) = 4
trigger3 = var(7) - var(8) >= lifemax * 0.4
trigger3 = var(8) := var(7) - floor(lifemax * 0.4) || 1
trigger3 = var(10) := (var(10) | 32) || 1
trigger4 = fvar(5) = 5
trigger4 = var(7) - var(8) >= lifemax * 0.6
trigger4 = var(8) := var(7) - floor(lifemax * 0.6) || 1
trigger4 = var(10) := (var(10) | 32) || 1
trigger5 = fvar(5) = 6
trigger5 = var(7) - var(8) >= lifemax * 0.45
trigger5 = var(8) := var(7) - floor(lifemax * 0.45) || 1
trigger5 = var(10) := (var(10) | 32) || 1
trigger6 = time > 1500 + 500 * (enemynear,movetype = A || enemynear(numenemy > 1),movetype = A)
trigger6 = var(10) := (var(10) | 16) || 1
trigger7 = var(10) & 8
value = 2000
ignorehitpause = 1

[State 火花Helper]
type = Selfstate
trigger1 = ishelper(205) || ishelper(210) || ishelper(215) || ishelper(240)
trigger2 = ishelper(310) || ishelper(160260) || ishelper(3102) || ishelper(3201)
trigger3 = ishelper(3401) || ishelper(3600) || ishelper(3601) || ishelper(3602)
trigger4 = ishelper(3603) || ishelper(3604) || ishelper(3702) || ishelper(3804)
trigger5 = ishelper(3902) || ishelper(4201)
value = 16025
ignorehitpause = 1

[State 常驻Helper]
type = Selfstate
trigger1 = ishelper(112001)
value = 110001
ignorehitpause = 1

[State 常驻Helper]
type = Selfstate
trigger1 = ishelper(111000) || ishelper(111001)
value = 111000
ignorehitpause = 1


[State 弹幕演出Helper]
type = Selfstate
trigger1 = ishelper(16026)
value = 16026
ignorehitpause = 1

[State 弹幕演出Helper]
type = Selfstate
trigger1 = ishelper(16027)
value = 16027
ignorehitpause = 1

[State 弹幕演出Helper]
type = Selfstate
trigger1 = ishelper(16028)
trigger2 = ishelper(16029)
value = 16028
ignorehitpause = 1



;-----------------
[State 常驻Helper]
type = Selfstate
trigger1 = ishelper(110000) || ishelper(112000)
trigger2 = ishelper(111005)
value = 110000
ignorehitpause = 1