feat: 添加战斗效果126和284
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
25
logic/service/fight/boss/NewSeIdx_126.go
Normal file
25
logic/service/fight/boss/NewSeIdx_126.go
Normal 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{})
|
||||||
|
}
|
||||||
26
logic/service/fight/boss/NewSeIdx_284.go
Normal file
26
logic/service/fight/boss/NewSeIdx_284.go
Normal 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{})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user