2025-11-14 00:26:34 +08:00
|
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"blazing/logic/service/fight/info"
|
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
|
|
2025-12-05 00:24:02 +08:00
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
2025-11-14 00:26:34 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 损失1/2的体力,提升自身的能力
|
|
|
|
|
|
*/
|
|
|
|
|
|
type Effect79 struct {
|
|
|
|
|
|
node.EffectNode
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
|
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 79, &Effect79{})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 命中之后
|
|
|
|
|
|
// 特攻+2速度+1命中+1,
|
|
|
|
|
|
func (e *Effect79) OnSkill() bool {
|
|
|
|
|
|
|
|
|
|
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, 2, 2, info.AbilityOpType.ADD)
|
|
|
|
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, 4, 1, info.AbilityOpType.ADD)
|
|
|
|
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, 5, 1, info.AbilityOpType.ADD)
|
|
|
|
|
|
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
|
|
|
|
|
|
Type: info.DamageType.Fixed,
|
2025-12-05 00:24:02 +08:00
|
|
|
|
Damage: alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.MaxHp)).Div(alpacadecimal.NewFromInt(2)),
|
2025-11-14 00:26:34 +08:00
|
|
|
|
})
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|