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

enum BattleType {
  nil = 0;
  pve = 1;
  pvp = 2;
  pvb = 3;
}

//玩法类型
enum PlayType {
  moonfantasy = 0; //月之秘境
  mainline = 1;    //主线玩法
  pagoda = 2;      //爬塔
  viking = 3;      //远征
  rtask = 4;       //随机任务
  hunting = 5;     //狩猎
}

//战斗状态
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"`) 普通技能
  map<string, int32> property = 11; // 属性相关
}

//战斗阵型信息
message DBBattleFormt {
  int32 leadpos = 1; //队长位置
  repeated BattleRole team = 2;
}

//战斗记录
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;               //最终结果
}