syntax = "proto3";
option go_package = ".;pb";
import "battle_db.proto";
import "battle_msg.proto";

//修改行动值
message ComModifyOperate{
  int32 to = 1;
  float nv =2; //行动值
  bool reset = 3;//是否是清零
}
//战斗开始
message ComStartFight{
  int32 reserve =1;
}
//初始化战斗角色
message ComInitFight{
  int32 curWave =1;  //波次
  int32 redEntryRid =2; // side=1
  int32 buleEntryRid =3; // side = 2;
  int32 playType = 4;  //玩法类型
  repeated BattleRole roles = 5; //角色列表
}
// 删除角色
message ComDeleteRole{
  int32 to = 1;
}
//战斗结束指令
message ComEndFight{
  string fightId = 1;
  int32 winSide =2;
  int32 totalRound =3; //经历回合
  int32 RedDeath = 4;  //红方死亡统计
  int32 buleDeath = 5; //蓝方死亡统计
}
//技能信息
message ComSkillInfo{
  int32 skillId = 1;
  int32 lv = 2;
  int32 maxCd = 3;
  int32 cd = 4;
  bool showEffect = 5;//是否显示CD恢复特效
}
//回合开始
message ComStartAction{
  int32 from = 1; //当前出手角色
  int32 target = 2; //预选攻击目标
  int32 curRound = 3;
  repeated ComSkillInfo skillInfo = 4;
}

//角色技能CD
message ComSkillCDAction{
  int32 from = 1; 
  repeated ComSkillInfo skillInfo = 2;
}
//回合结束
message  ComStopAction{
  int32 from = 1; //当前结束回合角色
}
//等待输入技能
message ComWaitInputSkill{
  bool auto = 1;
  int32 side = 2;
  int32 skillId = 3;
  int32 target = 4;
  int32 curRound = 5;
}
//主技能命令
message ComSkillAtk{
  int32 from = 1;
  int32 skillid = 2;
  int32 lv = 3;
  int32 param = 4;
  int32 target = 5; //释放目标
  repeated ComSkillAfterAtk comList = 6;
  string aniName = 7; //预览使用
}
//子技能
message ComSkillAfterAtk{
  int32 skillid = 1;
  int32 from = 2;
  repeated int32 target= 4; //子技能目标(弹道类技能会用到)
  repeated BattleCmd comList = 5;
}
//buff
message ComMondifyBuff{
  int32 to = 1;
  int64 gid = 2; //唯一实体id
  int32 buffId = 3; //配置id
  int32 overlapNum = 4; //叠加层数
  float param = 5; //参数 - 护盾量
  int32 operate = 6; // 0 移除 1 添加 2 修改
}
//复活
message ComRebirth{
  int32 to = 1;
}
//血量变化
message ComModifyHealth{
  int32 to = 1;
  int32 from = 2;
  bool baoji = 3;
  bool hideDmg = 4;
  int32 modifyType = 5;
  float num = 6;
  int32 nhp = 7;
  int32 mhp = 8;
}
//教学任务更新
message ComTeachTask{
  int32 id = 1;
  int32 count = 2;
}
//剧情
message ComStory{
  int32 id = 1;
  int32 storyId = 2;
}
//剧情
message ComGuide{
  int32 id = 1;
  int32 guideId = 2;
}
//中途创建角色
message ComCreateRoles{
  int32 side = 1;
  int32 entryRid = 2;
  int32 playType = 3;
  repeated BattleRole roles = 4;
}
//播放特效
message ComPlayEffect{
  string effectName = 1;
  int32 side = 2;
}
//出手倒计时
message ComEmitCountdown
{
  int32 reserve =1;
}

//特殊效果飘字
message ComEffectTips
{
  EffectTipsType type = 1;
  int32 to = 2;
}
enum EffectTipsType {
  Eff_Success = 0;
  Not_Success = 1; //没有成功
  Immunity = 2; //免疫
  Resist = 3;  //抵抗
  Not_Gain = 4; //无法获得增益
  Not_Control = 5; //免疫控制
  Not_Action = 6;  //无法行动
}
//链接特效
message ComChainEffect
{
  repeated int32 roles = 1;
}