30 lines
649 B
Go
30 lines
649 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// 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
|
|
// }
|