Files
bl/logic/service/fight/effect/effect_39.go
昔念 8b48ce1c06 ```
feat(fight): 调整技能与状态效果逻辑,优化战斗流程

- 注释掉状态 ID 13 的注册,暂不启用 DrainedHP 状态
- 为 Effect10 增加输入参数设置,标记目标单位
- 重构 Effect62 实现逻辑,新增子效果 Effect62_1 支持回合触发秒杀机制
- 引入 decimal 包以支持精确伤害计算
- 修改命中判断流程,修复部分技能命中异常问题
- 增加睡眠状态对空技能的防御处理
- 优化战斗死亡判定逻辑,支持同归于尽判定及战斗结束控制
2025-11-08 23:20:48 +08:00

36 lines
611 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* n%降低对手所有技能m点PP值然后若对手所选择的技能PP值为0则当回合对手无法行动
*/
func init() {
input.InitEffect(input.EffectType.Skill, 39, &Effect39{
EffectNode: node.EffectNode{},
})
}
type Effect39 struct {
node.EffectNode
}
func (e *Effect39) OnSkill(ctx input.Ctx) bool {
if !e.Hit() {
return true
}
// 概率判定
ok, _, _ := e.Input.Player.Roll(e.SideEffectArgs[0], 100)
if !ok {
return true
}
ctx.DelPP(e.SideEffectArgs[1])
return true
}