[Statedef -2]

;----------------------------------------------------------------------------
;一击头像位置调整

[State 0, 左右位置调整]
type = VarSet
trigger1 = !Ishelper
fv = 35
value = 0 ;<————更改此处数值进行调整
ignorehitpause = 1
persistent = 1

[State 0, 上下位置调整]
type = VarSet
trigger1 = !Ishelper
fv = 36
value = 0 ;<————更改此处数值进行调整
ignorehitpause = 1
persistent = 1

;----------------------------------------------------------------------------
;消除发气掌特效

[State -2, 消除特效1040]
type = removeexplod
triggerall = !Ishelper
trigger1 = (Anim != 1000) || (stateno != 1000)
ID = 1040
ignorehitpause = 1
persistent = 1

[State -2, 消除特效1041]
type = removeexplod
triggerall = !Ishelper
trigger1 = (Anim != 1010) || (stateno != 1010)
ID = 1041
ignorehitpause = 1
persistent = 1

;----------------------------------------------------------------------------
;更好的演出效果

[State 0, 更好的演出效果]
type = AssertSpecial
trigger1 = roundstate != 2 
flag = nobardisplay
ignorehitpause = 1
persistent = 1

;----------------------------------------------------------------------------
;BASARA K.O.

[State 0, BASARA K.O.]
type = Helper
triggerall = !ishelper
triggerall = alive
triggerall = (stateno = 3210) || (stateno = 3810)
triggerall = enemynear,Alive = 0
trigger1 = roundstate > 2
trigger1 = NumHelper(8550) <= 0
helpertype = normal
name = "8550"
ID = 8550
stateno = 8550
pos = ScreenWidth*0.5,ScreenHeight*0.5
postype = back
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 99999999
pausemovetime = 99999999
ignorehitpause = 1
persistent = 1

;----------------------------------------------------------------------------
;战国一击

[State 0, 战国一击显示]
type = Helper
triggerall = !ishelper
trigger1 = NumHelper(14000) <= 0
helpertype = normal
name = "14000"
ID = 14000
stateno = 14000
pos = 0,ScreenHeight*0.5
postype = back
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 99999999
pausemovetime = 99999999
ignorehitpause = 1
persistent = 1

;----------------------------------------------------------------------------
;一击变量

[State 0, 变量设置]
type = VarAdd
triggerall = !ishelper
trigger1 = MoveContact = 1
trigger2 = ProjContact = 1
v = 8
value = ceil(10*cond((helper(40100),fvar(8)<=0),1,(helper(40100),fvar(8))))
ignorehitpause = 0
persistent = 0

[State 0, 一击变量检查]
type = VarSet
triggerall = !ishelper
trigger1 = var(8) < 0
v = 8
value = 1000
ignorehitpause = 1
persistent = 1

;----------------------------------------------------------------------------
;连击修正

[State 0, 修正归零]
type = VarSet
triggerall = !ishelper
triggerall = RoundState = 2
trigger1 = enemynear,movetype != H
v = 0
value = 0
ignorehitpause = 1
persistent = 1

[State 0, 修正累计]
type = VarAdd
triggerall = !ishelper
triggerall = RoundState = 2
triggerall = var(0) < 8
trigger1 = movehit = 1
trigger2 = projhit = 1
v =  0
value = 1
ignorehitpause = 0
persistent = 0

[State 0, 变量]
Type = VarSet
triggerall = palno <= 8
triggerall = !ishelper
triggerall = RoundState = 2
trigger1 = var(0) >= 8
v =  0
value = 8
IgnoreHitPause = 1
persistent = 1

[State 0, 伤害修正]
Type = Attackmulset
triggerall = palno <= 4
triggerall = !ishelper
triggerall = RoundState = 2
triggerall = stateno != [3000,3850]
trigger1 = var(0) < 8
value = 1-var(0)*0.1
ignorehitpause = 1
persistent = 1

[State 0, 伤害修正]
Type = Attackmulset
triggerall = palno <= 4
triggerall = !ishelper
triggerall = RoundState = 2
triggerall = stateno != [3000,3850]
trigger1 = var(0) >= 8
value = 0.2
ignorehitpause = 1
persistent = 1

[State 0, 伤害修正]
Type = Attackmulset
triggerall = !ishelper
triggerall = RoundState = 2
trigger1 = palno >= 5
trigger2 = stateno = [3000,3850]
value = 1
ignorehitpause = 1
persistent = 1

;-----------------------------------------------------------------------------
;カウンターヒット判定
;-----------------------------------------------------------------------------
[State -2, Counter]
type = VarSet
triggerall = !Ishelper
trigger1 = EnemyNear,MoveType = A
fvar(32) = 1

[State -2, Counter Time Add]
type = VarAdd
triggerall = !Ishelper
trigger1 = EnemyNear,MoveType != A
trigger1 = fvar(32) >= 1
fvar(32) = 1

[State -2, Counter Time Reset]
type = VarSet
triggerall = !Ishelper
trigger1 = fvar(32) > 3
fvar(32) = 0
ignorehitpause = 1

[State -2, カウンターヒット呼出]
type = Helper
triggerall = !Ishelper
triggerall = Numhelper(10200) = 0
triggerall = fvar(32) >= 1
trigger1 = movehit = 1 && numtarget
name = "counter"
id = 10200
pos = 0,0
postype = left
stateno = 10200
helpertype = normal
ownpal = 1
keyctrl = 0
size.xscale = 1
size.yscale = 1
persistent = 0
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State -2,]
type = StopSnd
triggerall = !Ishelper
trigger1 = Movetype = H
channel = 10
ignorehitpause = 1

[State -2, PlaySnd]
type = PlaySnd
triggerall = !Ishelper
triggerall = alive = 1
triggerall = random <= 700
triggerall = time = 1
trigger1 = stateno = 5000
trigger1 = anim = 5000 || anim = 5001 || anim = 5010 || anim = 5011
trigger2 = stateno = 5010
trigger2 = anim = 5020 || anim = 5021
value = s5000,0

[State -2, PlaySnd]
type = PlaySnd
triggerall = !Ishelper
triggerall = alive = 1
triggerall = random <= 700
triggerall = time = 1
trigger1 = stateno = 5000
trigger1 = anim = 5002 || anim = 5003 || anim = 5012 || anim = 5013
trigger2 = stateno = 5010
trigger2 = anim = 5022 || anim = 5023
value = s5000,2

[State -2, PlaySnd]
type = PlaySnd
triggerall = !Ishelper
triggerall = alive = 1
triggerall = random <= 700
triggerall = time = 1
trigger1 = stateno = 5101
value = s5000,3

;---------------------------------------------------------------------------
;回气系统
[State 0, 回气系统]
type = PowerAdd
triggerall = var(59) >= 0
trigger1 = Vel X > 0
trigger1 = stateno < 2000
trigger1 = gametime%5 = 1
value = Abs(Vel X)*Abs((enemynear,pos X)-pos X)*(cond((helper(40100),var(15) = 0),0.02,0.05))
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;特殊系统

[State 0, 变量减少]
type = VarAdd
triggerall = !ishelper
triggerall = var(59) >= 1
trigger1 = var(18) >= 1
v = 18
value = -1
ignorehitpause = 0
persistent = 0

[State 0, 特殊系统]
type = NotHitBy
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = Movetype != H
trigger1 = var(18) >= 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 3
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;狂中性能

[State 0, -1]
type = NotHitBy
triggerall = !ishelper
triggerall = (helper(40100),var(52))
trigger1 = var(59) >= 1
trigger1 = movetype = A
value = SCA
time = 3
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = NotHitBy
triggerall = !ishelper
trigger1 = palno >= 5
trigger1 = var(59) >= 1
trigger1 = movetype != h
trigger1 = life <= lifemax*0.4
value = SCA
time = 3
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = NotHitBy
triggerall = !ishelper
triggerall = (helper(40100),var(57))
trigger1 = var(59) >= 1
trigger1 = movetype != H
trigger1 = Enemynear,movetype = H
value = SCA
time = 3
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = PowerAdd
triggerall = !ishelper
triggerall = (helper(40100),var(53))
trigger1 = var(59) >= 1
trigger1 = roundstate = 2
trigger1 = (stateno < 2000) || (movetype = H)
value = 2
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = PowerAdd
triggerall = !ishelper
triggerall = Palno >= 5
triggerall = (helper(40100),var(53))
trigger1 = var(59) >= 1
trigger1 = roundstate = 2
trigger1 = (stateno < 2000) || (movetype = H)
value = 8
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = PowerAdd
triggerall = !ishelper
triggerall = Palno >= 6
triggerall = (helper(40100),var(53))
trigger1 = var(59) >= 1
trigger1 = roundstate = 2
trigger1 = (stateno < 2000) || (movetype = H)
value = 1000
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = PowerAdd
triggerall = !ishelper
triggerall = (helper(40100),var(54))
trigger1 = var(59) >= 1
trigger1 = movetype = H
value = 4
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = DefenceMulSet
triggerall = !ishelper
triggerall = (helper(40100),var(56))
trigger1 = life <= lifemax*0.5
value = 0.25
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = LifeAdd
triggerall = !ishelper
triggerall = (helper(40100),var(55))
trigger1 = roundstate = 2
trigger1 = gametime%3 = 0
trigger1 = life < lifemax*0.35
value = 1
kill = 0
absolute = 1
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;准神用

[State 0, -1]
type = LifeAdd
triggerall = !ishelper
trigger1 = Palno >= 6
value = abs(lifemax*0.02)
kill = 1
absolute = 1
ignorehitpause = 1
persistent = 1

[State 0, -1]
type = NotHitBy
triggerall = !ishelper
trigger1 = Palno >= 6
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 10
ignorehitpause = 1
persistent = 1

[State 0, 时止解除01]
type = SuperPause
triggerall = !Ishelper
triggerall = palno >= 6
trigger1 = anim != 3800
trigger1 = stateno != 3800
trigger1 = anim != 3810
trigger1 = stateno != 3810
time = 0
anim = -1
sound = -1
movetime = 0
darken = 0
p2defmul = 1
poweradd = 0
ignorehitpause = 1
persistent = 1

[State 0, 时止解除02]
type = Pause
triggerall = !Ishelper
triggerall = palno >= 6
trigger1 = anim != 3800
trigger1 = stateno != 3800
trigger1 = anim != 3810
trigger1 = stateno != 3810
time = 0
movetime = 0
pausebg = 0
ignorehitpause = 1
persistent = 1

