Class OfficerSelector

java.lang.Object
mekhq.campaign.universe.commandGeneration.ratgen.OfficerSelector

public final class OfficerSelector extends Object
Ranks the people generated for a command by how well they would lead it.

The order is the one the retired AtB Company Generator used. Tactical Genius comes first: a person with the ability outranks anyone without it. After that the caller chooses which matters more, the person's combat experience level or the total of their Leadership, Strategy and Tactics skill levels; the other breaks ties. In a Clan command a Bloodname comes before everything: the Bloodnamed are the warriors the Clans put in command. The comparators here put the best person first.

  • Method Details

    • bestFirst

      public static Comparator<Person> bestFirst(Campaign campaign, boolean prioritizeCombat)
      Orders people best first for a leadership post in a command of the campaign's own faction.
      Parameters:
      campaign - the campaign, whose options and date decide how skills are read
      prioritizeCombat - true to rank by combat experience before command skills, false to rank by command skills before combat experience; Tactical Genius leads either way
      Returns:
      a comparator placing the best candidate first
    • bestFirst

      public static Comparator<Person> bestFirst(Campaign campaign, boolean prioritizeCombat, boolean isClanCommand)
      Orders people best first for a leadership post.
      Parameters:
      campaign - the campaign, whose options and date decide how skills are read
      prioritizeCombat - true to rank by combat experience before command skills, false to rank by command skills before combat experience; Tactical Genius leads either way
      isClanCommand - true when the command is a Clan one, so a Bloodname comes before all else
      Returns:
      a comparator placing the best candidate first
    • bloodnamedFirst

      public static Comparator<Person> bloodnamedFirst()
      Orders people so the Bloodnamed come first and the rest keep their order, for a post a Clan gives only to a Bloodnamed warrior when the options ask for no other order.
      Returns:
      a comparator placing Bloodnamed people first
    • mostSkilledFirst

      public static Comparator<Person> mostSkilledFirst(Campaign campaign)
      Orders people best first for a seat in the leading lances: Tactical Genius, then combat experience.
      Parameters:
      campaign - the campaign, whose options and date decide how skills are read
      Returns:
      a comparator placing the most skilled pilot first
    • describe

      public static String describe(Campaign campaign, Person person)
      A one-line account of what the orders see in a person, for the log: Tactical Genius if they have it, their combat experience, and their command skill total.
      Parameters:
      campaign - the campaign, whose options and date decide how skills are read
      person - the person
      Returns:
      for example Jane Doe (Tactical Genius, combat Veteran, command 3)
    • hasBloodname

      public static boolean hasBloodname(Person person)
      Returns:
      true when the person carries a Bloodname