Files
bl/logic/service/fight/effect/effect_20.go
昔念 f847386b7c feat(fight): 优化技能命中逻辑与效果触发流程
重构了技能攻击处理逻辑,调整了命中判断和效果应用的顺序。
新增 `Calculate_Pre` 接口方法用于实现无视类效果。
修复技能是否命中的判断逻辑,确保效果命中状态正确传递。
清理上回合缓存的效果数据,保证每回合初始状态干净。
统一使用 `IsFirst` 方法判断先后手,提升代码一致性。
完善玩家离线时的数据保存顺序,避免重复操作。
更新依赖模块版本信息。
2025-10-05 00:29:22 +08:00

27 lines
519 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/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* m%令本方疲惫n回合无法攻击
*/
func init() {
input.InitEffect(input.EffectType.Skill, 20, &Effect20{})
}
type Effect20 struct {
node.EffectNode
}
// 使用技能时不可被继承继承Miss和Hit就行
func (e *Effect20) OnSkill(input.Ctx) bool {
e.Input.AddEffect(input.Geteffect(input.EffectType.Status, int(info.PetStatus.Tired)))
return true
}