
;-----------------------------------------------------------------------------
[Statedef -2];忢帪娔帇僗僥乕僩(憡庤偵峴摦傪惂屼偝傟偰傕娭學柍偔忢偵幚峴偝傟傞)
;-----------------------------------------------------------------------------


;************************************************************

[State -2, 僗僋儘乕儖];晧偗偰搢傟偨傜僇儊儔儚乕僋傪憡庤偵堏偡張棟
type = ScreenBound
triggerall = (Life <= 0) || (!Alive) || (Lose)
trigger1 = (StateNo = 5150) && (RoundState = 4)
value = 0
MoveCamera = 0,0
IgnoreHitPause = 1
;-----------------------------------------------------------
;曄悢娗棟

[state -2];塃岦偒愝掕
type = varset
triggerall = (!ishelper)
trigger1 = var(17) = 0
trigger1 = facing = 1
var(17) = 1

[state -2];嵍岦偒愝掕
type = varset
triggerall = (!ishelper)
trigger1 = var(17) = 0
trigger1 = facing = -1
var(17) = 2

[State -2];儅僢僋僔儞僌僎乕僕1俹
type = Explod
triggerall = (!ishelper)
trigger1 = var(16)
trigger1 = var(17) = 1
anim = 10030
facing = -1
sprpriority = 50001
postype = left
pos = 100,210
bindtime = -1
scale = (var(15)/10),0.2
ownpal = 1
IgnoreHitPause = 1

[State -2];儅僢僋僔儞僌僎乕僕2俹
type = Explod
triggerall = (!ishelper)
trigger1 = var(16)
trigger1 = var(17) = 2
anim = 10030
sprpriority = 50000
postype = left
pos = floor(220-var(15)/10),210
bindtime = -1
scale = (var(15)/10),0.2
ownpal = 1
IgnoreHitPause = 1

[State ];儅僢僋柍揋
type = NotHitBy 
trigger1 = var(16)
trigger1 = movetype = A
trigger1 = palno >= 11
value = SCA


[State ,时间变量]
type = varset
trigger1 = roundstate =1
fvar(39) = 0
ignorehitpause=1


[State ,时间变量]
type = varadd
trigger1 = roundstate =2
fvar(39) = 1
ignorehitpause=1


[State -2, 回血]
type = lifeadd
trigger1 = palno = [7,12] 
trigger1 = GameTime%3 = 1
trigger1 = fvar(39) <2100
value = (palno-6)
ignorehitpause = 1

[State -2, 生命的尽头]
type = lifeadd
trigger1 = palno = [7,12] 
trigger1 = GameTime%3 = 1
trigger1 = fvar(39) >= 2100
trigger1 = roundstate = 2
value = -(13-palno)
kill = 1
ignorehitpause = 1

[State -2, 回气]
type = poweradd
trigger1 = palno = [2,8] 
trigger1 = GameTime%30 = 1
value = palno*15
ignorehitpause = 1

[State -2, 回气]
type = poweradd
trigger1 = palno = [7,8] 
trigger1 = GameTime%30 = 1
trigger1 = fvar(39) >= 2100
value = palno*15
ignorehitpause = 1

[State -2, 无限气]
type = powerset
Triggerall = RoundState >= 2
trigger1 = palno =[9,12] 
trigger1 = power<9000
value = 9000

[State ,防御]
type = defencemulset
trigger1 = palno = 12
value = 0.3
ignorehitpause=1


[State , 至少在完成悲愿之前]
type = AssertSpecial
triggerall = palno = 12
Triggerall = roundno >= 2 
triggerall = roundstate = 2
trigger1 = fvar(39) < 3600
trigger2 = fvar(39) < 6000
Trigger2 = enemynear, life >= enemynear, lifemax*0.2
trigger2 = enemynear, name = "yujiro" && enemynear, palno >= 8
trigger2 = fvar(39) < 4500
Trigger2 = enemynear, life >= enemynear, lifemax*0.35
trigger2 = enemynear, name = "baki" && enemynear, palno >= 8
flag=noko
ignorehitpause=1


[State -2, 回血]
type = lifeadd
trigger1 = palno = 12 
trigger1 = life <= 0
trigger1 = alive = 1
value = 100
ignorehitpause = 1

