; 功夫人的中文化cns文档。
; 由MKII翻译。

; 这篇文章里有很多注释，对cns的学习有一定的参考作用
;
; 注意：
; p1指玩家，p2指敌人
; y坐标（纵向）里，负数指向上，正数指向下，0为地平线
; 不区分大小写

[Data]
;起始HP
life = 1200

;攻击力（数值高更强）
attack = 130

;防御力（数值高更强）
defence = 100

;最高气槽值
power = 5000

;倒地时增加防御力百分比
fall.defence_up = 50

;倒地后爬起需要的时间
liedown.time = 60

;Juggle点数
airjuggle = 15

;默认的打击火花号
sparkno = 2

;默认的防御火花号
guard.sparkno = 40

;设为1的话KO时会有回音
KO.echo = 0

;音量调节 (负数声音减小)
volume = 0

;变量号大于以下数值的变量在局与局之间不会被清零。整数变量一共有60个，变量号为0至59。
;此外还有40个浮点变量，变量号为0至39.如果不写以下两行，那么所有的变量都会被清零。
;另外，你需要改变common1.cns里的state 5900来决定每一场之间清零与否。
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1           ;横向缩放比例
yscale = 1           ;纵向缩放比例
ground.back = 15     ;人物宽度 (地面上，中心到后方距离)
ground.front = 16    ;人物宽度 (地面上，中心到前方距离)
air.back = 12        ;人物宽度 (空中，中心到后方距离)
air.front = 12       ;人物宽度 (空中，中心到前方距离)
height = 60          ;人物高度(对手需要跳多高才能跳过)
attack.dist = 160    ;默认攻击距离
proj.attack.dist = 90 ;默认飞行道具攻击距离
proj.doscale = 0     ;如果值为1，则缩放飞行道具
head.pos = -5, -90   ;头部的大概位置
mid.pos = -5, -60    ;身体中部的大概位置
shadowoffset = 0     ;人物阴影的纵向偏移量
draw.offset = 0,0    ;人物图像的纵向偏移量 (x, y). 推荐 0,0

[Velocity]
walk.fwd  = 1.25     ;前进速度
walk.back = -1.25     ;后退速度
run.fwd  = 7, 0    ;跑步速度 (x, y)
run.back = -4.5,-3.8 ;后跃速度 (x, y)
jump.neu = 0,-7.5     ;跳速度 (x, y)
jump.back = -3.2   ;后跳速度 (x, y)
jump.fwd = 3.2      ;前跳速度 (x, y)
;runjump.back = -2.55,-8.1 ;跑跳速度 (可选)
;runjump.fwd = 4,-8.1      ;.
;airjump.neu = 0,-8.1      ;.
;airjump.back = -2.55      ;二段跳速度 (可选)
;airjump.fwd = 2.5         ;.
;air.gethit.groundrecover = -.15,-3.5  ;地面受身速度 (x, y) **MUGEN 1.0专用**
;air.gethit.airrecover.mul = .5,.2     ;空中受身速度系数 (x, y) **MUGEN 1.0专用**
;air.gethit.airrecover.add = 0,-4.5    ;空中受身速度偏移 (x, y) **MUGEN 1.0专用**
;air.gethit.airrecover.back = -1       ;按后按键时空中受身速度增加量 **MUGEN 1.0专用**
;air.gethit.airrecover.fwd = 0         ;按前按键时空中受身速度增加量 **MUGEN 1.0专用**
;air.gethit.airrecover.up = -2         ;按上按键时空中受身速度增加量 **MUGEN 1.0专用**
;air.gethit.airrecover.down = 1.5      ;按下按键时空中受身速度增加量 **MUGEN 1.0专用**

[Movement]
airjump.num = 0       ;空中跳跃次数 (可选)
airjump.height = 35   ;空中跳跃时离地最小距离 (可选)
yaccel = .5          ;重力加速度
stand.friction = .85  ;站立时摩擦系数
crouch.friction = .82 ;下蹲时摩擦系数
;stand.friction.threshold = 2          ;如果人物站立时速度小于这个数值，停止人物移动 **MUGEN 1.0专用**
;crouch.friction.threshold = .05       ;如果人物下蹲时速度小于这个数值，停止人物移动 **MUGEN 1.0专用**
;air.gethit.groundlevel = 25           ;当人物的Y坐标大于这个数值时，人物落地 **MUGEN 1.0专用**
;air.gethit.groundrecover.ground.threshold = -20 ;当人物的Y坐标小于这个数值时，人物可以受身 **MUGEN 1.0专用**
;air.gethit.groundrecover.groundlevel = 10   ;当人物的Y坐标小于这个数值时，人物可以受身落地 **MUGEN 1.0专用**
;air.gethit.airrecover.threshold = -1  ;当人物的纵向速度大于这个数值时，人物可以受身 **MUGEN 1.0专用**
;air.gethit.airrecover.yaccel = .35    ;人物受身时重力加速度 **MUGEN 1.0专用**
;air.gethit.trip.groundlevel = 15      ;当人物在被绊倒的state里，Y坐标大于这个数值时，人物落地 **MUGEN 1.0专用**
;down.bounce.offset = 0, 20            ;人物弹地时的坐标偏移量 (x, y) **MUGEN 1.0专用**
;down.bounce.yaccel = .4               ;人物弹地时的重力加速度 **MUGEN 1.0专用**
;down.bounce.groundlevel = 12          ;在人物弹地时，当人物的Y坐标大于这个数值时，人物落地 **MUGEN 1.0专用**
;down.friction.threshold = .05         ;如果人物倒地时速度小于这个数值，停止人物移动 **MUGEN 1.0专用**

;默认语言下的胜利台词 (optional)  **MUGEN 1.0专用**
;如果包括这一段，默认语言必须为英语
[Quotes]
; 每种语言最多可以有100个胜利台词 (victory0 - victory99)
victory1 = "You must defeat Tu Shou to stand a chance."
victory2 = "You need a lot of training. Come back in ten years."
victory3 = "You look familiar. Did I see you on TV?"
victory4 = "Your moves are too predictable. You want to learn Kung Fu Palm? It's not for novices."
victory5 = "That was a good workout."
victory6 = "I want to challenge more skilled fighters."
victory7 = "What do you mean my girlfriend is in another temple?"

