private static IEnumerable <string> GetAllInvasionsCountedItems(WFInvasion inv)
        {
            foreach (var reward in inv.attackerReward.countedItems)
            {
                yield return(reward.type);
            }

            foreach (var reward in inv.defenderReward.countedItems)
            {
                yield return(reward.type);
            }
        }
Beispiel #2
0
        public static string ToString(WFInvasion inv)
        {
            var sb         = new StringBuilder();
            var completion = Math.Floor(inv.completion);

            sb.AppendLine($"地点: [{inv.node}]");

            sb.AppendLine($"> 进攻方: {inv.attackingFaction}");
            if (!inv.vsInfestation)
            {
                sb.AppendLine($"奖励: {ToString(inv.attackerReward)}");
            }
            sb.AppendLine($"进度: {completion}%");
            // sb.AppendLine();

            sb.AppendLine($"> 防守方: {inv.defendingFaction}");
            sb.AppendLine($"奖励: {ToString(inv.defenderReward)}");
            sb.Append($"进度 {100 - completion}%");
            return(sb.ToString());
        }
Beispiel #3
0
 public void TranslateInvasion(WFInvasion invasion)
 {
     TranslateReward(invasion.attackerReward);
     TranslateReward(invasion.defenderReward);
     invasion.node = TranslateNode(invasion.node);
 }