- 删除了 fight.go 文件,移除了 PlayerI 接口和 FightC 结构体 - 更新了 battle.go 文件,将 Effects 类型改为 *NodeManager - 重构了 nodemanger.go 文件,取消了 NodeManagerE 结构体,改为在 NodeManager 中直接处理所有效果 - 优化了 player.go 文件,将 service 包改为 blservice 包以避免循环引用
43 lines
1.0 KiB
Go
43 lines
1.0 KiB
Go
package service
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/modules/blazing/model"
|
|
"fmt"
|
|
)
|
|
|
|
type AI_player struct {
|
|
fightinfo info.NoteReadyToFightInfo
|
|
id uint32 //0
|
|
FightC *FightC //绑定战斗标识 替代本身的是否战斗标记 //IsFighting bool
|
|
//petinfo []model.PlayerInfo //精灵信息
|
|
|
|
}
|
|
|
|
func (f *AI_player) ID() uint32 {
|
|
return f.id
|
|
}
|
|
|
|
func (f *AI_player) MapID() uint32 {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (f *AI_player) GetInfo() model.PlayerInfo {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (f *AI_player) SendPack(b []byte) error {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (f *AI_player) SendReadyToFightInfo(gg info.FightStartOutboundInfo) {
|
|
|
|
fmt.Println(gg)
|
|
f.FightC.UseSkill(f, f.fightinfo.OpponentPetList[0].SkillList[0].ID) //使用1#技能,实际上要按照四个技能权重去使用
|
|
//这时候给个出招
|
|
}
|
|
|
|
func (f *AI_player) SendNoteReadyToFightInfo(_ info.NoteReadyToFightInfo) {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|