summaryrefslogtreecommitdiffstats
path: root/pokemod/Rules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Rules.cpp')
-rw-r--r--pokemod/Rules.cpp134
1 files changed, 67 insertions, 67 deletions
diff --git a/pokemod/Rules.cpp b/pokemod/Rules.cpp
index 21f2b428..a999cf1a 100644
--- a/pokemod/Rules.cpp
+++ b/pokemod/Rules.cpp
@@ -21,15 +21,15 @@
// Pokemod includes
#include "Pokemod.h"
-const QStringList Rules::DVStr = QStringList() << "16" << "32";
+const QStringList Pokemod::Rules::DVStr = QStringList() << "16" << "32";
-Rules::Rules(const Rules& rules) :
+Pokemod::Rules::Rules(const Rules& rules) :
Object("Rules", rules.parent(), 0)
{
*this = rules;
}
-Rules::Rules(const Pokemod* parent) :
+Pokemod::Rules::Rules(const Pokemod* parent) :
Object("Rules", parent, 0),
m_genderAllowed(false),
m_breedingAllowed(false),
@@ -63,19 +63,19 @@ Rules::Rules(const Pokemod* parent) :
{
}
-Rules::Rules(const Rules& rules, const Pokemod* parent) :
+Pokemod::Rules::Rules(const Rules& rules, const Pokemod* parent) :
Object("Rules", parent, 0)
{
*this = rules;
}
-Rules::Rules(const QDomElement& xml, const Pokemod* parent) :
+Pokemod::Rules::Rules(const QDomElement& xml, const Pokemod* parent) :
Object("Rules", parent, 0)
{
load(xml);
}
-void Rules::validate()
+void Pokemod::Rules::validate()
{
TEST(setBreedingAllowed, breedingAllowed);
TEST(setMaxMultiplier, maxMultiplier);
@@ -98,7 +98,7 @@ void Rules::validate()
emit(warning("Pokerus chance is high"));
}
-void Rules::load(const QDomElement& xml, const int /*id*/)
+void Pokemod::Rules::load(const QDomElement& xml, const int /*id*/)
{
LOAD(bool, genderAllowed);
LOAD(bool, breedingAllowed);
@@ -131,7 +131,7 @@ void Rules::load(const QDomElement& xml, const int /*id*/)
LOAD(Fraction, pokerusChance);
}
-QDomElement Rules::save() const
+QDomElement Pokemod::Rules::save() const
{
QDomElement xml = QDomDocument().createElement(className());
SAVE(bool, genderAllowed);
@@ -166,12 +166,12 @@ QDomElement Rules::save() const
return xml;
}
-void Rules::setGenderAllowed(const bool genderAllowed)
+void Pokemod::Rules::setGenderAllowed(const bool genderAllowed)
{
CHECK(genderAllowed);
}
-void Rules::setBreedingAllowed(const bool breedingAllowed)
+void Pokemod::Rules::setBreedingAllowed(const bool breedingAllowed)
{
if (!m_genderAllowed && breedingAllowed)
{
@@ -181,12 +181,12 @@ void Rules::setBreedingAllowed(const bool breedingAllowed)
CHECK(breedingAllowed);
}
-void Rules::setCriticalDomains(const bool criticalDomains)
+void Pokemod::Rules::setCriticalDomains(const bool criticalDomains)
{
CHECK(criticalDomains);
}
-void Rules::setMaxMultiplier(const int maxMultiplier)
+void Pokemod::Rules::setMaxMultiplier(const int maxMultiplier)
{
if (!maxMultiplier)
{
@@ -196,12 +196,12 @@ void Rules::setMaxMultiplier(const int maxMultiplier)
CHECK(maxMultiplier);
}
-void Rules::setNumBoxes(const int numBoxes)
+void Pokemod::Rules::setNumBoxes(const int numBoxes)
{
CHECK(numBoxes);
}
-void Rules::setBoxSize(const int boxSize)
+void Pokemod::Rules::setBoxSize(const int boxSize)
{
if (m_numBoxes && !boxSize)
{
@@ -211,7 +211,7 @@ void Rules::setBoxSize(const int boxSize)
CHECK(boxSize);
}
-void Rules::setMaxParty(const int maxParty)
+void Pokemod::Rules::setMaxParty(const int maxParty)
{
if (!maxParty)
{
@@ -221,7 +221,7 @@ void Rules::setMaxParty(const int maxParty)
CHECK(maxParty);
}
-void Rules::setMaxFight(const int maxFight)
+void Pokemod::Rules::setMaxFight(const int maxFight)
{
if (m_maxParty < maxFight)
{
@@ -231,7 +231,7 @@ void Rules::setMaxFight(const int maxFight)
CHECK(maxFight);
}
-void Rules::setMaxPlayers(const int maxPlayers)
+void Pokemod::Rules::setMaxPlayers(const int maxPlayers)
{
if (maxPlayers < 2)
{
@@ -241,22 +241,22 @@ void Rules::setMaxPlayers(const int maxPlayers)
CHECK(maxPlayers);
}
-void Rules::setMaxHeldItems(const int maxHeldItems)
+void Pokemod::Rules::setMaxHeldItems(const int maxHeldItems)
{
CHECK(maxHeldItems);
}
-void Rules::setMaxAbilities(const int maxAbilities)
+void Pokemod::Rules::setMaxAbilities(const int maxAbilities)
{
CHECK(maxAbilities);
}
-void Rules::setMaxNatures(const int maxNatures)
+void Pokemod::Rules::setMaxNatures(const int maxNatures)
{
CHECK(maxNatures);
}
-void Rules::setMaxMoves(const int maxMoves)
+void Pokemod::Rules::setMaxMoves(const int maxMoves)
{
if (!maxMoves)
{
@@ -266,7 +266,7 @@ void Rules::setMaxMoves(const int maxMoves)
CHECK(maxMoves);
}
-void Rules::setMaxLevel(const int maxLevel)
+void Pokemod::Rules::setMaxLevel(const int maxLevel)
{
if (!maxLevel)
{
@@ -276,32 +276,32 @@ void Rules::setMaxLevel(const int maxLevel)
CHECK(maxLevel);
}
-void Rules::setMaxStages(const int maxStages)
+void Pokemod::Rules::setMaxStages(const int maxStages)
{
CHECK(maxStages);
}
-void Rules::setMaxMoney(const int maxMoney)
+void Pokemod::Rules::setMaxMoney(const int maxMoney)
{
CHECK(maxMoney);
}
-void Rules::setHardCash(const bool hardCash)
+void Pokemod::Rules::setHardCash(const bool hardCash)
{
CHECK(hardCash);
}
-void Rules::setAllowSwitchStyle(const bool allowSwitchStyle)
+void Pokemod::Rules::setAllowSwitchStyle(const bool allowSwitchStyle)
{
CHECK(allowSwitchStyle);
}
-void Rules::setSpecialSplit(const bool specialSplit)
+void Pokemod::Rules::setSpecialSplit(const bool specialSplit)
{
CHECK(specialSplit);
}
-void Rules::setSpecialDVSplit(const bool specialDVSplit)
+void Pokemod::Rules::setSpecialDVSplit(const bool specialDVSplit)
{
if (!specialDVSplit && m_specialSplit)
{
@@ -311,7 +311,7 @@ void Rules::setSpecialDVSplit(const bool specialDVSplit)
CHECK(specialDVSplit);
}
-void Rules::setMaxDVValue(const int maxDVValue)
+void Pokemod::Rules::setMaxDVValue(const int maxDVValue)
{
if (1 < maxDVValue)
{
@@ -321,32 +321,32 @@ void Rules::setMaxDVValue(const int maxDVValue)
CHECK(maxDVValue);
}
-void Rules::setHappiness(const bool happiness)
+void Pokemod::Rules::setHappiness(const bool happiness)
{
CHECK(happiness);
}
-void Rules::setHappyFaintLoss(const int happyFaintLoss)
+void Pokemod::Rules::setHappyFaintLoss(const int happyFaintLoss)
{
CHECK(happyFaintLoss);
}
-void Rules::setHappyLevelGain(const int happyLevelGain)
+void Pokemod::Rules::setHappyLevelGain(const int happyLevelGain)
{
CHECK(happyLevelGain);
}
-void Rules::setHappySteps(const int happySteps)
+void Pokemod::Rules::setHappySteps(const int happySteps)
{
CHECK(happySteps);
}
-void Rules::setEffortValuesAllowed(const bool effortValuesAllowed)
+void Pokemod::Rules::setEffortValuesAllowed(const bool effortValuesAllowed)
{
CHECK(effortValuesAllowed);
}
-void Rules::setMaxTotalEV(const int maxTotalEV)
+void Pokemod::Rules::setMaxTotalEV(const int maxTotalEV)
{
if (!maxTotalEV)
{
@@ -356,7 +356,7 @@ void Rules::setMaxTotalEV(const int maxTotalEV)
CHECK(maxTotalEV);
}
-void Rules::setMaxEVPerStat(const int maxEVPerStat)
+void Pokemod::Rules::setMaxEVPerStat(const int maxEVPerStat)
{
if ((!maxEVPerStat && m_maxTotalEV) || (m_maxTotalEV < maxEVPerStat))
{
@@ -366,7 +366,7 @@ void Rules::setMaxEVPerStat(const int maxEVPerStat)
CHECK(maxEVPerStat);
}
-void Rules::setPokerusChance(const Fraction& pokerusChance)
+void Pokemod::Rules::setPokerusChance(const Fraction& pokerusChance)
{
if (1 < pokerusChance)
{
@@ -376,152 +376,152 @@ void Rules::setPokerusChance(const Fraction& pokerusChance)
CHECK(pokerusChance);
}
-bool Rules::genderAllowed() const
+bool Pokemod::Rules::genderAllowed() const
{
return m_genderAllowed;
}
-bool Rules::breedingAllowed() const
+bool Pokemod::Rules::breedingAllowed() const
{
return m_breedingAllowed;
}
-bool Rules::criticalDomains() const
+bool Pokemod::Rules::criticalDomains() const
{
return m_criticalDomains;
}
-int Rules::maxMultiplier() const
+int Pokemod::Rules::maxMultiplier() const
{
return m_maxMultiplier;
}
-int Rules::numBoxes() const
+int Pokemod::Rules::numBoxes() const
{
return m_numBoxes;
}
-int Rules::boxSize() const
+int Pokemod::Rules::boxSize() const
{
return m_boxSize;
}
-int Rules::maxParty() const
+int Pokemod::Rules::maxParty() const
{
return m_maxParty;
}
-int Rules::maxFight() const
+int Pokemod::Rules::maxFight() const
{
return m_maxFight;
}
-int Rules::maxPlayers() const
+int Pokemod::Rules::maxPlayers() const
{
return m_maxPlayers;
}
-int Rules::maxHeldItems() const
+int Pokemod::Rules::maxHeldItems() const
{
return m_maxHeldItems;
}
-int Rules::maxAbilities() const
+int Pokemod::Rules::maxAbilities() const
{
return m_maxAbilities;
}
-int Rules::maxNatures() const
+int Pokemod::Rules::maxNatures() const
{
return m_maxNatures;
}
-int Rules::maxMoves() const
+int Pokemod::Rules::maxMoves() const
{
return m_maxMoves;
}
-int Rules::maxLevel() const
+int Pokemod::Rules::maxLevel() const
{
return m_maxLevel;
}
-int Rules::maxStages() const
+int Pokemod::Rules::maxStages() const
{
return m_maxStages;
}
-int Rules::maxMoney() const
+int Pokemod::Rules::maxMoney() const
{
return m_maxMoney;
}
-bool Rules::hardCash() const
+bool Pokemod::Rules::hardCash() const
{
return m_hardCash;
}
-bool Rules::allowSwitchStyle() const
+bool Pokemod::Rules::allowSwitchStyle() const
{
return m_allowSwitchStyle;
}
-bool Rules::specialSplit() const
+bool Pokemod::Rules::specialSplit() const
{
return m_specialSplit;
}
-bool Rules::specialDVSplit() const
+bool Pokemod::Rules::specialDVSplit() const
{
return m_specialDVSplit;
}
-int Rules::maxDVValue() const
+int Pokemod::Rules::maxDVValue() const
{
return m_maxDVValue;
}
-bool Rules::happiness() const
+bool Pokemod::Rules::happiness() const
{
return m_happiness;
}
-int Rules::happyFaintLoss() const
+int Pokemod::Rules::happyFaintLoss() const
{
return m_happyFaintLoss;
}
-int Rules::happyLevelGain() const
+int Pokemod::Rules::happyLevelGain() const
{
return m_happyLevelGain;
}
-int Rules::happySteps() const
+int Pokemod::Rules::happySteps() const
{
return m_happySteps;
}
-bool Rules::effortValuesAllowed() const
+bool Pokemod::Rules::effortValuesAllowed() const
{
return m_effortValuesAllowed;
}
-int Rules::maxTotalEV() const
+int Pokemod::Rules::maxTotalEV() const
{
return m_maxTotalEV;
}
-int Rules::maxEVPerStat() const
+int Pokemod::Rules::maxEVPerStat() const
{
return m_maxEVPerStat;
}
-Fraction Rules::pokerusChance() const
+Pokemod::Fraction Pokemod::Rules::pokerusChance() const
{
return m_pokerusChance;
}
-Rules& Rules::operator=(const Rules& rhs)
+Pokemod::Rules& Pokemod::Rules::operator=(const Rules& rhs)
{
if (this == &rhs)
return *this;