;其他语言的胜利台词 (optional)
;可以不加入其他语言的胜利台词，也可以加入任意多个
;标识符开头必须用ISO 639-1标准来标识语(中文的标识符为zh)，例如 "[zh.Quotes]".
;在mugen.cfg里调整语言选项
[zh.Quotes]
victory1 = "如果不能接下我的功夫掌的话，你连一点机会都没有！"
victory2 = "功夫火候不够，修行十年再来吧。"
victory3 = "你看着很眼熟，你上过电视吗？"
victory4 = "你的招数太容易预判了。哦，你想学功夫掌？对新人来说是不是有点太难了。"
victory5 = "刚才的作为热身运动挺不错的啊。"
victory6 = "我要挑战的是远超你的水平的强者。"
victory7 = "什么！我的女朋友在另外一个庙里？"

;---------------------------------------------------------------------------
;---------------------- Integer variable list ----------------------

; var(1):= 8100
; var(3):= -3
; var(4):= 3105, 3205, 3305, 40
; var(5):= 7016, 7017
; var(7):= 3100, 3105, 3205
; var(8):= 3100, 3105, 3205

;---------------------- Float variable list ----------------------

; fvar(0):= 9999
;fvar(15):= 9999




;---------------------------------------------------------------------------
; 时间到判负
; CNS难度：基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; 胜利后姿势判定
; CNS难度：基本
[Statedef 180]
type = S

[state ]
type = changestate
trigger1 = MatchOver = 1
value = 183+Random%2

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181+Random%2

;---------------------------------------------------------------------------
; 胜利姿势1-鞠躬
; CNS难度：基本
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
value = s221,45

[State 断言]
type = AssertSpecial
trigger1 = time = [0,200]
flag = roundnotover

;---------------------------------------------------------------------------
;获胜2
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 音效]
type = PlaySnd
trigger1 = animelem = 2
value = s5210,0

[State 断言]
type = AssertSpecial
trigger1 = time = [0,270]
flag = roundnotover

[State 无敌]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
;获胜3
[statedef 183]
type = s
ctrl = 0
anim = 183
velset = 0,0
facep2 = 1

[state 移动]
type = velset
trigger1 = animelem = 4
x = -1.3

[State 0]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1

[state 彑棙億乕僘]
type=assertspecial
triggerall = time >= 60
trigger1 =  backEdgebodydist >= -40
flag=roundnotover

;---------------------------------------------------------------------------
;获胜3
[Statedef 184]
type = S
ctrl = 0
anim = 184
velset = 0,0

[State 音效]
type = PlaySnd
trigger1 = animelem = 2
value = s5210,0

[State 断言]
type = AssertSpecial
trigger1 = time = [0,270]
flag = roundnotover

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 7
value = s6000,8

[State 特效]
type = Explod
trigger1 = animelem = 7
anim = 1410
sprpriority = 10
scale = 0.8,0.9
postype = p1
pos = 0,0
bindtime = 1
under = 0
ownpal = 1
supermovetime = 999

[State 无敌]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; 开场判定
[statedef 190]
type = s
ctrl = 0
velset = 0,0

[State 开场随机]
type = ChangeState
Trigger1 = Time = [0,1]
value = 191+Random%2

[state 归零]
type = changestate
trigger1 = animtime = 0
value = 0

;---------------------------------------------------------------------------
; 开场1
; CNS难度：基本
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 191, 1] ;冻结动画直到PreIntro结束
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, 2] ;在这个Assert结束后播放"round 1, fight"
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
value = s6000,8

[State 特效]
type = Explod
trigger1 = animelem = 2
anim = 1410
sprpriority = 10
scale = 0.8,0.9
postype = p1
pos = 0,0
bindtime = 1
under = 0
ownpal = 1
supermovetime = 999

[State 归零] ;结束后转移到站立state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; 开场2
; CNS难度：基本
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 音效]
type = PlaySnd
trigger1 = time = 35
value = s6000,8

[State 特效]
type = Explod
trigger1 = time = 35
anim = 1410
sprpriority = 10
scale = 0.8,0.9
postype = p1
pos = 0,0
bindtime = 1
under = 0
ownpal = 1
supermovetime = 999

[State 191, 2] ;在这个Assert结束后播放"round 1, fight"
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 归零] ;结束后转移到站立state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; 挑拨
; CNS难度：初级
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, 1]
type = CtrlSet
trigger1 = Time = 40
value = 1

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; 站轻拳-远
; CNS难度：初级
[Statedef 200]
type    = S                      ;状态: S-站立, C-蹲, A-空中, L-倒地
movetype= A                      ;招式种类: A-攻击, I-非攻击, H-受击
physics = S                      ;物理: S-站立, C-蹲, A-空中
velset = 0,0                     ;设定速度 (x,y) (不写这行则不改变速度)
ctrl = 0                         ;设定可控与否 (不写这行则不改变ctrl)
anim = 200                       ;改变动作 (不写这行则不改变anim)                  
sprpriority = 2                  ;设定p1的贴图优先度到2 (在前面)

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,3

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,0

[State 攻击判定]
type = HitDef                
trigger1 = time = 0          
attr = S, NA                 
damage = 20,0              
animtype = Medium            
guardflag = MA               
hitflag = MAF               
priority = 3, Hit            
pausetime = 8,9             
sparkno = s-1
guard.sparkno = S7060
sparkxy = -10,-85
hitsound = S200,0
guardsound = S150,1 
guard.hittime = 12 
ground.type = High          
ground.slidetime = 9         
ground.hittime = 12         
ground.velocity = -3,0     
airguard.velocity = -2,-.8 
air.type = Low               
air.velocity = -3,-3       
air.hittime = 12  
yaccel = .5  
getpower = 40,20
givepower = 5,0       
id = 200
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(200) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-90
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 站轻拳-近
; CNS难度：初级
[Statedef 205]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 205
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,3

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,0

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 30,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8,9
sparkno = s-1
guard.sparkno = s7060
sparkxy = -10,-90
hitsound = S200,0
guardsound = S150,1
guard.hittime = 12 
ground.type = Low
ground.slidetime = 8
ground.hittime = 12
ground.velocity = -3,0
airguard.velocity = -2,-.8
air.type = Low
air.velocity = -3,-3
air.hittime = 12
yaccel = .5 
getpower = 40,20
givepower = 5,0
id = 205
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(205) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-85
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 站重拳-远
; CNS难度：初级
; 注意width控制器，他让功夫人的物理判定框（pushbox）更大，这样他离敌人不会太近。
; 在MUGEN里用Ctrl-C来查看地面上他脚附近的红色判定条。
; 这个state的sprpriority（贴图优先度）是-1, 而不是一般用的2， 这样功夫人一开始会层叠在对方后方。
; [State 210, 4]里的SprPriority控制器在功夫人的胳膊伸出去的时候带到前头。
; 为了在这时暂停动作，在[State 210, 3]有一个ChangeAnim控制器检测有没有击中敌人，然后转到下一个动作元素。
; (注意elem=6这个参数). 如果要看效果的话，删除这个控制器作比较（打人会软绵绵的）。
[Statedef 210]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,4

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,2

