ecs/proto/idl/mod_battle.proto
2025-06-20 15:34:32 +08:00

76 lines
2.3 KiB
Protocol Buffer
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package Pb;
option go_package = "pb/";
import "mod_item.proto";
// ModId.ModuleBattle = 4000;
// 战斗模块消息定义
// 如果定义的消息内没有字段或者消息被注释掉了,说明该请求不需要参数,发送消息时仅发送包头即可,包体可为空, 返回的消息亦是如此。
// MsgId.ModBattleEnter = 4001;
//进入战斗请求
message BattleEnterReq {
uint32 SceneId = 1; //场景ID
}
//战斗Buff
message BattleBuff {
uint32 Skill = 1; //Buff技能
uint32 Layers = 2; //Buff层数
}
//战斗数值
message BattleValue {
int64 Value = 1; //数值集合,负数是伤害,正数回血
uint64 Hp = 2; //受数值影响后的当前血量
uint32 Status = 3; //0.正常, 1.暴击, 2.闪避3.无敌4.格挡5.吸收, 6.反弹, 7.免疫
}
//战斗目标
message BattleTarget {
uint32 Type = 1; //目标类型, 1.英雄自己人2.怪物(敌人)
uint32 Position = 2; //目标位置索引1-6
uint64 HpMax = 3; //最大血量
uint32 Rage = 4; //当前怒气
repeated BattleBuff BuffList = 5; //目标DeBuff状态ID待定如眩晕、击飞等
repeated BattleValue ValueList = 6; //数值集合,负数是伤害,正数回血
}
//战斗动作
message BattleAction {
BattleTarget Caster = 1; //投手(动作发出者)
uint32 Type = 2; //类型
uint32 SkillId = 3; //技能ID
repeated BattleTarget TargetList = 4; //动作目标
}
//战斗回合
message BattleRound {
uint32 BattleRound = 1; //战斗当前回合
repeated BattleAction ActionList = 2; //动作列表
}
//战斗单位
message BattleUnit {
uint64 UnitId = 1; //自己是英雄唯一ID敌人是怪物表ID敌对玩家是英雄表ID
uint32 SuitId = 2; //时装ID
}
// MsgId.ModBattleEnter = 4001;
//进入战斗结果返回
message BattleEnterAck {
uint32 SceneId = 1; //战斗场景ID
bool Succeed = 2; //挑战成功
int32 Score = 3; //战斗分数(星数)
repeated BattleUnit Heroes = 4; //英雄阵容
repeated BattleUnit Enemies = 5; //敌人阵容
uint32 BattleRounds = 6; //战斗总回合数
repeated BattleRound RoundList = 7;
repeated Item RewardList = 8; //奖励列表(掉落物品列表)
}
// MsgId.ModBattleEnd = 4002;
// 战斗结束请求,退出战斗场景
message BattleEndReq {
}