All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix(fight): 移除无用依赖并优化技能效果逻辑 - 移除了github.com/alpacahq/alpacadecimal依赖,简化了生命值恢复计算逻辑 - 修复了effect_4_5.go中技能参数索引错误,统一了概率判定和属性设置的参数使用
29 lines
530 B
Go
29 lines
530 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/action"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
/**
|
|
* 恢复自身最大体力的1/n
|
|
*/
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 43, &Effect43{})
|
|
|
|
}
|
|
|
|
type Effect43 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect43) OnSkill() bool {
|
|
|
|
//fmt.Println("恢复自身最大体量的1/n", tt.IntPart())
|
|
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0]))
|
|
|
|
return true
|
|
}
|