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

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

[Data]
;起始HP
life = 1000

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

;防御力（数值高更强）
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  = 2.2      ;前进速度
walk.back = -2.2     ;后退速度
run.fwd  = 6.5, 0    ;跑步速度 (x, y)
run.back = -6,-4     ;后跃速度 (x, y)
jump.neu = 0,-8     ;跳速度 (x, y)
jump.back = -3    ;后跳速度 (x, y)
jump.fwd = 3      ;前跳速度 (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专用**
;ir.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 = "什么！我的女朋友在另外一个庙里？"

;---------------------------------------------------------------------------
; 变量表:
; 这是功夫人用的变量列表。
; 记录下你用的变量可以减少你的工作量。
; var(3)  - 小跳
; var(4)  - 小跳
; var(5)  - BUFF - 3000
; var(6)  - BUFF - 4000 

;---------------------------------------------------------------------------
; 时间到判负
; 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
triggerall = var(6) = 0
trigger1 = MatchOver = 1
value = 182

[state 转入]
type = changestate
triggerall = var(6) = 1
trigger1 = MatchOver = 1
value = 185

[State 转入]
type = ChangeState
trigger1 = Time = 0
value = 181

;---------------------------------------------------------------------------
; 获胜1
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Alive
value = s10,38

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

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

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

[State 坐标]
type = Posadd
trigger1 = AnimElem = 8
trigger2 = AnimElem = 9
x = -15

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

[State 音效]
type = Posadd
trigger1 = AnimElem = 11
x = -5

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Alive
value = s10,36

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 7
trigger1 = Alive
value = s10,37

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 11
trigger1 = Alive
value = s12,3

[State 特效]
type = Explod
trigger1 = AnimElem = 3
anim = 183
postype = P1
pos = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1

[State 特效]
type = Explod
trigger1 = AnimElem = 4
anim = 184
postype = P1
pos = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1

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


;---------------------------------------------------------------------------
; 获胜3
; CNS难度：基本
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 音效]
type = PlaySnd
Trigger1 = time = 0
value = s12,10

[State 音效]
type = PlaySnd
trigger1 = time = 34
value = S0,6

[State 音效]
type = PlaySnd
trigger1 = time = 161
value = S0,7

[State 特效]
type = Explod
trigger1 = time = 0
anim = 186
pos = -30,2
scale = 1.05,1.05
postype = p1
sprpriority = -1
bindtime = -1
removetime = -1

[state 特效]
Type = Explod
trigger1 = time = 0
anim = 187
sprpriority = 9
posType = p1
pos = -30,-10
scale = .15,.3
bindTime = 8
under = 0
ownpal = 1

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

