OSDN Git Service

重巡戦隊、西へ!のカウンターを実装する
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 10 May 2020 08:41:43 +0000 (17:41 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 10 May 2020 08:58:44 +0000 (17:58 +0900)
KancolleSniffer.Test/QuestCounterTest.cs
KancolleSniffer/Model/QuestCountList.cs
KancolleSniffer/Model/QuestCounter.cs

index 967b0f1..5b06722 100644 (file)
@@ -1259,6 +1259,50 @@ namespace KancolleSniffer.Test
         }\r
 \r
         /// <summary>\r
+        /// 912: 重巡戦隊、西へ!\r
+        /// </summary>\r
+        [TestMethod]\r
+        public void BattleResult_914()\r
+        {\r
+            var count = InjectQuest(914);\r
+            _battleInfo.InjectResultStatus(\r
+                new []{ShipStatus(5), ShipStatus(5), ShipStatus(5), ShipStatus(1)},\r
+                new ShipStatus[0], new ShipStatus[0], new ShipStatus[0]);\r
+\r
+            InjectMapNext(41, 5);\r
+            InjectBattleResult("A");\r
+            PAssert.That(() => count.NowArray.SequenceEqual(new[] {0, 0, 0, 0}), "駆逐艦なしはカウントしない");\r
+\r
+            _battleInfo.Result.Friend.Main[3] = ShipStatus(2);\r
+            InjectBattleResult("B");\r
+            PAssert.That(() => count.NowArray.SequenceEqual(new[] {0, 0, 0, 0}), "B勝利はカウントしない");\r
+\r
+            InjectBattleResult("A");\r
+            PAssert.That(() => count.NowArray.SequenceEqual(new[] {1, 0, 0, 0}), "4-1");\r
+\r
+            InjectMapNext(42, 4);\r
+            InjectBattleResult("A");\r
+            PAssert.That(() => count.NowArray.SequenceEqual(new[] {1, 0, 0, 0}), "ボス以外はカウントしない");\r
+\r
+            InjectMapNext(42, 5);\r
+            _battleInfo.Result.Friend.Main[0] = ShipStatus(6);\r
+            InjectBattleResult("A");\r
+            PAssert.That(() => count.NowArray.SequenceEqual(new[] {1, 0, 0, 0}), "重巡2隻はカウントしない");\r
+\r
+            _battleInfo.Result.Friend.Main[0] = ShipStatus(5);\r
+            InjectBattleResult("A");\r
+            PAssert.That(() => count.NowArray.SequenceEqual(new[] {1, 1, 0, 0}), "4-2");\r
+\r
+            InjectMapNext(43, 5);\r
+            InjectBattleResult("A");\r
+            PAssert.That(() => count.NowArray.SequenceEqual(new[] {1, 1, 1, 0}), "4-3");\r
+\r
+            InjectMapNext(44, 5);\r
+            InjectBattleResult("A");\r
+            PAssert.That(() => count.NowArray.SequenceEqual(new[] {1, 1, 1, 1}), "4-3");\r
+        }\r
+\r
+        /// <summary>\r
         /// 280と854以降を同時に遂行していると854以降がカウントされないことがある\r
         /// </summary>\r
         [TestMethod]\r
index 5ac8b1f..0c6e3c2 100644 (file)
@@ -77,6 +77,7 @@ namespace KancolleSniffer.Model
             {904, new QuestSortie {Interval = Yearly2, MaxArray = new[] {1, 1, 1, 1}, Rank = "S", Maps = new[] {25, 34, 45, 53}, Material = new[] {0, 8, 10, 4}}}, // 904: 精鋭「十九駆」、躍り出る!\r
             {905, new QuestSortie {Interval = Yearly2, MaxArray = new[] {1, 1, 1, 1, 1}, Rank = "A", Maps = new[] {11, 12, 13, 15, 16}, Material = new[] {0, 6, 8, 0}}}, // 905: 「海防艦」、海を護る!\r
             {912, new QuestSortie {Interval = Yearly3, MaxArray = new[] {1, 1, 1, 1, 1}, Rank = "A", Maps = new[] {13, 21, 22, 23, 16}, Material = new[] {0, 5, 6, 0}}}, // 912: 工作艦「明石」護衛任務\r
+            {914, new QuestSortie {Interval = Yearly3, MaxArray = new[] {1, 1, 1, 1}, Rank = "A", Maps = new[] {41, 42, 43, 44}, Material = new[] {0, 5, 0, 4}}}, // 914: 重巡戦隊、西へ!\r
 \r
             {303, new QuestPractice {Interval = Daily, Max = 3, Rank = "E", Material = new[] {1, 0, 0, 0}}}, // 303: 「演習」で練度向上!\r
             {304, new QuestPractice {Interval = Daily, Max = 5, Rank = "B", Material = new[] {0, 0, 1, 0}}}, // 304: 「演習」で他提督を圧倒せよ!\r
index 31a8228..2c7e5ba 100644 (file)
@@ -321,6 +321,8 @@ namespace KancolleSniffer.Model
                     return specs.Types.Count(type => type == 1) >= 3 && specs.Types.Length <= 5;\r
                 case 912:\r
                     return specs.Flagship.Name.StartsWith("明石") && specs.Types.Count(type => type == 2) >= 3;\r
+                case 914:\r
+                    return specs.Types.Count(type => type == 5) >= 3 && specs.Types.Count(type => type == 2) >= 1;\r
                 case 318:\r
                     return specs.Types.Count(type => type == 3) >= 2;\r
                 case 330:\r