コミットメタ情報

リビジョン887da2eba4435f4ce1fe2d8bd98ebcccb2265e21 (tree)
日時2018-04-03 22:21:38
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

「空母機動部隊」西へ!のカウンタを実装する

変更サマリ

差分

--- a/KancolleSniffer.Test/QuestInfoTest.cs
+++ b/KancolleSniffer.Test/QuestInfoTest.cs
@@ -500,6 +500,44 @@ namespace KancolleSniffer.Test
500500 }
501501
502502 /// <summary>
503+ /// 264: 「空母機動部隊」西へ!
504+ /// </summary>
505+ [TestMethod]
506+ public void BattleResult_264()
507+ {
508+ var battleInfo = new BattleInfo(null, null);
509+ var questInfo = new QuestInfo(null, battleInfo, () => new DateTime(2015, 1, 1));
510+ questInfo.InspectQuestList(CreateQuestList(new[] {264}));
511+
512+ battleInfo.InjectResultStatus(new[]
513+ {
514+ ShipStatus(7), ShipStatus(11), ShipStatus(3),
515+ ShipStatus(3), ShipStatus(2), ShipStatus(2)
516+ }, new ShipStatus[0], new ShipStatus[0], new ShipStatus[0]);
517+ questInfo.InspectMapNext(Js(new
518+ {
519+ api_maparea_id = 4,
520+ api_mapinfo_no = 2,
521+ api_event_id = 4
522+ }));
523+ questInfo.InspectBattleResult(Js(new {api_win_rank = "S"}));
524+ questInfo.InspectMapNext(Js(new
525+ {
526+ api_maparea_id = 4,
527+ api_mapinfo_no = 2,
528+ api_event_id = 5
529+ }));
530+ questInfo.InspectBattleResult(Js(new {api_win_rank = "A"}));
531+ PAssert.That(() => questInfo.Quests[0].Count.Now == 0);
532+ questInfo.InspectBattleResult(Js(new {api_win_rank = "S"}));
533+ PAssert.That(() => questInfo.Quests[0].Count.Now == 1);
534+
535+ battleInfo.Result.Friend.Main[0].NowHp = 0;
536+ questInfo.InspectBattleResult(Js(new {api_win_rank = "S"}));
537+ PAssert.That(() => questInfo.Quests[0].Count.Now == 1, "轟沈あり");
538+ }
539+
540+ /// <summary>
503541 /// 266: 「水上反撃部隊」突入せよ!
504542 /// </summary>
505543 [TestMethod]
--- a/KancolleSniffer/QuestInfo.cs
+++ b/KancolleSniffer/QuestInfo.cs
@@ -266,6 +266,7 @@ namespace KancolleSniffer
266266 {257, new QuestSpec {Interval = Monthly, Max = 1, Material = new[] {0, 0, 0, 3}}}, // 257: 「水雷戦隊」南西へ!
267267 {259, new QuestSpec {Interval = Monthly, Max = 1, Material = new[] {0, 3, 0, 4}}}, // 259: 「水上打撃部隊」南方へ!
268268 {261, new QuestSortie {Interval = Weekly, Max = 3, Rank = "A", Maps = new[] {15}, Material = new[] {0, 0, 0, 3}}}, // 261: 海上輸送路の安全確保に努めよ!
269+ {264, new QuestSpec {Interval = Monthly, Max = 1, Material = new[] {0, 0, 0, 2}}}, // 264: 「空母機動部隊」西へ!
269270 {265, new QuestSortie {Interval = Monthly, Max = 10, Rank = "A", Maps = new[] {15}, Material = new[] {0, 0, 5, 3}}}, // 265: 海上護衛強化月間
270271 {266, new QuestSpec {Interval = Monthly, Max = 1, Material = new[] {0, 0, 4, 2}}}, // 266: 「水上反撃部隊」突入せよ!
271272
@@ -608,6 +609,16 @@ namespace KancolleSniffer
608609 }
609610 }
610611 }
612+ if (_quests.TryGetValue(264, out var q264))
613+ {
614+ if (_map == 42 && _boss && QuestSortie.CompareRank(rank, "S") == 0)
615+ {
616+ var fleet = _battleInfo.Result.Friend.Main.Where(s => s.NowHp > 0).Select(s => s.Spec)
617+ .ToArray();
618+ if (fleet.Count(spec => spec.ShipType == 2) >= 2 && fleet.Count(spec => spec.IsAircraftCarrier) >= 2)
619+ IncrementCount(q264.Count);
620+ }
621+ }
611622 if (_quests.TryGetValue(266, out var q266))
612623 {
613624 if (_map == 25 && _boss && QuestSortie.CompareRank(rank, "S") == 0)
旧リポジトリブラウザで表示