[State 攻击判定]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = (AnimElem = 6) && (!movecontact)
attr = S, NA
animtype = hard
damage = 50,0 
priority = 4, Hit
getpower = 50,10
hitflag = MAF  
guardflag = MA
pausetime = 11,12
sparkno = s-1
guard.sparkno = s7060
sparkxy = -10,-80
hitsound = S220,0
guardsound = S150,1
guard.hittime = 20
ground.type = low
ground.slidetime = 17
ground.hittime  = 20
ground.velocity = -7
air.velocity = -4,-3.5
airguard.velocity = -4.5,-2.5
envshake.time = 9
envshake.ampl = 3
yaccel = .5
getpower = 80,40
givepower = 10,0
ID = 210
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(210) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-80
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.4,0.4
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 站重拳-近
; CNS难度：初级
[Statedef 215]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 215
sprpriority = 2

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,2

[State 攻击判定]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = hard
damage = 15,0  
priority = 4, Hit
getpower = 50,10
hitflag = MAF  
guardflag = MA
pausetime = 5,6
sparkxy = -10,-60
sparkno = s-1
guard.sparkno = s7060
hitsound = S220,0
guardsound = S150,1
ground.type = low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -2
air.velocity = -4,-3.5
airguard.velocity = -4.5,-2.5
envshake.time = 3
envshake.ampl = 3
yaccel = .5
getpower = 40,20
givepower = 10,0
ID = 215
forcenofall = 1

[State 攻击判定]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype  = hard
damage = 20,0 
priority = 4, Hit
hitflag = MAF  
guardflag = MA
pausetime = 8,9
sparkxy = -10,-70
sparkno = s-1
guard.sparkno = s7060
hitsound = S220,0
guardsound = S150,1
ground.type = low
ground.slidetime = 18
ground.hittime  = 22
ground.velocity = -4
air.velocity = -4,-3.5
airguard.velocity = -4.5,-2.5
envshake.time = 5
envshake.ampl = 3
yaccel = .5
getpower = 40,20
givepower = 5,0
ID = 216
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(215) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-70
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.4,0.4
trans = addalpha
alpha = 256, 256

[State 打击火花]
type = Explod
triggerall = numtarget(216) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-90
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.4,0.4
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 站轻脚-远
; CNS难度：初级
[Statedef 230]
type    = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,2

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,1

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S,NA
animtype  = light
damage = 30,0
priority = 3, Hit
hitflag = MAF 
guardflag = L
pausetime = 8,9
sparkno = s-1
guard.sparkno = s7060
sparkxy = -25,-55
hitsound = S210,0
guardsound = S150,1
guard.hittime  = 12
guard.hittime  = 12
ground.type = high
ground.slidetime = 9
ground.hittime  = 12
ground.velocity = -4.5
air.velocity = -3,-3
airguard.velocity = -3,-1
yaccel = .5  
getpower = 40,20
givepower = 5,0  
ID = 230
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(230) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-55
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 站轻脚-近
; CNS难度：初级
[Statedef 235]
type    = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 235
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,2

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,1

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 30,0
animtype = Light
guardflag = MA
hitflag = MA
priority = 3, Hit
pausetime = 8,9
sparkno = s-1
guard.sparkno = s7060
sparkxy = -16,-30
hitsound   = S210,0
guardsound = S150,1
guard.hittime = 12 
ground.type = Low
ground.slidetime = 8
ground.hittime = 12
ground.velocity = -4,0
airguard.velocity = -2,-.8
air.type = Low
air.velocity = -3,-3
air.hittime = 12
yaccel = .5 
getpower = 40,20
givepower = 5,0
id = 235
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(235) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-30
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 站重脚-远
; CNS难度：初级
[Statedef 240]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,5

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,2

[State 攻击判定]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = (AnimElem = 6) && (!movecontact)
attr = S,NA
animtype  = hard
damage = 40,0 
priority = 4, Hit
hitflag = MAF  
guardflag = H
pausetime = 11,12
sparkno = s-1
guard.sparkno = s7060
sparkxy = -25,-80
hitsound = S230,0
guardsound = S150,1
guard.hittime  = 22
ground.type = low
ground.slidetime = 17
ground.hittime  = 22
ground.velocity = -7
air.velocity = -4,-3.5
airguard.velocity = -4.5,-2.5
envshake.time = 9
envshake.ampl = 3
yaccel = .5
getpower = 50,30
givepower = 10,0
ID = 240
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(240) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-90
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.4,0.4
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 站重脚-近
; CNS难度：初级
[Statedef 245]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 245
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,5

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,2

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S,NA
animtype  = light
damage = 40,0
priority = 3, Hit
hitflag = MAF 
guardflag = L
pausetime = 8,9
sparkxy = -5,-40
sparkno = s-1
guard.sparkno = s7060
hitsound = S230,0
guardsound = S150,1
guard.hittime = 22
ground.type = high
ground.slidetime = 17
ground.hittime  = 22
ground.velocity = -4.5
air.velocity = -4,-3.5
airguard.velocity = -4.5,-2.5
envshake.time = 9
envshake.ampl = 3
yaccel = .5
getpower = 50,30
givepower = 10,0
id = 245
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(245) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-40
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.4,0.4
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 特殊技—肘击
; CNS难度：初级
[Statedef 300]
type = S
movetype = A
physics = S
anim = 300
velset = 0
ctrl = 0

[State 取消]
type = palfx
triggerall = time <= 2
trigger1 = prevstateno = 1610
time = 1
add = 256,256,256
color = 1
ignorehitpause = 1

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,3

[state 速度]
type = velset
trigger1 = animelemtime(1) >= 0 && animelemtime(4) < 0
x = 4

