diff options
Diffstat (limited to 'pokemod/Rules.cpp')
| -rw-r--r-- | pokemod/Rules.cpp | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/pokemod/Rules.cpp b/pokemod/Rules.cpp index 37c605d1..dfb4a09f 100644 --- a/pokemod/Rules.cpp +++ b/pokemod/Rules.cpp @@ -23,7 +23,7 @@ #include "Pokemod.h" #include "Rules.h" -PokeMod::Rules::Rules(const Pokemod& par) : +Rules::Rules(const Pokemod& par) : Object(par, 0), genderAllowed(false), breedingAllowed(false), @@ -53,13 +53,13 @@ PokeMod::Rules::Rules(const Pokemod& par) : { } -PokeMod::Rules::Rules(const Pokemod& par, const QString& fname) : +Rules::Rules(const Pokemod& par, const QString& fname) : Object(par, 0) { load(fname); } -bool PokeMod::Rules::validate() const +bool Rules::validate() const { bool valid = true; pokemod.validationMsg("---Rules", Pokemod::V_Msg); @@ -105,7 +105,7 @@ bool PokeMod::Rules::validate() const return valid; } -void PokeMod::Rules::load(const QString& fname) throw(Exception) +void Rules::load(const QString& fname) throw(Exception) { Ini ini(fname); unsigned i; @@ -139,7 +139,7 @@ void PokeMod::Rules::load(const QString& fname) throw(Exception) pokerusChance.set(i, j); } -void PokeMod::Rules::save() const throw(Exception) +void Rules::save() const throw(Exception) { Ini ini; ini.addField("genderAllowed", genderAllowed); @@ -171,138 +171,138 @@ void PokeMod::Rules::save() const throw(Exception) ini.save(QString("%1/rules.pini").arg(pokemod.getPath())); } -void PokeMod::Rules::setGenderAllowed(const bool g) +void Rules::setGenderAllowed(const bool g) { genderAllowed = g; if (!genderAllowed) breedingAllowed = false; } -void PokeMod::Rules::setBreedingAllowed(const bool b) throw(Exception) +void Rules::setBreedingAllowed(const bool b) throw(Exception) { if (!genderAllowed) throw(Exception("Rules", "cannot breed without genders")); breedingAllowed = b; } -void PokeMod::Rules::setHoldItems(const unsigned h) +void Rules::setHoldItems(const unsigned h) { holdItems = h; } -void PokeMod::Rules::setCriticalDomains(const bool c) +void Rules::setCriticalDomains(const bool c) { criticalDomains = c; } -void PokeMod::Rules::setAbilityAllowed(const bool a) +void Rules::setAbilityAllowed(const bool a) { abilityAllowed = a; } -void PokeMod::Rules::setNatureAllowed(const bool n) +void Rules::setNatureAllowed(const bool n) { natureAllowed = n; } -void PokeMod::Rules::setNumBoxes(const unsigned n) +void Rules::setNumBoxes(const unsigned n) { numBoxes = n; } -void PokeMod::Rules::setBoxSize(const unsigned b) +void Rules::setBoxSize(const unsigned b) { boxSize = b; } -void PokeMod::Rules::setMaxParty(const unsigned m) throw(BoundsException) +void Rules::setMaxParty(const unsigned m) throw(BoundsException) { if (!m) throw(BoundsException("Rules", "maxParty")); maxParty = m; } -void PokeMod::Rules::setMaxFight(const unsigned m) throw(BoundsException) +void Rules::setMaxFight(const unsigned m) throw(BoundsException) { if (maxParty < m) throw(BoundsException("Rules", "maxFight")); maxFight = m; } -void PokeMod::Rules::setMaxMoves(const unsigned m) throw(BoundsException) +void Rules::setMaxMoves(const unsigned m) throw(BoundsException) { if (!m) throw(BoundsException("Rules", "maxMoves")); maxMoves = m; } -void PokeMod::Rules::setMaxLevel(const unsigned m) throw(BoundsException) +void Rules::setMaxLevel(const unsigned m) throw(BoundsException) { if (!m) throw(BoundsException("Rules", "maxLevel")); maxLevel = m; } -void PokeMod::Rules::setMaxMoney(const unsigned m) +void Rules::setMaxMoney(const unsigned m) { maxMoney = m; } -void PokeMod::Rules::setHardCash(const bool h) +void Rules::setHardCash(const bool h) { hardCash = h; } -void PokeMod::Rules::setSpecialSplit(const bool s) +void Rules::setSpecialSplit(const bool s) { specialSplit = s; } -void PokeMod::Rules::setSpecialDVSplit(const bool s) +void Rules::setSpecialDVSplit(const bool s) { specialDVSplit = s; } -void PokeMod::Rules::setMaxDVValue(const unsigned char m) throw(BoundsException) +void Rules::setMaxDVValue(const unsigned char m) throw(BoundsException) { if ((m != 16) && (m != 32)) throw(BoundsException("Rules", "maxDVValue")); maxDVValue = m; } -void PokeMod::Rules::setHappiness(const bool h) +void Rules::setHappiness(const bool h) { happiness = h; } -void PokeMod::Rules::setHappyFaintLoss(const unsigned h) +void Rules::setHappyFaintLoss(const unsigned h) { happyFaintLoss = h; } -void PokeMod::Rules::setHappyLevelGain(const unsigned h) +void Rules::setHappyLevelGain(const unsigned h) { happyLevelGain = h; } -void PokeMod::Rules::setHappySteps(const unsigned h) +void Rules::setHappySteps(const unsigned h) { happySteps = h; } -void PokeMod::Rules::setEffortValuesAllowed(const bool e) +void Rules::setEffortValuesAllowed(const bool e) { effortValuesAllowed = e; } -void PokeMod::Rules::setMaxTotalEV(const unsigned m) throw(Exception) +void Rules::setMaxTotalEV(const unsigned m) throw(Exception) { if (!effortValuesAllowed) throw(Exception("Rules", "no effort values")); maxTotalEV = m; } -void PokeMod::Rules::setMaxEVPerStat(const unsigned m) throw(Exception) +void Rules::setMaxEVPerStat(const unsigned m) throw(Exception) { if (!effortValuesAllowed) throw(Exception("Rules", "no effort values")); @@ -311,147 +311,147 @@ void PokeMod::Rules::setMaxEVPerStat(const unsigned m) throw(Exception) maxEVPerStat = m; } -void PokeMod::Rules::setPokerusChance(const unsigned n, const unsigned d) throw(Exception) +void Rules::setPokerusChance(const unsigned n, const unsigned d) throw(Exception) { pokerusChance.set(n, d); } -void PokeMod::Rules::setPokerusChanceNum(const unsigned n) throw(Exception) +void Rules::setPokerusChanceNum(const unsigned n) throw(Exception) { pokerusChance.setNum(n); } -void PokeMod::Rules::setPokerusChanceDenom(const unsigned d) throw(Exception) +void Rules::setPokerusChanceDenom(const unsigned d) throw(Exception) { pokerusChance.setDenom(d); } -bool PokeMod::Rules::getGenderAllowed() const +bool Rules::getGenderAllowed() const { return genderAllowed; } -bool PokeMod::Rules::getBreedingAllowed() const +bool Rules::getBreedingAllowed() const { return breedingAllowed; } -unsigned PokeMod::Rules::getHoldItems() const +unsigned Rules::getHoldItems() const { return holdItems; } -bool PokeMod::Rules::getCriticalDomains() const +bool Rules::getCriticalDomains() const { return criticalDomains; } -bool PokeMod::Rules::getAbilityAllowed() const +bool Rules::getAbilityAllowed() const { return abilityAllowed; } -bool PokeMod::Rules::getNatureAllowed() const +bool Rules::getNatureAllowed() const { return natureAllowed; } -unsigned PokeMod::Rules::getNumBoxes() const +unsigned Rules::getNumBoxes() const { return numBoxes; } -unsigned PokeMod::Rules::getBoxSize() const +unsigned Rules::getBoxSize() const { return boxSize; } -unsigned PokeMod::Rules::getMaxParty() const +unsigned Rules::getMaxParty() const { return maxParty; } -unsigned PokeMod::Rules::getMaxFight() const +unsigned Rules::getMaxFight() const { return maxFight; } -unsigned PokeMod::Rules::getMaxMoves() const +unsigned Rules::getMaxMoves() const { return maxMoves; } -unsigned PokeMod::Rules::getMaxLevel() const +unsigned Rules::getMaxLevel() const { return maxLevel; } -unsigned PokeMod::Rules::getMaxMoney() const +unsigned Rules::getMaxMoney() const { return maxMoney; } -bool PokeMod::Rules::getHardCash() const +bool Rules::getHardCash() const { return hardCash; } -bool PokeMod::Rules::getSpecialSplit() const +bool Rules::getSpecialSplit() const { return specialSplit; } -bool PokeMod::Rules::getSpecialDVSplit() const +bool Rules::getSpecialDVSplit() const { return specialDVSplit; } -unsigned char PokeMod::Rules::getMaxDVValue() const +unsigned char Rules::getMaxDVValue() const { return maxDVValue; } -bool PokeMod::Rules::getHappiness() const +bool Rules::getHappiness() const { return happiness; } -unsigned PokeMod::Rules::getHappyFaintLoss() const +unsigned Rules::getHappyFaintLoss() const { return happyFaintLoss; } -unsigned PokeMod::Rules::getHappyLevelGain() const +unsigned Rules::getHappyLevelGain() const { return happyLevelGain; } -unsigned PokeMod::Rules::getHappySteps() const +unsigned Rules::getHappySteps() const { return happySteps; } -bool PokeMod::Rules::getEffortValuesAllowed() const +bool Rules::getEffortValuesAllowed() const { return effortValuesAllowed; } -unsigned PokeMod::Rules::getMaxTotalEV() const +unsigned Rules::getMaxTotalEV() const { return maxTotalEV; } -unsigned PokeMod::Rules::getMaxEVPerStat() const +unsigned Rules::getMaxEVPerStat() const { return maxEVPerStat; } -Frac PokeMod::Rules::getPokerusChance() const +Frac Rules::getPokerusChance() const { return pokerusChance; } -PokeMod::Rules& PokeMod::Rules::operator=(const Rules& rhs) +Rules& Rules::operator=(const Rules& rhs) { if (this == &rhs) return *this; |
