• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révisione85d4b349cb3241bcd6ec657ae85593b4929aa90 (tree)
l'heure2020-05-09 19:59:35
AuteurKazuhiro Fujieda <fujieda@user...>
CommiterKazuhiro Fujieda

Message de Log

練習航海及び警備任務を実施せよ!のカウンターを実装する

Change Summary

Modification

--- a/KancolleSniffer.Test/QuestCounterTest.cs
+++ b/KancolleSniffer.Test/QuestCounterTest.cs
@@ -165,7 +165,8 @@ namespace KancolleSniffer.Test
165165 new QuestCount {Id = 280, NowArray = new[] {1, 1, 1, 1}},
166166 new QuestCount {Id = 872, NowArray = new[] {1, 1, 1, 1}},
167167 new QuestCount {Id = 284, NowArray = new[] {1, 1, 1, 1}},
168- new QuestCount {Id = 226, Now = 2}
168+ new QuestCount {Id = 226, Now = 2},
169+ new QuestCount {Id = 436, NowArray = new[] {1, 0, 1, 1, 1}},
169170 }
170171 };
171172 new QuestInfo().LoadState(status);
@@ -208,6 +209,9 @@ namespace KancolleSniffer.Test
208209 var q226 = status.QuestCountList.First(q => q.Id == 226);
209210 Assert.AreEqual("2/5", q226.ToString());
210211 Assert.AreEqual("", q226.ToToolTip());
212+ var q436 = status.QuestCountList.First(q => q.Id == 436);
213+ Assert.AreEqual("1\u200a0\u200a1\u200a1\u200a1", q436.ToString());
214+ Assert.AreEqual("練習航海1 長距離練習航海0 警備任務1 対潜警戒任務1 強行偵察任務1", q436.ToToolTip());
211215 }
212216 }
213217
@@ -1464,6 +1468,37 @@ namespace KancolleSniffer.Test
14641468 }
14651469
14661470 /// <summary>
1471+ /// 436: 練習航海及び警備任務を実施せよ!
1472+ /// </summary>
1473+ [TestMethod]
1474+ public void MissionResult_436()
1475+ {
1476+ var count = InjectQuest(436);
1477+
1478+ _questCounter.InspectDeck(Js(
1479+ new[]
1480+ {
1481+ new {api_id = 2, api_mission = new[] {2, 1}},
1482+ new {api_id = 3, api_mission = new[] {2, 2}},
1483+ new {api_id = 4, api_mission = new[] {2, 3}}
1484+ }));
1485+ _questCounter.InspectMissionResult("api%5Fdeck%5Fid=2", Js(new {api_clear_result = 1}));
1486+ _questCounter.InspectMissionResult("api%5Fdeck%5Fid=3", Js(new {api_clear_result = 1}));
1487+ _questCounter.InspectMissionResult("api%5Fdeck%5Fid=4", Js(new {api_clear_result = 1}));
1488+ PAssert.That(() => count.NowArray.SequenceEqual(new[] {1, 1, 1, 0, 0}));
1489+
1490+ _questCounter.InspectDeck(Js(
1491+ new[]
1492+ {
1493+ new {api_id = 2, api_mission = new[] {2, 4}},
1494+ new {api_id = 3, api_mission = new[] {2, 10}}
1495+ }));
1496+ _questCounter.InspectMissionResult("api%5Fdeck%5Fid=2", Js(new {api_clear_result = 1}));
1497+ _questCounter.InspectMissionResult("api%5Fdeck%5Fid=3", Js(new {api_clear_result = 1}));
1498+ PAssert.That(() => count.NowArray.SequenceEqual(new[] {1, 1, 1, 1, 1}));
1499+ }
1500+
1501+ /// <summary>
14671502 /// 503: 艦隊大整備!
14681503 /// 504: 艦隊酒保祭り!
14691504 /// </summary>
--- a/KancolleSniffer/Model/QuestCountList.cs
+++ b/KancolleSniffer/Model/QuestCountList.cs
@@ -23,7 +23,8 @@ namespace KancolleSniffer.Model
2323 private const QuestInterval Weekly = QuestInterval.Weekly;
2424 private const QuestInterval Monthly = QuestInterval.Monthly;
2525 private const QuestInterval Quarterly = QuestInterval.Quarterly;
26- private const QuestInterval Yearly = QuestInterval.Yearly;
26+ private const QuestInterval Yearly2 = QuestInterval.Yearly2;
27+ private const QuestInterval Yearly3 = QuestInterval.Yearly3;
2728
2829 /// <summary>
2930 /// このテーブルは七四式電子観測儀を参考に作成した。
@@ -73,8 +74,8 @@ namespace KancolleSniffer.Model
7374 {893, new QuestSortie {Interval = Quarterly, MaxArray = new[] {3, 3, 3, 3}, Rank = "S", Maps = new[] {15, 71, 721, 722}, Material = new[] {0, 0, 0, 0}}}, // 893: 泊地周辺海域の安全確保を徹底せよ!
7475 {894, new QuestSortie {Interval = Quarterly, MaxArray = new[] {1, 1, 1, 1, 1}, Rank = "S", Maps = new[] {13, 14, 21, 22, 23}, Material = new[] {0, 0, 0, 0}}}, // 894: 空母戦力の投入による兵站線戦闘哨戒
7576 {903, new QuestSortie {Interval = Quarterly, MaxArray = new[] {1, 1, 1, 1}, Rank = "S", Maps = new[] {51, 54, 64, 65}, Material = new[] {0, 10, 0, 0}}}, // 903: 拡張「六水戦」、最前線へ!
76- {904, new QuestSortie {Interval = Yearly, MaxArray = new[] {1, 1, 1, 1}, Rank = "S", Maps = new[] {25, 34, 45, 53}, Material = new[] {0, 8, 10, 4}}}, // 904: 精鋭「十九駆」、躍り出る!
77- {905, new QuestSortie {Interval = Yearly, MaxArray = new[] {1, 1, 1, 1, 1}, Rank = "A", Maps = new[] {11, 12, 13, 15, 16}, Material = new[] {0, 6, 8, 0}}}, // 905: 「海防艦」、海を護る!
77+ {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: 精鋭「十九駆」、躍り出る!
78+ {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: 「海防艦」、海を護る!
7879
7980 {303, new QuestPractice {Interval = Daily, Max = 3, Rank = "E", Material = new[] {1, 0, 0, 0}}}, // 303: 「演習」で練度向上!
8081 {304, new QuestPractice {Interval = Daily, Max = 5, Rank = "B", Material = new[] {0, 0, 1, 0}}}, // 304: 「演習」で他提督を圧倒せよ!
@@ -94,6 +95,7 @@ namespace KancolleSniffer.Model
9495 {424, new QuestMission {Interval = Monthly, Max = 4, Shift = 1, Ids = new[] {5}, Material = new[] {0, 0, 0, 0}}}, // 424: 輸送船団護衛を強化せよ!
9596 {426, new QuestMission {Interval = Quarterly, MaxArray = new[] {1, 1, 1, 1}, Ids = new[] {3, 4, 5, 10}, Material = new[] {0, 0, 4, 0}}}, // 426: 海上通商航路の警戒を厳とせよ!
9697 {428, new QuestMission {Interval = Quarterly, MaxArray = new[] {2, 2, 2}, Ids = new[] {4, 101, 102}, Material = new[] {0, 0, 0, 3}}}, // 428: 近海に侵入する敵潜を制圧せよ!
98+ {436, new QuestMission {Interval = Yearly3, MaxArray = new[] {1, 1, 1, 1, 1}, Ids = new[] {1, 2, 3, 4, 10}, Material = new [] {0, 4, 0, 0}}}, // 436: 練習航海及び警備任務を実施せよ!
9799
98100 {503, new QuestSpec {Interval = Daily, Max = 5, Material = new[] {0, 2, 0, 0}}}, // 503: 艦隊大整備!
99101 {504, new QuestSpec {Interval = Daily, Max = 15, Material = new[] {1, 0, 1, 0}}}, // 504: 艦隊酒保祭り!
--- a/KancolleSniffer/Model/QuestCounter.cs
+++ b/KancolleSniffer/Model/QuestCounter.cs
@@ -123,6 +123,7 @@ namespace KancolleSniffer.Model
123123 {
124124 426 => new[] {"警備任務", "対潜警戒任務", "海上護衛任務", "強硬偵察任務"},
125125 428 => new[] {"対潜警戒任務", "海峡警備行動", "長時間対潜警戒"},
126+ 436 => new[] {"練習航海", "長距離練習航海", "警備任務", "対潜警戒任務", "強行偵察任務"},
126127 688 => new[] {"艦戦", "艦爆", "艦攻", "水偵"},
127128 _ => new string[0]
128129 }).Zip(NowArray, (entry, n) => $"{entry}{n}"));
--- a/KancolleSniffer/Model/QuestInfo.cs
+++ b/KancolleSniffer/Model/QuestInfo.cs
@@ -63,7 +63,8 @@ namespace KancolleSniffer.Model
6363 Weekly,
6464 Monthly,
6565 Quarterly,
66- Yearly
66+ Yearly2,
67+ Yearly3
6768 }
6869
6970 public class QuestInfo : IHaveState
@@ -118,7 +119,7 @@ namespace KancolleSniffer.Model
118119 private readonly QuestInterval[] _intervals =
119120 {
120121 QuestInterval.Daily, QuestInterval.Weekly, QuestInterval.Monthly,
121- QuestInterval.Other, QuestInterval.Quarterly, QuestInterval.Yearly
122+ QuestInterval.Other, QuestInterval.Quarterly, QuestInterval.Yearly2
122123 };
123124
124125 private readonly int[] _progress = {0, 50, 80};
@@ -219,7 +220,7 @@ namespace KancolleSniffer.Model
219220 QuestInterval.Weekly => CrossBoundary(LastMonday.AddHours(5)),
220221 QuestInterval.Monthly => CrossBoundary(new DateTime(_now.Year, _now.Month, 1, 5, 0, 0)),
221222 QuestInterval.Quarterly => CrossBoundary(QuarterlyBoundary.AddHours(5)),
222- QuestInterval.Yearly => CrossBoundary(new DateTime(_now.Year, 2, 1, 5, 0, 0)),
223+ QuestInterval.Yearly2 => CrossBoundary(new DateTime(_now.Year, 2, 1, 5, 0, 0)),
223224 _ => false
224225 };
225226 }