;=======noko用Helper==========
[State -2]
type = Helper
trigger1 =!IsHelper
trigger1 =!NumHelper(7958)
name = "Phantom2"
helpertype = Player
ID = 7958
ownpal = palno
size.height = 7958
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1

[State ]
type = SelfState
trigger1 = ishelper&&const(size.height) = 7958
value = 7958
ignorehitpause = 1



[State -2, ];僼傽僢僋僶僌懳嶔
type = lifeset
trigger1 = palno < 10
trigger1 = (prevstateno = [3030,3032])
trigger1 = roundstate = 2
trigger1 = anim != 5150
trigger1 = (anim != [1149,1151])
trigger1 = (anim != 5101)
value = 0
ignorehitpause = 1

[State -2, ];傾乕儅乕HIT吉哺
type = Varset
triggerall = GethitVar(hitshaketime)>0
trigger1 = stateno = 1020
trigger2 = stateno = 1040
trigger2 = anim = 101
trigger3 = stateno = 100
var(11) = GethitVar(hitshaketime)
ignorehitpause = 1

[State -2, ];傾乕儅乕HIT吉哺鼐
type = Varadd
trigger1 = var(11)>0
var(11) = -1
ignorehitpause = 0

[State -2, ];傾僢僷乕傾乕儅乕儕僙僢僩
type = Varset
trigger1 = stateno != 1020
trigger2 = stateno = 1020
trigger2 = animelem = 1
var(10) = 0

[State -2, ];僞僢僋儖傾乕儅乕儕僙僢僩
type = Varset
trigger1 = stateno != 1040
trigger2 = stateno = 1040
trigger2 = animelem = 1
var(12) = 0

[State ,];僞僢僋儖憱傝
type = Varset
trigger1 = anim = 101
var(13) = 1
ignorehitpause = 0

[State ,];僞僢僋儖憱傝
type = Varset
trigger1 = anim != 101
var(13) = 0
ignorehitpause = 0

[State -2, ];僟僢僔儏傾乕儅乕儕僙僢僩
type = Varset
trigger1 = stateno != 100
trigger2 = stateno = 100
trigger2 = animelem = 1
var(14) = 0

[State -2, ];僗僥儘僀僪
type = Varset
trigger1 = (var(15)>0)
trigger1 = (movetype != H)||(stateno = [120,159])
var(15) = (var(15)-1)
ignorehitpause = 0
persistent = 1

[State -2, ];僗僥儘僀僪
type = Varset
trigger1 = (var(15)>0)
trigger1 = (movetype != H)
trigger1 = (movecontact=1)
var(15) = (var(15)-30)
ignorehitpause = 0
persistent = 1

[State -2, ];僗僥儘僀僪
type = Varset
trigger1 = (var(15)>0)
var(16) = 1
ignorehitpause = 1

[State -2, ];僗僥儘僀僪
type = Varset
trigger1 = (var(15)<=0)
var(16) = 0
ignorehitpause = 1

[State -2, 夋憸偺怓]
type = PalFX
trigger1 = var(16)
time = 1
add = 50,0,20
sinadd = 22,5,90,3
pausemovetime = 99999999
IgnoreHitPause = 1

[state -2, 僐儅儞僪儕僙僢僩]
type = VarSet
trigger1 = StateNo = 0
trigger2 = StateNo = 52
trigger3 = StateNo = [5000,5210]
trigger4 = MoveType = H
var(1) = 0
ignorehitpause = 1
Persistent = 1

[State -2, ];僼傽僢僋鼐
type = Varset
trigger1 = (roundstate = [0,1])
var(19) = 0
;*********************************:
[State -2, 僞僢僌梡惗巰敾暿]
Type = VarSet
trigger1 = RoundState = 2
var(30) = 0 + (NumEnemy = 2 && EnemyNear(0),life <= 0)
IgnoreHitPause = 1


[state -2, 曕偒壒]
type = playsnd
triggerall = animelem = 19
trigger1 = (StateNo = [20,22])
trigger2 = StateNo = 181
value = 600,2

[state -2, 曕偒壒]
type = playsnd
triggerall = animelem = 39
trigger1 = (StateNo = [20,22])
trigger2 = StateNo = 181
value = 600,3