[state 速度]
type = velset
trigger1 = animtime = 0
trigger2 = movehit
x = 0

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype = Hard
damage = 50,0
priority = 6, Hit
hitflag = MAF
guardflag = MA
pausetime = 11,12
sparkno = s-1
guard.sparkno = s7060
sparkxy = -10,-80
hitsound = S240,0
guardsound = S150,1
ground.type = low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4
air.velocity = -4,-6
envshake.time = 9
envshake.ampl = 3
yaccel = .5
getpower = 60,30
givepower = 20,0
fall = 0
air.fall = 1
fall.recover = 0
ID = 300

[State 打击火花]
type = Explod
triggerall = numtarget(300) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 45,-70
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 特殊技—一英寸
; CNS难度：初级
[Statedef 310]
type     = S
movetype = A
physics  = S
ctrl     = 0
velset   = 0,0
anim     = 310

[State 取消]
type = palfx
triggerall = time <= 2
trigger1 = prevstateno = 1610
time = 1
add = 256,256,256
color = 1
ignorehitpause = 1

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,3

[State 坐标]
type = PosAdd
trigger1 = animelem = 3
x = 15

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype = Hard
damage = 50,0
priority = 6, Hit
hitflag = MAF
guardflag = MA
pausetime = 11,12
sparkno = s-1
guard.sparkno = s7060
sparkxy = -10,-80
hitsound = S240,0
guardsound = S150,1
ground.type = low
ground.slidetime = 17
ground.hittime  = 20
ground.velocity = -4
air.velocity = -4,-6
envshake.time = 9
envshake.ampl = 3
yaccel = .5
getpower = 60,30
givepower = 20,0
fall = 0
air.fall = 1
fall.recover = 0
ID = 310

[State 打击火花]
type = Explod
triggerall = numtarget(310) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 65,-65
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.45,0.45
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 特殊技—膝踢
; CNS难度：初级
[Statedef 320]
type    = A
movetype = A
physics = N
ctrl = 0
velset = 0,0
anim = 320
sprpriority = 2
facep2 = 1

[State 取消]
type = palfx
triggerall = time <= 2
trigger1 = prevstateno = 1610
time = 1
add = 256,256,256
color = 1
ignorehitpause = 1

[State 挥击音效]
type = PlaySnd
trigger1 = AnimElem = 2
value = s600,3

[State 状态变更]
type = StateTypeSet
trigger1 = animelem = 7
movetype = I

[State 状态变更]
type = StateTypeSet
trigger1 = animelemtime(3) = 2
statetype = A

[State 速度]
type = posadd
trigger1 = AnimElem = 3, = 0
x = 6
y = -4

[State 速度]
type = posadd
trigger1 = AnimElem = 3, = 1
x = 6
y = -4

[State 速度]
type = posadd
trigger1 = AnimElem = 4, = 0
x = 12
y = -4

[State 速度]
type = posadd
trigger1 = AnimElem = 3, = 2
trigger2 = AnimElem = 4, = 1
x = 6
y = -4

[State 速度]
type = posadd
trigger1 = AnimElem = 4, = 2
trigger2 = AnimElem = 4, = 3
x = 3
y = -1

[State 速度]
type = VelAdd
trigger1 = AnimElem = 5
y = 2

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype  = Medium
damage = 50,0
priority = 6, Hit
hitflag = MAF
guardflag = H
pausetime = 11,12
sparkno = s-1
guard.sparkno = s7060
sparkxy = -15,-80
hitsound = S230,0
guardsound = S150,1
ground.type = low
ground.slidetime = 17
ground.hittime  = 20
ground.velocity = -5
air.velocity = -2.5,-4
air.animtype = Back
envshake.time = 9
envshake.ampl = 3
yaccel = .5
getpower = 60,30
givepower = 20,0
air.fall = 1
fall.recover = 0
ID = 320

[State 打击火花]
type = Explod
triggerall = numtarget(320) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 35,-80
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.45,0.45
trans = addalpha
alpha = 256, 256

[State 转入]
type = ChangeState
trigger1 = animelemtime(6) >= 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 321
ctrl = 0

;---------------------------------------------------------------------------
; 落地
; CNS难度：初级
[Statedef 321]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 321
sprpriority = 10

[State 坐标]
type = PosSet
trigger1 = time = 0
y = 0

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; CD
; CNS难度：初级
[Statedef 350]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 350
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s701,0

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,3

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype = Hard
damage = 80,0
priority = 6, Hit
hitflag = MAF
guardflag = MA
pausetime = 11,12
sparkno = s-1
guard.sparkno = s7060
sparkxy = -10,-90
hitsound   = S240,0
guardsound = S150,2
ground.type = low
ground.slidetime = 15
ground.hittime  = 22
ground.velocity = -4,-6
air.velocity = -4,-6
envshake.ampl = 12
envshake.freq = 40
envshake.time = 20
yaccel = .5
getpower = 80,40
givepower = 20,0
fall = 1
fall.recover = 0
ID = 350

[State 打击火花]
type = Explod
triggerall = numtarget(350) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p2
pos = -19,-83
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.45,0.45
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;刚CD
[statedef 351]
type = S
movetype = A
physics = S
anim = 350
velset = 0
ctrl = 0
poweradd = -1000

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
value = s701,0

[state 颜色]
type = envcolor
trigger1 = time = 0
value = 255,255,255
time = 5
under = 1

[state 暂停]
type = pause
trigger1 = time = 0
time = 10

[state 无敌]
type = nothitby
trigger1 = 1
value = sca

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,3

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype = Hard
damage = 80,0
priority = 6, Hit
hitflag = MAF
guardflag = MA
pausetime = 11,12
sparkno = s-1
guard.sparkno = s7060
sparkxy = -10,-90
hitsound   = S240,0
guardsound = S150,2
ground.type = low
ground.slidetime = 15
ground.hittime  = 22
ground.velocity = -4,-6
air.velocity = -4,-6
envshake.ampl = 12
envshake.freq = 40
envshake.time = 20
yaccel = .5
getpower = 80,40
givepower = 20,0
fall = 1
fall.recover = 0
ID = 350

