Files
bl/logic/service/player/ai.go
昔念 e54d4bacaa ```
feat(fight): 增加战斗模式枚举并重构战斗逻辑判断

- 引入完整的 BattleMode 枚举定义,替代原有的 BattleStatus,明确区分各类战斗场景
- 在多个控制器中替换对旧 Status 字段的依赖,统一使用 Mode 判断战斗状态
- 修复部分函数调用前未检查 FightC 是否为空的问题,增加 ErrBattleEnded 错误返回
- 调整
2025-11-21 02:40:27 +08:00

47 lines
749 B
Go

package player
import (
"blazing/logic/service/common"
"blazing/logic/service/fight/info"
"blazing/modules/blazing/model"
)
type AI_player struct {
baseplayer
petinfo []model.PetInfo //精灵信息
CanCapture int
}
func (p *AI_player) Getfightinfo() info.Fightinfo {
return info.Fightinfo{}
}
func (f *AI_player) SendPack(b []byte) error {
return nil
}
func (f *AI_player) SendPackCmd(_ uint32, _ any) {
//fmt.Println("战斗结束")
}
func (p *AI_player) GetPetInfo() []model.PetInfo {
return p.petinfo
}
func (lw *AI_player) SendLoadPercent(info.LoadPercentOutboundInfo) {
}
func (f *AI_player) InvitePlayer(ff common.PlayerI) {
}
func (p *AI_player) QuitFight() {
}
func (p *AI_player) CanFight() bool {
return true
}