Refactors constants out of Derangements.h.
This commit is contained in:
@@ -9,6 +9,163 @@ using std::string;
|
|||||||
using std::vector;
|
using std::vector;
|
||||||
} // End namespace
|
} // End namespace
|
||||||
|
|
||||||
|
const uint8_t kDerangementAmnesiaTextColor = kColorDarkRed;
|
||||||
|
const std::string kDerangementAmnesiaLabel = "Amnesia";
|
||||||
|
const std::string kDerangementAmnesiaDescription =
|
||||||
|
R"---(You forget a segment of your past. Additionally in some cases a character can forget abilities and be unable to use them for the duration.)---";
|
||||||
|
const uint8_t kDerangementDelusionsOfGrandeurTextColor = kColorDarkMagenta;
|
||||||
|
const std::string kDerangementDelusionsOfGrandeurLabel = "Delusions of Grandeur";
|
||||||
|
const std::string kDerangementDelusionsOfGrandeurDescription = R"---(You imagine you are better than you are.)---";
|
||||||
|
const uint8_t kDerangementFantasyTextColor = kColorDarkYellow;
|
||||||
|
const std::string kDerangementFantasyLabel = "Fantasy";
|
||||||
|
const std::string kDerangementFantasyDescription =
|
||||||
|
R"---(You enter a self-created world where you are the forgotten hero.)---";
|
||||||
|
const uint8_t kDerangementManicDepressionTextColor = kColorDarkWhite;
|
||||||
|
const std::string kDerangementManicDepressionLabel = "Manic-Depression";
|
||||||
|
const std::string kDerangementManicDepressionDescription =
|
||||||
|
R"---(You sink into deep and fitful depressions, showing no interest in anything which used to captivate your interests. You will go along with others rather than use the energy to resist. Occasional fits of great energy grab hold of you, and you will work for hours or even days on your projects. During this time you will resist even the need for sleep as you burn up blood and Willpower on your schemes.)---";
|
||||||
|
const uint8_t kDerangementMultiplePersonalitiesTextColor = kColorDarkBlue;
|
||||||
|
const std::string kDerangementMultiplePersonalitiesLabel = "Multiple Personalities";
|
||||||
|
const std::string kDerangementMultiplePersonalitiesDescription =
|
||||||
|
R"---(You possess a number of new personalities. You have amore than one Mature, and will switch between them. Thus you regain Willpower points in defferent ways at defferent times)---";
|
||||||
|
const uint8_t kDerangementObsessionTextColor = kColorBrightGreen;
|
||||||
|
const std::string kDerangementObsessionLabel = "Obsession";
|
||||||
|
const std::string kDerangementObsessionDescription = R"---(You become obsessed with some interest or fetish.)---";
|
||||||
|
const uint8_t kDerangementOvercompensationTextColor = kColorBrightCyan;
|
||||||
|
const std::string kDerangementOvercompensationLabel = "Overcompensation";
|
||||||
|
const std::string kDerangementOvercompensationDescription =
|
||||||
|
R"---(You make up for your moral weaknesses by playing up your strengths to an extreme. You don't think you can frenzy and won't stop it.)---";
|
||||||
|
const uint8_t kDerangementParanoiaTextColor = kColorBrightRed;
|
||||||
|
const std::string kDerangementParanoiaLabel = "Paranoia";
|
||||||
|
const std::string kDerangementParanoiaDescription =
|
||||||
|
R"---(You are convinced that you are being hunted. You hold even your closest Friends under suspicion.)---";
|
||||||
|
const uint8_t kDerangementPerfectionTextColor = kColorBrightMagenta;
|
||||||
|
const std::string kDerangementPerfectionLabel = "Perfection";
|
||||||
|
const std::string kDerangementPerfectionDescription =
|
||||||
|
R"---(All your energy is directed toward preventing anything from going wong. When it does you must make a self-control roll or frenzy.)---";
|
||||||
|
const uint8_t kDerangementRegressionTextColor = kColorBrightYellow;
|
||||||
|
const std::string kDerangementRegressionLabel = "Regression";
|
||||||
|
const std::string kDerangementRegressionDescription =
|
||||||
|
R"---(You become childlike retreating to an earlier time when less was expected of you Willpower is regained inthe way a Child's is.)---";
|
||||||
|
const DerangementType kDerangementUnknown = {0, "", "", 0};
|
||||||
|
const DerangementType kDerangementAmnesia = {
|
||||||
|
kDerangementAmnesiaId,
|
||||||
|
kDerangementAmnesiaLabel,
|
||||||
|
kDerangementAmnesiaDescription,
|
||||||
|
kDerangementAmnesiaTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementDelusionsOfGrandeur = {
|
||||||
|
kDerangementDelusionsOfGrandeurId,
|
||||||
|
kDerangementDelusionsOfGrandeurLabel,
|
||||||
|
kDerangementDelusionsOfGrandeurDescription,
|
||||||
|
kDerangementDelusionsOfGrandeurTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementFantasy = {
|
||||||
|
kDerangementFantasyId,
|
||||||
|
kDerangementFantasyLabel,
|
||||||
|
kDerangementFantasyDescription,
|
||||||
|
kDerangementFantasyTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementManicDepression = {
|
||||||
|
kDerangementManicDepressionId,
|
||||||
|
kDerangementManicDepressionLabel,
|
||||||
|
kDerangementManicDepressionDescription,
|
||||||
|
kDerangementManicDepressionTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementMultiplePersonalities = {
|
||||||
|
kDerangementMultiplePersonalitiesId,
|
||||||
|
kDerangementMultiplePersonalitiesLabel,
|
||||||
|
kDerangementMultiplePersonalitiesDescription,
|
||||||
|
kDerangementMultiplePersonalitiesTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementObsession = {
|
||||||
|
kDerangementObsessionId,
|
||||||
|
kDerangementObsessionLabel,
|
||||||
|
kDerangementObsessionDescription,
|
||||||
|
kDerangementObsessionTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementOvercompensation = {
|
||||||
|
kDerangementOvercompensationId,
|
||||||
|
kDerangementOvercompensationLabel,
|
||||||
|
kDerangementOvercompensationDescription,
|
||||||
|
kDerangementOvercompensationTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementParanoia = {
|
||||||
|
kDerangementParanoiaId,
|
||||||
|
kDerangementParanoiaLabel,
|
||||||
|
kDerangementParanoiaDescription,
|
||||||
|
kDerangementParanoiaTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementPerfection = {
|
||||||
|
kDerangementPerfectionId,
|
||||||
|
kDerangementPerfectionLabel,
|
||||||
|
kDerangementPerfectionDescription,
|
||||||
|
kDerangementPerfectionTextColor,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementRegression = {
|
||||||
|
kDerangementRegressionId,
|
||||||
|
kDerangementRegressionLabel,
|
||||||
|
kDerangementRegressionDescription,
|
||||||
|
kDerangementRegressionTextColor,
|
||||||
|
};
|
||||||
|
const int kDerangementsCount = 10;
|
||||||
|
|
||||||
|
const uint8_t kDerangementTextColors[] = {
|
||||||
|
0,
|
||||||
|
kDerangementAmnesiaTextColor,
|
||||||
|
kDerangementDelusionsOfGrandeurTextColor,
|
||||||
|
kDerangementFantasyTextColor,
|
||||||
|
kDerangementManicDepressionTextColor,
|
||||||
|
kDerangementMultiplePersonalitiesTextColor,
|
||||||
|
kDerangementObsessionTextColor,
|
||||||
|
kDerangementOvercompensationTextColor,
|
||||||
|
kDerangementParanoiaTextColor,
|
||||||
|
kDerangementPerfectionTextColor,
|
||||||
|
kDerangementRegressionTextColor,
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::string kDerangementLabels[] = {
|
||||||
|
"",
|
||||||
|
kDerangementAmnesiaLabel,
|
||||||
|
kDerangementDelusionsOfGrandeurLabel,
|
||||||
|
kDerangementFantasyLabel,
|
||||||
|
kDerangementManicDepressionLabel,
|
||||||
|
kDerangementMultiplePersonalitiesLabel,
|
||||||
|
kDerangementObsessionLabel,
|
||||||
|
kDerangementOvercompensationLabel,
|
||||||
|
kDerangementParanoiaLabel,
|
||||||
|
kDerangementPerfectionLabel,
|
||||||
|
kDerangementRegressionLabel,
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::string kDerangementDescriptions[] = {
|
||||||
|
"",
|
||||||
|
kDerangementAmnesiaDescription,
|
||||||
|
kDerangementDelusionsOfGrandeurDescription,
|
||||||
|
kDerangementFantasyDescription,
|
||||||
|
kDerangementManicDepressionDescription,
|
||||||
|
kDerangementMultiplePersonalitiesDescription,
|
||||||
|
kDerangementObsessionDescription,
|
||||||
|
kDerangementOvercompensationDescription,
|
||||||
|
kDerangementParanoiaDescription,
|
||||||
|
kDerangementPerfectionDescription,
|
||||||
|
kDerangementRegressionDescription,
|
||||||
|
};
|
||||||
|
|
||||||
|
const DerangementType kDerangements[] = {
|
||||||
|
{0, "", "", 0},
|
||||||
|
kDerangementAmnesia,
|
||||||
|
kDerangementDelusionsOfGrandeur,
|
||||||
|
kDerangementFantasy,
|
||||||
|
kDerangementManicDepression,
|
||||||
|
kDerangementMultiplePersonalities,
|
||||||
|
kDerangementObsession,
|
||||||
|
kDerangementOvercompensation,
|
||||||
|
kDerangementParanoia,
|
||||||
|
kDerangementPerfection,
|
||||||
|
kDerangementRegression,
|
||||||
|
};
|
||||||
|
|
||||||
bool operator==(const DerangementType& left, const DerangementType& right) {
|
bool operator==(const DerangementType& left, const DerangementType& right) {
|
||||||
return left.description == right.description && left.id == right.id && left.label == right.label
|
return left.description == right.description && left.id == right.id && left.label == right.label
|
||||||
&& left.textColor == right.textColor;
|
&& left.textColor == right.textColor;
|
||||||
|
|||||||
@@ -24,171 +24,15 @@ struct DerangementType {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const int kDerangementAmnesiaId = 1;
|
const int kDerangementAmnesiaId = 1;
|
||||||
const uint8_t kDerangementAmnesiaTextColor = kColorDarkRed;
|
|
||||||
const std::string kDerangementAmnesiaLabel = "Amnesia";
|
|
||||||
const std::string kDerangementAmnesiaDescription =
|
|
||||||
R"---(You forget a segment of your past. Additionally in some cases a character can forget abilities and be unable to use them for the duration.)---";
|
|
||||||
const int kDerangementDelusionsOfGrandeurId = 2;
|
const int kDerangementDelusionsOfGrandeurId = 2;
|
||||||
const uint8_t kDerangementDelusionsOfGrandeurTextColor = kColorDarkMagenta;
|
|
||||||
const std::string kDerangementDelusionsOfGrandeurLabel = "Delusions of Grandeur";
|
|
||||||
const std::string kDerangementDelusionsOfGrandeurDescription = R"---(You imagine you are better than you are.)---";
|
|
||||||
const int kDerangementFantasyId = 3;
|
const int kDerangementFantasyId = 3;
|
||||||
const uint8_t kDerangementFantasyTextColor = kColorDarkYellow;
|
|
||||||
const std::string kDerangementFantasyLabel = "Fantasy";
|
|
||||||
const std::string kDerangementFantasyDescription =
|
|
||||||
R"---(You enter a self-created world where you are the forgotten hero.)---";
|
|
||||||
const int kDerangementManicDepressionId = 4;
|
const int kDerangementManicDepressionId = 4;
|
||||||
const uint8_t kDerangementManicDepressionTextColor = kColorDarkWhite;
|
|
||||||
const std::string kDerangementManicDepressionLabel = "Manic-Depression";
|
|
||||||
const std::string kDerangementManicDepressionDescription =
|
|
||||||
R"---(You sink into deep and fitful depressions, showing no interest in anything which used to captivate your interests. You will go along with others rather than use the energy to resist. Occasional fits of great energy grab hold of you, and you will work for hours or even days on your projects. During this time you will resist even the need for sleep as you burn up blood and Willpower on your schemes.)---";
|
|
||||||
const int kDerangementMultiplePersonalitiesId = 5;
|
const int kDerangementMultiplePersonalitiesId = 5;
|
||||||
const uint8_t kDerangementMultiplePersonalitiesTextColor = kColorDarkBlue;
|
|
||||||
const std::string kDerangementMultiplePersonalitiesLabel = "Multiple Personalities";
|
|
||||||
const std::string kDerangementMultiplePersonalitiesDescription =
|
|
||||||
R"---(You possess a number of new personalities. You have amore than one Mature, and will switch between them. Thus you regain Willpower points in defferent ways at defferent times)---";
|
|
||||||
const int kDerangementObsessionId = 6;
|
const int kDerangementObsessionId = 6;
|
||||||
const uint8_t kDerangementObsessionTextColor = kColorBrightGreen;
|
|
||||||
const std::string kDerangementObsessionLabel = "Obsession";
|
|
||||||
const std::string kDerangementObsessionDescription = R"---(You become obsessed with some interest or fetish.)---";
|
|
||||||
const int kDerangementOvercompensationId = 7;
|
const int kDerangementOvercompensationId = 7;
|
||||||
const uint8_t kDerangementOvercompensationTextColor = kColorBrightCyan;
|
|
||||||
const std::string kDerangementOvercompensationLabel = "Overcompensation";
|
|
||||||
const std::string kDerangementOvercompensationDescription =
|
|
||||||
R"---(You make up for your moral weaknesses by playing up your strengths to an extreme. You don't think you can frenzy and won't stop it.)---";
|
|
||||||
const int kDerangementParanoiaId = 8;
|
const int kDerangementParanoiaId = 8;
|
||||||
const uint8_t kDerangementParanoiaTextColor = kColorBrightRed;
|
|
||||||
const std::string kDerangementParanoiaLabel = "Paranoia";
|
|
||||||
const std::string kDerangementParanoiaDescription =
|
|
||||||
R"---(You are convinced that you are being hunted. You hold even your closest Friends under suspicion.)---";
|
|
||||||
const int kDerangementPerfectionId = 9;
|
const int kDerangementPerfectionId = 9;
|
||||||
const uint8_t kDerangementPerfectionTextColor = kColorBrightMagenta;
|
|
||||||
const std::string kDerangementPerfectionLabel = "Perfection";
|
|
||||||
const std::string kDerangementPerfectionDescription =
|
|
||||||
R"---(All your energy is directed toward preventing anything from going wong. When it does you must make a self-control roll or frenzy.)---";
|
|
||||||
const int kDerangementRegressionId = 10;
|
const int kDerangementRegressionId = 10;
|
||||||
const uint8_t kDerangementRegressionTextColor = kColorBrightYellow;
|
|
||||||
const std::string kDerangementRegressionLabel = "Regression";
|
|
||||||
const std::string kDerangementRegressionDescription =
|
|
||||||
R"---(You become childlike retreating to an earlier time when less was expected of you Willpower is regained inthe way a Child's is.)---";
|
|
||||||
const DerangementType kDerangementUnknown = {0, "", "", 0};
|
|
||||||
const DerangementType kDerangementAmnesia = {
|
|
||||||
kDerangementAmnesiaId,
|
|
||||||
kDerangementAmnesiaLabel,
|
|
||||||
kDerangementAmnesiaDescription,
|
|
||||||
kDerangementAmnesiaTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementDelusionsOfGrandeur = {
|
|
||||||
kDerangementDelusionsOfGrandeurId,
|
|
||||||
kDerangementDelusionsOfGrandeurLabel,
|
|
||||||
kDerangementDelusionsOfGrandeurDescription,
|
|
||||||
kDerangementDelusionsOfGrandeurTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementFantasy = {
|
|
||||||
kDerangementFantasyId,
|
|
||||||
kDerangementFantasyLabel,
|
|
||||||
kDerangementFantasyDescription,
|
|
||||||
kDerangementFantasyTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementManicDepression = {
|
|
||||||
kDerangementManicDepressionId,
|
|
||||||
kDerangementManicDepressionLabel,
|
|
||||||
kDerangementManicDepressionDescription,
|
|
||||||
kDerangementManicDepressionTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementMultiplePersonalities = {
|
|
||||||
kDerangementMultiplePersonalitiesId,
|
|
||||||
kDerangementMultiplePersonalitiesLabel,
|
|
||||||
kDerangementMultiplePersonalitiesDescription,
|
|
||||||
kDerangementMultiplePersonalitiesTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementObsession = {
|
|
||||||
kDerangementObsessionId,
|
|
||||||
kDerangementObsessionLabel,
|
|
||||||
kDerangementObsessionDescription,
|
|
||||||
kDerangementObsessionTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementOvercompensation = {
|
|
||||||
kDerangementOvercompensationId,
|
|
||||||
kDerangementOvercompensationLabel,
|
|
||||||
kDerangementOvercompensationDescription,
|
|
||||||
kDerangementOvercompensationTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementParanoia = {
|
|
||||||
kDerangementParanoiaId,
|
|
||||||
kDerangementParanoiaLabel,
|
|
||||||
kDerangementParanoiaDescription,
|
|
||||||
kDerangementParanoiaTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementPerfection = {
|
|
||||||
kDerangementPerfectionId,
|
|
||||||
kDerangementPerfectionLabel,
|
|
||||||
kDerangementPerfectionDescription,
|
|
||||||
kDerangementPerfectionTextColor,
|
|
||||||
};
|
|
||||||
const DerangementType kDerangementRegression = {
|
|
||||||
kDerangementRegressionId,
|
|
||||||
kDerangementRegressionLabel,
|
|
||||||
kDerangementRegressionDescription,
|
|
||||||
kDerangementRegressionTextColor,
|
|
||||||
};
|
|
||||||
const int kDerangementsCount = 10;
|
|
||||||
|
|
||||||
const uint8_t kDerangementTextColors[] = {
|
|
||||||
0,
|
|
||||||
kDerangementAmnesiaTextColor,
|
|
||||||
kDerangementDelusionsOfGrandeurTextColor,
|
|
||||||
kDerangementFantasyTextColor,
|
|
||||||
kDerangementManicDepressionTextColor,
|
|
||||||
kDerangementMultiplePersonalitiesTextColor,
|
|
||||||
kDerangementObsessionTextColor,
|
|
||||||
kDerangementOvercompensationTextColor,
|
|
||||||
kDerangementParanoiaTextColor,
|
|
||||||
kDerangementPerfectionTextColor,
|
|
||||||
kDerangementRegressionTextColor,
|
|
||||||
};
|
|
||||||
|
|
||||||
const std::string kDerangementLabels[] = {
|
|
||||||
"",
|
|
||||||
kDerangementAmnesiaLabel,
|
|
||||||
kDerangementDelusionsOfGrandeurLabel,
|
|
||||||
kDerangementFantasyLabel,
|
|
||||||
kDerangementManicDepressionLabel,
|
|
||||||
kDerangementMultiplePersonalitiesLabel,
|
|
||||||
kDerangementObsessionLabel,
|
|
||||||
kDerangementOvercompensationLabel,
|
|
||||||
kDerangementParanoiaLabel,
|
|
||||||
kDerangementPerfectionLabel,
|
|
||||||
kDerangementRegressionLabel,
|
|
||||||
};
|
|
||||||
|
|
||||||
const std::string kDerangementDescriptions[] = {
|
|
||||||
"",
|
|
||||||
kDerangementAmnesiaDescription,
|
|
||||||
kDerangementDelusionsOfGrandeurDescription,
|
|
||||||
kDerangementFantasyDescription,
|
|
||||||
kDerangementManicDepressionDescription,
|
|
||||||
kDerangementMultiplePersonalitiesDescription,
|
|
||||||
kDerangementObsessionDescription,
|
|
||||||
kDerangementOvercompensationDescription,
|
|
||||||
kDerangementParanoiaDescription,
|
|
||||||
kDerangementPerfectionDescription,
|
|
||||||
kDerangementRegressionDescription,
|
|
||||||
};
|
|
||||||
|
|
||||||
const DerangementType kDerangements[] = {
|
|
||||||
{0, "", "", 0},
|
|
||||||
kDerangementAmnesia,
|
|
||||||
kDerangementDelusionsOfGrandeur,
|
|
||||||
kDerangementFantasy,
|
|
||||||
kDerangementManicDepression,
|
|
||||||
kDerangementMultiplePersonalities,
|
|
||||||
kDerangementObsession,
|
|
||||||
kDerangementOvercompensation,
|
|
||||||
kDerangementParanoia,
|
|
||||||
kDerangementPerfection,
|
|
||||||
kDerangementRegression,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @brief Determines the equality of two derangements.
|
/// @brief Determines the equality of two derangements.
|
||||||
/// @param left A derangement to compare.
|
/// @param left A derangement to compare.
|
||||||
|
|||||||
@@ -14,73 +14,97 @@ using namespace Test;
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
const DerangementType kDerangementAmnesia = {
|
||||||
|
1,
|
||||||
|
"Amnesia",
|
||||||
|
R"---(You forget a segment of your past. Additionally in some cases a character can forget abilities and be unable to use them for the duration.)---",
|
||||||
|
1,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementDelusionsOfGrandeur = {
|
||||||
|
2,
|
||||||
|
"Delusions of Grandeur",
|
||||||
|
R"---(You imagine you are better than you are.)---",
|
||||||
|
5,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementFantasy = {
|
||||||
|
3,
|
||||||
|
"Fantasy",
|
||||||
|
R"---(You enter a self-created world where you are the forgotten hero.)---",
|
||||||
|
3,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementManicDepression = {
|
||||||
|
4,
|
||||||
|
"Manic-Depression",
|
||||||
|
R"---(You sink into deep and fitful depressions, showing no interest in anything which used to captivate your interests. You will go along with others rather than use the energy to resist. Occasional fits of great energy grab hold of you, and you will work for hours or even days on your projects. During this time you will resist even the need for sleep as you burn up blood and Willpower on your schemes.)---",
|
||||||
|
7,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementMultiplePersonalities = {
|
||||||
|
5,
|
||||||
|
"Multiple Personalities",
|
||||||
|
R"---(You possess a number of new personalities. You have amore than one Mature, and will switch between them. Thus you regain Willpower points in defferent ways at defferent times)---",
|
||||||
|
4,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementObsession = {
|
||||||
|
6,
|
||||||
|
"Obsession",
|
||||||
|
R"---(You become obsessed with some interest or fetish.)---",
|
||||||
|
10,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementOvercompensation = {
|
||||||
|
7,
|
||||||
|
"Overcompensation",
|
||||||
|
R"---(You make up for your moral weaknesses by playing up your strengths to an extreme. You don't think you can frenzy and won't stop it.)---",
|
||||||
|
14,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementParanoia = {
|
||||||
|
8,
|
||||||
|
"Paranoia",
|
||||||
|
R"---(You are convinced that you are being hunted. You hold even your closest Friends under suspicion.)---",
|
||||||
|
9,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementPerfection = {
|
||||||
|
9,
|
||||||
|
"Perfection",
|
||||||
|
R"---(All your energy is directed toward preventing anything from going wong. When it does you must make a self-control roll or frenzy.)---",
|
||||||
|
13,
|
||||||
|
};
|
||||||
|
const DerangementType kDerangementRegression = {
|
||||||
|
10,
|
||||||
|
"Regression",
|
||||||
|
R"---(You become childlike retreating to an earlier time when less was expected of you Willpower is regained inthe way a Child's is.)---",
|
||||||
|
11,
|
||||||
|
};
|
||||||
|
|
||||||
TestResults test_GetDerangement() {
|
TestResults test_GetDerangement() {
|
||||||
return execute_suite<DerangementType, int>(make_test_suite(
|
return execute_suite<DerangementType, int>(make_test_suite(
|
||||||
"SBF::GetDerangement",
|
"SBF::GetDerangement",
|
||||||
GetDerangement,
|
GetDerangement,
|
||||||
vector<TestTuple<DerangementType, int>>({
|
vector<TestTuple<DerangementType, int>>({
|
||||||
make_test<DerangementType, int>("should get {0, "
|
|
||||||
", "
|
|
||||||
", 0} for invalid derangement id 0",
|
|
||||||
{0, "", "", 0},
|
|
||||||
make_tuple(0)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementAmnesiaId, kDerangementAmnesiaLabel, kDerangementAmnesiaDescription, "
|
"should get {0, \"\", \"\", 0} for invalid derangement id 0", {0, "", "", 0}, make_tuple(0)),
|
||||||
"kDerangementAmnesiaTextColor} for derangement id 1",
|
|
||||||
kDerangementAmnesia,
|
|
||||||
make_tuple(1)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementDelusionsOfGrandeurId, kDerangementDelusionsOfGrandeurLabel, "
|
"should get amnesia for derangement id 1", kDerangementAmnesia, make_tuple(1)),
|
||||||
"kDerangementDelusionsOfGrandeurDescription, kDerangementDelusionsOfGrandeurTextColor} for derangement "
|
|
||||||
"id 2",
|
|
||||||
kDerangementDelusionsOfGrandeur,
|
|
||||||
make_tuple(2)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementFantasyId, kDerangementFantasyLabel, kDerangementFantasyDescription, "
|
"should get delusions of grandeur for derangement id 2", kDerangementDelusionsOfGrandeur, make_tuple(2)),
|
||||||
"kDerangementFantasyTextColor} for derangement id 3",
|
|
||||||
kDerangementFantasy,
|
|
||||||
make_tuple(3)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementManicDepressionId, kDerangementManicDepressionLabel, "
|
"should get fantasy for derangement id 3", kDerangementFantasy, make_tuple(3)),
|
||||||
"kDerangementManicDepressionDescription, kDerangementManicDepressionTextColor} for derangement id 4",
|
|
||||||
kDerangementManicDepression,
|
|
||||||
make_tuple(4)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementMultiplePersonalitiesId, kDerangementMultiplePersonalitiesLabel, "
|
"should get manic-depression for derangement id 4", kDerangementManicDepression, make_tuple(4)),
|
||||||
"kDerangementMultiplePersonalitiesDescription, kDerangementMultiplePersonalitiesTextColor} for "
|
make_test<DerangementType, int>("should get multiple personalities for derangement id 5",
|
||||||
"derangement id 5",
|
|
||||||
kDerangementMultiplePersonalities,
|
kDerangementMultiplePersonalities,
|
||||||
make_tuple(5)),
|
make_tuple(5)),
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementObsessionId, kDerangementObsessionLabel, kDerangementObsessionDescription, "
|
"should get obsession for derangement id 6", kDerangementObsession, make_tuple(6)),
|
||||||
"kDerangementObsessionTextColor} for derangement id 6",
|
|
||||||
kDerangementObsession,
|
|
||||||
make_tuple(6)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementOvercompensationId, kDerangementOvercompensationLabel, "
|
"should get overcompensation for derangement id 7", kDerangementOvercompensation, make_tuple(7)),
|
||||||
"kDerangementOvercompensationDescription, kDerangementOvercompensationTextColor} for derangement id 7",
|
|
||||||
kDerangementOvercompensation,
|
|
||||||
make_tuple(7)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementParanoiaId, kDerangementParanoiaLabel, kDerangementParanoiaDescription, "
|
"should get paranoia for derangement id 8", kDerangementParanoia, make_tuple(8)),
|
||||||
"kDerangementParanoiaTextColor} for derangement id 8",
|
|
||||||
kDerangementParanoia,
|
|
||||||
make_tuple(8)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementPerfectionId, kDerangementPerfectionLabel, kDerangementPerfectionDescription, "
|
"should get perfection for derangement id 9", kDerangementPerfection, make_tuple(9)),
|
||||||
"kDerangementPerfectionTextColor} for derangement id 9",
|
|
||||||
kDerangementPerfection,
|
|
||||||
make_tuple(9)),
|
|
||||||
make_test<DerangementType, int>(
|
make_test<DerangementType, int>(
|
||||||
"should get {kDerangementRegressionId, kDerangementRegressionLabel, kDerangementRegressionDescription, "
|
"should get regression for derangement id 10", kDerangementRegression, make_tuple(10)),
|
||||||
"kDerangementRegressionTextColor} for derangement id 10",
|
make_test<DerangementType, int>(
|
||||||
kDerangementRegression,
|
"should get {0, \"\", \"\", 0} for invalid derangement id 11", {0, "", "", 0}, make_tuple(11)),
|
||||||
make_tuple(10)),
|
|
||||||
make_test<DerangementType, int>("should get {0, "
|
|
||||||
", "
|
|
||||||
", 0} for invalid derangement id 11",
|
|
||||||
{0, "", "", 0},
|
|
||||||
make_tuple(11)),
|
|
||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,54 +150,44 @@ TestResults test_DerangementType_operator_extract() {
|
|||||||
},
|
},
|
||||||
vector<TestTuple<string, DerangementType>>({
|
vector<TestTuple<string, DerangementType>>({
|
||||||
make_test<string, DerangementType>("should print amnesia",
|
make_test<string, DerangementType>("should print amnesia",
|
||||||
"Derangement: {id: 1, label: \"" + kDerangementAmnesiaLabel
|
"Derangement: {id: 1, label: \"Amnesia\", description: \""
|
||||||
+ "\", description: \"" + kDerangementAmnesiaDescription
|
+ kDerangementAmnesia.description + "\", textColor: 1}",
|
||||||
+ "\", textColor: 1}",
|
|
||||||
make_tuple(kDerangementAmnesia)),
|
make_tuple(kDerangementAmnesia)),
|
||||||
make_test<string, DerangementType>("should print delusions of grandeur",
|
make_test<string, DerangementType>("should print delusions of grandeur",
|
||||||
"Derangement: {id: 2, label: \"" + kDerangementDelusionsOfGrandeurLabel
|
"Derangement: {id: 2, label: \"Delusions of Grandeur\", description: \""
|
||||||
+ "\", description: \"" + kDerangementDelusionsOfGrandeurDescription
|
+ kDerangementDelusionsOfGrandeur.description + "\", textColor: 5}",
|
||||||
+ "\", textColor: 5}",
|
|
||||||
make_tuple(kDerangementDelusionsOfGrandeur)),
|
make_tuple(kDerangementDelusionsOfGrandeur)),
|
||||||
make_test<string, DerangementType>("should print fantasy",
|
make_test<string, DerangementType>("should print fantasy",
|
||||||
"Derangement: {id: 3, label: \"" + kDerangementFantasyLabel
|
"Derangement: {id: 3, label: \"Fantasy\", description: \""
|
||||||
+ "\", description: \"" + kDerangementFantasyDescription
|
+ kDerangementFantasy.description + "\", textColor: 3}",
|
||||||
+ "\", textColor: 3}",
|
|
||||||
make_tuple(kDerangementFantasy)),
|
make_tuple(kDerangementFantasy)),
|
||||||
make_test<string, DerangementType>("should print manic depression",
|
make_test<string, DerangementType>("should print manic depression",
|
||||||
"Derangement: {id: 4, label: \"" + kDerangementManicDepressionLabel
|
"Derangement: {id: 4, label: \"Manic-Depression\", description: \""
|
||||||
+ "\", description: \"" + kDerangementManicDepressionDescription
|
+ kDerangementManicDepression.description + "\", textColor: 7}",
|
||||||
+ "\", textColor: 7}",
|
|
||||||
make_tuple(kDerangementManicDepression)),
|
make_tuple(kDerangementManicDepression)),
|
||||||
make_test<string, DerangementType>("should print multiple personalities",
|
make_test<string, DerangementType>("should print multiple personalities",
|
||||||
"Derangement: {id: 5, label: \"" + kDerangementMultiplePersonalitiesLabel
|
"Derangement: {id: 5, label: \"Multiple Personalities\", description: \""
|
||||||
+ "\", description: \"" + kDerangementMultiplePersonalitiesDescription
|
+ kDerangementMultiplePersonalities.description + "\", textColor: 4}",
|
||||||
+ "\", textColor: 4}",
|
|
||||||
make_tuple(kDerangementMultiplePersonalities)),
|
make_tuple(kDerangementMultiplePersonalities)),
|
||||||
make_test<string, DerangementType>("should print obsession",
|
make_test<string, DerangementType>("should print obsession",
|
||||||
"Derangement: {id: 6, label: \"" + kDerangementObsessionLabel
|
"Derangement: {id: 6, label: \"Obsession\", description: \""
|
||||||
+ "\", description: \"" + kDerangementObsessionDescription
|
+ kDerangementObsession.description + "\", textColor: 10}",
|
||||||
+ "\", textColor: 10}",
|
|
||||||
make_tuple(kDerangementObsession)),
|
make_tuple(kDerangementObsession)),
|
||||||
make_test<string, DerangementType>("should print overcompensation",
|
make_test<string, DerangementType>("should print overcompensation",
|
||||||
"Derangement: {id: 7, label: \"" + kDerangementOvercompensationLabel
|
"Derangement: {id: 7, label: \"Overcompensation\", description: \""
|
||||||
+ "\", description: \"" + kDerangementOvercompensationDescription
|
+ kDerangementOvercompensation.description + "\", textColor: 14}",
|
||||||
+ "\", textColor: 14}",
|
|
||||||
make_tuple(kDerangementOvercompensation)),
|
make_tuple(kDerangementOvercompensation)),
|
||||||
make_test<string, DerangementType>("should print paranoia",
|
make_test<string, DerangementType>("should print paranoia",
|
||||||
"Derangement: {id: 8, label: \"" + kDerangementParanoiaLabel
|
"Derangement: {id: 8, label: \"Paranoia\", description: \""
|
||||||
+ "\", description: \"" + kDerangementParanoiaDescription
|
+ kDerangementParanoia.description + "\", textColor: 9}",
|
||||||
+ "\", textColor: 9}",
|
|
||||||
make_tuple(kDerangementParanoia)),
|
make_tuple(kDerangementParanoia)),
|
||||||
make_test<string, DerangementType>("should print perfection",
|
make_test<string, DerangementType>("should print perfection",
|
||||||
"Derangement: {id: 9, label: \"" + kDerangementPerfectionLabel
|
"Derangement: {id: 9, label: \"Perfection\", description: \""
|
||||||
+ "\", description: \"" + kDerangementPerfectionDescription
|
+ kDerangementPerfection.description + "\", textColor: 13}",
|
||||||
+ "\", textColor: 13}",
|
|
||||||
make_tuple(kDerangementPerfection)),
|
make_tuple(kDerangementPerfection)),
|
||||||
make_test<string, DerangementType>("should print regression",
|
make_test<string, DerangementType>("should print regression",
|
||||||
"Derangement: {id: 10, label: \"" + kDerangementRegressionLabel
|
"Derangement: {id: 10, label: \"Regression\", description: \""
|
||||||
+ "\", description: \"" + kDerangementRegressionDescription
|
+ kDerangementRegression.description + "\", textColor: 11}",
|
||||||
+ "\", textColor: 11}",
|
|
||||||
make_tuple(kDerangementRegression)),
|
make_tuple(kDerangementRegression)),
|
||||||
make_test<string, DerangementType>(
|
make_test<string, DerangementType>(
|
||||||
"should print an unknown derangement",
|
"should print an unknown derangement",
|
||||||
@@ -194,11 +208,7 @@ TestResults test_DerangementType_operator_equal_to() {
|
|||||||
make_test<bool, DerangementType, DerangementType>(
|
make_test<bool, DerangementType, DerangementType>(
|
||||||
"should return true when comparing two different instances created with the same values",
|
"should return true when comparing two different instances created with the same values",
|
||||||
true,
|
true,
|
||||||
make_tuple(kDerangementFantasy,
|
make_tuple(kDerangementFantasy, DerangementType({3, "Fantasy", kDerangementFantasy.description, 3}))),
|
||||||
DerangementType({kDerangementFantasyId,
|
|
||||||
kDerangementFantasyLabel,
|
|
||||||
kDerangementFantasyDescription,
|
|
||||||
kDerangementFantasyTextColor}))),
|
|
||||||
make_test<bool, DerangementType, DerangementType>(
|
make_test<bool, DerangementType, DerangementType>(
|
||||||
"should return false when comparing two different derangements",
|
"should return false when comparing two different derangements",
|
||||||
false,
|
false,
|
||||||
@@ -218,11 +228,7 @@ TestResults test_DerangementType_operator_not_equal_to() {
|
|||||||
make_test<bool, DerangementType, DerangementType>(
|
make_test<bool, DerangementType, DerangementType>(
|
||||||
"should return false when comparing two different instances created with the same values",
|
"should return false when comparing two different instances created with the same values",
|
||||||
false,
|
false,
|
||||||
make_tuple(kDerangementFantasy,
|
make_tuple(kDerangementFantasy, DerangementType({3, "Fantasy", kDerangementFantasy.description, 3}))),
|
||||||
DerangementType({kDerangementFantasyId,
|
|
||||||
kDerangementFantasyLabel,
|
|
||||||
kDerangementFantasyDescription,
|
|
||||||
kDerangementFantasyTextColor}))),
|
|
||||||
make_test<bool, DerangementType, DerangementType>(
|
make_test<bool, DerangementType, DerangementType>(
|
||||||
"should return true when comparing two different derangements",
|
"should return true when comparing two different derangements",
|
||||||
true,
|
true,
|
||||||
|
|||||||
Reference in New Issue
Block a user