package fight func NewFightBase() *FightBase { return &FightBase{} } /// /// 每场战斗需要new一个类,因为客户端有同时进行多场战斗的需求,所以这里不能是单例 /// type FightBase struct { /// /// 战斗类型 /// fightType FightType /// /// 战斗是否进行中 /// fightIng bool /// /// 所有参战角色集合 /// Roles []*FightRole /// /// 当前回合满足行动值大于等于100的所有角色 /// CanAtkRoles []*FightRole /// /// 最后一次攻击的角色 /// LastActionRole FightRole /// /// 是否自动战斗 /// AutoFight bool /// /// 战斗AI /// FightAI FightAI /// /// 随机数种子 /// RandSeed int64 /// /// 事件系统 /// FightEvent IFightEvent /// /// 战报 /// FightLog FightLog /// /// 是否可进入下个循环 /// /// /// 客户端专用逻辑 /// ToNextRound bool } /// /// 开始战斗 /// func (this *FightBase) StartFight() { this.fightIng = true // FightDebug.Log("=========开始战斗=========") //记录战报 // var com = new(ComStartFight) // FightLog.AddCommand(com) //不直接用enum,防止装箱拆箱 this.FightEvent.Emit(int(EventType_OnFightStart)) // BeforeStart() // EmitCaptainSkill() // EmitPassiveSkillSkill() // //todo...符文技?? // InitRoleOperateValue() // TurnRound() }