[State 打击火花]
type = Explod
triggerall = numtarget(350) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p2
pos = -19,-83
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.45,0.45
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 蹲轻拳
; CNS难度：初级
; 一个简单的下蹲攻击.HitDef的guardflag被设为L，表示只能用蹲防来防御这个攻击，而不是站防或者空防。
; slidetime和hittime最好设置的小一点，这样对手硬直不会过长。
; 对于所有的下蹲攻击，记得设置attr参数为下蹲。比如这里的"C, NA"代表"下蹲, 普通攻击"。
; HitDef的priority设为3而不是默认的4，这样攻击优先度会低一些。
; 当两个人物的攻击判定框重合时，功夫人会被击中，而不是互杀。
[Statedef 400]
type    = C
movetype= A
physics = C
ctrl = 0
anim = 400
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 300 
value = s200,2

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,0

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage = 20,0
priority = 3
animtype = Light
hitflag = MAF
guardflag = MA
pausetime = 8,9
sparkxy = -5,-40
sparkno = s-1
guard.sparkno = s7060
hitsound = S200,0
guardsound = S150,1
guard.hittime = 12
ground.type = Low
ground.slidetime = 8
ground.hittime = 12
ground.velocity = -5
air.velocity = -2,-2
yaccel = .5  
getpower = 40,20
givepower = 5,0 
id = 400
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(400) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 45,-40
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; 蹲重拳
; CNS难度：初级
; 这是个两段攻击，是由两个HitDef来实现的，每一个HitDef对应每一段攻击的那一帧。
; 注意第一段不可以可以被空防，因为guardflag是M。
; 第二段的guardflag是MA，所以这个攻击可以被站防和空防。
[Statedef 410]
type    = C
movetype= A
physics = C
ctrl = 0
anim = 420
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,5

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = 600,2

[State 速度]
type = VelSet
trigger1 = animelemtime(1) > 0
trigger1 = animelemtime(3) <= 0
x = .5

[State 速度]
type = VelSet
trigger1 = animtime = 4
x = 0

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage = 40,0
priority = 4, Hit
animtype  = hard
hitflag = MAF
guardflag = MA
pausetime = 11,12
sparkno = s-1
guard.sparkno = s7060
hitsound   = S220,0
guardsound = S150,1
sparkxy = -10,-60+floor(P2dist y+20)
guard.hittime  = 23
ground.type = low
ground.slidetime = 17
ground.hittime  = 23
ground.velocity = -6
air.velocity = -4.5,-4
envshake.time = 9
envshake.ampl = 3
yaccel = .5  
getpower = 80,40
givepower = 10,0 
ID = 410
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(410) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 5+floor(P2dist x),ifelse(time>=9,-100,-60)
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.4,0.4
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; 蹲轻脚
; CNS难度：初级
[Statedef 430]
type    = C
movetype= A
physics = C
ctrl = 0
anim = 410
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 300 
value = s200,2

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = 600,1

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 20,0
animtype = Light
hitflag = MA
guardflag = L
pausetime = 8,9
sparkno = s-1
guard.sparkno = s7060
sparkxy = -5,-6
hitsound = S210,0
guardsound = S150,1
guard.hittime = 12
ground.type = Low
ground.slidetime = 8
ground.hittime = 12
ground.velocity = -5.5
air.velocity = -2,-3
yaccel = .5  
getpower = 30,15
givepower = 5,0 
id = 430
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(430) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 40,-6
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; 蹲重脚
; CNS难度：初级
; 这个攻击的ground.type参数被设为trip，所以对方被击中时会进入绊倒的动画。
; 注意这个攻击的hitflag是MAFD，表示倒地的对手也可以被击中。
[Statedef 440]
type    = C
movetype= A
physics = C
poweradd= 35
ctrl = 0
anim = 430
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 499 
value = s200,5

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = 600,2

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 40,0
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkxy = -10,-25
sparkno = s-1
guard.sparkno = s7060
hitsound = S230,0
guardsound = S150,1
guard.hittime  = 22
ground.type = Trip
ground.slidetime = 13
ground.hittime  = 22
ground.velocity = -3.5,-3.5
air.velocity = -3.5,-3.5
guard.velocity = -6
fall = 1
envshake.time = 9
envshake.ampl = 3
yaccel = .5  
getpower = 80,40
givepower = 10,0 
id = 440

[State 打击火花]
type = Explod
triggerall = numtarget(440) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 55,-10
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; 跳轻拳
; CNS难度：初级
[Statedef 600]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 600
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500 
value = s200,2

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,0

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 30,0
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = s-1
guard.sparkno = s7060
sparkxy = -10,-50
hitsound   = S200,0
guardsound = S150,1
ground.type = High
ground.slidetime = 9
ground.hittime = 15
ground.velocity = -4
air.velocity = -1.5,-3
yaccel = .5  
getpower = 30,15
givepower = 5,0 
id = 600
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(600) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 5+floor(P2dist x),-45
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

;---------------------------------------------------------------------------
; 跳重拳
; CNS难度：初级
[Statedef 610]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 620
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500 
value = s200,5

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,2

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 50,0
guardflag = HA
priority = 4
pausetime = 11,12
sparkxy = -10,-60
sparkno = s-1
guard.sparkno = s7060
hitsound   = S220,0
guardsound = S150,1
animtype = Medium
guard.hittime = 25
ground.type = High
ground.slidetime = 16
ground.hittime = 25
ground.velocity = -5
air.velocity = -3,-4
envshake.time = 9
envshake.ampl = 3
yaccel = .5  
getpower = 80,40
givepower = 10,0 
id = 610
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(610) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 5+floor(P2dist x),-45
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.45,0.45
trans = addalpha
alpha = 256, 256

;---------------------------------------------------------------------------
; 跳轻脚
; CNS难度：初级
[Statedef 630]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 610
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500 
value = s200,2

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,1

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 30,0
guardflag = HA
priority = 4
pausetime = 12,13
sparkxy = -10,-50
sparkno = s-1
guard.sparkno = s7060
hitsound   = S210,0
guardsound = S150,1
guard.hittime = 15
animtype = Hard
ground.type = High
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -5
air.velocity = -3,-5
yaccel = .5  
getpower = 40,20
givepower = 5,0 
id = 630
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(630) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 10+floor(P2dist x),-50
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

;---------------------------------------------------------------------------
; 跳重脚
; CNS难度：初级
[Statedef 640]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 630
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500 
value = s200,5

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,2

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 50,0
guardflag = HA
priority = 4
pausetime = 12,13
sparkxy = -10,-50
sparkno = s-1
guard.sparkno = s7060
hitsound   = S230,0
guardsound = S150,1
animtype = Hard
guard.hittime = 25
ground.type = High
ground.slidetime = 16
ground.hittime = 25
ground.velocity = -5
air.velocity = -3,-4
envshake.time = 9
envshake.ampl = 3
yaccel = .5  
getpower = 80,40
givepower = 10,0 
id = 640
forcenofall = 1

[State 打击火花]
type = Explod
triggerall = numtarget(640) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 0+floor(P2dist x),-50
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.45,0.45
trans = addalpha
alpha = 256, 256

