Files
bl/logic/service/fight/boss/NewSeIdx_126.go
xinian 17103cbc9a
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat: 添加战斗效果126和284
2026-03-06 10:23:07 +08:00

26 lines
958 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/action"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// 126. 给一种 battle_attr 增加固定 n/100 点属性值;a1: battle_attr, a2: n
type NewSel126 struct {
NewSel0
}
func (e *NewSel126) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
p := e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())]
e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())] += uint32(e.Args()[1].Div(alpacadecimal.NewFromInt(100).Mul(alpacadecimal.NewFromInt(int64(p)))).IntPart())
}
func (e *NewSel126) TurnEnd() {
p := e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())]
e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())] -= uint32(e.Args()[1].Div(alpacadecimal.NewFromInt(100).Mul(alpacadecimal.NewFromInt(int64(p)))).IntPart())
}
func init() {
input.InitEffect(input.EffectType.NewSel, 126, &NewSel126{})
}