コミットメタ情報

リビジョン9323a047fdd7163d799259036e8002aff12e5948 (tree)
日時2018-03-24 22:36:35
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

「対空兵装の整備拡充」のカウンタを実装する

変更サマリ

差分

--- a/KancolleSniffer.Test/QuestInfoTest.cs
+++ b/KancolleSniffer.Test/QuestInfoTest.cs
@@ -975,12 +975,13 @@ namespace KancolleSniffer.Test
975975 /// 676: 装備開発力の集中整備
976976 /// 677: 継戦支援能力の整備
977977 /// 678: 主力艦上戦闘機の更新
978+ /// 680: 対空兵装の整備拡充
978979 /// </summary>
979980 [TestMethod]
980981 public void DestroyItem_613_638_663_673_674_675_676_677_678()
981982 {
982983 var itemInfo = new ItemInfo();
983- var questInfo = new QuestInfo(itemInfo, null, () => new DateTime(2015, 1, 1)) {AcceptMax = 9};
984+ var questInfo = new QuestInfo(itemInfo, null, () => new DateTime(2015, 1, 1)) {AcceptMax = 10};
984985
985986 itemInfo.InjectItemSpec(new[]
986987 {
@@ -993,12 +994,14 @@ namespace KancolleSniffer.Test
993994 new ItemSpec {Id = 7, Name = "35.6cm連装砲", Type = 3},
994995 new ItemSpec {Id = 25, Name = "零式水上偵察機", Type = 10},
995996 new ItemSpec {Id = 13, Name = "61cm三連装魚雷", Type = 5},
996- new ItemSpec {Id = 20, Name = "零式艦戦21型", Type = 6}
997+ new ItemSpec {Id = 20, Name = "零式艦戦21型", Type = 6},
998+ new ItemSpec {Id = 28, Name = "22号水上電探", Type = 12},
999+ new ItemSpec {Id = 31, Name = "32号水上電探", Type = 13}
9971000 });
998- itemInfo.InjectItems(new[] {1, 37, 19, 4, 11, 75, 7, 25, 13, 20});
999- questInfo.InspectQuestList(CreateQuestList(new[] {613, 638, 663, 673, 674, 675, 676, 677, 678}));
1001+ itemInfo.InjectItems(new[] {1, 37, 19, 4, 11, 75, 7, 25, 13, 20, 28, 31});
1002+ questInfo.InspectQuestList(CreateQuestList(new[] {613, 638, 663, 673, 674, 675, 676, 677, 678, 680}));
10001003 questInfo.InspectDestroyItem(
1001- "api%5Fslotitem%5Fids=1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10&api%5Fverno=1", null);
1004+ "api%5Fslotitem%5Fids=1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%2C11%2C12&api%5Fverno=1", null);
10021005 PAssert.That(() =>
10031006 questInfo.Quests.Select(q => new {q.Id, q.Count.Now}).Take(5).SequenceEqual(new[]
10041007 {
@@ -1013,6 +1016,8 @@ namespace KancolleSniffer.Test
10131016 PAssert.That(() => q677.Id == 677 && q677.Count.NowArray.SequenceEqual(new[] {1, 1, 1}));
10141017 var q678 = questInfo.Quests[8];
10151018 PAssert.That(() => q678.Id == 678 && q678.Count.NowArray.SequenceEqual(new[] {1, 1}));
1019+ var q680 = questInfo.Quests[9];
1020+ PAssert.That(() => q680.Id == 680 && q680.Count.NowArray.SequenceEqual(new[] {1, 2}));
10161021 }
10171022
10181023 /// <summary>
--- a/KancolleSniffer/QuestInfo.cs
+++ b/KancolleSniffer/QuestInfo.cs
@@ -289,6 +289,7 @@ namespace KancolleSniffer
289289 {676, new QuestSpec {Interval = Weekly, MaxArray = new[] {3, 3, 1}, Material = new[] {0, 1, 7, 0}}}, // 676: 装備開発力の集中整備
290290 {677, new QuestSpec {Interval = Weekly, MaxArray = new[] {4, 2, 3}, Material = new[] {0, 5, 0, 0}}}, // 677: 継戦支援能力の整備
291291 {678, new QuestSpec {Interval = Quarterly, MaxArray = new[] {3, 5}, Material = new[] {0, 0, 8, 0}}}, // 678: 主力艦上戦闘機の更新
292+ {680, new QuestSpec {Interval = Quarterly, MaxArray = new[] {4, 4}, Material = new[] {0, 0, 6, 0}}}, // 680: 対空兵装の整備拡充
292293
293294 {702, new QuestPowerup {Interval = Daily, Max = 2, Material = new[] {0, 1, 0, 0}}}, // 702: 艦の「近代化改修」を実施せよ!
294295 {703, new QuestPowerup {Interval = Weekly, Max = 15, Material = new[] {1, 0, 2, 0}}} // 703: 「近代化改修」を進め、戦備を整えよ!
@@ -828,6 +829,12 @@ namespace KancolleSniffer
828829 q678.Count.NowArray[1] += items.Count(spec => spec.Id == 20);
829830 NeedSave = true;
830831 }
832+ if (_quests.TryGetValue(680, out var q680))
833+ {
834+ q680.Count.NowArray[0] += items.Count(spec => spec.Type == 21);
835+ q680.Count.NowArray[1] += items.Count(spec => spec.Type == 12 || spec.Type == 13);
836+ NeedSave = true;
837+ }
831838 }
832839
833840 public void InspectPowerup(dynamic json)
旧リポジトリブラウザで表示