[State 0, 时止解除额外01]
type = SuperPause
triggerall = Ishelper
triggerall = root,palno >= 6
trigger1 = root,anim != 3800
trigger1 = root,stateno != 3800
trigger1 = root,anim != 3810
trigger1 = root,stateno != 3810
time = 0
anim = -1
sound = -1
movetime = 0
darken = 0
p2defmul = 1
poweradd = 0
ignorehitpause = 1
persistent = 1

[State 0, 时止解除额外02]
type = Pause
triggerall = Ishelper
triggerall = palno >= 6
trigger1 = root,anim != 3800
trigger1 = root,stateno != 3800
trigger1 = root,anim != 3810
trigger1 = root,stateno != 3810
time = 0
movetime = 0
pausebg = 0
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;敌方速度

[State 0, 横轴速度]
type = VarSet
trigger1 = !ishelper
fv = 4
value = facing*enemynear(var(58)),facing*enemynear(var(58)),Vel X
ignorehitpause = 1
persistent = 1

[State 0, 纵轴速度]
type = VarSet
trigger1 = !ishelper
fv = 5
value = Enemynear(var(58)),Vel Y
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;打击范围增加

[State 0, 打击范围增加测量1]
type = VarSet
trigger1 = !Numtarget
trigger1 = !ishelper
trigger1 = (Enemynear(var(58)),statetype = S) || (Enemynear(var(58)),statetype = A)
fv = 6
value = Enemynear(var(58)),Const(size.head.pos.y)
ignorehitpause = 1
persistent = 1

[State 0, 打击范围增加测量2]
type = VarSet
trigger1 = !Numtarget
trigger1 = !ishelper
trigger1 = (Enemynear(var(58)),statetype = C)
fv = 6
value = Enemynear(var(58)),Const(size.mid.pos.y)
ignorehitpause = 1
persistent = 1

[State 0, 打击范围增加测量3]
type = VarSet
trigger1 = Numtarget
trigger1 = !ishelper
trigger1 = (Enemynear(var(58)),statetype = S) || (Enemynear(var(58)),statetype = A)
fv = 6
value = Const(size.head.pos.y)
ignorehitpause = 1
persistent = 1

[State 0, 打击范围增加测量4]
type = VarSet
trigger1 = Numtarget
trigger1 = !ishelper
trigger1 = (Enemynear(var(58)),statetype = C)
fv = 6
value = Const(size.mid.pos.y)
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;敌方血量检测

[State 0, 敌方当前血量]
type = VarSet
trigger1 = !ishelper
fv = 9
value = Enemynear(var(58)),life
ignorehitpause = 1
persistent = 1

[State 0, 敌方最大血量]
type = VarSet
trigger1 = !ishelper
fv = 10
value = Enemynear(var(58)),lifemax
ignorehitpause = 1
persistent = 1

;-----------------------------------------------------------------------------
; AI用重力加速度测量
;-----------------------------------------------------------------------------

[State -2, 重力加速度测量-p2]
type = VarSet
triggerall = !ishelper
triggerall = NumHelper(999)
triggerall = EnemyNear(var(58)),Vel Y != 0
triggerall = EnemyNear(var(58)),Pos Y < (((EnemyNear(var(58)),Anim != [5051,5059]) && (EnemyNear(var(58)),Anim != [5061,5069])) && (EnemyNear(var(58)),StateNo = 5050))*25 ;参考Statedef 5050
triggerall = fvar(20) != Helper(999),fvar(0)
trigger1 = EnemyNear(var(58)),StateNo != [5000,5210]
trigger2 = EnemyNear(var(58)),Movetype != H
fv = 20
value = Helper(999),fvar(0)
IgnoreHitPause = 1

[State -2, 重力加速度测量-普通受击]
type = VarSet
triggerall = !ishelper
triggerall = EnemyNear(var(58)),Vel Y != 0
triggerall = EnemyNear(var(58)),Movetype = H
triggerall = EnemyNear(var(58)),Pos Y < (((EnemyNear(var(58)),Anim != [5051,5059]) && (EnemyNear(var(58)),Anim != [5061,5069])) && (EnemyNear(var(58)),StateNo = 5050))*25 ;参考Statedef 5050
triggerall = fvar(20) != EnemyNear(var(58)),GetHitVar(yaccel)
trigger1 = EnemyNear(var(58)),StateNo = [5000,5210]
fv = 20
value = EnemyNear(var(58)),GetHitVar(yaccel)
IgnoreHitPause = 1

;敌人不在空中时
[State -2, 敌人不在空中时]
type = VarSet
triggerall = !ishelper
trigger1 = fvar(20) != 0 && EnemyNear(var(58)),Vel Y = 0
fv = 20
value = 0
IgnoreHitPause = 1

;-----------------------------------------------------------------------------
; 全局变量超杀奖池
;-----------------------------------------------------------------------------

[State 0, 全局变量超杀]
type = Null
triggerall = !ishelper
trigger1 = stateno = 2000;双掌天莲华
trigger1 = 1 || (fvar(25):=1)
trigger2 = stateno = 2100;天翔乱姬
trigger2 = 1 || (fvar(26):=1)
trigger3 = stateno = 2200;流燕脚
trigger3 = 1 || (fvar(27):=1)
trigger4 = stateno = 2300;MAX双掌天莲华
trigger4 = 1 || (fvar(28):=1)
trigger5 = stateno = 2400;MAX天翔乱姬
trigger5 = 1 || (fvar(29):=1)
trigger6 = stateno = 3000;八卦掌燕舞
trigger6 = 1 || (fvar(30):=1)
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;所有招式复位

[State 0, 变量清零]
type = VarRangeSet
triggerall = !ishelper
trigger1 = fvar(25) >= 1
trigger1 = fvar(26) >= 1
trigger1 = fvar(27) >= 1
trigger1 = fvar(28) >= 1
trigger1 = fvar(29) >= 1
trigger1 = fvar(30) >= 1
fvalue = 0
first = 25
last = 33
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;限制攻击

[State 0, 限制特殊投]
type = Explod
triggerall = !ishelper
triggerall = NumExplod(80) <= 0
trigger1 = stateno = 80
anim = 9999
ID = 80
pos = 0,-450
postype = p1
facing = 1
bindtime = -1
vel = 0,0
removetime = 180
pausemovetime = 999999
supermovetime = 999999
scale = 0,0
sprpriority = -999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 0, 限制重拳目押]
type = Explod
triggerall = !ishelper
triggerall = NumExplod(100210) <= 0
trigger1 = var(35) = 1007
anim = 9999
ID = 100210
pos = 0,-450
postype = p1
facing = 1
bindtime = -1
vel = 0,0
removetime = -1
pausemovetime = 999999
supermovetime = 999999
scale = 0,0
sprpriority = -999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 0, 限制近轻脚目押]
type = Explod
triggerall = !ishelper
triggerall = NumExplod(100235) <= 0
trigger1 = var(35) = 1112
anim = 9999
ID = 100235
pos = 0,-450
postype = p1
facing = 1
bindtime = -1
vel = 0,0
removetime = -1
pausemovetime = 999999
supermovetime = 999999
scale = 0,0
sprpriority = -999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 0, 限制凹升龙]
type = Explod
triggerall = !ishelper
triggerall = NumExplod(101100) <= 0
trigger1 = stateno = 1100
anim = 9999
ID = 101100
pos = 0,-450
postype = p1
facing = 1
bindtime = -1
vel = 0,0
removetime = 300
pausemovetime = 999999
supermovetime = 999999
scale = 0,0
sprpriority = -999
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 0, 限制天翔乱姬裸凹]
type = Explod
triggerall = !ishelper
triggerall = NumExplod(102100) <= 0
trigger1 = stateno = 2100
anim = 9999
ID = 102100
pos = 0,-450
postype = p1
facing = 1
bindtime = -1
vel = 0,0
removetime = 300
pausemovetime = 999999
supermovetime = 999999
scale = 0,0
sprpriority = -999
ownpal = 1
ignorehitpause = 1
persistent = 0

;---------------------------------------------------------------------------
;消除限制

[State 0, 消除限制近轻脚]
type = RemoveExplod
triggerall = !ishelper
triggerall = NumExplod(100235)
trigger1 = var(35) = [1000,1007]
id = 100235
ignorehitpause = 1
persistent = 1

[State 0, 消除限制重拳]
type = RemoveExplod
triggerall = !ishelper
triggerall = NumExplod(100210)
trigger1 = var(35) = [1100,1112]
id = 100210
ignorehitpause = 1
persistent = 1

;-----------------------------------------------------------------------------
; 特殊Helper
;-----------------------------------------------------------------------------

[State 0, -2]
type = Helper
triggerall = !Ishelper
triggerall = palno >= 6
trigger1 = !Numhelper(135967)
helpertype = player
name = "135967"
ID = 135967
stateno = 135967
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999999999
pausemovetime = 999999999
ignorehitpause = 1
persistent = 1

[State 0, 状态锁]
type = SelfState
triggerall = Ishelper(135967)
trigger1 = helper(135967),stateno != 135967
trigger1 = helper(135967),stateno != 135968
value = 135967
anim = 135967
ctrl = 0
ignorehitpause = 1
persistent = 1

[State 0, 特殊情况消除]
type = DestroySelf
triggerall = Ishelper(135967)
trigger1 = helper(135967),stateno != 135967
trigger1 = helper(135967),stateno != 135968
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;特殊断言

[State 0, 特殊断言01]
Type = AssertSpecial
TriggerAll = roundstate <= 2
TriggerAll = !ishelper       	      			;必须是本体
TriggerAll = enemynear(var(58)),life > 0	;最近的活敌生命值大于 0 防止打不死对面
TriggerAll = alive					;在活着的时候
trigger1 = (fvar(15) >= 1) || (fvar(22) >= 1)		
flag = noko                 	      			
ignorehitpause = 1
persistent = 1

[State 0, 特殊断言02]
type = AssertSpecial
triggerall = !Ishelper
TriggerAll = roundstate > 2
trigger1 = Alive	
flag = noko                 	      			
ignorehitpause = 1
persistent = 1

[State 0, 特殊断言03]
type = AssertSpecial
triggerall = Ishelper
TriggerAll = roundstate > 2
trigger1 = 1	
flag = noko                 	      			
ignorehitpause = 1
persistent = 1

[State 0, 锁血]
type = LifeSet
triggerall = !Ishelper
trigger1 = (fvar(15) >= 1) || (fvar(22) >= 1)
trigger1 = life < lifemax*0.05
value = lifemax*0.05
ignorehitpause = 1
persistent = 1

