Beispiel #1
0
 public static float GetPartyBonus(this Clan party, GetBonusDelegate getBonusDelegate, LogBonusDelegate logBonusDelegate) =>
 party.Companions
 .Select(companion => companion.CharacterObject)
 .GetPartyBonus(party.Leader.CharacterObject, getBonusDelegate, logBonusDelegate);
Beispiel #2
0
 public static float GetPartyBonus(this MobileParty party, GetBonusDelegate getBonusDelegate, LogBonusDelegate logBonusDelegate) =>
 party.Party
 .GetPartyBonus(getBonusDelegate, logBonusDelegate);
Beispiel #3
0
 public static float GetPartyBonus(this IEnumerable <CharacterObject> party, CharacterObject leader, GetBonusDelegate getBonusDelegate, LogBonusDelegate logBonusDelegate) =>
 (Config.Instance.applye_bonuses_from_companions
         ? new CharacterObject[] { leader }.Concat(party)
         : new CharacterObject[] { leader })
 .GetPartyBonus(getBonusDelegate, logBonusDelegate);
Beispiel #4
0
 public static float GetPartyBonus(this PartyBase party, GetBonusDelegate getBonusDelegate, LogBonusDelegate logBonusDelegate) =>
 party.MemberRoster.Troops
 .GetPartyBonus(party.Leader, getBonusDelegate, logBonusDelegate);
Beispiel #5
0
 private static float GetPartyBonus(this IEnumerable <CharacterObject> party, GetBonusDelegate getBonusDelegate, LogBonusDelegate logBonusDelegate) =>
 1 + party
 .Where(troop => troop != null && troop.IsHero)
 .Distinct()
 .Select(troop => new
 {
     bonus = getBonusDelegate(new CharacterAttributeBonuses(troop)),
     name  = troop.Name.ToString()
 })
 .Do(troop => logBonusDelegate?.Invoke(troop.bonus, troop.name))
 .Sum(troop => troop.bonus);