_battleInfo = new BattleInfo(_shipInfo, _itemInfo);\r
}\r
\r
+ /// <summary>\r
+ /// 連撃を受けて女神が発動する\r
+ /// </summary>\r
[TestMethod]\r
- public void Damecon()\r
+ public void CauseRepairGoddessByDoubleAttack()\r
{\r
var logs = ReadAllLines("damecon_001");\r
var items = JsonParser.Parse("[[[],[],[],[],[43]]]");\r
_battleInfo.InspectBattleResult(result);\r
PAssert.That(() => _shipInfo.GetShipStatuses(2)[4].NowHp == 31);\r
}\r
+\r
+ /// <summary>\r
+ /// 夜戦で戦艦の攻撃を受ける\r
+ /// </summary>\r
+ [TestMethod]\r
+ public void AttackedByBattleShipInMidnight()\r
+ {\r
+ var logs = ReadAllLines("midnight_002");\r
+ var battle = JsonParser.Parse(logs[3]);\r
+ _shipInfo.InjectShips(battle, JsonParser.Parse(logs[0]));\r
+ _battleInfo.InspectBattle(battle, logs[1]);\r
+ _battleInfo.InspectBattleResult(JsonParser.Parse(logs[6]));\r
+ PAssert.That(() => _shipInfo.GetShipStatuses(0)[3].NowHp == 12);\r
+ }\r
}\r
}
\ No newline at end of file
for (var i = 0; i < eflags.Length; i++)\r
{\r
// 一度に複数の目標を狙う攻撃はないものと仮定する\r
- var hit = new {t = targets[i][0], d = damages[i].Sum()};\r
+ var hit = new {t = targets[i][0], d = damages[i].Sum(d => d >= 0 ? d : 0)};\r
if (hit.t == -1)\r
continue;\r
if (eflags[i] == 1)\r
}\r
\r
\r
-\r
private void VerifyResultRank(dynamic json)\r
{\r
if (_friend == null)\r