[State 0, 锁血]
type = LifeSet
triggerall = !Ishelper
triggerall = palno >= 6
triggerall = Alive
trigger1 = roundstate != 2
value = lifemax*2
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;状态锁

[State 0, st固]
type = SelfState
triggerall = !Ishelper
Triggerall = name = "Hotaru-Futaba"
Triggerall = fvar(22) != 0
trigger1 = anim = 712
value = anim
ctrl = 0
ignorehitpause = 1
persistent = 1

[State 0, st固02]
type = SelfState
triggerall = !Ishelper
Triggerall = name = "Hotaru-Futaba"
Triggerall = fvar(22) != 0
trigger1 = anim = 0
value = 0
ctrl = 1
ignorehitpause = 1
persistent = 1

[State 0, st固03]
type = SelfState
triggerall = !Ishelper
Triggerall = name = "Hotaru-Futaba"
Triggerall = fvar(22) != 0
trigger1 = anim = 3200
trigger2 = anim = 3210
trigger3 = anim = 3800
trigger4 = anim = 3810
value = anim
ctrl = 0
ignorehitpause = 1
persistent = 1

;---------------------------------------------------------------------------
;recovery

[State 0, recovery01]
type = SelfState
triggerall = !Ishelper
Triggerall = Alive
Triggerall = name = "Hotaru-Futaba"
trigger1 = life <= lifemax*0.25
trigger1 = (sysvar(3) != (gametime*114+514-19-19+810)) || (movetype = H)
trigger1 = fvar(15) > 0
trigger1 = fvar(22) = 0
trigger1 = 1 || fvar(15) := (fvar(15)-1)
trigger1 = 1 || fvar(22) := 1
value = 712
anim = 712
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, recovery02]
type = SelfState
triggerall = !Ishelper
Triggerall = Alive
Triggerall = palno = 5
Triggerall = name = "Hotaru-Futaba"
trigger1 = time = [1,2]
trigger1 = random%12 = 0
trigger1 = (sysvar(3) != (gametime*114+514-19-19+810)) || (movetype = H)
trigger1 = fvar(22) = 0
trigger1 = 1 || fvar(22) := 1
value = 712
anim = 712
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, recovery03]
type = SelfState
triggerall = !Ishelper
Triggerall = Alive
Triggerall = palno >= 6
Triggerall = name = "Hotaru-Futaba"
trigger1 = (sysvar(3) != (gametime*114+514-19-19+810)) || (movetype = H)
trigger1 = fvar(22) = 0
trigger1 = 1 || fvar(22) := 1
value = 712
anim = 712
ctrl = 0
ignorehitpause = 1
persistent = 0

[State 0, debug]
type = DisplayToClipboard
trigger1 = !Ishelper
text = "var(35) = %d var(41) = %d var(42) = %d JL = %d"
params = var(35),var(41),var(42),((enemynear(var(58)),pos X)-pos X)*facing
ignorehitpause = 1
persistent = 1

;-----------------------------------------------------------------------------
;---------------------------------------------------------------------------------
[Statedef -3];常時監視ステート(p2statenoなどで相手に行動を制御された時は実行しない)
;※※※※※※※※※※※※※※※※※※※※ハイジャンプ?東方萃夢想風味
;理論は簡単
;ハイジャンプコマンドを入れた「瞬間」、varスイッチを１にする。
;でハイジャンプのコマンドは最後がU、つまりジャンプする。
;そしてジャンプステート５０の時にvarスイッチが１以上ならveladdで加速します。
;varスイッチを０にするトリガーは「ステート５０の２フレーム目」です。

[State -3, コマンドを入れたらVarをON] 
type = VarSet
triggerall = !Ishelper
trigger1 = command = "jump"
trigger1 = ctrl
trigger1 = statetype = S
trigger2 = prevstateno = 100
trigger2 = command = "holdfwd"
v = 3
value = 1

[State -3, sysvarを引継ぐ]
type = VarSet
triggerall = !Ishelper
trigger1 = Var(3) = 1
trigger1 = stateno = 40 ;ジャンプする前のステート
trigger1 = AnimTime = 0 ;ジャンプ方向を決めるsysvarがリセットされる寸前
var(3) = ifelse(sysvar(1)=0, 2, ifelse(sysvar(1)=1, 3, 4))

[State -3, varをOFFにするステート]
type = VarSet
triggerall = !Ishelper
triggerall = Time = 2
trigger1 = stateno = 50
trigger2 = stateno != [40,59]
v = 3
value = 0

[State -3, 前にボタンを押してたら前にも加速]
type = VelAdd
trigger1 = !Ishelper
trigger1 = var(3) = 3
trigger1 = stateno = 50
y = -0.6
x = 1.8

[State -3, 後ろなら後ろに加速]
type = VelAdd
trigger1 = !Ishelper
trigger1 = var(3) = 4
trigger1 = stateno = 50
y = -0.6
x = -1.8

[State -3, 垂直ジャンプにveladdを使って上に加速]
type = VelAdd
trigger1 = !Ishelper
trigger1 = var(3) = 2
trigger1 = stateno = 50
y = -1.8

[State -3, 成功したときの残像]
type = AfterImage
trigger1 = !Ishelper
trigger1 = var(3) >= 1
trigger1 = stateno = 50
time = 25
trans = add1
length = 4
timeGap = 3
frameGap = 1
palBright = 0, 0, 0
palContrast = 128, 128, 128
palAdd = 0, 0, 0
palMul = 1, 1, 1

;[State -3, CornerPush]
;Type = Width
;trigger1 = !Ishelper
;Trigger1 = Enemy, BackEdgeDist < 10
;Trigger2 = Enemy, FrontEdgeDist < 10
;Edge = 10

;记录Gametime
[State -3, 记录Gametime]
type = Varset
trigger1 = !Ishelper
trigger1 = 1
sysvar(3) = (gametime*114+514-19-19+810)
ignorehitpause = 1

;------------------------------------------------------------------------------
;AI 用的 helper
;------------------------------------------------------------------------------

;--------------------------------------------
;辅助防御 I
[State -3]
type = Helper
triggerall = !Ishelper
triggerall = var(59) >= 1
trigger1 = !numhelper(998)
helpertype = normal
name = "Guard I"
ID = 998
stateno = 998
postype = P1
pos = 50,0
supermovetime = 999999
pausemovetime = 999999
persistent = 0

;--------------------------------------------
;记录重力加速度
[State -3]
type = Helper
triggerall = !Ishelper
triggerall = var(59) >= 1
trigger1 = !numhelper(999)
helpertype = normal
name = "Guard II"
ID = 999
stateno = 999
postype = P1
pos = -50,0
supermovetime = 999999
pausemovetime = 999999
persistent = 0

;--------------------------------------------
;距离-前
[State -3]
type = Helper
triggerall = !Ishelper
;triggerall = var(59) >= 1
trigger1 =!NumHelper(21000+ID)
trigger1 =!IsHelper
helpertype = normal
name = "Edge of Stage Right"
postype = P1
ID = 21000+ID
stateno = 21000
pausemovetime = 0
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0

;--------------------------------------------
;距离-后
[State -3]
type = Helper
triggerall = !Ishelper
;triggerall = var(59) >= 1
trigger1 =!NumHelper(21001+ID)
trigger1 =!IsHelper
helpertype = normal
name = "Edge of Stage Left"
postype = P1
ID = 21001+ID
stateno = 21001
pausemovetime = 0
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0

;--------------------------------------------
;防御-对飞行道具
[State -3]
type = HelPer
triggerall = !Ishelper
triggerall = var(59) >= 1
trigger1 = !NumHelper(25000+ID)
HelPerType = normal
Name = "bullet"
ID = 25000+ID
stateno = 25000
pos = 5, 0
postype = p1
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
ignorehitpause = 1

;--------------------------------------------
;防御记录
[State -3, Helper]
Type = Helper
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = RoundState = 2
trigger1 =!NumHelper(31000+id)
trigger1 =!IsHelper
helpertype = normal
Name = "Guard"
ID = 31000+id
stateno = 31000
pos = 0,9999
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
ignorehitpause = 1
persistent = 0

;--------------------------------------------
;开关helper
[State 0, Helper]
type = Helper
triggerall = !Ishelper
trigger1 = !numhelper(40100)
helpertype = normal
name = "开关"
ID = 40100
stateno = 40100
postype = right
facing = -1
pos = -999000,-999000
keyctrl = 0
size.xscale = 1
size.yscale = 1
ownpal = 1
size.shadowoffset = -99999
supermovetime = 999999
pausemovetime = 999999

;------------------------------------------------------------------------------
;AI用变量
;------------------------------------------------------------------------------

[State 特殊断言]
Type = AssertSpecial
trigger1 = var(59) >= 1
flag = NoWalk

;-----------------------------------------------------------------------------
; 取得敌人的生死状况
[State -3, 敌人的生死判別]
Type = VarSet
triggerall = RoundState = 2
trigger1 = NumEnemy <= 1
trigger2 = NumEnemy >= 2
trigger2 = EnemyNear(0),Life > 0
trigger2 = Ctrl || !NumTarget || NumTarget >= 2
trigger3 = NumEnemy >= 2
trigger3 = EnemyNear(0),Life > 0
trigger3 = Target,StateType = L || Facing*(Pos X-Target,Pos X) > 0
trigger4 = NumEnemy >= 2 && NumTarget = 1
trigger4 = Enemy(0),Life > 0 && Enemy(1),Life > 0
trigger4 = EnemyNear(0),ID = Target,ID
trigger4 = Target,StateType != L
trigger4 = Facing*(Pos X-Target,Pos X) <= 0
trigger4 = !Ctrl
var(58) = 0
IgnoreHitPause = 1

[State -3, 敌人的生死判別]
Type = VarSet
triggerall = RoundState = 2
triggerall = NumEnemy >= 2
triggerall = !var(58)
trigger1 = EnemyNear(0),Life <= 0
trigger2 = NumEnemy >= 2 && NumTarget = 1
trigger2 = Enemy(0),Life > 0 && Enemy(1),Life > 0
trigger2 = EnemyNear(0),ID != Target,ID
trigger2 = Facing*(Pos X-Target,Pos X) <= 0
trigger2 = Target,StateType != L
trigger2 = !Ctrl
var(58) = 1
IgnoreHitPause = 1

;-----------------------------------------------------------------------
; 对手的硬直时间计算

[State -3, 时间重置]
Type = VarSet
trigger1 = var(49) != 0
V = 49
Value = 0
IgnoreHitPause = 1