;---------------------------------------------------------------------------
; 开场判定
[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

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

[State 断言]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10,0

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 9
value = s10,1

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
value = s12,0

[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 行动]
type = CtrlSet
trigger1 = Time = 30
value = 1

[State 变量]
type = VarSet
trigger1 = Time = 0
v = 5
value = 0

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

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

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 30,5
animtype = Light
guardflag = MAF
hitflag = MAF
priority = 3, Hit
pausetime = 8, 9
sparkno = s-1
guard.sparkno = s7050
sparkxy = -10, -78
hitsound = s1,0
guardsound = s2,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 15
ground.velocity = -4.5,0
airguard.velocity = -1.9,-.8
air.type = Low
air.velocity = -1.4,-3
air.hittime = 12

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
trigger1 = random < 400
value = s10,5

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

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

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

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 30, 5
animtype = Light
guardflag = MAF
hitflag = MAF
priority = 3, Hit
pausetime = 8, 9
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20, -78
hitsound = s1,0
guardsound = s2,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 15
ground.velocity = -4,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = random < 400
value = s10,5

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

[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
poweradd = 40
ctrl     = 0
velset   = 0,0
anim     = 210
sprpriority = 2

[state 坐标]
type = Posadd
trigger1 = AnimElem = 6
x = 5

[state 坐标]
type = Posadd
trigger1 = AnimElem = 7
x = 10

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 60,10
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 3, Hit
pausetime = 10, 11
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20, -65
hitsound = s1,1
guardsound = s2,0
ground.type = Low
ground.slidetime = 16
ground.hittime  = 25
ground.velocity = -7.5
airguard.velocity = -2.3,-1.8
air.type = High
air.velocity = -2.5,-3
air.hittime = 12

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 70,-65
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = random < 400
value = s10, 7

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

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

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

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 60,10
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 3, Hit
pausetime = 10, 11
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20, -65
hitsound = s1,1
guardsound = s2,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -8.3
airguard.velocity = -2.3,-1.8
air.type = High
air.velocity = -2.5,-3
air.hittime = 22

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 40,-65
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = random < 400
value = s10,7

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

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

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

[state 坐标]
type = Posadd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 10

[state 坐标]
type = Posadd
trigger1 = AnimElem = 6
trigger2 = Animtime = 0
x = -10

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Medium
damage = 30,5
guardflag = HA
pausetime = 9,12
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20, -50
hitsound = s1,2
guardsound = s2,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5
air.velocity = -2.5,-3.5

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = random < 400
value = s10,7

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0,2

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

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

[state 坐标]
type = Posadd
trigger1 = AnimElem = 2
x = -10

[state 坐标]
type = Posadd
trigger1 = AnimElem = 7
x = 10

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype = Medium
damage = 30,5
guardflag = MA
pausetime = 7,8
sparkno = s-1
guard.sparkno = s7050
sparkxy = -10, -75
hitsound = s1,2
guardsound = s2,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 13
ground.velocity = -3.5
air.velocity = -2.5,-3.5

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = random < 400
value = s10,7

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

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

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

[state 坐标]
type = Posadd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
x = 10

[state 坐标]
type = Posadd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 11
trigger3 = AnimElem = 12
x = -10

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype = Hard
damage = 60,10
guardflag = MA
pausetime = 10,11
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20,-90
hitsound   = s1,3
guardsound = s2,0
ground.type = High
ground.slidetime = 16
ground.hittime  = 25
ground.velocity = -8
air.velocity = -3.2,-3.2

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 5
trigger1 = random < 400
value = s10,7

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
value = s0,3

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

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

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype = Hard
damage = 60,10
guardflag = MA
pausetime = 10,11
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20,-60
hitsound   = s1,3
guardsound = s2,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -8.2
air.velocity = -3.6,-3.4

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 50,-70
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 6
trigger1 = random < 400
value = s10,7

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 6
value = s0,3

[State 转入]
type = ChangeState
triggerall = movehit
trigger1 = target,statetype != A
triggerall = command = "holdb"
trigger1 = AnimElemtime(7) >= 0 && AnimElemtime(8) < 0
value = 330
ctrl = 1

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

;---------------------------------------------------------------------------
;CD
[Statedef 300]
type     = S
movetype = A
physics  = S
poweradd = 40
ctrl     = 0
velset   = 0,0
anim     = 300
sprpriority = 3

[state 坐标]
type = Posset
trigger1 = time = 0
y = 0

[state 速度]
type = Velset
trigger1 = AnimElem = 3
x = 2

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage = 80,15
priority = 5
pausetime = 12,12
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20,-70
hitsound = s1,4
hitflag = MAF
guardflag = MA
guardsound = s2,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -5,-5
air.velocity = -5,-5
air.animtype = Back
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 60,-70
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0,4

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
trigger1 = random < 400
value = s10,18

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

;---------------------------------------------------------------------------
;刚CD
[Statedef 305]
type     = S
movetype = A
physics  = S
poweradd = -1000
ctrl     = 0
velset   = 0,0
anim     = 300
sprpriority = 3

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

[state 坐标]
type = Posset
trigger1 = time = 0
y = 0

[state 速度]
type = Velset
trigger1 = AnimElem = 3
x = 2

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

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Diagup
damage = 40
pausetime = 12,15
sparkno = s-1
sparkxy = -20,-70
guard.sparkno = s7050
hitsound   = s1,4
ground.type = High
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -5,-5
air.velocity = -5,-5
fall = 1
fall.recover = 0
kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 60,-70
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0,4

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
value = s10,18

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

;---------------------------------------------------------------------------
; 特殊技—肘钉
; CNS难度：初级
[Statedef 310]
type     = S
movetype = A
physics  = S
poweradd = 40
ctrl     = 0
velset   = 0,0
anim     = 310
sprpriority = 2

[State 坐标]
type = PosAdd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
x = 12

[State 坐标]
type = PosAdd
trigger1 = AnimElem = 4
x = 5

[State 坐标]
type = PosAdd
trigger1 = AnimElem = 14
trigger2 = AnimElem = 15
x = -15

[State 坐标]
type = PosAdd
trigger1 = AnimElem = 13
x = -5

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 62, 0
animtype = Hard
guardflag = M
hitflag = MAF
priority = 3, Hit
pausetime = 11, 14
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20, -75
hitsound = s1,1
guardsound = s2,0
ground.type = High
ground.slidetime = 21
ground.hittime  = 21
ground.velocity = -8
air.type = High
air.velocity = -3,-4
air.hittime = 22
air.fall = 1
fall.recover = 0

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 45,-75
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 9
trigger1 = random < 400
value = s10,10

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

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

;---------------------------------------------------------------------------
; 特殊技—扣杀踢
; CNS难度：初级
[Statedef 330]
type     = S
movetype = A
physics  = S
poweradd = 50
ctrl     = 0
velset   = 0,0
anim     = 330
sprpriority = 2

[State 坐标]
type = PosAdd
trigger1 = AnimElem = 1
x = 20

[State 坐标]
type = PosAdd
trigger1 = AnimElem = 6
x = -10

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage = 50, 0
animtype = Hard
guardflag = H
hitflag = MAF
priority = 3, Hit
pausetime = 10, 11
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20, -80
hitsound = s1,3
guardsound = s2,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 22
ground.velocity = -5
airguard.velocity = -2.5,-2.5
air.type = High
air.velocity = -2.5,-2.5
air.hittime = 22
air.fall = 1
fall.recover = 0

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 50,-65
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
trigger1 = random < 400
value = s10,7

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
value = s0,3

[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
poweradd = 20
ctrl     = 0
anim     = 400
sprpriority = 2

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
trigger1 = random < 400
value = s10,5

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

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage = 30,5
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = M
pausetime = 8,9
sparkno = s-1
guard.sparkno = s7050
sparkxy = -10,-45
hitsound   = s1,0
guardsound = s2,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 16
ground.velocity = -5
air.velocity = -1.5,-3

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 50,-45
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
poweradd = 40
ctrl     = 0
anim     = 410
sprpriority = 2

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 5
trigger1 = random < 400
value = s10,7

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

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 60,10
animtype = Hard
guardflag = M
hitflag = MAF
priority = 3, Hit
pausetime = 10, 11
sparkno = s-1
guard.sparkno = s7050
sparkxy = -13, -80
hitsound = s1,1
guardsound = s2,0
ground.type = High
ground.slidetime = 21
ground.hittime  = 22
ground.velocity = -7.6
airguard.velocity = -2.3,-1.8
air.type = High
air.velocity = -2.5,-3
air.hittime = 22
air.fall = 1
fall.recover = 0

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 30,-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 = 11
ctrl = 1

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
trigger1 = random < 400
value = s10,5

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
value = s0,2

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 30,5
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 8,10
sparkno = s-1
guard.sparkno = s7050
sparkxy = -10,-8
hitsound   = s1,2
guardsound = s2,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 16
ground.velocity = -5.5
air.velocity = -2,-3

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 45,-8
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难度：初级
; 这个攻击的ground.type参数被设为trip，所以对方被击中时会进入绊倒的动画。
; 注意这个攻击的hitflag是MAFD，表示倒地的对手也可以被击中。
[Statedef 440]
type     = C
movetype = A
physics  = C
poweradd = 40
ctrl     = 0
anim     = 440
sprpriority = 2

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = random < 400
value = s10,8

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 5
value = s0,3

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 60,10
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = s-1
guard.sparkno = s7050
sparkxy = -12,-10
hitsound   = s1,3
guardsound = s2,0
ground.type = Trip
ground.slidetime = 13
ground.hittime  = 15
ground.velocity = -3,-3
air.velocity = -3,-3
guard.velocity = -6
fall = 1

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 40,-8
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
poweradd = 20
ctrl     = 0
anim     = 600
sprpriority = 2

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = random < 400
value = s10,5

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

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 30,5
hitflag = MAF
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20,-60
hitsound   = s1,0
guardsound = s2,0
ground.type = High
ground.slidetime = 9
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1.3,-3

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7000
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 35,-55
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
poweradd = 40
ctrl     = 0
anim     = 610
sprpriority = 2

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = random < 400
value = s10,7

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

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 60,10
guardflag = HA
priority = 4
pausetime = 13,14
sparkno = s-1
guard.sparkno = s7050
sparkxy = -25,-55
hitsound   = s1,1
guardsound = s2,0
animtype = Medium
ground.type = High
ground.slidetime = 16
ground.hittime  = 24
ground.velocity = -5
air.velocity = -3,-4

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 45,-60
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = random < 400
value = s10,5

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0,2

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 30,5
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = s-1
guard.sparkno = s7050
sparkxy = -25,-70
hitsound   = s1,2
guardsound = s2,0
ground.type = High
ground.slidetime = 9
ground.hittime  = 13
ground.velocity = -4
air.velocity = -2,-3

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

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

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
trigger1 = random < 400
value = s10,7

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 4
value = s0,3

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 60,10
guardflag = HA
priority = 4
pausetime = 13,15
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20,-50
hitsound   = s1,3
guardsound = s2,0
animtype = Hard
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -5
air.velocity = -3,-4

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 50,-45
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

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

[State 攻击判定]
type = HitDef
trigger1 = time = 0
attr = A, NA
animtype  = Hard
damage  = 80,15
priority = 5
pausetime = 12,12
sparkno = s-1
guard.sparkno = s7050
sparkxy = -20,-70
hitsound = s1,4
hitflag = MAF
guardflag = MA
guardsound = s2,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -5,-5
air.velocity = -5,-5
air.animtype = Back
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 打击火花]
type = Explod
ownpal = 1
trigger1 = movehit = 1
anim = 7001
sprpriority = 10
supermovetime = 9999
postype = p1
pos = 50,-75
bindtime = 1
ignorehitpause = 1
persistent = 0
under = 0
ownpal = 1
scale = 0.35,0.35
trans = addalpha
alpha = 256, 256

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0,4

[State 音效]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = random < 400
value = s10,18

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

[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 = PlaySnd
trigger1 = AnimElem = 2
trigger1 = random < 400
value = s10,11

[State 残影]
type = AfterImage
trigger1 = AnimElem = 2
time = 19
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 0,0,0
palcontrast = 128,128,128
palmul = 1,1,1

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

[State 速度]
type = VelSet
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(6) < 0
x = 5

[State 速度]
type = VelSet
trigger1 = AnimElem = 7
x = 0

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

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

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

[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 = PlaySnd
trigger1 = AnimElem = 2
trigger1 = random < 400
value = s10,11

[State 残影]
type = AfterImage
trigger1 = AnimElem = 2
time = 19
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 0,0,0
palcontrast = 128,128,128
palmul = 1,1,1

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

[State 速度]
type = VelSet
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(6) < 0
x = -5

[State 速度]
type = VelSet
trigger1 = AnimElem = 7
x = 0

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

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

;---------------------------------------------------------------------------
; 功夫投-尝试
; CNS难度：中级-上级
; 投技并不难写，但是有的时候会很繁杂。（翻译这个魂淡文本也是）
; 投技的HitDef需要特殊写法。关键的两个参数是p1stateno和p2stateno。
; 如果HitDef击中了，攻击者会进入p1stateno，受击者会进入p2stateno。
; 关于p2stateno特别的地方是受击者会进入p1的cns文档里写的state。
; 无论p2是谁，他都会进入这个文档(kfm.cns)里声明的state820，直到投技结束。
; （在MUGEN里进入debug模式看p2的状态号，黄色的状态号表明在其他人物的state里。

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

[State 攻击判定]
type = HitDef
trigger1 = Time = 0
attr = , NT     
hitflag = M-       
priority = 1, Miss
sparkno = s-1
sparkxy = -20,-80
p1sprpriority = 2   
p2sprpriority = 1     
p1facing = 1
p2facing = 1          
p1stateno = 810
p2stateno = 820
guard.dist = 0
fall = 1
numhits = 0

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

;---------------------------------------------------------------------------
;投(P1)
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810

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

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

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

[State 转向]
type = Turn
trigger1 = AnimElem = 6

[State 图层]
type = SprPriority
trigger1 = AnimElem = 4
value = 0

[State 音效]
type = PlaySnd
Trigger1 = time = 0
value = s1,6

[State 坐标]
type = PlaySnd
Trigger1 = AnimElem = 4
value = s0,4

[State 坐标]
type = TargetBind
Trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(4) < 0
pos = 30, 0

[State 坐标]
type = TargetBind
Trigger1 = AnimElemtime(4) >= 0 && AnimElemtime(5) < 0
pos = -12, -95

[State 坐标]
type = TargetBind
Trigger1 = AnimElemtime(5) >= 0 && AnimElemtime(6) < 0
pos = -45, -90

[State 坐标]
type = TargetBind
Trigger1 = AnimElemtime(6) >= 0 && AnimElemtime(6) < 2
pos = 60, -15

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

;---------------------------------------------------------------------------
;投(P2)
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 屏幕检测]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

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

[State 速度]
type = Velset
trigger1 = AnimElemtime(6) >= 0
x = 3
y = 20

[State 震屏]
type = EnvShake
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
time = 10

[State 扣血]
type = Lifeadd
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = -100

[State 转入]
type = ChangeState
trigger1 = ishelper
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100

[State 转入]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100

;---------------------------------------------------------------------------
;投(P2)
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 0,0

[State 屏幕检测]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

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

[State 速度]
type = Velset
trigger1 = AnimElemtime(6) >= 0
x = 3
y = 20

[State 震屏]
type = EnvShake
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
time = 10

[State 扣血]
type = Lifeadd
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = -100

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

;---------------------------------------------------------------------------
;投(P2)
[Statedef 822]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 3
facep2 = 1

[state 转入]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1253

[state 转入]
type = ChangeAnim2
Trigger1 = !HitShakeOver
Trigger1 = Time > 0
value = 1253

[State 暂停]
type = Pause
trigger1 = time = [0,5]
time = 2

[state 速度]
type = velset
triggerall = Enemynear,facing = -facing
trigger1 = time = 0
x = 0
y = -8.5

[state 速度]
type = velset
triggerall = Enemynear,facing = facing
trigger1 = time = 0
x = 0
y = -8.5

[state 速度]
type = veladd
trigger1 = time > 1
y = 0.4

[state 转入]
type = ChangeAnim2
Trigger1 = Vel Y > 0
Trigger1 = Pos Y < 0
Trigger1 = Anim = 1253
value = 1254

[state 屏幕限制]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 1,0

[State 旋转]
type = AngleDraw
trigger1 = HitShakeOver
scale = 1,1
value = 15 * time

[State 转入] 
type = SelfState
triggerall = time >= 10
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
[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)

[State 格挡]
type = helper
triggerall = var(5) = 1
triggerall = stateno = 1300
trigger1 = time >= 0
trigger1 =  NUMhelper(1310) = 0
stateno = 1310
id = 1310
name = "dun"
pos = 0,0
postype = P1
helpertype = normal
keyctrl = 0
ownpal = 1
PERSISTENT = 1
ignorehitpause = 1

[State 火花]
type = Helper
Trigger1 = projhit1000 = 1 && ProjContact = 1
name = "huohua"
id = 8888
stateno = 8888
postype = p2
pos = 15,-30
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit1003 = 1 && ProjContact = 1
name = "huohua"
id = 8889
stateno = 8889
postype = p2
pos = 15,-50
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit1010 = 1 && ProjContact = 1
name = "huohua"
id = 8888
stateno = 8888
postype = p2
pos = 15,-30
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit1050 = 1 && ProjContact = 1
name = "huohua"
id = 8888
stateno = 8888
postype = p2
pos = 15,-30
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit1085 = 1 && ProjContact = 1
name = "huohua"
id = 8888
stateno = 8888
postype = p2
pos = 10,-60
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit1284 = 1 && ProjContact = 1
name = "huohua"
id = 8889
stateno = 8889
postype = p2
pos = 0,-50
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit3105 = 1 && ProjContact = 1
name = "huohua"
id = 8889
stateno = 8889
postype = p2
pos = 0,-50;+(floor(p2bodydist Y))
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit3106 = 1 && ProjContact = 1
name = "huohua"
id = 8890
stateno = 8890
postype = p2
pos = 0,-50;+(floor(p2bodydist Y))
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit3150 = 1 && ProjContact = 1
name = "huohua"
id = 8889
stateno = 8889
postype = p2
pos = 0,-50;+(floor(p2bodydist Y))
ownpal = 1

[State 火花]
type = Helper
Trigger1 = projhit3151 = 1 && ProjContact = 1
name = "huohua"
id = 8890
stateno = 8890
postype = p2
pos = 0,-50;+(floor(p2bodydist Y))
ownpal = 1

;特效部分

[State 特效]
type = Explod
trigger1 = p2movetype = H
trigger1 = p2stateno = 1231	
trigger1 = enemy,time = 1
anim = 7200
pos = 0,0
postype = p2
scale = 0.5,0.5
sprpriority = -10
ownpal = 1
bindtime = 1

[State 特效]
type = Explod
trigger1 = p2movetype = H
trigger1 = p2stateno = 1253	
trigger1 = enemy,time = 1
persistent = 0
anim = 7310
postype = P2
pos = -10,10
sprpriority = 999
bindtime = 1

[State 特效]
type = Explod
trigger1 = p2movetype = H
trigger1 = p2stateno = 822	
trigger1 = enemy,time = 1
persistent = 0
anim = 7310
postype = P2
pos = -10,10
sprpriority = 999
bindtime = 1

[State 特效]
type = Explod
trigger1 = p2movetype = H
trigger1 = p2stateno = 1253	
trigger1 = enemy,time = 1
anim = 7311
pos = -10,10
postype = p2
bindtime = 1
sprpriority = -10
ownpal = 1
scale = 0.8,0.8

[State 特效]
type = Explod
trigger1 = p2movetype = H
trigger1 = p2stateno = 822	
trigger1 = enemy,time = 1
anim = 7311
pos = -10,10
postype = p2
bindtime = 1
sprpriority = -10
ownpal = 1
scale = 0.8,0.8

[State 特效]
type = Explod
trigger1 = p2movetype = H
trigger1 = p2stateno = 1165
trigger1 = enemy,backEdgebodydist <= 5
anim = 7250
pos = -20,-60
postype = p2
facing = -1
scale = 0.5,0.5
sprpriority = -9
ownpal = 1
bindtime = 1

[State Exp删除]
type = RemoveExplod
trigger1 = Anim !=  1050
ID = 1006

[State Exp删除]
type = RemoveExplod
trigger1 = Anim != 1303
ID = 1303

[State Exp删除]
type = RemoveExplod
trigger1 = Anim != 3150
trigger1 = Anim != 4000
trigger2 = Movetype != A
ID = 3160

[State Exp删除]
type = RemoveExplod
trigger1 = Anim != 3260
ID = 3261

[State Exp删除]
type = RemoveExplod
trigger1 = Anim != 4005
ID = 4030

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

[State 音效停止]
type = StopSnd
trigger1 = stateno != 1260
trigger1 = stateno != 1280
trigger1 = stateno != 1300
channel = 2

[State 音效停止]
type = StopSnd
trigger1 = stateno != [4005,4006]
channel = 3

[State 特效]
type = PlaySnd
trigger1 = p2movetype = H
trigger1 = p2stateno = 1253	
trigger1 = enemy,time = 1
value = s1,8

[State 音效]
type = PlaySnd
trigger1 = p2movetype = H
trigger1 = p2stateno = 1165
trigger1 = enemy,backEdgebodydist <= 5
value = s1,8

;--------------------------------------------------------------------------
[Statedef -3]


[State -3, コマンドを入れたらVarをON]
Type = VarSet
Trigger1 = Command = "jump" ;残影跳的指令，一般是269，247这些的，一会给出指令
Trigger1 = Ctrl
Trigger1 = StateType = S
Trigger2 = PrevStateNo = [100,102]
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 -3, 成功したときの残像]
type = AfterImage
Trigger1 = var(3) >= 1
Trigger1 = stateno = 50
time = 25
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 0,0,0
palcontrast = 128,128,128
palmul = 1,1,1
