Files
bl/logic/service/fight/effect/none.go
xinian faad50b1df
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 新增战斗技能效果并修复初始化注册
2026-03-13 16:05:43 +08:00

50 lines
1.1 KiB
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/input"
"blazing/logic/service/fight/node"
)
// 445 - 使用后在战斗结束时可以获得500赛尔豆每日上限5000
type Effect445 struct {
node.EffectNode
}
// func (e *Effect445) OnSkill() bool {
// // 这个效果需要在战斗结束后执行,暂时记录奖励
// e.Ctx().Our.EndReward = 500
// return true
// }
func init() {
input.InitEffect(input.EffectType.Skill, 445, &Effect445{})
}
// 201 - 组队时恢复己方1/n的体力
type Effect201 struct {
node.EffectNode
}
// func (e *Effect201) OnSkill() bool {
// // 检查是否在组队战斗中
// if e.Ctx().IsTeamBattle {
// // 计算恢复量
// team := e.Ctx().Our.TeamPets // 假设有队伍宠物列表
// for _, pet := range team {
// if pet.Info.Hp > 0 { // 只恢复还活着的宠物
// maxHp := pet.GetMaxHP()
// healAmount := maxHp.Div(e.Args()[0]) // 1/n
// // 恢复体力
// pet.Heal(pet, &action.SelectSkillAction{}, healAmount)
// }
// }
// }
// return true
// }
func init() {
input.InitEffect(input.EffectType.Skill, 201, &Effect201{})
}