Files
bl/logic/service/fight/effect/1044.go
昔念 b558f46d7a
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
feat(game): 宠物融合系统添加物品消耗异常处理

- 在宠物融合过程中添加物品扣除失败的错误检查
- 当物品不足时返回ErrInsufficientItems错误码

fix(pet): 宠物仓库管理功能增加数据库操作错误处理

- 在宠物释放到仓库和从仓库取出时验证数据库更新结果
- 添加宠物背包切换功能的错误检查机制

feat(fight):
2026-03-19 14:50:11 +08:00

48 lines
904 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/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 1044 - 吸取对手能力提升状态吸取成功则下n回合造成的伤害翻倍
type Effect1044 struct {
node.EffectNode
damageMultiplierActive bool
multiplierDuration int
can bool
}
func (e *Effect1044) OnSkill() bool {
// 检查对手是否有能力提升状态可以吸取
for i, v := range e.Ctx().Opp.Prop[:] {
if v > 0 {
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
e.can = true
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
}
}
}
return true
}
func (e *Effect1044) Damage_Mul(t *info.DamageZone) bool {
if !e.can {
return true
}
if t.Type != info.DamageType.Red {
return true
}
t.Mul(2)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1044, &Effect1044{})
}