コミットメタ情報

リビジョン86700d9f1a5a3cab3055abdad3b2f0ae30a2dea3 (tree)
日時2018-06-03 17:55:22
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

CSV形式に素対潜を追加する

変更サマリ

差分

--- a/KancolleSniffer/ShipStatus.cs
+++ b/KancolleSniffer/ShipStatus.cs
@@ -159,10 +159,8 @@ namespace KancolleSniffer
159159 var depthCharge = false;
160160 var aircraft = false;
161161 var all = 0.0;
162- var vanilla = AntiSubmarine;
163162 foreach (var spec in Slot.Select(item => item.Spec))
164163 {
165- vanilla -= spec.AntiSubmarine;
166164 if (spec.IsSonar)
167165 {
168166 sonar = true;
@@ -180,6 +178,7 @@ namespace KancolleSniffer
180178 }
181179 all += spec.EffectiveAntiSubmarine;
182180 }
181+ var vanilla = ShipAntiSubmarine;
183182 if (vanilla == 0 && !aircraft) // 素対潜0で航空機なしは対潜攻撃なし
184183 return 0;
185184 var bonus = 1.0;
@@ -196,6 +195,8 @@ namespace KancolleSniffer
196195 }
197196 }
198197
198+ public int ShipAntiSubmarine => AntiSubmarine - Slot.Sum(item => item.Spec.AntiSubmarine);
199+
199200 public bool CanOpeningAntiSubmarineAttack
200201 {
201202 get
--- a/KancolleSniffer/TextGenerator.cs
+++ b/KancolleSniffer/TextGenerator.cs
@@ -22,11 +22,11 @@ namespace KancolleSniffer
2222 public static class TextGenerator
2323 {
2424 public static string GenerateShipList(IEnumerable<ShipStatus> shipList)
25- => "ID,艦種,艦名,レベル,cond\r\n" +
25+ => "ID,艦種,艦名,レベル,cond,素対潜\r\n" +
2626 string.Join("\r\n",
2727 from ship in shipList
2828 orderby ship.Spec.ShipType, -ship.Level, ship.ExpToNext
29- select $"{ship.Id},{ship.Spec.ShipTypeName},{ship.Name},{ship.Level},{ship.Cond}");
29+ select $"{ship.Id},{ship.Spec.ShipTypeName},{ship.Name},{ship.Level},{ship.Cond},{ship.ShipAntiSubmarine}");
3030
3131 public static string GenerateKantaiSarashiData(IEnumerable<ShipStatus> shipList)
3232 {
旧リポジトリブラウザで表示