2022-12-03 14:33:09 +01:00
|
|
|
|
namespace EDPlayerJournal;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Static strings related to combat zones
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class CombatZones {
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Type string for ground combat zone
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string GroundCombatZone = "Ground";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Type string for ship combat zones
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string ShipCombatZone = "Ship";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-12-03 20:42:38 +01:00
|
|
|
|
/// AX combat zone
|
2022-12-03 14:33:09 +01:00
|
|
|
|
/// </summary>
|
2022-12-03 20:42:38 +01:00
|
|
|
|
public static readonly string AXCombatZone = "AX";
|
2022-12-03 14:33:09 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Difficulty low
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string DifficultyLow = "Low";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Difficulty medium
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string DifficultyMedium = "Medium";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Difficulty high
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string DifficultyHigh = "High";
|
2022-12-03 20:42:38 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Very high difficulty, so far AX combat zone only
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string DifficultyVeryHigh = "Very High";
|
2023-02-25 17:48:01 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns the given combat zone difficulty as an integer, so it can be sorted.
|
|
|
|
|
/// 0 = lowest difficulty, 1 = medium and so forth.
|
|
|
|
|
/// </summary>
|
2023-02-26 21:57:24 +01:00
|
|
|
|
public static int? DifficultyRank(string? difficulty) {
|
2023-02-25 17:48:01 +01:00
|
|
|
|
Dictionary<string, int> ranks = new() {
|
|
|
|
|
{ DifficultyLow, 0 },
|
|
|
|
|
{ DifficultyMedium, 1 },
|
|
|
|
|
{ DifficultyHigh, 2 },
|
|
|
|
|
{ DifficultyVeryHigh, 3 }
|
|
|
|
|
};
|
|
|
|
|
|
2023-02-26 21:57:24 +01:00
|
|
|
|
if (difficulty == null ) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-25 17:48:01 +01:00
|
|
|
|
if (ranks.TryGetValue(difficulty, out int rank)) {
|
|
|
|
|
return rank;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
2022-12-03 14:33:09 +01:00
|
|
|
|
}
|