private BattleResultRank CalcLdResultRank() { var friend = new ResultRankParams(_friend.Concat(_guard).ToArray()); if (friend.Gauge <= 0) { return(BattleResultRank.P); } if (friend.GaugeRate < 10) { return(BattleResultRank.A); } if (friend.GaugeRate < 20) { return(BattleResultRank.B); } if (friend.GaugeRate < 50) { return(BattleResultRank.C); } if (friend.GaugeRate < 80) { return(BattleResultRank.D); } return(BattleResultRank.E); }
private BattleResultRank CalcResultRank() { var friend = new ResultRankParams(_friend.Concat(_guard).ToArray()); var enemy = new ResultRankParams(_enemy.Concat(_enemyGuard).ToArray()); if (friend.Sunk == 0 && enemy.Sunk == enemy.Count) { if (friend.Gauge <= 0) { return(BattleResultRank.P); } return(BattleResultRank.S); } if (friend.Sunk == 0 && enemy.Sunk >= (int)(enemy.Count * 0.7) && enemy.Count > 1) { return(BattleResultRank.A); } if (friend.Sunk < enemy.Sunk && _enemy[0].NowHp == 0) { return(BattleResultRank.B); } if (friend.Count == 1 && _friend[0].DamageLevel == ShipStatus.Damage.Badly) { return(BattleResultRank.D); } if (enemy.GaugeRate > friend.GaugeRate * 2.5) { return(BattleResultRank.B); } if (enemy.GaugeRate > friend.GaugeRate * 0.9) { return(BattleResultRank.C); } if (friend.Count > 1 && friend.Count - 1 == friend.Sunk) { return(BattleResultRank.E); } return(BattleResultRank.D); }