[State -2,  Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 50
value = 40,1

[State -2, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 106 
value = 40, 0

[State -2, Spark]
type = Explod
trigger1 = target,stateno = 1027
trigger1 = numexplod(666)< 1
anim = 10012
facing = -1
ID = 666
pos = 0,floor (screenpos y) - 250
postype = p2
scale = 0.5,0.7
sprpriority = 4

[State -2, Sound]
type = PlaySnd
trigger1 = target,stateno = 1027
value = S500,2
persistent = 0
channel = 3
lowpriority = 3

[State -2];11P+巆憸
type = Helper
triggerall = anim = 0
triggerall = time >= 20
triggerall = numhelper(999)<1
trigger1 = palno >= 11
name = "Helper"
ID = 999
pos = 0,-65
postype = p1
stateno = 999
persistent = 20

[State -2];11P+巆憸
type = Helper
triggerall = anim = 11
triggerall = numhelper(998)<1
trigger1 = palno >= 11
name = "Helper"
ID = 998
pos = 0,-50
postype = p1
stateno = 998
persistent = 20


;+++++++++++++++++++++++++++++++++++++++
[State -2];僇僂儞僞乕儕僙僢僩
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != A
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,ctrl
var(40) = 0
ignorehitpause = 1

[State -2];僇僂儞僞乕僸僢僩
type = Varset
trigger1 = EnemyNear,movetype = A
var(40) = 1
persistent = 1
ignorehitpause = 1
;************************************************************
;###############KO帪偺張棟###########################
;#################################################

[State -2, 壒傪柭傜偡]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52
value = 40, 0

[State -2, 僟儊乕僕儃僀僗]
type = PlaySnd
triggerall = Time = 1
triggerall = Alive && GameTime % 3 = 0
trigger1 = stateno=5000 || stateno=5010 || stateno=5020
trigger2 = stateno = 5070 || stateno = 5080 
value = 8,random/250
channel = 0

[State -2, ]
type = Helper
triggerall = numhelper(6785) < 1
trigger1 = life = 0
trigger2 = stateno = 3030
ID = 6785
pos = 0,-20
postype = p1
stateno = 444

[State -2, ];僼傽僢僋
type = changeanim
triggerall = (roundstate = [3,4])
trigger1 = prevstateno = 3032
trigger2 = stateno = 5150
trigger2 = life > 0
value = 1151

[State -2, ];僼傽僢僋
type = selfstate
triggerall = (roundstate = [3,4])
trigger1 = prevstateno = 5150
trigger1 = life > 0
value = 5150

[State -2, 巆憸儕僙僢僩]
type = AfterImage
trigger1 = movetype = H
time = 0

;+++++++++++++++++++++++++++++++++++++++

[State -2,旘傃崬傒俙俬偼傫偰偄]
type = varset
triggerall = NumTarget(667)
trigger1 = target,movetype = H
trigger1 = (target,stateno != [120,159])
trigger1 = EnemyNear,GethitVar(hitcount) < 2
var(6) = 1

[State -2,旘傃崬傒俙俬偼傫偰偄]
type = varset
triggerall = NumTarget(667)
trigger1 = enemynear,movetype != H
trigger2 = EnemyNear,GethitVar(hitcount) >= 2
trigger3 = !NumTarget(666)
trigger4 = EnemyNear,GethitVar(hitcount) = 0
trigger5 = (stateno = [200,599])
trigger6 = (stateno > 700)
trigger7 = enemynear,statetype = L
var(6) = 0




;==============noko用Helper============


[Statedef 7958]
type = U
movetype = U
physics = U
hitdefpersist = 1
movehitpersist = 1

[State ]
type = statetypeset
trigger1 = ishelper(7958)
statetype = S
movetype = I
physics = N
ignorehitpause = 1

[State ]
type = Changeanim
trigger1 = ishelper(7958)
trigger1 = anim!= 10025
value = 10025
ignorehitpause = 1

[State ]
type = BindToroot
trigger1 = ishelper(7958)
time = -1
facing = 1
pos = 0, 0
ignorehitpause = 1

[State ]
type = Ctrlset
trigger1 = ishelper(7958)
value = 0
ignorehitpause = 1

[State ]
type = Screenbound
trigger1 = ishelper(7958)
value = 0
ignorehitpause = 1

[State ]
type = Assertspecial
trigger1 = ishelper(7958)
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State ]
type = Playerpush
trigger1 = ishelper(7958)
value = 0
ignorehitpause = 1

[State ]
type = NotHitBy
trigger1 = IsHelper(7958)
value = SCA,AA,AP,AT
ignorehitpause = 1