[State -3, 敌人的硬直时间]
Type = VarSet
triggerall = !EnemyNear(var(58)),Ctrl
triggerall = EnemyNear(var(58)),StateType != A
triggerall = EnemyNear(var(58)),StateType != L
triggerall = EnemyNear(var(58)),MoveType = H
trigger1 = EnemyNear(var(58)),StateNo = [120,160)
trigger2 = EnemyNear(var(58)),StateNo = [5000,5100)
trigger3 = EnemyNear(var(58)),StateNo = [24500,24511]
V = 49
Value = EnemyNear(var(58)),GetHitVar(hittime)+1
IgnoreHitPause = 1

;-----------------------------------------------------------------------------
; AI前进或后退用变量

[State -3, 行动]
type = VarRandom
triggerall = var(59) >= 1
triggerall = Facing*(EnemyNear(var(58)),Pos x-Pos x) >= 50
trigger1 = (gametime%45 = 0) || (var(40) = 0)
v = 40
range = 1,2
ignorehitpause = 1
persistent = 1

[State -3, 前进2]
type = VarRandom
triggerall = var(59) >= 1
triggerall = EnemyNear(var(58)),ctrl = 0
triggerall = EnemyNear(var(58)),stateno > 120
trigger1 = Facing*(EnemyNear(var(58)),Pos x-Pos x) >= 50
v = 40
range = 1,1
ignorehitpause = 1
persistent = 1

[State -3, 后退]
type = VarRandom
triggerall = var(59) >= 1
triggerall = Facing*(EnemyNear(var(58)),Pos x-Pos x) < 80
trigger1 = gametime%15 = 0
v = 40
range = 2,2
ignorehitpause = 1
persistent = 1

[State -3, 后退2]
type = VarRandom
triggerall = var(59) >= 1
triggerall = Facing*(EnemyNear(var(58)),Pos x-Pos x) >= 150
trigger1 = gametime%15 = 0
v = 40
range = 2,3
ignorehitpause = 1
persistent = 1

;-----------------------------------------------------------------------------
; 前段和后端距离检测
[State -1, 当人物开局在左边时检测前方的距离]
Type = VarSet
trigger1 =(NumHelper(21000+ID) && NumHelper(21001+ID))
trigger1 = TeamSide = 1
var(41) = floor(Abs(ifelse(Facing = 1,Helper(21000+ID),RootDist X,Helper(21001+ID),RootDist X)))
IgnoreHitPause = 1

[State -1, 当人物是开局在右边时检测前方的距离]
Type = VarSet
trigger1 =(NumHelper(21000+ID) && NumHelper(21001+ID))
trigger1 = TeamSide = 2
var(41) = floor(Abs(ifelse(Facing = 1,Helper(21001+ID),RootDist X,Helper(21000+ID),RootDist X)))
IgnoreHitPause = 1

[State -1, 当人物开局在左边时检测后方的距离]
Type = VarSet
trigger1 =(NumHelper(21000+ID) && NumHelper(21001+ID))
trigger1 = TeamSide = 1
var(42) = floor(Abs(ifelse(Facing = 1,Helper(21001+ID),RootDist X,Helper(21000+ID),RootDist X)))
IgnoreHitPause = 1

[State -1, 当人物是开局在右边时检测后方的距离]
Type = VarSet
trigger1 =(NumHelper(21000+ID) && NumHelper(21001+ID))
trigger1 = TeamSide = 2
var(42) = floor(Abs(ifelse(Facing = 1,Helper(21000+ID),RootDist X,Helper(21001+ID),RootDist X)))
IgnoreHitPause = 1

;-----------------------------------------------------------------------
; 防御

[State -3, 不需要防守的时候] ;敌人死了，或者是不在guarddist内
type = varSet
triggerall = !IsHelper
trigger1 = NumEnemy = 0
trigger2 = !InGuardDist
var(48) = 0
IgnoreHitPause = 1

[State -3, 站防] ;站防，用var(48) = 2来代替
Type = VarSet
TriggerAll = var(59) >= 1
TriggerAll =!IsHelper
TriggerAll = NumEnemy
TriggerAll = NumHelper(31000+ID)
TriggerAll = StateType != A
TriggerAll = EnemyNear(var(58)),StateNo != 0
Trigger1 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(10)
Trigger2 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(11)
Trigger3 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(12)
Trigger4 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(13)
Trigger5 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(14)
var(48) = 2
IgnoreHitPause = 1

[State -3, 蹲防] ;蹲防，用var(48) = 1来代替
Type = VarSet
TriggerAll = var(59) >= 1
TriggerAll =!IsHelper
TriggerAll = NumEnemy
TriggerAll = NumHelper(31000+ID)
TriggerAll = StateType != A
TriggerAll = EnemyNear(var(58)),StateNo != 0
Trigger1 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(20)
Trigger2 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(21)
Trigger3 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(22)
Trigger4 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(23)
Trigger5 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(24)
var(48) = 1
IgnoreHitPause = 1

[State -3, 站防]
Type = VarSet
TriggerAll = var(59) >= 1
TriggerAll =!IsHelper
TriggerAll = NumEnemy
TriggerAll = NumHelper(31000+ID)
TriggerAll = StateType != A
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(20) ;不能是被破防的招式
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(21)
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(22)
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(23)
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(24)
Trigger1 = var(59) >= 1
Trigger1 = EnemyNear(var(58)),StateType = A
Trigger2 = var(59) >= 1
Trigger2 = EnemyNear(var(58)),StateType = S
Trigger3 = var(59) >= 1
Trigger3 = EnemyNear(var(58)),StateType = S
Trigger3 =!EnemyNear(var(58)),NumProj
var(48) = 2
IgnoreHitPause = 1

[State -3, 蹲防]
Type = VarSet
TriggerAll = var(59) >= 1
TriggerAll =!IsHelper
TriggerAll = NumEnemy
TriggerAll = NumHelper(31000+ID)
TriggerAll = StateType != A
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(10)
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(11)
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(12)
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(13)
TriggerAll = EnemyNear(var(58)),StateNo != Helper(31000+ID),var(14)
Trigger1 = var(59) >= 1
Trigger1 = EnemyNear(var(58)),StateType = C
var(48) = 1
IgnoreHitPause = 1

[State -3, 站防]
Type = VarSet
TriggerAll = var(59) >= 1
TriggerAll =!IsHelper
TriggerAll = NumEnemy
TriggerAll = NumHelper(31000+ID)
TriggerAll = StateType != A
TriggerAll = MoveType != H
Trigger1 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(10) ;破防以后换一个段位记忆招式
Trigger2 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(11)
Trigger3 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(12)
Trigger4 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(13)
Trigger5 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(14)
var(48) = 2
IgnoreHitPause = 1

[State -3, 蹲防]
Type = VarSet
TriggerAll = var(59) >= 1
TriggerAll =!IsHelper
TriggerAll = NumEnemy
TriggerAll = NumHelper(31000+ID)
TriggerAll = StateType != A
TriggerAll = MoveType != H
Trigger1 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(20)
Trigger2 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(21)
Trigger3 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(22)
Trigger4 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(23)
Trigger5 = EnemyNear(var(58)),StateNo = Helper(31000+ID),var(24)
var(48) = 1
IgnoreHitPause = 1

;-----------------------------------------------------------------------------
;连段变量

[State 0, 起手成功]
type = VarSet
triggerall = !Ishelper
triggerall = var(50) = 0
trigger1 = movehit = 1
trigger2 = projhit = 1
v = 50
value = 1
ignorehitpause = 1
persistent = 0

[State 0, 变量归零]
type = VarSet
triggerall = !Ishelper
trigger1 = var(50) > 0
trigger1 = Enemynear(var(58)),movetype != H 
trigger2 = var(50) > 0
trigger2 = !Numtarget
trigger3 = var(50) < 0
v = 50
value = 0
ignorehitpause = 1
persistent = 0

[State 0, 记录连击数-普通]
type = VarAdd
triggerall = !Ishelper
trigger1 = movehit = 1
trigger2 = projhit = 1
v = 50
value = 1
ignorehitpause = 0
persistent = 0

[State 0, 连段步骤变量归零]
type = VarSet
triggerall = !Ishelper
trigger1 = var(50) = 0
trigger2 = movetype = H
trigger3 = (stateno = 810)
trigger4 = stateno = [2000,3850]
v = 35
value = 0
ignorehitpause = 1
persistent = 1

[State 0, 连段总执行次数]
type = VarSet
triggerall = !Ishelper
trigger1 = var(50) = 0
trigger2 = movetype = H
trigger3 = stateno = [2000,2850]
v = 36
value = 0
ignorehitpause = 1
persistent = 1

;------------------------------------------------------------------------------
;一击解放-准神
;------------------------------------------------------------------------------

[State 0, 零牙·天翔乱姬]
type = ChangeState
value = 3800
triggerall = !Ishelper
triggerall = palno >= 6
triggerall = var(59) >= 1
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = [200,440]
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger2 = stateno = 960
trigger2 = animtime = 0
trigger2 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;一击解放
;------------------------------------------------------------------------------

[State 0, 零牙·天翔乱姬]
type = ChangeState
value = 3200
triggerall = !Ishelper
triggerall = palno = [1,5]
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(8) >= 1000
triggerall = (life <= (lifemax*0.4)) || (palno = [3,5]) || (helper(40100),var(15) >= 1)
triggerall = power >= 1000
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = [200,440]
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger2 = stateno = 960
trigger2 = animtime = 0
trigger2 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;连段结束
;------------------------------------------------------------------------------

[State 0, 连段结束]
type = ChangeState
value = 810
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = (var(36) >= (cond((var(59)-1)<=0,1,(var(59)-1))))
triggerall = power < helper(40100),var(25)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 210
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger2 = stateno = 215
trigger2 = movehit = 1
trigger2 = AnimElem = 1,>=1
trigger3 = stateno = 235
trigger3 = movehit = 1
trigger3 = AnimElem = 1,>=1
trigger4 = stateno = 245
trigger4 = movehit = 1
trigger4 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;超杀-地面
;------------------------------------------------------------------------------

[State 0, 超杀-针对地面]
type = ChangeState
value = helper(40100),var(30)
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = (var(36) >= (var(59)-1)) || (fvar(9) < ((fvar(10)*0.10)*(helper(40100),var(25))*0.001))
triggerall = power >= helper(40100),var(25)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 210
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger2 = stateno = 215
trigger2 = movehit = 1
trigger2 = AnimElem = 1,>=1
trigger3 = stateno = 235
trigger3 = movehit = 1
trigger3 = AnimElem = 1,>=1
trigger4 = stateno = 245
trigger4 = movehit = 1
trigger4 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;空中连段其一
;------------------------------------------------------------------------------

