Files
bl/logic/service/fight/effect/effect_9.go
2025-10-05 07:13:43 +00:00

41 lines
838 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/common/utils"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* 连续使用每次威力增加n最高威力m
*/
func init() {
input.InitEffect(input.EffectType.Skill, 9, &Effect9{
EffectNode: node.EffectNode{},
})
}
type Effect9 struct {
node.EffectNode
Skillid int //记录使用的技能 如果技能变了就删除effect
UseSkillCount int //技能使用了多少次切换后置0
}
func (e *Effect9) Skill_Hit(ctx input.Ctx) bool {
if e.Skillid != 0 && ctx.SkillEntity.ID != e.Skillid {
e.NotALive()
e.UseSkillCount = 0
return true
}
e.Skillid = ctx.SkillEntity.ID
add := e.EffectNode.SideEffectArgs[0] * e.UseSkillCount
ctx.SkillEntity.Power += utils.Min(add, e.EffectNode.SideEffectArgs[1])
e.UseSkillCount++
return true
}