From 75e2d917a5e995ba17d542fc9148991318f85374 Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Fri, 16 Feb 2018 22:27:25 +0900 Subject: [PATCH] =?utf8?q?=E3=83=84=E3=83=BC=E3=83=AB=E3=83=81=E3=83=83?= =?utf8?q?=E3=83=97=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E4=BB=BB?= =?utf8?q?=E5=8B=99=E8=A9=B3=E7=B4=B0=E3=81=AB=E7=8D=B2=E5=BE=97=E8=B3=87?= =?utf8?q?=E6=9D=90=E3=82=92=E5=8A=A0=E3=81=88=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KancolleSniffer.Test/QuestInfoTest.cs | 193 ++++++++-------------------------- KancolleSniffer/MainForm.cs | 2 +- KancolleSniffer/QuestInfo.cs | 145 +++++++++++++------------ 3 files changed, 125 insertions(+), 215 deletions(-) diff --git a/KancolleSniffer.Test/QuestInfoTest.cs b/KancolleSniffer.Test/QuestInfoTest.cs index cf3a211..08b2349 100644 --- a/KancolleSniffer.Test/QuestInfoTest.cs +++ b/KancolleSniffer.Test/QuestInfoTest.cs @@ -113,35 +113,38 @@ namespace KancolleSniffer.Test QuestLastReset = new DateTime(2017, 10, 31, 5, 0, 0) }; questInfo.LoadState(status); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - {new {api_no = 201, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}} - })); + questInfo.InspectQuestList(CreateQuestList(new[] {201})); questInfo.SaveState(status); PAssert.That(() => status.QuestCountList.Select(qc => new {qc.Id, qc.Now}).SequenceEqual(new[] {new {Id = 213, Now = 1}, new {Id = 822, Now = 1}})); // デイリーとマンスリーが消える - questInfo.InspectQuestList(Js(new - { - api_list = new[] - {new {api_no = 201, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}} - })); + questInfo.InspectQuestList(CreateQuestList(new[] {201})); questInfo.SaveState(status); PAssert.That(() => status.QuestCountList.Select(qc => new {qc.Id, qc.Now}).SequenceEqual(new[] {new {Id = 822, Now = 1}})); // ウィークリーが消える - questInfo.InspectQuestList(Js(new - { - api_list = new[] - {new {api_no = 201, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}} - })); + questInfo.InspectQuestList(CreateQuestList(new[] {201})); questInfo.SaveState(status); PAssert.That(() => status.QuestCountList.Length == 0); // クォータリーが消える } private JsonObject Js(object obj) => JsonObject.CreateJsonObject(obj); + private object CreateQuestList(int[] ids) => Js(new + { + api_list = + ids.Select(id => new + { + api_no = id, + api_category = id / 100, + api_state = 2, + api_title = "", + api_detail = "", + api_get_material = new int[0], + api_progress_flag = 0 + }) + }); + /// /// 201: 敵艦隊を撃滅せよ! /// 210: 敵艦隊を10回邀撃せよ! @@ -152,16 +155,7 @@ namespace KancolleSniffer.Test public void BattleResult_201_216_210_214() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 201, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 210, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 214, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 216, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {201, 216, 210, 214})); questInfo.InspectMapStart(Js(new { @@ -213,22 +207,11 @@ namespace KancolleSniffer.Test /// 218: 敵補給艦を3隻撃沈せよ! /// [TestMethod] - public void BattleResult_211_212_218_213_220_221() + public void BattleResult_211_212_213_218_220_221() { var battleInfo = new BattleInfo(null, null); var questInfo = new QuestInfo(null, battleInfo, () => new DateTime(2015, 1, 1)) {AcceptMax = 6}; - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 211, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 212, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 213, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 218, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 220, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 221, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {211, 212, 213, 218, 220, 221})); // 補給艦1隻と空母2隻 battleInfo.InjectEnemyResultStatus(new[] { @@ -258,14 +241,7 @@ namespace KancolleSniffer.Test { var battleInfo = new BattleInfo(null, null); var questInfo = new QuestInfo(null, battleInfo, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 228, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 230, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {228, 230})); // 潜水艦3 battleInfo.InjectEnemyResultStatus(new[] { @@ -289,13 +265,7 @@ namespace KancolleSniffer.Test public void BattleResult_226() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 226, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {226})); questInfo.InspectMapStart(Js(new { @@ -336,13 +306,7 @@ namespace KancolleSniffer.Test public void BattleResult_243() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 243, api_category = 2, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {243})); questInfo.InspectMapStart(Js(new { @@ -375,14 +339,7 @@ namespace KancolleSniffer.Test public void BattleResult_822_854() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 822, api_category = 8, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 854, api_category = 8, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {822, 854})); questInfo.InspectMapNext(Js(new { @@ -435,16 +392,7 @@ namespace KancolleSniffer.Test public void PracticeResult_303_304_302_311() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 302, api_category = 3, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 303, api_category = 3, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 304, api_category = 3, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 311, api_category = 3, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {302, 303, 304, 311})); questInfo.InspectPracticeResult(Js(new {api_win_rank = "C"})); questInfo.InspectPracticeResult(Js(new {api_win_rank = "A"})); @@ -468,17 +416,7 @@ namespace KancolleSniffer.Test public void MissionResult_402_403_404_410_411() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 402, api_category = 4, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 403, api_category = 4, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 404, api_category = 4, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 410, api_category = 4, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 411, api_category = 4, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {402, 403, 404, 410, 411})); questInfo.InspectDeck(Js( new[] @@ -506,20 +444,14 @@ namespace KancolleSniffer.Test public void MissionResult_426() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 426, api_category = 4, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {426})); questInfo.InspectDeck(Js( new[] { new {api_id = 2, api_mission = new[] {2, 3}}, new {api_id = 3, api_mission = new[] {2, 4}}, - new {api_id = 4, api_mission = new[] {2, 5}}, + new {api_id = 4, api_mission = new[] {2, 5}} })); questInfo.InspectMissionResult("api%5Fdeck%5Fid=2", Js(new {api_clear_result = 1})); questInfo.InspectMissionResult("api%5Fdeck%5Fid=3", Js(new {api_clear_result = 1})); @@ -529,7 +461,7 @@ namespace KancolleSniffer.Test questInfo.InspectDeck(Js( new[] { - new {api_id = 2, api_mission = new[] {2, 10}}, + new {api_id = 2, api_mission = new[] {2, 10}} })); questInfo.InspectMissionResult("api%5Fdeck%5Fid=2", Js(new {api_clear_result = 1})); PAssert.That(() => @@ -543,20 +475,14 @@ namespace KancolleSniffer.Test public void MissionResult_428() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 428, api_category = 4, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {428})); questInfo.InspectDeck(Js( new[] { new {api_id = 2, api_mission = new[] {2, 4}}, new {api_id = 3, api_mission = new[] {2, 101}}, - new {api_id = 4, api_mission = new[] {2, 102}}, + new {api_id = 4, api_mission = new[] {2, 102}} })); questInfo.InspectMissionResult("api%5Fdeck%5Fid=2", Js(new {api_clear_result = 1})); questInfo.InspectMissionResult("api%5Fdeck%5Fid=3", Js(new {api_clear_result = 1})); @@ -573,14 +499,7 @@ namespace KancolleSniffer.Test public void Powerup_503_504() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 503, api_category = 5, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 504, api_category = 5, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {503, 504})); questInfo.CountNyukyo(); questInfo.CountCharge(); @@ -601,18 +520,7 @@ namespace KancolleSniffer.Test public void Kousyou_605_606_607_608_609_619() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)) {AcceptMax = 6}; - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 605, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 606, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 607, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 608, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 609, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 619, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {605, 606, 607, 608, 609, 619})); questInfo.CountCreateItem(); questInfo.CountCreateShip(); @@ -656,20 +564,7 @@ namespace KancolleSniffer.Test new ItemSpec {Id = 13, Name = "61cm三連装魚雷", Type = 5} }); itemInfo.InjectItems(new[] {1, 37, 19, 4, 11, 75, 7, 25, 13}); - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 613, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 638, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 663, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 673, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 674, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 675, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 676, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 677, api_category = 6, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {613, 638, 663, 673, 674, 675, 676, 677})); questInfo.InspectDestroyItem("api%5Fslotitem%5Fids=1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9&api%5Fverno=1", null); PAssert.That(() => questInfo.Quests.Select(q => new {q.Id, q.Count.Now}).Take(5).SequenceEqual(new[] @@ -693,21 +588,21 @@ namespace KancolleSniffer.Test public void Powerup_702_703() { var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); - - questInfo.InspectQuestList(Js(new - { - api_list = new[] - { - new {api_no = 702, api_category = 7, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0}, - new {api_no = 703, api_category = 7, api_state = 2, api_title = "", api_detail = "", api_progress_flag = 0} - } - })); + questInfo.InspectQuestList(CreateQuestList(new[] {702, 703})); questInfo.InspectPowerup(Js(new {api_powerup_flag = 1})); PAssert.That(() => questInfo.Quests.Select(q => new {q.Id, q.Count.Now}) .SequenceEqual(new[] {new {Id = 702, Now = 1}, new {Id = 703, Now = 1}})); } + [TestMethod] + public void NotImplemented() + { + var questInfo = new QuestInfo(null, null, () => new DateTime(2015, 1, 1)); + questInfo.InspectQuestList(CreateQuestList(new[] {318})); + PAssert.That(() => questInfo.Quests[0].Count.Spec.Material.Length == 0); + } + /// /// 文字列表記にする /// diff --git a/KancolleSniffer/MainForm.cs b/KancolleSniffer/MainForm.cs index e88111e..18fd894 100644 --- a/KancolleSniffer/MainForm.cs +++ b/KancolleSniffer/MainForm.cs @@ -940,7 +940,7 @@ namespace KancolleSniffer category[i].BackColor = quests[i].Color; name[i].Text = quests[i].Name; progress[i].Text = $"{quests[i].Progress:D}%"; - _toolTipQuest.SetToolTip(name[i], quests[i].Detail); + _toolTipQuest.SetToolTip(name[i], quests[i].ToToolTip()); var c = quests[i].Count; if (c.Id == 0) { diff --git a/KancolleSniffer/QuestInfo.cs b/KancolleSniffer/QuestInfo.cs index 9fc458e..a73d536 100644 --- a/KancolleSniffer/QuestInfo.cs +++ b/KancolleSniffer/QuestInfo.cs @@ -28,6 +28,7 @@ namespace KancolleSniffer public int Category { get; set; } public string Name { get; set; } public string Detail { get; set; } + public int[] Material { get; set; } public int Progress { get; set; } [XmlIgnore] @@ -35,6 +36,15 @@ namespace KancolleSniffer [XmlIgnore] public Color Color { get; set; } + + public string ToToolTip() => + Detail + + (Material == null || Material.All(x => x == 0) + ? "" + : "\r\n" + string.Join(" ", + new[] {"燃", "弾", "鋼", "ボ", "建造", "修復", "開発", "改修"} + .Zip(Material, (m, num) => num == 0 ? "" : m + num) + .Where(s => !string.IsNullOrEmpty(s)))); } public enum QuestInterval @@ -53,6 +63,7 @@ namespace KancolleSniffer public int[] MaxArray { get; set; } public bool AdjustCount { get; set; } = true; public int Shift { get; set; } + public int[] Material { get; set; } } public class QuestSortie : QuestSpec @@ -173,7 +184,8 @@ namespace KancolleSniffer { case 426: return string.Join(" ", - new[] {"警備任務", "対潜警戒任務", "海上護衛任務", "強硬偵察任務"}.Zip(NowArray, (mission, n) => n >= 1 ? mission : "") + new[] {"警備任務", "対潜警戒任務", "海上護衛任務", "強硬偵察任務"} + .Zip(NowArray, (mission, n) => n >= 1 ? mission : "") .Where(s => !string.IsNullOrEmpty(s))); case 428: return string.Join(" ", @@ -204,66 +216,66 @@ namespace KancolleSniffer /// private static readonly Dictionary QuestSpecs = new Dictionary { - {201, new QuestSortie {Interval = Daily, Max = 1, Rank = "B"}}, // 201: 敵艦隊を撃滅せよ! - {216, new QuestSortie {Interval = Daily, Max = 1, Rank = "B"}}, // 216: 敵艦隊主力を撃滅せよ! - {210, new QuestSortie {Interval = Daily, Max = 10}}, // 210: 敵艦隊を10回邀撃せよ! - {211, new QuestEnemyType {Interval = Daily, Max = 3, EnemyType = new[] {7, 11}}}, // 211: 敵空母を3隻撃沈せよ! - {212, new QuestEnemyType {Interval = Daily, Max = 5, EnemyType = new[] {15}}}, // 212: 敵輸送船団を叩け! - {218, new QuestEnemyType {Interval = Daily, Max = 3, EnemyType = new[] {15}}}, // 218: 敵補給艦を3隻撃沈せよ! - {226, new QuestSortie {Interval = Daily, Max = 5, Rank = "B", Maps = new[] {21, 22, 23, 24, 25}}}, // 226: 南西諸島海域の制海権を握れ! - {230, new QuestEnemyType {Interval = Daily, Max = 6, EnemyType = new[] {13}}}, // 230: 敵潜水艦を制圧せよ! - - {213, new QuestEnemyType {Interval = Weekly, Max = 20, EnemyType = new[] {15}}}, // 213: 海上通商破壊作戦 - {214, new QuestSpec {Interval = Weekly, MaxArray = new[] {36, 6, 24, 12}}}, // 214: あ号作戦 - {220, new QuestEnemyType {Interval = Weekly, Max = 20, EnemyType = new[] {7, 11}}}, // 220: い号作戦 - {221, new QuestEnemyType {Interval = Weekly, Max = 50, EnemyType = new[] {15}}}, // 221: ろ号作戦 - {228, new QuestEnemyType {Interval = Weekly, Max = 15, EnemyType = new[] {13}}}, // 228: 海上護衛戦 - {229, new QuestSortie {Interval = Weekly, Max = 12, Rank = "B", Maps = new[] {41, 42, 43, 44, 45}}}, // 229: 敵東方艦隊を撃滅せよ! - {241, new QuestSortie {Interval = Weekly, Max = 5, Rank = "B", Maps = new[] {33, 34, 35}}}, // 241: 敵北方艦隊主力を撃滅せよ! - {242, new QuestSortie {Interval = Weekly, Max = 1, Rank = "B", Maps = new[] {44}}}, // 242: 敵東方中枢艦隊を撃破せよ! - {243, new QuestSortie {Interval = Weekly, Max = 2, Rank = "S", Maps = new[] {52}}}, // 243: 南方海域珊瑚諸島沖の制空権を握れ! - {256, new QuestSortie {Interval = Monthly, Max = 3, Rank = "S", Maps = new[] {61}}}, // 256: 「潜水艦隊」出撃せよ! - {261, new QuestSortie {Interval = Weekly, Max = 3, Rank = "A", Maps = new[] {15}}}, // 261: 海上輸送路の安全確保に努めよ! - {265, new QuestSortie {Interval = Monthly, Max = 10, Rank = "A", Maps = new[] {15}}}, // 265: 海上護衛強化月間 - - {822, new QuestSortie {Interval = Quarterly, Max = 2, Rank = "S", Maps = new[] {24}}}, // 822: 沖ノ島海域迎撃戦 - {854, new QuestSpec {Interval = Quarterly, MaxArray = new[] {1, 1, 1, 1}}}, // 854: 戦果拡張任務!「Z作戦」前段作戦 - - {303, new QuestPractice {Interval = Daily, Max = 3, Win = false}}, // 303: 「演習」で練度向上! - {304, new QuestPractice {Interval = Daily, Max = 5, Win = true}}, // 304: 「演習」で他提督を圧倒せよ! - {302, new QuestPractice {Interval = Weekly, Max = 20, Win = true}}, // 302: 大規模演習 - {311, new QuestPractice {Interval = Daily, Max = 7, Win = true}}, // 311: 精鋭艦隊演習 - - {402, new QuestMission {Interval = Daily, Max = 3}}, // 402: 「遠征」を3回成功させよう! - {403, new QuestMission {Interval = Daily, Max = 10}}, // 403: 「遠征」を10回成功させよう! - {404, new QuestMission {Interval = Weekly, Max = 30}}, // 404: 大規模遠征作戦、発令! - {410, new QuestMission {Interval = Weekly, Max = 1, Ids = new[] {37, 38}}}, // 410: 南方への輸送作戦を成功させよ! - {411, new QuestMission {Interval = Weekly, Max = 6, Shift = 1, Ids = new[] {37, 38}}}, // 411: 南方への鼠輸送を継続実施せよ! - {424, new QuestMission {Interval = Monthly, Max = 4, Shift = 1, Ids = new[] {5}}}, // 424: 輸送船団護衛を強化せよ! - {426, new QuestSpec {Interval = Quarterly, MaxArray = new[] {1, 1, 1, 1}}}, // 426: 海上通商航路の警戒を厳とせよ! - {428, new QuestSpec {Interval = Quarterly, MaxArray = new[] {2, 2, 2}}}, // 428: 近海に侵入する敵潜を制圧せよ! - - {503, new QuestSpec {Interval = Daily, Max = 5}}, // 503: 艦隊大整備! - {504, new QuestSpec {Interval = Daily, Max = 15}}, // 504: 艦隊酒保祭り! - - {605, new QuestSpec {Interval = Daily, Max = 1}}, // 605: 新装備「開発」指令 - {606, new QuestSpec {Interval = Daily, Max = 1}}, // 606: 新造艦「建造」指令 - {607, new QuestSpec {Interval = Daily, Max = 3, Shift = 1}}, // 607: 装備「開発」集中強化! - {608, new QuestSpec {Interval = Daily, Max = 3, Shift = 1}}, // 608: 艦娘「建造」艦隊強化! - {609, new QuestSpec {Interval = Daily, Max = 2}}, // 609: 軍縮条約対応! - {619, new QuestSpec {Interval = Daily, Max = 1}}, // 619: 装備の改修強化 - - {613, new QuestSpec {Interval = Weekly, Max = 24}}, // 613: 資源の再利用 - {638, new QuestDestroyItem {Interval = Weekly, Max = 6, Items = new[] {21}}}, // 638: 対空機銃量産 - {663, new QuestDestroyItem {Interval = Quarterly, Max = 10, Items = new[] {3}} }, // 663: 新型艤装の継続研究 - {673, new QuestDestroyItem {Interval = Daily, Max = 4, Items = new[] {1}, Shift = 1}}, // 673: 装備開発力の整備 - {674, new QuestDestroyItem {Interval = Daily, Max = 3, Items = new[] {21}, Shift = 2}}, // 674: 工廠環境の整備 - {675, new QuestSpec {Interval = Quarterly, MaxArray = new[] {6, 4}}}, // 675: 運用装備の統合整備 - {676, new QuestSpec {Interval = Weekly, MaxArray = new[] {3, 3, 1}}}, // 676: 装備開発力の集中整備 - {677, new QuestSpec {Interval = Weekly, MaxArray = new[] {4, 2, 3}}}, // 677: 継戦支援能力の整備 - - {702, new QuestPowerup {Interval = Daily, Max = 2}}, // 702: 艦の「近代化改修」を実施せよ! - {703, new QuestPowerup {Interval = Weekly, Max = 15}} // 703: 「近代化改修」を進め、戦備を整えよ! + {201, new QuestSortie {Interval = Daily, Max = 1, Rank = "B", Material = new[] {0, 0, 1, 0}}}, // 201: 敵艦隊を撃滅せよ! + {216, new QuestSortie {Interval = Daily, Max = 1, Rank = "B", Material = new[] {0, 1, 1, 0}}}, // 216: 敵艦隊主力を撃滅せよ! + {210, new QuestSortie {Interval = Daily, Max = 10, Material = new[] {0, 0, 1, 0}}}, // 210: 敵艦隊を10回邀撃せよ! + {211, new QuestEnemyType {Interval = Daily, Max = 3, EnemyType = new[] {7, 11}, Material = new[] {0, 2, 0, 0}}}, // 211: 敵空母を3隻撃沈せよ! + {212, new QuestEnemyType {Interval = Daily, Max = 5, EnemyType = new[] {15}, Material = new[] {0, 0, 2, 0}}}, // 212: 敵輸送船団を叩け! + {218, new QuestEnemyType {Interval = Daily, Max = 3, EnemyType = new[] {15}, Material = new[] {0, 1, 1, 0}}}, // 218: 敵補給艦を3隻撃沈せよ! + {226, new QuestSortie {Interval = Daily, Max = 5, Rank = "B", Maps = new[] {21, 22, 23, 24, 25}, Material = new[] {1, 1, 0, 0}}}, // 226: 南西諸島海域の制海権を握れ! + {230, new QuestEnemyType {Interval = Daily, Max = 6, EnemyType = new[] {13}, Material = new[] {0, 1, 0, 0}}}, // 230: 敵潜水艦を制圧せよ! + + {213, new QuestEnemyType {Interval = Weekly, Max = 20, EnemyType = new[] {15}, Material = new[] {0, 0, 3, 0}}}, // 213: 海上通商破壊作戦 + {214, new QuestSpec {Interval = Weekly, MaxArray = new[] {36, 6, 24, 12}, Material = new[] {2, 0, 2, 0}}}, // 214: あ号作戦 + {220, new QuestEnemyType {Interval = Weekly, Max = 20, EnemyType = new[] {7, 11}, Material = new[] {0, 2, 0, 0}}}, // 220: い号作戦 + {221, new QuestEnemyType {Interval = Weekly, Max = 50, EnemyType = new[] {15}, Material = new[] {0, 3, 0, 0}}}, // 221: ろ号作戦 + {228, new QuestEnemyType {Interval = Weekly, Max = 15, EnemyType = new[] {13}, Material = new[] {0, 2, 0, 1}}}, // 228: 海上護衛戦 + {229, new QuestSortie {Interval = Weekly, Max = 12, Rank = "B", Maps = new[] {41, 42, 43, 44, 45}, Material = new[] {0, 0, 2, 0}}}, // 229: 敵東方艦隊を撃滅せよ! + {241, new QuestSortie {Interval = Weekly, Max = 5, Rank = "B", Maps = new[] {33, 34, 35}, Material = new[] {0, 0, 3, 3}}}, // 241: 敵北方艦隊主力を撃滅せよ! + {242, new QuestSortie {Interval = Weekly, Max = 1, Rank = "B", Maps = new[] {44}, Material = new[] {0, 1, 1, 0}}}, // 242: 敵東方中枢艦隊を撃破せよ! + {243, new QuestSortie {Interval = Weekly, Max = 2, Rank = "S", Maps = new[] {52}, Material = new[] {0, 0, 2, 2}}}, // 243: 南方海域珊瑚諸島沖の制空権を握れ! + {256, new QuestSortie {Interval = Monthly, Max = 3, Rank = "S", Maps = new[] {61}, Material = new[] {0, 0, 0, 0}}}, // 256: 「潜水艦隊」出撃せよ! + {261, new QuestSortie {Interval = Weekly, Max = 3, Rank = "A", Maps = new[] {15}, Material = new[] {0, 0, 0, 3}}}, // 261: 海上輸送路の安全確保に努めよ! + {265, new QuestSortie {Interval = Monthly, Max = 10, Rank = "A", Maps = new[] {15}, Material = new[] {0, 0, 5, 3}}}, // 265: 海上護衛強化月間 + + {822, new QuestSortie {Interval = Quarterly, Max = 2, Rank = "S", Maps = new[] {24}, Material = new[] {0, 0, 0, 5}}}, // 822: 沖ノ島海域迎撃戦 + {854, new QuestSpec {Interval = Quarterly, MaxArray = new[] {1, 1, 1, 1}, Material = new[] {0, 0, 0, 4}}}, // 854: 戦果拡張任務!「Z作戦」前段作戦 + + {303, new QuestPractice {Interval = Daily, Max = 3, Win = false, Material = new[] {1, 0, 0, 0}}}, // 303: 「演習」で練度向上! + {304, new QuestPractice {Interval = Daily, Max = 5, Win = true, Material = new[] {0, 0, 1, 0}}}, // 304: 「演習」で他提督を圧倒せよ! + {302, new QuestPractice {Interval = Weekly, Max = 20, Win = true, Material = new[] {0, 0, 2, 1}}}, // 302: 大規模演習 + {311, new QuestPractice {Interval = Daily, Max = 7, Win = true, Material = new[] {0, 2, 0, 0}}}, // 311: 精鋭艦隊演習 + + {402, new QuestMission {Interval = Daily, Max = 3, Material = new[] {0, 0, 1, 0}}}, // 402: 「遠征」を3回成功させよう! + {403, new QuestMission {Interval = Daily, Max = 10, Material = new[] {0, 0, 0, 0}}}, // 403: 「遠征」を10回成功させよう! + {404, new QuestMission {Interval = Weekly, Max = 30, Material = new[] {0, 0, 3, 0}}}, // 404: 大規模遠征作戦、発令! + {410, new QuestMission {Interval = Weekly, Max = 1, Ids = new[] {37, 38}, Material = new[] {0, 0, 0, 0}}}, // 410: 南方への輸送作戦を成功させよ! + {411, new QuestMission {Interval = Weekly, Max = 6, Shift = 1, Ids = new[] {37, 38}, Material = new[] {0, 0, 2, 1}}}, // 411: 南方への鼠輸送を継続実施せよ! + {424, new QuestMission {Interval = Monthly, Max = 4, Shift = 1, Ids = new[] {5}, Material = new[] {0, 0, 0, 0}}}, // 424: 輸送船団護衛を強化せよ! + {426, new QuestSpec {Interval = Quarterly, MaxArray = new[] {1, 1, 1, 1}, Material = new[] {0, 0, 4, 0}}}, // 426: 海上通商航路の警戒を厳とせよ! + {428, new QuestSpec {Interval = Quarterly, MaxArray = new[] {2, 2, 2}, Material = new[] {0, 0, 0, 3}}}, // 428: 近海に侵入する敵潜を制圧せよ! + + {503, new QuestSpec {Interval = Daily, Max = 5, Material = new[] {0, 2, 0, 0}}}, // 503: 艦隊大整備! + {504, new QuestSpec {Interval = Daily, Max = 15, Material = new[] {1, 0, 1, 0}}}, // 504: 艦隊酒保祭り! + + {605, new QuestSpec {Interval = Daily, Max = 1, Material = new[] {1, 0, 1, 0}}}, // 605: 新装備「開発」指令 + {606, new QuestSpec {Interval = Daily, Max = 1, Material = new[] {0, 1, 1, 0}}}, // 606: 新造艦「建造」指令 + {607, new QuestSpec {Interval = Daily, Max = 3, Shift = 1, Material = new[] {0, 0, 2, 0}}}, // 607: 装備「開発」集中強化! + {608, new QuestSpec {Interval = Daily, Max = 3, Shift = 1, Material = new[] {1, 0, 2, 0}}}, // 608: 艦娘「建造」艦隊強化! + {609, new QuestSpec {Interval = Daily, Max = 2, Material = new[] {0, 1, 0, 0}}}, // 609: 軍縮条約対応! + {619, new QuestSpec {Interval = Daily, Max = 1, Material = new[] {0, 0, 0, 1}}}, // 619: 装備の改修強化 + + {613, new QuestSpec {Interval = Weekly, Max = 24, Material = new[] {0, 0, 0, 0}}}, // 613: 資源の再利用 + {638, new QuestDestroyItem {Interval = Weekly, Max = 6, Items = new[] {21}, Material = new[] {0, 0, 2, 1}}}, // 638: 対空機銃量産 + {663, new QuestDestroyItem {Interval = Quarterly, Max = 10, Items = new[] {3}, Material = new[] {0, 0, 3, 0}}}, // 663: 新型艤装の継続研究 + {673, new QuestDestroyItem {Interval = Daily, Max = 4, Items = new[] {1}, Shift = 1, Material = new[] {0, 0, 1, 0}}}, // 673: 装備開発力の整備 + {674, new QuestDestroyItem {Interval = Daily, Max = 3, Items = new[] {21}, Shift = 2, Material = new[] {0, 1, 1, 0}}}, // 674: 工廠環境の整備 + {675, new QuestSpec {Interval = Quarterly, MaxArray = new[] {6, 4}, Material = new[] {0, 0, 0, 0}}}, // 675: 運用装備の統合整備 + {676, new QuestSpec {Interval = Weekly, MaxArray = new[] {3, 3, 1}, Material = new[] {0, 1, 7, 0}}}, // 676: 装備開発力の集中整備 + {677, new QuestSpec {Interval = Weekly, MaxArray = new[] {4, 2, 3}, Material = new[] {0, 5, 0, 0}}}, // 677: 継戦支援能力の整備 + + {702, new QuestPowerup {Interval = Daily, Max = 2, Material = new[] {0, 1, 0, 0}}}, // 702: 艦の「近代化改修」を実施せよ! + {703, new QuestPowerup {Interval = Weekly, Max = 15, Material = new[] {1, 0, 2, 0}}} // 703: 「近代化改修」を進め、戦備を整えよ! }; // @formatter:on @@ -284,7 +296,7 @@ namespace KancolleSniffer Spec = spec }; } - return new QuestCount {Spec = new QuestSpec {AdjustCount = false}}; + return new QuestCount {Spec = new QuestSpec {Material = new int[0], AdjustCount = false}}; } public void Remove(int id) @@ -363,6 +375,7 @@ namespace KancolleSniffer var cat = (int)entry.api_category; var name = (string)entry.api_title; var detail = ((string)entry.api_detail).Replace("
", "\r\n"); + var material = (int[])entry.api_get_material; switch (progress) { @@ -385,7 +398,7 @@ namespace KancolleSniffer progress = 100; goto case 2; case 2: - AddQuest(id, cat, name, detail, progress, true); + AddQuest(id, cat, name, detail, material, progress, true); break; } } @@ -399,7 +412,8 @@ namespace KancolleSniffer } } - private void AddQuest(int id, int category, string name, string detail, int progress, bool adjustCount) + private void AddQuest(int id, int category, string name, string detail, int[] material, int progress, + bool adjustCount) { var count = _countList.GetCount(id); if (adjustCount) @@ -413,6 +427,7 @@ namespace KancolleSniffer Category = category, Name = name, Detail = detail, + Material = material?.Concat(count.Spec.Material).ToArray(), Count = count, Progress = progress, Color = category <= _color.Length ? _color[category - 1] : Control.DefaultBackColor @@ -729,7 +744,7 @@ namespace KancolleSniffer { _quests.Clear(); foreach (var q in status.QuestList) - AddQuest(q.Id, q.Category, q.Name, q.Detail, q.Progress, false); + AddQuest(q.Id, q.Category, q.Name, q.Detail, q.Material, q.Progress, false); } } } -- 2.11.0