[State 0, 空中连段其一]
type = ChangeState
value = 1200
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 235
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := 1100)
ignorehitpause = 0
persistent = 0

[State 0, 虎尾脚快速收招]
type = ChangeState
value = 1250
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1100
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1200
trigger1 = movehit
trigger1 = AnimElem = 6,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 蹲轻拳挥空]
type = ChangeState
value = 400
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1101
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1250
trigger1 = Animtime = 0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 重虎尾脚]
type = ChangeState
value = 1210
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1102
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 400
trigger1 = AnimElem = 6,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 虎尾脚快速收招]
type = ChangeState
value = 1250
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1103
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1210
trigger1 = movehit
trigger1 = AnimElem = 6,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 前影跳]
type = ChangeState
value = 32
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1104
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = Ctrl || (stateno = [19,22]) || (stateno = [100,101])
trigger1 = AnimElem = 1,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 碎头击]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1105
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = Ctrl || (stateno = 50)
trigger1 = AnimElem = 1,>=12
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 再起跳]
type = ChangeState
value = 626
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1106
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 625
trigger1 = movehit
trigger1 = Pos Y >= -20
trigger1 = AnimElem = 2,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 碎头击]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1107
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 626
trigger1 = AnimElem = 4,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 再起跳]
type = ChangeState
value = 626
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1108
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 625
trigger1 = movehit
trigger1 = Pos Y >= -20
trigger1 = AnimElem = 2,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 碎头击]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1109
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 626
trigger1 = AnimElem = 4,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 再起跳]
type = ChangeState
value = 626
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1110
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 625
trigger1 = movehit
trigger1 = Pos Y >= -20
trigger1 = AnimElem = 2,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 重连击蹴]
type = ChangeState
value = 1510
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1111
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 626
trigger1 = AnimElem = 2,>=5
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 鹰踏挥空]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1112
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1520
trigger1 = movehit
trigger1 = AnimElem = 12,>=0
trigger1 =  1 || (var(35) := 0)
trigger1 =  1 || (var(36) := var(36)+1)
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;空中特殊连段
;------------------------------------------------------------------------------

[State 0, 空中特殊连段]
type = ChangeState
value = 1000
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 210
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := 1000)
ignorehitpause = 0
persistent = 0

[State 0, 轻双掌迸]
type = ChangeState
value = 1300
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1000
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = Ctrl || (stateno = [19,22]) || (stateno = [100,101])
trigger1 = AnimElem = 1,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 轻虎尾脚]
type = ChangeState
value = 1200
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1001
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1300
trigger1 = movehit = 1
trigger1 = AnimElem = 18,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 虎尾脚快速收招]
type = ChangeState
value = 1250
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1002
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1200
trigger1 = movehit
trigger1 = AnimElem = 6,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 蹲轻脚挥空]
type = ChangeState
value = 420
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1003
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1250
trigger1 = Animtime = 0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 前跑]
type = ChangeState
value = 102
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1004
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 420
trigger1 = AnimElem = 6,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 重转身翔]
type = ChangeState
value = 1110
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1005
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,50]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y)= [-35-floor(2*fvar(5)+(2*(2+1)/2)*fvar(20)),-1-floor(2*fvar(5)+(2*(2+1)/2)*fvar(20))]
trigger1 = stateno = 102
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 重转身翔-极限]
type = ChangeState
value = 1110
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1005
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 102
trigger1 = AnimElem = 1,>=16
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 重转身翔-版边]
type = ChangeState
value = 1110
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1005
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 235
trigger1 = AnimElem = 1,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 重连击蹴]
type = ChangeState
value = 1510
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1006
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1110
trigger1 = movehit
trigger1 = AnimElem = 18,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 鹰踏挥空]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 1007
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1520
trigger1 = movehit
trigger1 = AnimElem = 12,>=0
trigger1 =  1 || (var(35) := 0)
trigger1 =  1 || (var(36) := var(36)+1)
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;地面连段其二
;------------------------------------------------------------------------------

[State 0, 地面连段其二]
type = ChangeState
value = 1110
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
triggerall = random%3 = 0
trigger1 = (stateno = 215) || (stateno = 245)
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := 200)
ignorehitpause = 0
persistent = 0

[State 0, 重连击蹴]
type = ChangeState
value = 1510
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 200
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1110
trigger1 = movehit
trigger1 = AnimElem = 18,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 鹰踏挥空]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 201
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1520
trigger1 = movehit
trigger1 = AnimElem = 12,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 轻双掌迸]
type = ChangeState
value = 1300
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 202
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 235
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 疾风踢]
type = ChangeState
value = 1400
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 203
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1300
trigger1 = movehit
trigger1 = AnimElem = 20,>=2
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 连击蹴-速降]
type = ChangeState
value = 1500
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 204
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1440
trigger1 = movehit
trigger1 = AnimElem = 9,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 蹲重拳]
type = ChangeState
value = 412
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 205
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1530
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 重虎尾脚-版边]
type = ChangeState
value = 1210
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 205
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 235
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 发气掌]
type = ChangeState
value = 1010
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 206
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 412
trigger1 = AnimElem = 12,>=2
trigger1 =  1 || (var(35) := 0)
trigger1 =  1 || (var(36) := var(36)+1)
ignorehitpause = 0
persistent = 0

[State 0, 虎尾脚快速收招]
type = ChangeState
value = 1250
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 206
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1210
trigger1 = movehit
trigger1 = AnimElem = 6,>=0
trigger1 =  1 || (var(35) := 0)
trigger1 =  1 || (var(36) := var(36)+1)
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;地面连段其一
;------------------------------------------------------------------------------

[State 0, 地面连段其一]
type = ChangeState
value = 1300
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
triggerall = random%2 = 0
trigger1 = (stateno = 215) || (stateno = 245)
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := 100)
ignorehitpause = 0
persistent = 0

[State 0, 发气掌]
type = ChangeState
value = 1000
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 100
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 1300
trigger1 = movehit = 1
trigger1 = AnimElem = 10,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 前高影跳]
type = ChangeState
value = 35
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 101
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = Ctrl || (stateno = [19,22]) || (stateno = [100,101])
trigger1 = AnimElem = 1,>=0
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 碎头击]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 102
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = Ctrl || (stateno = 50)
trigger1 = AnimElem = 1,>=10
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 疾风踢]
type = ChangeState
value = 1400
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 103
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = (stateno = 215) || (stateno = 245)
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 轻连击蹴]
type = ChangeState
value = 1510
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 104
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1410
trigger1 = AnimElem = 12,>=2
trigger1 =  1 || (var(35) := var(35)+1)
ignorehitpause = 0
persistent = 0

[State 0, 鹰踏挥空]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 105
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1520
trigger1 = movehit
trigger1 = AnimElem = 12,>=0
trigger1 =  1 || (var(35) := 0)
trigger1 =  1 || (var(36) := var(36)+1)
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;发气掌
;------------------------------------------------------------------------------

[State 0, 发气掌]
type = ChangeState
value = 1000
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = (stateno = 210) || (stateno = 240)
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;空中抢招确认
;------------------------------------------------------------------------------

[State 0, 连击蹴]
type = ChangeState
value = 1500
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 620
trigger1 = movehit
trigger1 = AnimElem = 4,>=0
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;飞道命中确认
;------------------------------------------------------------------------------

[State 0, 疾风踢]
type = ChangeState
value = 1400
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X)) <= 120
trigger1 = ProjContactTime(1000) >= 2
trigger1 = ProjContactTime(1000) <= 35
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101])
trigger2 = stateno = 400
trigger2 = movehit = 1
trigger2 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;CD反击确认
;------------------------------------------------------------------------------

[State 0, 疾风踢]
type = ChangeState
value = 1400
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 780
trigger1 = movehit
trigger1 = AnimElem = 10,>=5
ignorehitpause = 0
persistent = 0

[State 0, 连击蹴-速降]
type = ChangeState
value = 1500
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1440
trigger1 = movehit
trigger1 = AnimElem = 9,>=0
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;升龙确认
;------------------------------------------------------------------------------

[State 0, 碎头击]
type = ChangeState
value = 625
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 1100
trigger1 = movehit
trigger1 = AnimElem = 10,>=2
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;拳脚连段
;------------------------------------------------------------------------------

[State 0, 蹲轻脚]
type = ChangeState
value = 420
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 400
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

[State 0, 站轻攻击]
type = ChangeState
value = cond(random%2=0,205,235)
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 420
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

[State 0, 站近轻脚]
type = ChangeState
value = 235
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
trigger1 = stateno = 420
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

[State 0, 站近重拳]
type = ChangeState
value = 215
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 205
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

[State 0, 站近重脚]
type = ChangeState
value = 245
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 235
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

[State 0, 站重拳]
type = ChangeState
value = 210
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 215
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

[State 0, 站远重脚]
type = ChangeState
value = 240
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 245
trigger1 = movehit = 1
trigger1 = AnimElem = 1,>=1
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;特殊取消
;------------------------------------------------------------------------------

[State 0, 落地后前跑]
type = ChangeState
value = 100
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != L
trigger1 = stateno = 1525
trigger1 = AnimElem = 1,>=2
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;针对空中的目押
;------------------------------------------------------------------------------

[State 0, 远重拳]
type = ChangeState
value = 210
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(35) = 0
triggerall = NumExplod(100210) <= 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
triggerall = Enemynear(var(58)),Vel Y >= 0.1
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,40]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y)= [-40-floor(9*fvar(5)+(9*(9+1)/2)*fvar(20)),-10-floor(9*fvar(5)+(9*(9+1)/2)*fvar(20))]
triggerall = (random%3 = 0) || (NumExplod(100235))
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101])
ignorehitpause = 0
persistent = 0

[State 0, 近轻脚]
type = ChangeState
value = 235
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = A
triggerall = Enemynear(var(58)),Vel Y >= 0.1
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,40]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y)= [-35-floor(6*fvar(5)+(6*(6+1)/2)*fvar(20)),-1-floor(6*fvar(5)+(6*(6+1)/2)*fvar(20))]
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101])
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;目押拳脚
;------------------------------------------------------------------------------

[State 0, 站轻攻击]
type = ChangeState
value = cond(random%2,205,235)
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = var(49) >= 6
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype = S
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,45]
trigger1 = random%3 = 1
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53])
ignorehitpause = 0
persistent = 0