;---------------------------------------------------------------------------
; 跳CD
; CNS难度：初级
[Statedef 650]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 650
sprpriority = 2

[State 人物声音]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500 
value = s701,0

[State 挥击音效]
type = PlaySnd
trigger1 = Time = 0
value = s600,3

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = hard
damage = 80,0
hitflag = MAF
guardflag = HA
sparkno = s-1
guard.sparkno = s7060
pausetime = 11,12
sparkxy = -10,-45
hitsound   = S240,0
guardsound = S150,1
ground.type = low
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -5,-7
air.velocity = -5,-2
fall = 1
fall.recover = 0
envshake.ampl = 12
envshake.freq = 40
envshake.time = 20
yaccel = .5  
getpower = 50,20
givepower = 20,0 
id = 650

[State 打击火花]
type = Explod
triggerall = numtarget(650) = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 20
supermovetime = 9999
postype = p1
pos = 45,-45
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.45,0.45
trans = addalpha
alpha = 256, 256

;--------------------------------
; 闪避-原地
;--------------------------------
[Statedef 740]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 740
ctrl     = 0
sprpriority = -1

[State 音效]
type = PlaySnd
trigger1 = Time = 0
value = s0,1

[State 无敌]
type = NotHitBy
trigger1 = 1
value = SCA

[State 防推挤]
type = PlayerPush
trigger1 = AnimElemTime(1) > 0
value = 0

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 闪避-前
[Statedef 750]
type = S
physics = S
movetype = I
anim = 750
velset = 0,0
ctrl = 0
sprpriority = -1

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 1
value = s0,0

[State 取消]
type = palfx
triggerall = time <= 2
trigger1 = prevstateno = 1000
trigger2 = prevstateno = 1010
trigger3 = prevstateno = 1020
trigger4 = prevstateno = 1030
time = 2
add = 256,256,256
color = 1
ignorehitpause = 1

[State 转向]
type = Turn
trigger1 = Time = 0
trigger1 = PrevStateNo = 750
trigger1 = P2Dist X < 0

[State 转向]
type = ChangeState
trigger1 = PrevStateNo = [100,101]
trigger1 = Time = 0
trigger1 = P2Dist X < 0
value = 760

[State 暂停]
type = Pause
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = Time = 0
time = 10
movetime = 10

[State 闪屏]
type = EnvColor
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = Time = 0
value = 255,255,255
time = 4
under = 1

[State 减气]
type = PowerAdd
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = Time = 0
value = -1000

[State 防推挤]
type = PlayerPush
trigger1 = 1
value = 0

[State 无敌]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 残影]
type = AfterImage
trigger1 = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = AnimElem = 1
time = 15
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
Length = 6
FrameGap = 1
TimeGap = 1
trans = add1

[State 残影]
type = AfterImage
trigger1 = !(PrevStateNo = 150 || PrevStateNo = 152)
trigger1 = AnimElem = 1
time = 15
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
Length = 6
FrameGap = 1
TimeGap = 1
trans = add1

[State 移动]
type = VelSet
triggerall = !(PrevStateNo = 150 || PrevStateNo = 152)
trigger1 = AnimElem = 1, >= 0 && AnimElem = 6, < 23
x = 4.5 + (PrevStateNo = [100,101])

[State 移动]
type = VelSet
triggerall = !(PrevStateNo = 150 || PrevStateNo = 152)
trigger1 = AnimElem = 6, = 4
x = 0

[State 移动]
type = VelSet
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = AnimElem = 1, >= 0 && AnimElem = 6, < 23
x = 4.5

[State 移动]
type = VelSet
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = AnimElem = 6, = 4
x = 0

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 闪避-后
[Statedef 760]
type = S
physics = S
movetype = I
anim = 760
velset = 0,0
ctrl = 0
sprpriority = -1

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 1
value = s0,0

[State 转向]
type = Turn
trigger1 = PrevStateNo = 750
trigger1 = Time = 0
trigger1 = P2Dist X < 0

[State 转向]
type = ChangeState
trigger1 = PrevStateNo = [100,101]
trigger1 = Time = 0
trigger1 = P2Dist X < 0
value = 750

[State 暂停]
type = Pause
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = Time = 0
time = 10
movetime = 10

[State 闪屏]
type = EnvColor
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = Time = 0
value = 255,255,255
time = 4
under = 1

[State 减气]
type = PowerAdd
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = Time = 0
value = -1000

[State 防推挤]
type = PlayerPush
trigger1 = 1
value = 0

[State 无敌]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 残影]
type = AfterImage
trigger1 = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = AnimElem = 1
time = 15
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
Length = 6
FrameGap = 1
TimeGap = 1
trans = add1

[State 残影]
type = AfterImage
trigger1 = !(PrevStateNo = 150 || PrevStateNo = 152)
trigger1 = AnimElem = 1
time = 15
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
Length = 6
FrameGap = 1
TimeGap = 1
trans = add1

[State 速度]
type = VelSet
triggerall = !(PrevStateNo = 150 || PrevStateNo = 152)
trigger1 = AnimElem = 1, >= 0 && AnimElem = 4, < 3
x = -7

[State 速度]
type = VelSet
triggerall = !(PrevStateNo = 150 || PrevStateNo = 152)
trigger1 = AnimElem = 4, = 4
x = 0

[State 速度]
type = VelSet
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = AnimElem = 1, >= 0 && AnimElem = 4, < 3
x = -7

[State 速度]
type = VelSet
triggerall = PrevStateNo = 150 || PrevStateNo = 152
trigger1 = AnimElem = 4, = 4
x = 0

[State 归零]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 闪避-前空
[Statedef 770]
type = A
movetype = I
physics = N
velset = 0,0
anim = 770
ctrl = 0

[State 防推挤]
type = PlayerPush
trigger1 = 1
value = 0

[State 速度]
type = Velset
trigger1 = AnimElem = 1
y = -4
x = 8

[State 速度]
type = VelAdd
trigger1 = AnimElem = 1, >= 0
y = 0.45

[State 残影]
type = AfterImage
trigger1 = AnimElem = 1
time = 20
trans = add1
timegap = 1
framegap = 1
length = 6
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9

[State 控制]
type = CtrlSet
trigger1 = Animelem = 1,>=0
value = 1
ignorehitpause = 1

[State 转向]
type = Turn
triggerall = Animelem = 8
Trigger1= p2dist x < 0

