```
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

feat(fight): 技能效果93功能优化

- 移除alpacadecimal依赖包导入
- 简化Effect93初始化代码
- 重命名OnSkill方法为Skill_Use以提高语义清晰度
- 直接使用Args()[1]替换SideEffectArgs避免额外参数传递
```
This commit is contained in:
昔念
2026-03-12 01:16:26 +08:00
parent 4c71aa9db1
commit 7f3bfff542

View File

@@ -4,8 +4,6 @@ import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
/**
@@ -13,9 +11,7 @@ import (
*/
func init() {
input.InitEffect(input.EffectType.Skill, 93, &Effect93{
EffectNode: node.EffectNode{},
})
input.InitEffect(input.EffectType.Skill, 93, &Effect93{})
}
@@ -23,7 +19,7 @@ type Effect93 struct {
node.EffectNode
}
func (e *Effect93) OnSkill() bool {
func (e *Effect93) Skill_Use() bool {
// 概率判定
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
@@ -32,7 +28,7 @@ func (e *Effect93) OnSkill() bool {
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: alpacadecimal.NewFromInt(int64(e.SideEffectArgs[1])),
Damage: e.Args()[1],
})
return true
}