Example #1
0
 /// <summary>
 /// 获得对象选择列表
 /// </summary>
 /// <param name="game"></param>
 /// <returns></returns>
 public static string GetTargetListString(ActionStatus game)
 {
     List<string> Target = new List<string>();
     if (game.AllRole.MyPublicInfo.Hero.能否成为动作对象) Target.Add(CardUtility.strMe + CardUtility.strSplitMark + BattleFieldInfo.HeroPos);
     for (int i = 0; i < game.AllRole.MyPublicInfo.BattleField.MinionCount; i++)
     {
         if (game.AllRole.MyPublicInfo.BattleField.BattleMinions[i].能否成为动作对象) Target.Add(CardUtility.strMe + CardUtility.strSplitMark + (i + 1).ToString("D1"));
     }
     if (game.AllRole.YourPublicInfo.Hero.能否成为动作对象) Target.Add(CardUtility.strYou + CardUtility.strSplitMark + BattleFieldInfo.HeroPos);
     for (int i = 0; i < game.AllRole.YourPublicInfo.BattleField.MinionCount; i++)
     {
         if (game.AllRole.YourPublicInfo.BattleField.BattleMinions[i].能否成为动作对象) Target.Add(CardUtility.strYou + CardUtility.strSplitMark + (i + 1).ToString("D1"));
     }
     return Target.ToListString();
 }
Example #2
0
 /// <summary>
 /// 是否HIT对方奥秘
 /// </summary>
 /// <param name="IsFirst">是否为先手</param>
 /// <returns></returns>
 public string SecretHitCheck(string Action, bool IsFirst, ActionStatus gameStatus)
 {
     //奥秘判断 注意:这个动作并不改变FirstSecret和SecondSecret
     //1.例如,发生战斗的时候,如果两个随从都死了,
     //同时两边都有随从死亡的奥秘,则整个动作序列可能触发两边的奥秘
     //<本方奥秘在客户端判断>注意方向
     //2.服务器端只做判断,并且返回命中奥秘的列表,不做任何其他操作!
     List<string> HITCardList = new List<string>();
     foreach (var actionDetail in Action.Split(CardUtility.strSplitArrayMark.ToCharArray()))
     {
         //检查Second
         if (IsFirst && gameStatus.AllRole.YourPrivateInfo.奥秘列表.Count != 0)
         {
             for (int i = 0; i < gameStatus.AllRole.YourPrivateInfo.奥秘列表.Count; i++)
             {
                 if (IsSecretHit(gameStatus.AllRole.YourPrivateInfo.奥秘列表[i].序列号, actionDetail, false))
                 {
                     HITCardList.Add(gameStatus.AllRole.YourPrivateInfo.奥秘列表[i] + CardUtility.strSplitDiffMark + actionDetail);
                 }
             }
         }
         //检查First
         if ((!IsFirst) && gameStatus.AllRole.MyPrivateInfo.奥秘列表.Count != 0)
         {
             for (int i = 0; i < gameStatus.AllRole.MyPrivateInfo.奥秘列表.Count; i++)
             {
                 if (IsSecretHit(gameStatus.AllRole.MyPrivateInfo.奥秘列表[i].序列号, actionDetail, false))
                 {
                     HITCardList.Add(gameStatus.AllRole.MyPrivateInfo.奥秘列表[i] + CardUtility.strSplitDiffMark + actionDetail);
                 }
             }
         }
     }
     return HITCardList.ToListString();
 }