[State 灰尘特效]
type = Explod
trigger1 = Time = 0
anim = 115
ID = 115
pos = -10,-60
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 0.4,0.4
sprpriority = 1
ontop = 1
ownpal = 1
removeongethit = 1

[State 音效]
type = PlaySnd
trigger1 = time = 0
value = s40,4

[State 转入]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 321

;---------------------------------------------------------------------------
; C投-电辰
[Statedef 800]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

; 注意hitflag参数里的'-'符号，这代表只能击中不在受击状态（被击中或者防御中）。
; 这样就无法用投技去投一个已经被击中的敌人。
; priority务必设为1或2，这样不会覆盖敌方的普通攻击。
; 相杀参数务必设为miss或dodge，否则会出现毛病。
;
; 注意：有的时候（比如KOF的指令投）要求可以打中受击硬直中德敌人，但是不能打中防御硬直中的敌人
; 这时候写两个hitdef，第一个是当对方不在防御状态时触发，hitflag不带减号，第二个当对方在防御状态时触发，hitflag带减号
[State 800, 1]
type = HitDef
Trigger1 = 1
attr = ,NT          ;属性: 站立，普通投
hitflag = M-          ;能击中地面上非受击状态的敌人
priority = 1, Miss    ;低优先度，必须为miss或dodge
sparkno = -1          ;没有火花
p1sprpriority = 1     ;p1的位图在p2之前
                      ;p2的sprpriority默认是0
p1facing = 1
p2facing = 1          ;强制让对方面对我方
p1stateno = 810       ;成功的话p1转到810
p2stateno = 820       ;成功的话p2转到kfm的cns里的820
guard.dist = 0        ;这样对方不能转到防御state
fall = 1              ;强制对方落地

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;电辰
[Statedef 810]
type = S
movetype = I
physics = N
ctrl = 0
anim = 810

[State 推挤]
type = Width
trigger1 = AnimElem = 1
edge = 40, 0

[State 坐标]
type = targetbind
trigger1 = animelem = 1
pos = 40,0

[State 闪屏]
type = Envcolor
trigger1 = time = 0
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 0

[State 特效]
Type = Explod
TriggerAll = P2StateNo = 820 && p2movetype = H
Trigger1 = (Time%5 = 0)
Anim = 6004+Random%3
PosType = P2
Pos = 5 - (random%10),-10 - (random%70)
Scale = .3,.3
BindTime = 4
Sprpriority = 4
OwnPal = 1
RemoveTime = -2

[State 抓取火花]
type = Explod
trigger1 = time = 2
anim = 7100
sprpriority = 20
postype = p1
pos = 25,-70
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.4,0.4
trans = addalpha
alpha = 256, 256

[State 抓取音效]
type = PlaySnd
trigger1 = time = 0
value = s6000,8

[State 归零]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;电辰
[Statedef 820]
type     = S
movetype = H
physics  = N
velset = 0,0
sprpriority = 1

[State 无敌]
type = NotHitBy
trigger1 = 1
value = SCA

[state P2号]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

[State 屏幕震动]
type = EnvShake
trigger1 = Time = 0
time = 9
ampl = 3 
freq = 40

[State 染色]
type = PalFX
trigger1 = animelem = 1
time = 61
Add = -128,-128,-128
SinAdd = 192,192,256,4
Color = 64
InvertAll = 1

[State 速度]
type = PosAdd
trigger1 = animelem = 14
x = -20

[state 结束移动]
type = velset
trigger1 = pos y >= 0
y = 0

[state fall值还原]
type = Hitfallset
trigger1 = 1
value = 0

[state P2坐标]
type = posset
trigger1 = 1
y = 0

[State 定义在站立]
type = StateTypeSet
trigger1 = Pos Y = 0
statetype = S

[state 扣血]
type = lifeadd
trigger1 = time = 0
value = -lifemax*.1
absolute = 1

[State 转入]
type = ChangeState
trigger1 = Animtime = -1
trigger1 = ishelper
value = 5120

[State 转入]
type = SelfState
trigger1 = Animtime = 0
trigger1 = Alive
value = 5120

[State 转入]
type = SelfState
trigger1 = Animtime = 0
trigger1 = !Alive
value = 5150

;---------------------------------------------------------------------------
; D投-膝袭
[Statedef 805]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

; 注意hitflag参数里的'-'符号，这代表只能击中不在受击状态（被击中或者防御中）。
; 这样就无法用投技去投一个已经被击中的敌人。
; priority务必设为1或2，这样不会覆盖敌方的普通攻击。
; 相杀参数务必设为miss或dodge，否则会出现毛病。
;
; 注意：有的时候（比如KOF的指令投）要求可以打中受击硬直中德敌人，但是不能打中防御硬直中的敌人
; 这时候写两个hitdef，第一个是当对方不在防御状态时触发，hitflag不带减号，第二个当对方在防御状态时触发，hitflag带减号
[State 800, 1]
type = HitDef
Trigger1 = 1
attr = ,NT          ;属性: 站立，普通投
hitflag = M-          ;能击中地面上非受击状态的敌人
priority = 1, Miss    ;低优先度，必须为miss或dodge
sparkno = -1          ;没有火花
p1sprpriority = 1     ;p1的位图在p2之前
                      ;p2的sprpriority默认是0
p1facing = 1
p2facing = 1          ;强制让对方面对我方
p1stateno = 830       ;成功的话p1转到810
p2stateno = 840       ;成功的话p2转到kfm的cns里的820
guard.dist = 0        ;这样对方不能转到防御state
fall = 1              ;强制对方落地

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 膝袭
[Statedef 830]
type = S
movetype = I
physics = N
ctrl = 0
anim = 830

[State 抓取火花]
type = Explod
trigger1 = time = 3
anim = 7100
sprpriority = 20
postype = p1
pos = 25,-90
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.4,0.4
trans = addalpha
alpha = 256, 256

[State 打击火花]
type = Explod
ownpal = 1
trigger1 =  Animelem = 4
anim = 7000
sprpriority = 20
supermovetime = 9999
pos = -5,-60
postype = p1
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.45,0.45
trans = addalpha
alpha = 256, 256

[State 抓取音效]
type = PlaySnd
trigger1 = time = 0
value = s370,1

[State 打击音效]
type = PlaySnd
trigger1 = animelem = 4
value = s220,0

[State 坐标]
type = targetbind
trigger1 = animelem = 2
pos = 0, 0

[State 坐标]
type = targetbind
trigger1 = animelem = 3, = 1
pos = -10,0

