diff --git a/logic/service/fight/boss/NewSeIdx_126.go b/logic/service/fight/boss/NewSeIdx_126.go new file mode 100644 index 000000000..571854256 --- /dev/null +++ b/logic/service/fight/boss/NewSeIdx_126.go @@ -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{}) +} diff --git a/logic/service/fight/boss/NewSeIdx_284.go b/logic/service/fight/boss/NewSeIdx_284.go new file mode 100644 index 000000000..c19c4cd78 --- /dev/null +++ b/logic/service/fight/boss/NewSeIdx_284.go @@ -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{}) +}