[State 0, 蹲轻脚]
type = ChangeState
value = 420
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,45]
trigger1 = random%2 = 1
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101])
ignorehitpause = 0
persistent = 0

[State 0, 蹲轻拳]
type = ChangeState
value = 400
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != A
triggerall = Enemynear(var(58)),statetype != L
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,45]
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101])
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;超杀大放送
;------------------------------------------------------------------------------

[State -3,天翔乱姬]
type = ChangeState
value = 2100
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = NumExplod(102100) <= 0
triggerall = power >= 2000
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),Pos Y > -60
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X)) = [0,60]
triggerall = Enemynear(var(58)),stateno >= 0
triggerall = Enemynear(var(58)),stateno != 5120
triggerall = Enemynear(var(58)),movetype = A
triggerall = EnemyNear(var(58)),Ctrl = 0
triggerall = (EnemyNear(var(58)),Animtime <= -1) || (EnemyNear(var(58)),statetype = A)
triggerall = random%6 = 1
trigger1 = Ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101]) || (stateno = 120) || (stateno = [130,131]) || (stateno = 140)

;------------------------------------------------------------------------------
;AI试探
;------------------------------------------------------------------------------

[State -3,我管你这那的！]
type = ChangeState
value = 1100
triggerall = !ishelper
triggerall = (helper(40100),var(15) = 0)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = var(18) <= 0
triggerall = NumExplod(101100) <= 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X)) = [0,60]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y)= [-80-floor(2*fvar(5)+2*(2+1)/2*fvar(20)),0]
triggerall = EnemyNear(var(58)),Ctrl = 0
triggerall = EnemyNear(var(58)),movetype != I
triggerall = InGuardDist
trigger1 = Random <= 100
trigger1 = (EnemyNear(var(58)),StateNo = [0,1999])
trigger1 = ctrl || (stateno = [10,12]) || (StateNo = [19,22]) || (stateno = 120) || (stateno = [130,131]) || (stateno = 140)
trigger2 = ((Random <= 150) && (palno = [1,2])) || (palno = [3,4])
trigger2 = (EnemyNear(var(58)),StateNo = [1000,1999])
trigger2 = (stateno = [200,440])

[State -3,我管你这那的！]
type = ChangeState
value = 1100
triggerall = !ishelper
triggerall = (helper(40100),var(15) >= 1)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = var(18) <= 0
triggerall = NumExplod(101100) <= 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X)) = [0,60]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y)= [-80-floor(2*fvar(5)+2*(2+1)/2*fvar(20)),0]
triggerall = EnemyNear(var(58)),Ctrl = 0
triggerall = EnemyNear(var(58)),movetype != I
triggerall = EnemyNear(var(58)),statetype = A
triggerall = InGuardDist
trigger1 = Random <= 100
trigger1 = (EnemyNear(var(58)),StateNo = [0,1999])
trigger1 = ctrl || (stateno = [10,12]) || (StateNo = [19,22]) || (stateno = 120) || (stateno = [130,131]) || (stateno = 140)
trigger2 = (EnemyNear(var(58)),StateNo = [1000,1999])
trigger2 = (stateno = [200,440])

[State 0, 反击]
type = ChangeState
value = 80
triggerall = !ishelper
triggerall = (helper(40100),var(15) >= 1)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = NumExplod(80) <= 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-50,50]
triggerall = EnemyNear(var(58)),Pos Y > -60
triggerall = EnemyNear(var(58)),Ctrl = 0
triggerall = InGuardDist
triggerall = (EnemyNear(var(58)),time < 2)
triggerall = (EnemyNear(var(58)),StateNo = [0,1999])
trigger1 = Random <= (60+(palno*20))
trigger1 = ctrl || (stateno = [10,12]) || (StateNo = [19,22]) || (stateno = [100,101]) || (stateno = 120) || (stateno = [130,131]) || (stateno = 140) || (stateno = [700,710])
trigger2 = Random <= (60+(palno*20))
trigger2 = (stateno = [200,440])
trigger2 = time <= 6

;近身投-特殊
[State 0, 近身投-特殊]
type = ChangeState
value = 80
triggerall = !ishelper
triggerall = (helper(40100),var(15) >= 1)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = NumExplod(80) <= 0
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = stateno != 80
triggerall = EnemyNear(var(58)),statetype != L
triggerall = random <= (palno*200)
triggerall = EnemyNear(var(58)),Pos Y > -60
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-50,50]
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101]) || (stateno = 120) || (stateno = [130,131]) || (stateno = 140) || (stateno = [700,710])

;敌方意外受击
[State 0, 近身投-敌方意外受击]
type = ChangeState
value = 81
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = statetype != A
triggerall = RoundState = 2
triggerall = stateno != 81
triggerall = (EnemyNear(var(58)),stateno !=[120,155]) || (helper(40100),var(15) >= 1)
triggerall = EnemyNear(var(58)),movetype = H
triggerall = EnemyNear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),Pos Y > -60
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-50,50]
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101]) || (stateno = 120) || (stateno = [130,131]) || (stateno = 140) || (stateno = 700)

[State 0, 蹲轻拳]
type = ChangeState
value = 400
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = StateType != A
triggerall = RoundState = 2
triggerall = EnemyNear(var(58)),statetype != L
triggerall = EnemyNear(var(58)),statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,45]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y) >= 0
triggerall = EnemyNear(var(58)),facing = facing || !InGuardDist
triggerall = EnemyNear(var(58)),AnimTime <= -5
triggerall = (Prevstateno=[5000,5270]) || (Prevstateno=[120,159]) || (Prevstateno=700)
triggerall = EnemyNear(var(58)),ctrl = 0
triggerall = (EnemyNear(var(58)),stateno = [0,1999]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101])
trigger1 = random <= 700

[State 0, 站轻脚]
type = ChangeState
value = 235
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,50]
triggerall = EnemyNear(var(58)),movetype != H
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = (!InGuardDist) || (var(18) >= 8)
triggerall = (EnemyNear(var(58)),stateno = [0,1999]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101])
trigger1 = Random <= 150

[State 0, 蹲轻拳]
type = ChangeState
value = 400
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,50]
triggerall = EnemyNear(var(58)),movetype != H
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = (!InGuardDist) || (var(18) >= 8)
triggerall = (EnemyNear(var(58)),stateno = [0,1999]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101])
trigger1 = Random <= 150

[State 0, 蹲轻脚]
type = ChangeState
value = 420
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,50]
triggerall = EnemyNear(var(58)),movetype != H
triggerall = EnemyNear(var(58)),statetype != A
triggerall = EnemyNear(var(58)),statetype != L
triggerall = (!InGuardDist) || (var(18) >= 8)
triggerall = (EnemyNear(var(58)),stateno = [0,1999]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101])
trigger1 = Random <= 150

[State 0, 飞道进攻]
type = ChangeState
value = cond(random%2,1000,1010)
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = numprojID(1000) <= 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) >= 150) || ((facing*(EnemyNear(var(58)),Pos X - Pos X) >= 100) && (PrevStateNo = 710))
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y) >= -100
triggerall = EnemyNear(var(58)),movetype != H || (EnemyNear(var(58)),stateno = [120,160])
triggerall = EnemyNear(var(58)),statetype != L
triggerall = (!InGuardDist) 
triggerall = (EnemyNear(var(58)),stateno = [0,1999])
triggerall = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101])
trigger1 = Random <= 80

[State 0, 飞道之后]
type = ChangeState
value = 700
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = statetype != A
triggerall = Enemynear(var(58)),Alive
triggerall = Enemynear(var(58)),statetype != L
trigger1 = (stateno = 1000) || (stateno = 1010)
trigger1 = AnimELem = 12,>=0
ignorehitpause = 0
persistent = 0

;------------------------------------------------------------------------------
;空中拳脚立回
;------------------------------------------------------------------------------

[State 0, 跳轻脚]
type = ChangeState
value = 620
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = (var(18) <= 0)
triggerall = statetype = A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,55+floor(3*Vel X)]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y) = [-70-floor(3*fvar(5)+(3*(3+1)/2)*fvar(20)),-45-floor(3*fvar(5)+(3*(3+1)/2)*fvar(20))-fvar(6)]
triggerall = Enemynear(var(58)),Alive
triggerall = (EnemyNear(var(58)),movetype != H) || (EnemyNear(var(58)),stateno = [120,160]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = EnemyNear(var(58)),statetype != L
triggerall = (EnemyNear(var(58)),stateno = [0,1999]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = ctrl
Trigger1 = EnemyNear(var(58)),StateType = A && Random < 400
Trigger1 = Random <= 300
ignorehitpause = 0
persistent = 0

[State 0, 跳重脚]
type = ChangeState
value = 630
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = statetype = A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-60,85+floor(5*Vel X)]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y) = [-60-floor(5*fvar(5)+(5*(5+1)/2)*fvar(20)),-20-floor(5*fvar(5)+(5*(5+1)/2)*fvar(20))-fvar(6)]
triggerall = Enemynear(var(58)),Alive
triggerall = (EnemyNear(var(58)),movetype != H) || (EnemyNear(var(58)),stateno = [120,160]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = EnemyNear(var(58)),statetype != L
triggerall = (EnemyNear(var(58)),stateno = [0,1999]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = ctrl
Trigger1 = EnemyNear(var(58)),StateType != A
Trigger1 = Random < 200
Trigger2 = EnemyNear(var(58)),StateType = A && Random < 400
Trigger2 = Random <= 300
Trigger3 = Vel Y >= 0.1
Trigger3 = Pos Y >= (8*Vel Y+(8*(8+1)/2)*0.56)
Trigger3 = Pos Y <= (5*Vel Y+(5*(5+1)/2)*0.56)
ignorehitpause = 0
persistent = 0

[State 0, 极限跳重脚]
type = ChangeState
value = 630
triggerall = !Ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = statetype = A
triggerall = Enemynear(var(58)),Alive
triggerall = (EnemyNear(var(58)),movetype != H) || (EnemyNear(var(58)),stateno = [120,160]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = EnemyNear(var(58)),statetype != L
triggerall = (EnemyNear(var(58)),stateno = [0,1999]) || (EnemyNear(var(58)),stateno = [5000,5300])
triggerall = ctrl
Trigger1 = Vel Y >= 0.1
Trigger1 = Pos Y >= -ceil(8*Vel Y+(8*(8+1)/2)*0.56)
Trigger1 = Pos Y <= -ceil(5*Vel Y+(5*(5+1)/2)*0.56)
ignorehitpause = 0
persistent = 0

;-----------------------------------------------------------------------------
; AI跳跃

[State 0, 前小跳]
Type = ChangeState
value = 31
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = RoundState = 2
triggerall = Random <= 50 || ((var(18) >= 30) && random <= 600)
triggerall = StateType != A
triggerall = (!inguarddist) || (var(18) >= 30)
triggerall = enemynear(var(58)),StateNo!=[5000,5120]
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),StateType != L
triggerall = ctrl || (stateno = [19,20]) || (stateno = [100,101])
trigger1 =(Facing*(EnemyNear(var(58)),Pos x-Pos x)-30) = [20,90]
trigger1 = enemynear(var(58)),statetype != A || (var(18) >= 30)

[State 0, 前低空远跳]
Type = ChangeState
value = 33
triggerall = !ishelper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = RoundState = 2
triggerall = Random <= 80  || ((var(18) >= 30) && random <= 600)
triggerall = StateType != A
triggerall = (!inguarddist) || (var(18) >= 30)
triggerall = enemynear(var(58)),StateNo!=[5000,5120]
triggerall = enemynear(var(58)),movetype != H
triggerall = enemynear(var(58)),StateType != L
triggerall = ctrl || (stateno = [19,20]) || (stateno = [100,101]) || (stateno = [120,149])
trigger1 =(Facing*(EnemyNear(var(58)),Pos x-Pos x)-30) = [90,120]
trigger1 = (enemynear(var(58)),statetype != A) || (var(18) >= 30)

;------------------------------------------------------------------------------
;AI打防压制
;------------------------------------------------------------------------------

[State 0, 站近轻脚]
type = ChangeState
value = 235
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = var(49) >= 6
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,50]
triggerall = EnemyNear(var(58)),movetype = H
triggerall = (EnemyNear(var(58)),stateno = [120,155])
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22])

