• R/O
• HTTP
• SSH
• HTTPS

## KancolleSniffer: コミット

### コミットメタ情報

リビジョン a6002d6a7a28165cde3b2367b5d4a8150b381647 (tree) 2018-03-23 22:43:26 Kazuhiro Fujieda Kazuhiro Fujieda

### 差分

--- a/KancolleSniffer.Test/SnifferTest.cs
+++ b/KancolleSniffer.Test/SnifferTest.cs
 @@ -306,6 +306,17 @@ namespace KancolleSniffer.Test 306 306 } 307 307 308 308 /// 309 + /// 基地航空隊の出撃コストを計算する 310 + /// 311 + [TestMethod] 312 + public void CostForSortieOfBaseAirCorps() 313 + { 314 + var sniffer = new Sniffer(); 315 + SniffLogFile(sniffer, "baseaircorps_003"); 316 + PAssert.That(() => sniffer.BaseAirCorps[1].AirCorps[0].CostForSortie.SequenceEqual(new[] {99, 47})); 317 + } 318 + 319 + /// 309 320 /// 陸上戦闘機の改修レベルを制空値に反映させる。 310 321 /// 311 322 [TestMethod]
--- a/KancolleSniffer/BaseAirCoprs.cs
+++ b/KancolleSniffer/BaseAirCoprs.cs
 @@ -89,6 +89,24 @@ namespace KancolleSniffer 89 89 return new[] {prev[0] + cur[0], prev[1] + cur[1]}; 90 90 }).Select(fp => (int)(fp * reconPlaneBonus)).ToArray(); 91 91 } 92 + 93 + public int[] CostForSortie => Planes.Aggregate(new[] {0, 0}, (prev, plane) => 94 + { 95 + if (plane.State != 1) 96 + return prev; 97 + int fuel, bull; 98 + if (plane.Slot.Spec.Type == 47) 99 + { 100 + fuel = (int)Math.Ceiling(plane.Count * 1.5); 101 + bull = (int)(plane.Count * 0.7); 102 + } 103 + else 104 + { 105 + fuel = plane.Count; 106 + bull = (int)Math.Ceiling(plane.Count * 0.6); 107 + } 108 + return new[] {prev[0] + fuel, prev[1] + bull}; 109 + }); 92 110 } 93 111 94 112 public class PlaneInfo
--- a/KancolleSniffer/FleetPanel.cs
+++ b/KancolleSniffer/FleetPanel.cs
 @@ -35,6 +35,7 @@ namespace KancolleSniffer 35 35 public string Fleet { get; set; } 36 36 public string Fleet2 { get; set; } 37 37 public string Ship { get; set; } 38 + public string Ship2 { get; set; } 38 39 public int Id { get; set; } 39 40 public string Equip { get; set; } 40 41 public Color Color { get; set; }
 @@ -124,6 +125,7 @@ namespace KancolleSniffer 124 125 var ship = new Record 125 126 { 126 127 Ship = (s.Escaped ? "[避]" : "") + s.Name + " Lv" + s.Level, 128 + Ship2 = "", 127 129 Id = s.Id, 128 130 // ReSharper disable CompareOfFloatsByEqualityOperator 129 131 Spec = (fire == 0 ? "" : \$"砲{fire:f1}") + (subm == 0 ? "" : \$" 潜{subm:f1}{oasa}"),
 @@ -178,9 +180,11 @@ namespace KancolleSniffer 178 180 spec = "制空:" + RangeString(corpsFp.AirCombat); 179 181 spec2 = corpsFp.IsInterceptor ? "制空(防空):" + RangeString(corpsFp.Interception) : ""; 180 182 } 183 + var cost = airCorps.CostForSortie; 181 184 list.Add(new Record 182 185 { 183 186 Ship = name[i++] + " " + airCorps.ActionName, 187 + Ship2 = \$"出撃コスト:燃{cost[0]}弾{cost[1]}", 184 188 Spec = spec + " 距離:" + airCorps.Distance, 185 189 Spec2 = spec2 186 190 });
 @@ -296,6 +300,8 @@ namespace KancolleSniffer 296 300 var labels = _labelList[i]; 297 301 labels.Fleet.Text = e.Fleet; 298 302 labels.Name.SetName(e.Ship); 303 + if (e.Ship2 != "") 304 + _toolTip.SetToolTip(labels.Name, e.Ship2); 299 305 labels.Equip.Text = e.Equip; 300 306 labels.EquipColor.Visible = e.Equip != ""; 301 307 labels.EquipColor.BackColor = e.Color;