コミットメタ情報

リビジョン93a7bd2318508bb69302358fd105886fb393599d (tree)
日時2018-12-29 17:05:25
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

レーダー射撃戦の勝利判定を間違えるのを直す

変更サマリ

差分

--- a/KancolleSniffer.Test/BattleTest.cs
+++ b/KancolleSniffer.Test/BattleTest.cs
@@ -286,7 +286,8 @@ namespace KancolleSniffer.Test
286286 {
287287 var sniffer = new Sniffer();
288288 SniffLogFile(sniffer, "ld_shooting_001");
289- PAssert.That(() => sniffer.Battle.Result.Friend.Main[0].NowHp == 44);
289+ PAssert.That(() => !sniffer.IsBattleResultStatusError);
290+ PAssert.That(() => !sniffer.Battle.DisplayedResultRank.IsError);
290291 }
291292 }
292293 }
\ No newline at end of file
--- a/KancolleSniffer/Model/BattleInfo.cs
+++ b/KancolleSniffer/Model/BattleInfo.cs
@@ -111,7 +111,7 @@ namespace KancolleSniffer.Model
111111 BattleState = url.Contains("sp_midnight") ? BattleState.SpNight :
112112 url.Contains("midnight") ? BattleState.Night : BattleState.Day;
113113 CalcDamage(json);
114- ResultRank = url.EndsWith("ld_airbattle") ? CalcLdAirBattleRank() : CalcResultRank();
114+ ResultRank = url.Contains("/ld_") ? CalcLdResultRank() : CalcResultRank();
115115 SetResult();
116116 }
117117
@@ -637,7 +637,7 @@ namespace KancolleSniffer.Model
637637 }
638638 }
639639
640- private BattleResultRank CalcLdAirBattleRank()
640+ private BattleResultRank CalcLdResultRank()
641641 {
642642 var combined = _friend.Concat(_guard).Where(r => !r.Escaped).ToArray();
643643 var friendGauge = combined.Sum(r => r.StartHp - r.NowHp);
旧リポジトリブラウザで表示