Files
bl/logic/service/fight/effect/effect_69.go
昔念 a62b94446a ```
feat(pet): 添加精灵进化功能并优化融合系统

- 新增PetELV方法实现精灵进化功能,支持分支进化选择
- 添加进化相关的数据结构定义
- 实现进化材料检查和扣除逻辑
- 优化宠物融合失败处理机制

fix(fight): 修复战斗系统和效果计算问题

- 修复NewSeIdx_11和effect_60中的伤害计算逻辑
- 修复战斗状态判断条件,避免非PVP模式下的错误处理
- 优化战斗回合处理流程,修复效果缓存清空时机
- 修复effect_69
2026-01-03 01:35:32 +08:00

55 lines
987 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/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* 下n回合对手使用体力药剂时效果变成减少相应的体力
*/
type Effect69 struct {
node.EffectNode
}
type Effect69_sub struct {
node.EffectNode
}
func init() {
t := &Effect69{
EffectNode: node.EffectNode{},
}
//t.Owner(true)
//t.Duration(5)
input.InitEffect(input.EffectType.Skill, 69, t)
}
func (e *Effect69) OnSkill() bool {
if !e.Hit() {
return true
}
t := &Effect69_sub{
EffectNode: node.EffectNode{},
}
tt := e.ID()
tt.SetEffectType(input.EffectType.Sub)
t.ID(tt)
t.SetArgs(e.Input, e.SideEffectArgs...)
t.Duration(e.SideEffectArgs[0])
e.Ctx().Opp.AddEffect(e.Ctx().Our, t)
return true
}
func (e *Effect69_sub) Heal_Pre(f action.BattleActionI, t *int) bool {
if _, ok := f.(*action.UseItemAction); ok {
*t = -*t // 把t指向的值取反直接作用于外部变量
}
return true
}