50 lines
1.1 KiB
Go
50 lines
1.1 KiB
Go
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{})
|
||
|
||
}
|