Skip to content

Commit

Permalink
add javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Algebro7 committed Oct 4, 2024
1 parent 679528f commit 3814786
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
* Utility class that implements the mission tables as described in CamOps (4th printing).
*/
public class MissionSelector {
/**
* Determines the mission from the Inner Sphere/Clan column of the Missions Table on page 40
* in CamOps, 4th printing. Certain rolls generate missions from other columns, i.e. Special
* and Covert.
*
* @param roll The result of a 2d6 roll
* @param margin The margin of success from a Negotiation check
* @param isClan Whether the player unit is a Clan faction
* @return The AtBContractType representing the type of mission for the contract
*/
public static AtBContractType getInnerSphereClanMission(int roll, int margin, boolean isClan) {
if (isClan) {
int result = roll + margin;
Expand All @@ -47,6 +57,16 @@ public static AtBContractType getInnerSphereClanMission(int roll, int margin, bo
};
}

/**
* Determines the mission from the Independent column of the Missions Table on page 40 in
* CamOps, 4th printing. Certain rolls generate missions from other columns, i.e. Special
* and Covert.
*
* @param roll The result of a 2d6 roll
* @param margin The margin of success from a Negotiation check
* @param isClan Whether the player unit is a Clan faction
* @return The AtBContractType representing the type of mission for the contract
*/
public static AtBContractType getIndependentMission(int roll, int margin, boolean isClan) {
if (isClan) {
int result = roll + margin;
Expand All @@ -68,6 +88,16 @@ public static AtBContractType getIndependentMission(int roll, int margin, boolea
};
}

/**
* Determines the mission from the Corporation column of the Missions Table on page 40 in
* CamOps, 4th printing. Certain rolls generate missions from other columns, i.e. Special
* and Covert.
*
* @param roll The result of a 2d6 roll
* @param margin The margin of success from a Negotiation check
* @param isClan Whether the player unit is a Clan faction
* @return The AtBContractType representing the type of mission for the contract
*/
public static AtBContractType getCorporationMission(int roll, int margin, boolean isClan) {
if (isClan) {
int result = roll + margin;
Expand All @@ -89,6 +119,14 @@ public static AtBContractType getCorporationMission(int roll, int margin, boolea
};
}

/**
* Determines the mission from the Pirate column of the Missions Table on page 40 in CamOps,
* 4th printing.
*
* @param roll The result of a 2d6 roll
* @param margin The margin of success from a Negotiation check
* @return The AtBContractType representing the type of mission for the contract
*/
public static AtBContractType getPirateMission(int roll, int margin) {
roll += margin;
if (roll < 6) {
Expand Down

0 comments on commit 3814786

Please sign in to comment.