[State 0, 蹲轻脚]
type = ChangeState
value = 420
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = var(49) >= 4
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-20,50]
triggerall = EnemyNear(var(58)),movetype = H
triggerall = (EnemyNear(var(58)),stateno = [120,155])
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22])

[State 0, 站近轻脚]
type = ChangeState
value = 235
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),movetype = H
triggerall = (EnemyNear(var(58)),stateno = [120,155])
trigger1 = (stateno = 200) || (stateno = 400)
trigger1 = MoveContact = 1
trigger1 = AnimElem = 1,>=1

[State 0, 站轻脚]
type = ChangeState
value = 230
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),movetype = H
triggerall = (EnemyNear(var(58)),stateno = [120,155])
trigger1 = (stateno = 235) || (stateno = 420)
trigger1 = MoveContact = 1
trigger1 = AnimElem = 1,>=1

[State 0, 重击压制]
type = ChangeState
value = cond(random%2,210,240)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),movetype = H
triggerall = (EnemyNear(var(58)),stateno = [120,155])
trigger1 = (stateno = 230)
trigger1 = MoveContact = 1
trigger1 = AnimElem = 1,>=1

[State 0, 疾风踢压制]
type = ChangeState
value = 1400
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),movetype = H
triggerall = (EnemyNear(var(58)),stateno = [120,155])
triggerall = random%3 = 0
trigger1 = (stateno = 210) || (stateno = 240)
trigger1 = MoveContact
trigger1 = AnimElem = 8,>=0

[State 0, 压制抉择]
type = ChangeState
value = cond(random%2,31,cond(var(42)>=160,34,cond(var(42)<=100,700,710)))
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),movetype = H
triggerall = (EnemyNear(var(58)),stateno = [120,155])
trigger1 = (stateno = 210) || (stateno = 240)
trigger1 = MoveContact
trigger1 = AnimElem = 8,>=0

[State 0, 连击蹴压制]
type = ChangeState
value = 1510
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = EnemyNear(var(58)),movetype = H
triggerall = (EnemyNear(var(58)),stateno = [120,155])
triggerall = random%2 = 0
trigger1 = (stateno = 630)
trigger1 = MoveContact
trigger1 = AnimElem = 8,=0

;------------------------------------------------------------------------------
;AI的防御部分
;------------------------------------------------------------------------------

;压起身-跳
[State 0, 跳压起身]
type = ChangeState
value = 31
triggerall = !ishelper;这不是helper
triggerall = palno <= 2
triggerall = (helper(40100),var(15) = 0)
triggerall = var(59) >= 1
triggerall = statetype != A
triggerall = EnemyNear(var(58)),stateno = 5120
triggerall = EnemyNear(var(58)),animtime = -12
triggerall = RoundState = 2 && enemynear(var(58)),life > 0 
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-50,80]
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101]) || (stateno = 120) || (stateno = [130,131]) || (stateno = 140)

[State 0, 跳压制]
type = ChangeState
value = cond(random%2,630,625)
triggerall = !ishelper;这不是helper
triggerall = palno <= 2
triggerall = (helper(40100),var(15) = 0)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = RoundState = 2
triggerall = statetype = A
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-25,42+floor(5*Vel X)]
triggerall = (EnemyNear(var(58)),Pos Y - Pos Y) = [-60-floor(5*fvar(5)+(5*(5+1)/2)*fvar(20)),-20-floor(5*fvar(5)+(5*(5+1)/2)*fvar(20))-fvar(6)]
triggerall = Enemynear(var(58)),Alive
triggerall = EnemyNear(var(58)),stateno = 5120
triggerall = EnemyNear(var(58)),animtime >= -2
trigger1 = Ctrl
ignorehitpause = 0
persistent = 0

;尝试压起身
[State 0, 压起身]
type = ChangeState
value = 81
triggerall = !ishelper;这不是helper
triggerall = (helper(40100),var(15) >= 1)
triggerall = var(59) >= 1
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = EnemyNear(var(58)),stateno = 5120
triggerall = EnemyNear(var(58)),animtime >= -1
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X) - 15) = [-25,80]
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101]) || (stateno = 120) || (stateno = [130,131]) || (stateno = 140)

;遇到投闪避
[State 0, 遇到投闪避]
type = changestate
value = 700
triggerall = !ishelper;这不是helper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2;在对局中
triggerall = stateno != 700
triggerall = Statetype != A;自己不在空中
triggerall = (EnemyNear(var(58)),hitdefattr = S,AT,ST,NT) || (EnemyNear(var(58)),hitdefattr = C,AT,ST,NT) || (EnemyNear(var(58)),hitdefattr = A,AT,ST,NT);对方攻击为投技
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101])  || (stateno = [120,160]) 

;起身闪反
[State 0, 起身闪反]
type = ChangeState
value = cond(random%2=0,cond(var(41) < 100,710,700),cond((helper(40100),var(15) >= 1),81,cond(var(41) < 100,710,700)))
triggerall = !ishelper;这不是helper
triggerall = var(59) >= 1
triggerall = roundstate = 2
triggerall = InGuardDist
triggerall = EnemyNear(var(58)),Ctrl = 0
triggerall = EnemyNear(var(58)),StateType != L
triggerall = (facing*(EnemyNear(var(58)),Pos X - Pos X)) = [-90,90]
triggerall = (random%5 = 0) || ((palno >= 3) && (random%3 = 0)) || (palno >= 4) || (helper(40100),var(15) >= 1)
trigger1 = stateno = 5120 && Animtime = 0

;起身闪避
[State 0, 起身闪避]
type = ChangeState
value = cond(var(41) < 100,710,700)
triggerall = !ishelper;这不是helper
triggerall = var(59) >= 1
triggerall = roundstate = 2
triggerall = EnemyNear(var(58)),StateType != L
triggerall = EnemyNear(var(58)),Time >= 1
triggerall = (random%3 = 0) || (palno >= 3) || (helper(40100),var(15) >= 1)
trigger1 = stateno = 5120 && Animtime = 0

[State 0, 应对弹幕]
type = ChangeState
value = cond(((random%3 = [0,1]) && (facing*(EnemyNear(var(58)),Pos X - Pos X) <= 80)),120,700)
triggerall = (palno = [1,2])
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = var(18) <= 0
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = Alive
triggerall = EnemyNear(var(58)),NumProj > 0
triggerall = InGuardDist || Helper(25000+ID),InGuardDist
triggerall = (EnemyNear(var(58)),movetype = A)  || (EnemyNear(var(58)),movetype = I)
triggerall = EnemyNear(var(58)),ctrl = 0
triggerall = EnemyNear(var(58)),stateno < 2000
trigger1 = Ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101]) || (stateno = [120,140])

[State 0, 应对弹幕02]
type = ChangeState
value = 700
triggerall = (palno >= 3)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = var(18) <= 0
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = Alive
triggerall = EnemyNear(var(58)),NumProj > 0
triggerall = InGuardDist || Helper(25000+ID),InGuardDist
triggerall = (EnemyNear(var(58)),movetype = A)  || (EnemyNear(var(58)),movetype = I)
triggerall = EnemyNear(var(58)),ctrl = 0
triggerall = EnemyNear(var(58)),stateno < 2000
trigger1 = Ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [100,101]) || (stateno = [120,140])

;压制中应对反击
[State 0, 闪避]
type = ChangeState
value = cond(random%2,700,710)
triggerall = !ishelper;这不是helper
triggerall = (palno >= 3) || (helper(40100),var(15) >= 1)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = EnemyNear(var(58)),stateno > 155
triggerall = EnemyNear(var(58)),stateno != [120,155]
triggerall = EnemyNear(var(58)),PrevStateNo != 120
triggerall = EnemyNear(var(58)),PrevStateNo != 140
triggerall = EnemyNear(var(58)),PrevStateNo = [120,155]
triggerall = EnemyNear(var(58)),StateType != L
trigger1 = (StateNo = [200,440])
trigger1 = (MoveGuarded) || ((!MoveContact) && (time <= 6))
ignorehitpause = 1
persistent = 0

;攻击挥空后撤
[State 0, 后撤]
type = ChangeState
value = 710
triggerall = !ishelper;这不是helper
triggerall = (palno <= 3) && (helper(40100),var(15) = 0)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = EnemyNear(var(58)),StateType != L
trigger1 = (StateNo = [200,440])
trigger1 = !MoveContact
trigger1 = animtime = 0

;攻击挥空后撤
[State 0, 后撤]
type = ChangeState
value = cond(random%2,700,81)
triggerall = !ishelper;这不是helper
triggerall = (palno >= 4) || (helper(40100),var(15) >= 1)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = EnemyNear(var(58)),StateType != L
trigger1 = (StateNo = [200,440])
trigger1 = !MoveContact
trigger1 = animtime = 0

