lingsuanClient/protobuf/proto/新建 文本文档.txt

185 lines
5.2 KiB
Plaintext
Raw Normal View History

2025-06-07 17:07:13 +08:00
message level_data
{
optional battle_data data = 4;
}
message battle_data
{
//角色列表(我方和敌方所有角色)
repeated hero_info heros = 1;
//回合信息
repeated round_info rounds = 2;
//战斗数据
optional _info data = 3;
//战斗胜利或者失败
optional bool result = 4;
}
//角色信息
message hero_info
{
optional int32 uid=1;//角色id
optional int32 position=2;//角色位置
optional int32 level=3//角色等级
}
//战斗顶部 回合信息
message round_info
{
optional int32 tempId=1;
opti onal int32 frequency=2;//角色出手次数
optional int32 position=3//角色位置
}
//战斗信息
message battle_info
{
}
/// <summary>
/// 战斗结果数据
/// </summary>
message BattleResultData
{
public BattleResultType ResultType { get; set; } // 结果类型
public Dictionary<long, float> DamageDealt { get; set; } // 造成的伤害
public Dictionary<long, float> DamageTaken { get; set; } // 受到的伤害
public Dictionary<long, float> HealingDone { get; set; } // 治疗量
public List<long> DeadUnits { get; set; } // 死亡单位列表
public Dictionary<int, int> ItemRewards { get; set; } // 道具奖励
public int ExpReward { get; set; } // 经验奖励
public int GoldReward { get; set; } // 金币奖励
}
/// <summary>
/// 战斗结果类型
/// </summary>
message BattleResultType
{
None = 0,
Victory = 1, // 胜利
Defeat = 2, // 失败
Escape = 3, // 逃跑
Draw = 4, // 平局
}
/// <summary>
/// 战斗单位类型
/// </summary>
message BattleUnitType
{
None = 0,
Player = 1, // 玩家
Monster = 2, // 怪物
NPC = 3, // NPC
Pet = 4, // 宠物
}
/// <summary>
/// 战斗单位状态
/// </summary>
message BattleUnitState
{
None = 0,
Alive = 1, // 存活
Dead = 2, // 死亡
Stunned = 3, // 眩晕
Frozen = 4, // 冰冻
Invincible = 5 // 无敌
}
/// <summary>
/// 战斗阶段
/// </summary>
message BattlePhase
{
None = 0,
Prepare = 1, // 准备阶段
PlayerTurn = 2,// 玩家回合
EnemyTurn = 3, // 敌人回合
End = 4 // 结束阶段
}
/// <summary>
/// 战斗单位数据
/// </summary>
message BattleUnitData
{
public long UnitId { get; set; } // 单位ID
public BattleUnitType UnitType { get; set; } // 单位类型
public string Name { get; set; } // 单位名称
public int Level { get; set; } // 等级
public float MaxHp { get; set; } // 最大生命值
public float CurrentHp { get; set; } // 当前生命值
public float Attack { get; set; } // 攻击力
public float Defense { get; set; } // 防御力
public float Speed { get; set; } // 速度
public BattleUnitState State { get; set; } // 当前状态
public Vector3 Position { get; set; } // 位置
public Vector3 Rotation { get; set; } // 旋转
public bool HasActed { get; set; } // 本回合是否已行动
public int TurnOrder { get; set; } // 行动顺序
}
/// <summary>
/// 技能效果类型
/// </summary>
message SkillEffectType
{
None = 0,
Damage = 1, // 伤害
Heal = 2, // 治疗
Buff = 3, // 增益
Debuff = 4, // 减益
Control = 5, // 控制
Summon = 6, // 召唤
}
/// <summary>
/// 技能数据
/// </summary>
message SkillData
{
public int SkillId { get; set; } // 技能ID
public string Name { get; set; } // 技能名称
public float Cooldown { get; set; } // 冷却时间
public float CastTime { get; set; } // 施法时间
public float Range { get; set; } // 施法范围
public SkillEffectType EffectType { get; set; } // 效果类型
public float Value { get; set; } // 效果值
public float Duration { get; set; } // 持续时间
public int ActionCost { get; set; } // 行动点消耗
}
/// <summary>
/// 战斗动作类型
/// </summary>
message BattleActionType
{
None = 0,
Move = 1, // 移动
Attack = 2, // 普通攻击
Skill = 3, // 技能
Item = 4, // 使用道具
Escape = 5, // 逃跑
EndTurn = 6, // 结束回合
}
/// <summary>
/// 战斗动作数据
/// </summary>
message BattleActionData
{
public long SourceUnitId { get; set; } // 发起者ID
public long TargetUnitId { get; set; } // 目标ID
public BattleActionType ActionType { get; set; } // 动作类型
public int SkillId { get; set; } // 技能ID如果是技能动作
public Vector3 TargetPosition { get; set; } // 目标位置
}