Files
bl/logic/service/fight/boss/NewSeIdx_14.go
2026-04-04 04:28:04 +08:00

32 lines
1021 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/info"
"blazing/logic/service/fight/input"
)
// 14. 若遇到天敌, 则战斗开始时连续害怕 n 回合;a1: n
// TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;a1: n的核心逻辑
type NewSel14 struct {
NewSel0
conut int
}
func (e *NewSel14) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
// TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;a1: n的核心逻辑
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime || !e.ISNaturalEnemy() {
return
}
// 5. 获取状态效果实例并设置参数
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Fear))
// 6. 给对手添加状态
//然后这里是被动添加,所以对方不能消除
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
func init() {
input.InitEffect(input.EffectType.NewSel, 14, &NewSel14{})
}