feat: 添加战斗效果126和284
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-06 10:23:07 +08:00
committed by cnb
parent 24e7f2cd17
commit 17103cbc9a
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
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{})
}

View File

@@ -0,0 +1,26 @@
package effect
import (
"blazing/logic/service/fight/input"
)
// T284.
type NewSel284 struct {
NewSel0
}
func (e *NewSel284) SkillHit_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
if e.Ctx().SkillEntity.Priority <= 0 {
return true
}
e.Ctx().SkillEntity.SetNoSide()
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 284, &NewSel284{})
}