syntax = "proto3";
option go_package = ".;pb";
import "comm.proto";

enum BattleType {
  nil = 0;
  pve = 1;        //pve
  pvp = 2;        //异步pvp
  pvb = 3;        //boos战斗
  eve = 4;        //eve对战
  rtpvp = 5;      //实时pvp
  lpev = 6;       //连续战斗
}

//玩法类型
enum PlayType {
  null = 0;         //无效类型
  mainline = 1;     //主线玩法
  pagoda = 2;       //爬塔
  rtask = 3;        //随机任务战斗
  hunting = 4;      //狩猎
  viking = 5;       //维京远征
  moonfantasy = 6;  //月之秘境
  arena = 7;        //竞技场
  academy = 8;      //联盟学院
  heroteaching =9;  //英雄教学
  combat = 10;      //新关卡
  enchant = 11;     //附魔副本
  sociaty = 12;     //工会战
  friendsmeet = 13; //好友切磋
  practicenpc = 14; //武馆NPC
}

//战斗状态
enum BBattleState {
  in = 0;
  end = 2;
}

//战斗阵型信息
enum DBBattleComp {
  draw = 0; //平局
  red = 1;  //红方
  bule = 2; //蓝方
}

message BattleRole {
  int32 tid = 1;           // 临时id
  string oid = 2;          // 玩家英雄数据库id
  int32 pos = 3;           // 站位坐标
  string heroID = 4;       //@go_tags(`bson:"heroID"`) 英雄的配置表ID
  int32 star = 5;          // 英雄星级
  int32 lv = 6;            // 英雄等级
  int32 captainSkill = 7;  //@go_tags(`bson:"captainSkill"`) 队长技能
  int32 mainSuitSkill = 8; ///@go_tags(`bson:"mainSuitSkill"`)  主套装技能
  int32 subSuitSkill = 9;  ///@go_tags(`bson:"subSuitSkill"`)  副套装技能
  repeated SkillData normalSkill = 10; //@go_tags(`bson:"normalSkill"`) 普通技能
  repeated SkillData equipSkill = 11; //@go_tags(`bson:"equipSkill"`) 普通技能
  int32 PandaBuff = 12;             //熊猫buff技能id
  map<int32, int32> property = 13; //基础属性
  bool ishelp = 14;                 //是否是助战英雄
  int32 isboos = 15;                //是否是boos
  int32 monsterid = 16;             //怪物id
  int32 currhp = 17;                //当前血量
}

//战斗阵型信息
message DBBattleFormt {
  int32 leadpos = 1; //队长位置
  repeated BattleRole team = 2;   //自己的战队
  repeated BattleRole systeam = 3;  //系统辅助战队
  repeated BattleRole backupteam = 4; //后援战队
}

//战斗记录
message DBBattleRecord {
  string id = 1;                          //战斗记录id
  string title = 2;                       //战斗标题
  BattleType btype = 3;                   //战斗类型
  PlayType ptype = 4;                     //玩法类型
  string plevel = 5;                      //玩法关卡
  BBattleState state = 6;                 //战斗状态
  string redCompId = 7;                   //红方阵营id
  repeated DBBattleFormt redflist = 8;    //红方阵型列表
  string blueCompId = 9;                  //蓝方阵营id
  repeated DBBattleFormt buleflist = 10;  //红方阵型列表
  repeated DBBattleComp roundresult = 11; //战斗场次结果
  DBBattleComp result = 12;               //最终结果
  repeated int32 tasks = 13;             //任务列表
}