private int _calcBattlePvp(BattleFleets atakerReport, BattleFleets defendorReport, BattleResult status) { // if (status == BattleResult.DeadHeat) return 0; //if (status == BattleResult.AtackerEscape) return 0; var destroedHp = 0; var lostHp = 0; if (status == BattleResult.AtackerWin) { lostHp = FleetStats.SetPowerFleet(atakerReport.Lose).Hp; destroedHp = FleetStats.SetPowerFleet(defendorReport.Lose).Hp; } else if (status == BattleResult.DefenderWin) { lostHp = FleetStats.SetPowerFleet(defendorReport.Lose).Hp; destroedHp = FleetStats.SetPowerFleet(atakerReport.Lose).Hp; } var pvpMod = 1.1; var lost = 0; var destroy = 0; if (lostHp > 2) { lost = lostHp / 2; } if (destroedHp > 0) { destroy = destroedHp; } var resultPvp = (int)Math.Floor((lost + destroy) * pvpMod); return(resultPvp); }
private int _calcCc(BattleFleets skagryFleetReport, bool skagryIsAtacker) { var mod = skagryIsAtacker ? 2.0 : 1.0; var skagryHp = FleetStats.SetPowerFleet(skagryFleetReport.Before).Hp; var proportion = 100.0; var cc = mod * skagryHp / proportion; return((int)Math.Floor(cc)); }