;---------------------------------------------------------------------------
;分身（→快）
[Statedef 725]
type    = U                      ;状态: S-站立, C-蹲, A-空中, L-倒地
movetype= I                      ;招式种类: A-攻击, I-非攻击, H-受击
physics = N                      ;物理: S-站立, C-蹲, A-空中
velset = 3,0                 ;设定速度 (x,y) (不写这行则不改变速度)
ctrl = 0                         ;设定可控与否 (不写这行则不改变ctrl)
;anim = 725             ;改变动作 (不写这行则不改变anim)
poweradd = 0                    ;增加气 (不写这行则不增加气)
sprpriority = 2                  ;设定p1的贴图优先度到2 (在前面)

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Root,StateNo = 3055
flag = noshadow
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Root,StateNo = 3055
value = 1
scale = .75,.75

[state -2]
type = NotHitBy
Trigger1 = 1
value = SCA,AA,AP,AT
time = 5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value=root,var(7)
elem=root,var(8)

[State 0, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-16*time,0+16*time

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 16
;---------------------------------------------------------------------------
;分身（←快）
[Statedef 726]
type    = U                      ;状态: S-站立, C-蹲, A-空中, L-倒地
movetype= I                      ;招式种类: A-攻击, I-非攻击, H-受击
physics = N                      ;物理: S-站立, C-蹲, A-空中
velset = -3,0                 ;设定速度 (x,y) (不写这行则不改变速度)
ctrl = 0                         ;设定可控与否 (不写这行则不改变ctrl)
;anim = 725             ;改变动作 (不写这行则不改变anim)
poweradd = 0                    ;增加气 (不写这行则不增加气)
sprpriority = 2                  ;设定p1的贴图优先度到2 (在前面)

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Root,StateNo = 3055
flag = noshadow
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Root,StateNo = 3055
value = 1
scale = .75,.75

[state -2]
type = NotHitBy
Trigger1 = 1
value = SCA,AA,AP,AT
time = 5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value=root,var(7)
elem=root,var(8)

[State 0, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-16*time,0+16*time

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 16
;---------------------------------------------------------------------------
;分身（原地）
[Statedef 727]
type    = U                      ;状态: S-站立, C-蹲, A-空中, L-倒地
movetype= I                      ;招式种类: A-攻击, I-非攻击, H-受击
physics = N                      ;物理: S-站立, C-蹲, A-空中
velset = 0,0                 ;设定速度 (x,y) (不写这行则不改变速度)
ctrl = 0                         ;设定可控与否 (不写这行则不改变ctrl)
;anim = 725             ;改变动作 (不写这行则不改变anim)
poweradd = 0                    ;增加气 (不写这行则不增加气)
sprpriority = 4                  ;设定p1的贴图优先度到2 (在前面)

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Root,StateNo = 3055
flag = noshadow
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Root,StateNo = 3055
value = 1
scale = .75,.75

[state -2]
type = NotHitBy
Trigger1 = 1
value = SCA,AA,AP,AT
time = 5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value=root,var(7)
elem=root,var(8)

[State 0, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-16*time,0+16*time

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 16
;---------------------------------------------------------------------------
;分身（←慢）
[Statedef 728]
type    = U                      ;状态: S-站立, C-蹲, A-空中, L-倒地
movetype= I                      ;招式种类: A-攻击, I-非攻击, H-受击
physics = N                      ;物理: S-站立, C-蹲, A-空中
velset = -1.5,0                 ;设定速度 (x,y) (不写这行则不改变速度)
ctrl = 0                         ;设定可控与否 (不写这行则不改变ctrl)
;anim = 725             ;改变动作 (不写这行则不改变anim)
poweradd = 0                    ;增加气 (不写这行则不增加气)
sprpriority = 3                  ;设定p1的贴图优先度到2 (在前面)

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Root,StateNo = 3055
flag = noshadow
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Root,StateNo = 3055
value = 1
scale = .75,.75

[state -2]
type = NotHitBy
Trigger1 = 1
value = SCA,AA,AP,AT
time = 5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value=root,var(7)
elem=root,var(8)

[State 0, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-16*time,0+16*time

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 16
;---------------------------------------------------------------------------
;分身（→慢）
[Statedef 729]
type    = U                      ;状态: S-站立, C-蹲, A-空中, L-倒地
movetype= I                      ;招式种类: A-攻击, I-非攻击, H-受击
physics = N                      ;物理: S-站立, C-蹲, A-空中
velset = 1.5,0                 ;设定速度 (x,y) (不写这行则不改变速度)
ctrl = 0                         ;设定可控与否 (不写这行则不改变ctrl)
;anim = 725             ;改变动作 (不写这行则不改变anim)
poweradd = 0                    ;增加气 (不写这行则不增加气)
sprpriority = 3                  ;设定p1的贴图优先度到2 (在前面)

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Root,StateNo = 3055
flag = noshadow
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Root,StateNo = 3055
value = 1
scale = .75,.75

[state -2]
type = NotHitBy
Trigger1 = 1
value = SCA,AA,AP,AT
time = 5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value=root,var(7)
elem=root,var(8)

[State 0, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-16*time,0+16*time

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 16
;---------------------------------------------------------------------------------
;电子飘散
[Statedef 7015]
type = U
movetype = i
sprpriority = 3
juggle = 0
velset = 0,0
anim = 999

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = EnemyNear,pos x-facing
y = EnemyNear,pos y
ignorehitpause = 1

[State 0, Turn]
type = Turn
trigger1 = facing != EnemyNear,facing
ignorehitpause = 1

[State 0, Turn]
type = Turn
trigger1 = facing = EnemyNear,facing
ignorehitpause = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
[State 0, PlaySnd]
type = PlaySnd
triggerall = p2movetype = H
trigger1 = random<50
value = S15,0+random%6
volumescale = 75

[State -2, Helper]
type = Helper
triggerall = p2movetype = H
trigger1 = time%4 = 0
name = "粒子1"
stateno = 7016
pos = 40-random%80,0-random%100
postype = p2
facing = 1
ignorehitpause = 1 
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647
[State -2, Helper]
type = Helper
triggerall = p2movetype = H
trigger1 = time%4 = 0
name = "粒子2"
stateno = 7017
pos = 40-random%80,0-random%100
postype = p2
facing = 1
ignorehitpause = 1 
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 30
ignorehitpause = 1
;---------------------------------------------------------------------------------
;粒子组件1
[Statedef 7016]
type     = U
movetype = I
physics  = N
sprpriority = 9
juggle = 0
velset = 0,0
anim = 7093

[State 0, VarRandom]
type = VarRandom
trigger1 = !time
v = 5
range = 0,10

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = ifelse(random%2,var(5)*0.05,-var(5)*0.05)
y = -var(5)*0.1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 1*time
scale = 0.1-(0.1/28)*time,0.1-(0.1/28)*time

[state -2]
Type = AssertSpecial
Trigger1 = 1
flag = Noshadow
ignorehitpause = 1

[State 透明]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State -2]
type = AfterImage
Trigger1 = !time
time = -1
trans = add
timegap = 1
framegap = 1
length = 11
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
ignorehitpause = 1
;---------------------------------------------------------------------------------
;粒子组件2
[Statedef 7017]
type     = U
movetype = I
physics  = N
sprpriority = 9
juggle = 0
velset = 0,0
anim = 7094

[State 0, VarRandom]
type = VarRandom
trigger1 = !time
v = 5
range = 0,10

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = ifelse(random%2,var(5)*0.05,-var(5)*0.05)
y = -var(5)*0.1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 1*time
scale = 0.1-(0.1/45)*time,0.1-(0.1/45)*time

[state -2]
Type = AssertSpecial
Trigger1 = 1
flag = Noshadow
ignorehitpause = 1

[State 透明]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State -2]
type = AfterImage
Trigger1 = !time
time = -1
trans = add
timegap = 1
framegap = 1
length = 11
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
ignorehitpause = 1
;----------------------------------------------------------------------------
;(HELPER)背景闪灰
[Statedef 8100]
type = U
ctrl = 0
anim = 999
velset = 0,0
movetype = I
physics = N
sprpriority = 0

;---------------------[曄悢]
[state varset]
type = varset
trigger1 = time = 0
var(1) = 0

[state varadd]
type = varadd
trigger1 = time < 8
var(1) = 32

[state varadd]
type = varadd
trigger1 = time > 40
var(1) = -8

;---------------------[墘弌]
[state bgpalfx]
type = bgpalfx
trigger1 = 1
time = 1
add = 0,0,0
invertall = 0
color = 256 - var(1)

;---------------------[徚嫀]
[state destroyself]
type = destroyself
trigger1 = time = 71
;----------------------------------------------------------------------------
;(HELPER)变暗
[Statedef 8200]
type = U
ctrl = 0
anim = 10060
velset = 0,0
movetype = I
physics = N
sprpriority = -99999

[State 0, Trans]
type = Trans
trigger1 = Animelem = 2,>=0
trans = addalpha
alpha = 0,0+21*(time-40)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 1
scale = 10,10

[State 0, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
;---------------------------------------------------------------------------
;打击（斜上超大）
[Statedef 8542]
type    = U                      ;状态: S-站立, C-蹲, A-空中, L-倒地
movetype= I                      ;招式种类: A-攻击, I-非攻击, H-受击
physics = N                      ;物理: S-站立, C-蹲, A-空中
velset = 0,0                 ;设定速度 (x,y) (不写这行则不改变速度)
ctrl = 0                         ;设定可控与否 (不写这行则不改变ctrl)
anim = 7017             ;改变动作 (不写这行则不改变anim)
poweradd = 0                    ;增加气 (不写这行则不增加气)
sprpriority = 30                  ;设定p1的贴图优先度到2 (在前面)

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Noshadow
ignorehitpause = 1

[State 透明]
type = Trans
trigger1 = 1
trans = addalpha ;none, add, addalpha, add1, sub
alpha = 256,256

[State 601, 大小]
type = AngleDraw
trigger1 = 1
scale = .1,.5
value = 45

[State -2]
type = AfterImage
Trigger1 = time = 0
time = -1
trans = add
timegap = 1
framegap = 1
length = 4
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
ignorehitpause = 1

[State -2]
Type = Explod
trigger1 = time = 0
anim = 7001
sprpriority = 20
posType = p1
pos = 0,0
scale = .5,.5
bindTime = 1
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Animtime = 0

;---------------------
;连击修正
;---------------------
[Statedef 9999]
type = A
ctrl = 0
anim = 9999
velset = 0,0
movetype = I
physics = N
sprpriority = 10

[State 断言]
type = AssertSpecial ;这里让玩家无法看见helper
Trigger1 = 1
flag = NoShadow ;无影子
flag2 = invisible ;不可视

[State 无敌]
type = NotHitBy ;为了保证helper在战斗中不受某些类似AOE的影响，给helper写上无敌作为保险项
Trigger1 = 1
value = SCA

[State 間違いで本体が来たら立ちへ移行]
type = SelfState ;当这个statedef不是helper时转到0，并在statedef 0内写上destroyself，一会给出例子
trigger1 =!ishelper
value = 0

[State 转向]
type = Turn ;转向，其实没什么太大意义
trigger1 = Facing*ifelse((EnemyNear,Pos X-Pos X)>=0,1,-1) < 0
IgnoreHitPause = 1

[state a];修正
type = varset
trigger1 = parent,numtarget
trigger1 = enemy,movetype = H
trigger1 = enemy,gethitvar(hitcount) > 1
fvar(0) = ((100.0-(25.0+(enemy,gethitvar(hitcount)/2.0)*5.0))/100.0)

[state a];修正
type = varset
trigger1 = fvar(0) <= 0
fvar(0) = .5

[state -2, 伤害修正]
type = varset
triggerall = parent,palno = [1,12]
trigger1 = 1
fvar(15) = fvar(0)

[state -2, 伤害最低修正]
type = varset
triggerall = fvar(15)<0.5
trigger1 = 1
fvar(15) = 0.1

[state a]
type = removeexplod
trigger1 = RoundState > 2
id = 9999
