You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

76 lines
1.9 KiB

using System;
using System.Collections.Generic;
using ProtoCSStruct;
using Sog;
namespace Battle
{
public class BattleObj
{
public UInt64 BattleId
{
get { return battleInfo.BattleId; }
}
public int MainlandId
{
set { battleInfo.MainlandId = value; }
get { return battleInfo.MainlandId; }
}
public long LogUid
{
get { return battleInfo.RoleA.RoleBase.Uid; }
}
public CSBattleResult Result
{
set { battleInfo.BattleResult = value; }
get { return battleInfo.BattleResult; }
}
public BattleObj(ref BattleInfoAll battle)
{
battleInfo = battle;
Random = new Random();
}
//初始化数据备份
public BattleInfoAll battleInfo;
public int round;
public int MaxRound = 50;
// 对战双方的泥泞属性
public long[] unSpeedProp = new long[(int) BattleSide.Max];
public long[] unHealProp = new long[(int)BattleSide.Max];
// 英雄怪物列表,列表中的单位才可以成为技能目标
public List<BattleHero> herosA = new List<BattleHero>();
public List<BattleHero> herosB = new List<BattleHero>();
//所有生物,死亡不删除
public List<BattleHero> allCreatures = new List<BattleHero>();
// 为了战斗爽快感,目标在技能过程中死亡还要继续触发伤害、buff等逻辑
// 所以先把死亡英雄记下来,等这些逻辑处理完毕后,再来统一清理buff等资源
public List<BattleHero> deadHeros = new List<BattleHero>();
// 战斗中使用的随机数
public Random Random;
// 运行模式
public int runMode;
public int curLogIdx;
public int GenObjId()
{
return ++objId;
}
private int objId;
}
}