Beispiel #1
0
 public override float CalculateWarSuccessScore(Kingdom decidingKingdom, IFaction factionAtWar)
 {
     if (factionAtWar.IsKingdomFaction)
     {
         StanceLink stanceWith           = decidingKingdom.GetStanceWith(factionAtWar);
         int        decidingKingdomScore = stanceWith.GetSuccessfulSieges(decidingKingdom) * 1000
                                           + factionAtWar.Heroes.Count(h => h.IsPrisoner && h.PartyBelongedToAsPrisoner?.MapFaction == decidingKingdom) * 100
                                           + stanceWith.GetSuccessfulRaids(decidingKingdom) * 25
                                           + stanceWith.GetCasualties(factionAtWar);
         int factionAtWarScore = stanceWith.GetSuccessfulSieges(factionAtWar) * 1000
                                 + decidingKingdom.Heroes.Count(h => h.IsPrisoner && h.PartyBelongedToAsPrisoner?.MapFaction == factionAtWar) * 100
                                 + stanceWith.GetSuccessfulRaids(factionAtWar) * 25
                                 + stanceWith.GetCasualties(decidingKingdom);
         return(decidingKingdomScore - factionAtWarScore);
     }
     return(0);
 }