ericbabe
Posts: 11927
Joined: 3/23/2005 Status: offline
|
Here's the relevant section of code: quote:
// calc total carnage int totalCarnage = 0; bool bWasSmallBattle = false; for (p=1; p<NoNations; p++) totalCarnage += HexWar.CarnageTakenByPlayer[p]; if (totalCarnage<SmallBattleDeathSize) bWasSmallBattle = true; // modify morale and glory { int averageCarnage = (HexWar.CarnageTakenByTeam[0] + HexWar.CarnageTakenByTeam[1])/2; float scale = (float) averageCarnage/500.0f; int gloryScale = 2*(1 + min(TotalTeamStrength[0], TotalTeamStrength[1])/StrengthPerGloryInBattle); if (bWasSmallBattle) { scale = 0; gloryScale = 1; } if (TotalTeamStrength[0]>100000 && TotalTeamStrength[1]>100000) { gloryScale *= 2; scale *= 6; } if (averageCarnage<500) gloryScale = 0; { // modify morale for (p=1; p<NoPlayersWithTreaties; p++) if (PlayerStrength[p]) { // modf morale if (HexWar.RetreatRounds[p]>=0) { // greater morale loss for non-france in 1792-1796 int year = StartYear+GetTurn()/12; if (p!=France && (year>=1792 && year<1796)) { Do_ModfNationalMorale(p, -6*scale, loseBattle_MoraleMod); } else Do_ModfNationalMorale(p, -3*scale, loseBattle_MoraleMod); } else { Do_ModfNationalMorale(p, scale, winBattle_MoraleMod); } // lose ML for own casualties Do_ModfNationalMorale(p, -HexWar.CarnageTakenByPlayer[p]/2000, casualties_MoraleMod); So if you lost 30,000 men in a battle with at least 100,000 men on each side in 1798, and assuming the other side lost maybe 15,000 men, then: totalCarnage == 45000 averageCarnage = 22750 scale = 22750/500 = 45.5 but then scale *=6 gives: scale == 273 Since it's not between 1792 and 1796, we get: Do_ModfNationalMorale(p, -3*scale, loseBattle_MoraleMod); and -3*273 = -819 Since I had to approximate the French loss, this is only an approximation, but it seems to be about the right magnitude of loss that you experienced.
|