Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
实现1383-1387技能效果,包括自然祝福状态下的属性强化、自然祝福层数管理、护盾效果等
33 lines
690 B
Go
33 lines
690 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// Effect 1383: 全属性+{0},自身处于自然祝福状态下则强化效果翻倍
|
|
type Effect1383 struct{ node.EffectNode }
|
|
|
|
func (e *Effect1383) OnSkill() bool {
|
|
if len(e.Args()) == 0 {
|
|
return true
|
|
}
|
|
boost := int8(e.Args()[0].IntPart())
|
|
if boost == 0 {
|
|
return true
|
|
}
|
|
multiplier := int8(1)
|
|
if naturalBlessingEffect(e.Ctx().Our) != nil {
|
|
multiplier = 2
|
|
}
|
|
delta := boost * multiplier
|
|
for i := range e.Ctx().Our.Prop[:] {
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), delta)
|
|
}
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 1383, &Effect1383{})
|
|
}
|