;空震闪避超杀
[State 0, 闪避超杀]
type = changestate
value = cond(random%2,700,710)
triggerall = !ishelper;这不是helper
triggerall = (helper(40100),var(15) >= 1)
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = roundstate = 2;在对局中
triggerall = Statetype != A;自己不在空中
triggerall = EnemyNear(var(58)),ctrl = 0
triggerall = EnemyNear(var(58)),StateType != L
triggerall = ctrl  || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = [100,101]) || (StateNo = [120,160]) || (StateNo = [200,440])
trigger1 = random <= 100
trigger1 = EnemyNear(var(58)),stateno >= 2000
trigger1 = EnemyNear(var(58)), facing != facing
ignorehitpause = 0
persistent = 0

;紧急闪避
[State 0, 紧急闪避]
type = changestate
value = cond(random%2,700,710)
triggerall = (palno >= 3) || (helper(40100),var(15) >= 1)
triggerall = !ishelper;这不是helper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = var(18) = 0
triggerall = roundstate = 2;在对局中
triggerall = Statetype != A;自己不在空中
triggerall = EnemyNear(var(58)),ctrl = 0
triggerall = (stateno = [150,153]) && time = [0,1]
trigger1 = random <= 100
trigger1 = EnemyNear(var(58)),movetype = A;对方处于攻击状态
trigger2 = EnemyNear(var(58)),stateno >= 2000
trigger2 = EnemyNear(var(58)), facing != facing

;防御反击
[State 0, 防御反击]
type = changestate
value = cond((facing*(EnemyNear(var(58)),Pos X - Pos X) <= 80),cond(palno<=2,cond(random%2,710,780),780),700)
triggerall = !ishelper;这不是helper
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = var(18) = 0
triggerall = helper(40100),var(18) >= 240
triggerall = (power >= 500) || (palno >= 3) || (helper(40100),var(15) >= 1)
triggerall = roundstate = 2;在对局中
triggerall = Statetype != A;自己不在空中
triggerall = EnemyNear(var(58)),ctrl = 0
triggerall = stateno = [150,153]
trigger1 = EnemyNear(var(58)),movetype = A;对方处于攻击状态

;------------------------------------------------------------------------------
;防御

[State -3, 防御]
type = ChangeState
value = cond((facing*(EnemyNear(var(58)),Pos X - Pos X) <= 80),120,700)
triggerall = !ishelper;不是helper
triggerall = alive != 0
triggerall = var(59) >= 1
triggerall = var(18) <= 0
triggerall = (statetype != A)
triggerall = Stateno != [120,160]
triggerall = Ctrl || (StateNo = [10,12]) || (StateNo = [19,22]) || (stateno = [52,53]) || (stateno = [100,101])
trigger1 = inguarddist
trigger1 = Random <= 300 && Random <= 600 || var(59) > 1
trigger2 = inguarddist
trigger2 =(Facing*(EnemyNear(var(58)),Pos x-Pos x)-30) > 90 || enemynear(var(58)),time > 50
trigger2 = Random <= 300
trigger3 = inguarddist
trigger3 = enemynear(var(58)),numhelper > 0 || enemy,numproj > 0
trigger4 = enemynear(var(58)),movetype = A
trigger4 = !enemynear(var(58)),hitdefattr = SCA, NT, ST, HT
trigger4 = numenemy >= 2 || stateno != 100
trigger4 =(Facing*(EnemyNear(var(58)),Pos x-Pos x)-30) < 0
trigger4 =(Facing*(EnemyNear(var(58)),Pos x-Pos x)) > 0 ||(Facing*(EnemyNear(var(58)),Pos x-Pos x)) < 0
trigger5 = inguarddist
trigger5 = numenemy > 1
trigger5 = enemy(0),numhelper+enemy(1),numhelper > 0 || enemy(0),numproj+enemy(1),numproj > 0
trigger6 = numhelper(31000+id)
trigger6 = helper(31000+id),inguarddist
trigger6 = !enemynear(var(58)),hitdefattr = SCA, NT, ST, HT
trigger7 = InGuardDist || Helper(25000+ID),InGuardDist && EnemyNear(var(58)),facing != facing
trigger8 = InGuardDist
trigger8 = Abs(EnemyNear(var(58)),Pos X - Pos X) > 90 || EnemyNear(var(58)),Time >= 0
trigger9 = EnemyNear(var(58)),facing = facing ||(Facing*(EnemyNear(var(58)),Pos x-Pos x)) < 0
trigger9 = Helper(20000+ID),InGuardDist && EnemyNear(var(58)),StateType = A
Trigger10 = helper(998),inguarddist
Trigger10 = !enemynear(var(58)),hitdefattr = SCA, NT, ST, HT
Trigger10 = enemynear(var(58)),animtime < -3
Trigger11 = helper(999),inguarddist
Trigger11 = !enemynear(var(58)),hitdefattr = SCA, NT, ST, HT
Trigger11 = enemynear(var(58)),animtime < -3

;------------------------------------------------------------------------------
;移动部分
;------------------------------------------------------------------------------

;前跑
[State -3, 移动]
type = ChangeState
triggerall = !ishelper;不是helper
triggerall = alive
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = stateno != 100
triggerall = !inguarddist
triggerall = (EnemyNear(var(58)),movetype != A) || ((EnemyNear(var(58)),facing = facing) && facing*(EnemyNear(var(58)),pos x-pos x)-65 > 0)
triggerall = EnemyNear(var(58)),StateType != L
triggerall = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53]) || (stateno = 120) || (stateno = 140)
trigger1 = (Facing*(EnemyNear(var(58)),Pos x-Pos x)-15) >= 240
trigger1 = Random <= 240
trigger2 = (Facing*(EnemyNear(var(58)),Pos x-Pos x)-15) = [100,240]
trigger2 = Random <= 100
trigger3 = (Facing*(EnemyNear(var(58)),Pos x-Pos x)-15) = [60,100]
trigger3 = Random <= 80
trigger4 = EnemyNear(var(58)),ctrl = 0
trigger4 = EnemyNear(var(58)),stateno > 120
trigger4 = Facing*(EnemyNear(var(58)),Pos x-Pos x) >= 60
value = 100

;连段时前跑
[State -3, 前跑]
type = ChangeState
triggerall = !ishelper;不是helper
triggerall = alive
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = RoundState = 2
triggerall = statetype != A
triggerall = stateno != 100
triggerall = !inguarddist
triggerall = enemynear(var(58)),StateType != L
triggerall = EnemyNear(var(58)),stateno != 24935
triggerall = EnemyNear(var(58)),stateno != 24940
triggerall = ctrl || (stateno = [10,12]) || (stateno = [19,22]) || (stateno = [52,53])
trigger1 = (Facing*(EnemyNear(var(58)),Pos x-Pos x)-15) > 40
value = 100

;通常移动
[State -3, 移动]
type = ChangeState
triggerall = !ishelper;不是helper
triggerall = alive
triggerall = var(59) >= 1
triggerall = var(50) = 0
triggerall = RoundState = 2
triggerall = StateType != A
triggerall = stateno != 19
triggerall = !inguarddist
triggerall = enemynear(var(58)),movetype != A
triggerall = enemynear(var(58)),StateType != L
triggerall = enemynear(var(58)),StateNo != [5120,5299]
triggerall = ctrl || (stateno = [10,12]) || (stateno = [20,22])
triggerall =!InGuardDist || enemynear(var(58)),facing = facing
trigger1 = var(40) = 1
trigger2 = var(40) = 2
value = 19

;连段用移动
[State -3, 移动]
type = ChangeState
triggerall = !ishelper;不是helper
triggerall = alive
triggerall = var(59) >= 1
triggerall = var(50) > 0
triggerall = RoundState = 2
triggerall = StateType != A
triggerall = enemynear(var(58)),StateType != L
triggerall = enemynear(var(58)),StateNo != [5120,5299]
triggerall = stateno != 21
triggerall = ctrl || (stateno = [10,12]) || (stateno = [19,22])
trigger1 = (Facing*(EnemyNear(var(58)),Pos x-Pos x)-15) > 50
trigger1 = !InGuardDist
value = 21

;对方倒地时跑动
[State -3,跑动]
type = changestate
triggerall = !ishelper;不是helper
triggerall = alive
triggerall = var(59) >= 1;ai启动
triggerall = roundstate = 2;在对局中
triggerall = statetype != a;自己不在空中
triggerall = stateno != 100;自己不在100状态号中
triggerall = !inguarddist;自己不在防御范围
triggerall = EnemyNear(var(58)),stateno != 5120
triggerall = EnemyNear(var(58)),statetype = L ;对方在倒地状态
trigger1 = (EnemyNear(var(58)),pos x - pos x)*facing >= 120;与对方的绝对值距离大于等于120
trigger1 = ctrl || (stateno = [10,12]) || (stateno = [21,22]) || (stateno = [52,53]) || (stateno = [120,149])
value = 100

;对方倒地时移动
[State -3,移动]
type = changestate
triggerall = !ishelper;不是helper
triggerall = alive
triggerall = var(59) >= 1;ai启动
triggerall = roundstate = 2;在对局中
triggerall = statetype != a;自己不在空中
triggerall = stateno != 22;自己不在22状态号中
triggerall = !inguarddist;自己不在防御范围
triggerall = EnemyNear(var(58)),stateno != 5120
triggerall = EnemyNear(var(58)),statetype = L ;对方在倒地状态
trigger1 = (EnemyNear(var(58)),pos x - pos x)*facing > 65;与对方的绝对值距离大于等于65
trigger1 = ctrl  || (stateno = [10,12]) || (stateno = [20,21])
value = 22

;对方起身时移动2
[State -3,移动2]
type = changestate
triggerall = !ishelper;不是helper
triggerall = alive
triggerall = var(59) >= 1;ai启动
triggerall = roundstate = 2;在对局中
triggerall = statetype != a;自己不在空中
triggerall = stateno != 22;自己不在22状态号中
triggerall = !inguarddist;自己不在防御范围
triggerall = EnemyNear(var(58)),stateno = 5120
triggerall = ctrl || (stateno = [10,12]) || (stateno = [20,21])
trigger1 = (EnemyNear(var(58)),pos x - pos x)*facing < 65;与对方的绝对值距离小于65
trigger2 = (EnemyNear(var(58)),pos x - pos x)*facing > 75;与对方的绝对值距离大于75
value = 22