[State 推挤]
type = Width
trigger1 = AnimElem = 1
edge = 40, 0

[State 转向]
type = turn
trigger1 = animelem = 10

[State 屏幕震动]
type = EnvShake
trigger1 =  Animelem = 4
time = 9
ampl = 3 
freq = 40

[State 坐标]
type = targetbind
trigger1 = animelem = 5
pos = 0,-70

[State 坐标]
type = posadd
trigger1 = animelem = 7
trigger2 = AnimElem = 8
trigger3 = AnimElem = 9
x = 8

[State 坐标]
type = posadd
trigger1 = AnimElem = 10
x = -8

[State 归零]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 膝袭
[Statedef 840]
type = S
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 屏幕限制]
type = ScreenBound
trigger1 = 1
movecamera = 0,0

[State P2转入]
type = ChangeAnim2
Trigger1 = Time = 0
value = 840

[State 坐标]
type = posadd
trigger1 = animelem = 2
x = 14

[State 坐标]
type = posadd
trigger1 = animtime = 0
y = 60

[State 推挤]
type = Width
trigger1 = AnimElem = 1, >= 0
edge = 0, 30
[state 扣血]
type = lifeadd
trigger1 = animelem = 4
value = -lifemax*.1
absolute = 1

[State 速度]
type = VelAdd
Trigger1 = AnimElem = 4, = 1
x = 3
y = -1

[State P2转入]
type = SelfState
trigger1 = animtime = 0
value = 5050
Ctrl = 0

;---------------------------------------------------------------------------
; 空投
[Statedef 850]
type    = A
movetype= A
physics = A
anim = 850
sprpriority = 2
ctrl = 0

[State 攻击判定]
type = HitDef
Trigger1 = time = 0
ID = 850
attr = S, ST
hitflag = AF
hitsound = s-1,1
sparkno = -1
numhits = 0
p2facing = 1
p2stateno = 860

[State 转入]
type = ChangeState
trigger1 = p2stateno = 860
value = 855
ignorehitpause = 1

;---------------------------------------------------------------------------
; 每一帧执行(statedef -2)
;---------------------------------------------------------------------------

[Statedef -2]

[state helper]
type = Helper
trigger1 = numhelper(9999) = 0
id = 9999
name = "连击修正"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 9999
helpertype = normal
pausemovetime = 99999999
supermovetime = 99999999
keyctrl = 0 
ownpal = 0

[state 连击修正]
type = AttackMulSet
trigger1 = 1            ;伤害修正开关，= 1开启，= 0关闭   默认开启
value = helper(9999),fvar(15)

;Helper部分

;Explod部分

[State 特效]
Type = Explod
TriggerAll = P2StateNo = 1080 && p2movetype = H
Trigger1 = (Time%5 = 0)
Anim = 6004+Random%3
PosType = P2
Pos = 5 - (random%10),-10 - (random%70)
Scale = .3,.3
BindTime = 4
Sprpriority = 4
OwnPal = 1
RemoveTime = -2

[state 砸地特效]
type = explod
trigger1 = p2stateno = 1109
trigger1 = enemy,time = 1
trigger1 = p2movetype = H
postype = p2
anim = 6550
pos = -10,-5
scale = 0.3,0.3
sprpriority = 4
bindtime = 1
ownpal = 1

[State 特效删除]
type = removeExplod
trigger1 =  stateno != 3000
id = 3001

;音效部分
[State 音效停止]
type = StopSnd
trigger1 = stateno != 100
channel = 1

[State 音效停止]
type = StopSnd
trigger1 = stateno != [1060,1065]
trigger1 = stateno != 3000
trigger1 = stateno != 2002
channel = 2

;------------------------------------
;常时回气
[State 回气]
type = PowerAdd
trigger1 = PalNo = 2
value = 1
ignorehitpause = 1

[State 回气]
type = PowerAdd
trigger1 = PalNo = 3
value = 2
ignorehitpause = 1

;------------------------------------
;受击回气
[State 回气]
type = PowerAdd
triggerall = !IsHelper
triggerall = MoveType = H
triggerall = Time = 0
trigger1 = PalNo = 2
value = 2
ignorehitpause = 1

[State 回气]
type = PowerAdd
triggerall = !IsHelper
triggerall = MoveType = H
triggerall = Time = 0
trigger1 = PalNo = 3
value = 4
ignorehitpause = 1

;---------------------------------------------------------------------------
; 在自己的state里每一帧执行(statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, コマンドを入れたらVarをON]
Type = VarSet
Trigger1 = Command = "jump" ;残影跳的指令，一般是269，247这些的，一会给出指令
Trigger1 = Ctrl
Trigger1 = StateType = S
Trigger2 = PrevStateNo = 100
Trigger2 = Command = "holdfwd" ;之前的动作为跑步，并且按住前，才可出现残影跳
V = 3
Value = 1

[State -3, sysvarを引継ぐ] ;出现了残影跳以后，需要继续赋值
Type = VarSet
Trigger1 = Var(3) = 1 ;出现了残影跳
Trigger1 = StateNo = 40 ;ジャンプする前のステート
Trigger1 = AnimTime = 0 ;ジャンプ方向を決めるsysvarがリセットされる寸前
var(3) = ifelse(sysvar(1)=0, 2, ifelse(sysvar(1)=1, 3, 4)) ;利用sysvar来判断赋值，上跳赋值为2，前为3，后为4

[State -3, varをOFFにするステート] ;跳出去以后还原var(3) = 0
Type = VarSet
TriggerAll = Time = 2
Trigger1 = StateNo = 50
Trigger2 = StateNo != [40,59]
V = 3
Value = 0 ;还原

[State -3, 前にボタンを押してたら前にも加速] ;残影前跳加速
Type = VelAdd
Trigger1 = var(3) = 3
Trigger1 = StateNo = 50
x = 2.1

[State -3, 後ろなら後ろに加速] ;残影后跳加速
Type = VelAdd
Trigger1 = var(3) = 4
Trigger1 = StateNo = 50
x = -2.1

[State -3, 垂直ジャンプにveladdを使って上に加速] ;残影上跳加速
Type = VelAdd
Trigger1 = var(3) = 2
Trigger1 = StateNo = 50
y = -2.1

[State 残影]
type = AfterImage
Trigger1 = var(3) >= 1
Trigger1 = stateno = 50
time = 25
trans = add1
timegap = 1
framegap = 1
length = 6
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
