public static void CSAddTroop(int Tier, int num, PartyBase partyBase)
        {
            CharacterObject characterObject = (from x in CharacterObject.All
                                               where x.Tier == Tier && x.Culture.StringId == Hero.MainHero.Culture.StringId && !x.IsHero && (x.Occupation == Occupation.Soldier || x.Occupation == Occupation.Mercenary)
                                               select x).GetRandomElementInefficiently <CharacterObject>();

            partyBase.AddElementToMemberRoster(characterObject, num, false);
        }
 private void PartyRecruitAndRemovePrisoner(PartyBase mb, CharacterObject c)
 {
     if (Config.PrisonRecruitmentDebugEnabled)
     {
         ModDebug.ShowMessage("recruiting " + c.StringId + " from prisoners of party " + mb.Id);
     }
     mb.PrisonRoster.RemoveTroop(c, 1);
     mb.AddElementToMemberRoster(c, 1);
 }
 private void PartyRecruitAndRemovePrisoner(PartyBase acquiringParty, PartyBase prisonerParty, CharacterObject c, int times)
 {
     ModDebug.ShowMessage("recruiting " + c.StringId + " from prisoners of party " + prisonerParty.Id + " to the party " + acquiringParty.Id, DebugMessageType.Prisoner);
     prisonerParty.PrisonRoster.RemoveTroop(c, times);
     acquiringParty.AddElementToMemberRoster(c, times);
 }
 private void PartyRecruitAndRemovePrisoner(PartyBase mb, CharacterObject c, int times)
 {
     ModDebug.ShowMessage("recruiting " + c.StringId + " from prisoners of party " + mb.Id, DebugMessageType.Prisoner);
     mb.PrisonRoster.RemoveTroop(c, times);
     mb.AddElementToMemberRoster(c, times);
 }