Files
bl/logic/service/fight/effect/effect_101.go
昔念 6d387f847e
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
refactor(item_use): 优化物品列表处理逻辑

- 修改循环方式,使用索引直接赋值替换append操作
- 提升代码性能和内存使用效率

refactor(effect_101): 清理无用注释

- 移除过时的中文注释内容
```
2026-03-03 00:51:06 +08:00

31 lines
566 B
Go

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
/**
* 给对手造成伤害时,伤害数值的 n%恢复自身体力
*/
type Effect101 struct {
node.EffectNode
}
func init() {
input.InitEffect(input.EffectType.Skill, 101, &Effect101{})
}
func (e *Effect101) OnSkill() bool {
e.Input.Heal(
e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Mul(e.Args()[0].Div(alpacadecimal.NewFromInt(100))),
)
return true
}