diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-01-21 00:44:23 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-01-21 00:44:23 +0000 |
| commit | 2b653821cc31f18adb5d50bb0bc19048939670dc (patch) | |
| tree | d333bbf0d1dde8fe0c1633bea60785b20ac07841 /pokemod/Rules.cpp | |
| parent | e27ba66952a1e851bb417611e0ed7df1fbf5f945 (diff) | |
| download | sigen-2b653821cc31f18adb5d50bb0bc19048939670dc.tar.gz sigen-2b653821cc31f18adb5d50bb0bc19048939670dc.tar.xz sigen-2b653821cc31f18adb5d50bb0bc19048939670dc.zip | |
[ADD] More GUI classes (only MoveEffect left)
[FIX] Polished up GUI classes
[FIX] renamed methods get*ByID -> get*Index instead for more logical get*ByID
[FIX] Renaming in pokemod to remove mention of Pokémon
[FIX] minor .pro fixes (aesthetic mainly)
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@35 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Rules.cpp')
| -rw-r--r-- | pokemod/Rules.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/pokemod/Rules.cpp b/pokemod/Rules.cpp index 41776b2a..92461eca 100644 --- a/pokemod/Rules.cpp +++ b/pokemod/Rules.cpp @@ -30,8 +30,8 @@ PokeMod::Rules::Rules(const Pokemod& par) : criticalDomains(false), abilityAllowed(false), natureAllowed(false), - numPokemonBoxes(0), - numPokemonPerBox(1), + numBoxes(0), + boxSize(1), maxParty(1), maxFight(1), maxMoves(1), @@ -62,26 +62,26 @@ bool PokeMod::Rules::validate() const { bool valid = true; pokemod.validationMsg("---Rules", Pokemod::V_Msg); - if (!numPokemonBoxes) - pokemod.validationMsg("Invalid number of Pokémon boxes", Pokemod::V_Warn); - else if (!numPokemonPerBox) + if (!numBoxes) + pokemod.validationMsg("No box storage", Pokemod::V_Warn); + else if (!boxSize) { - pokemod.validationMsg("Invalid number of Pokémon per box"); + pokemod.validationMsg("Invalid box size"); valid = false; } if (!maxParty) { - pokemod.validationMsg("Invalid number of Pokémon for max party"); + pokemod.validationMsg("Invalid party size"); valid = false; } if (!maxParty || (maxParty < maxFight)) { - pokemod.validationMsg("More Pokémon can fight than are allowed in the party"); + pokemod.validationMsg("Larger active than party"); valid = false; } if (!maxMoves) { - pokemod.validationMsg("Pokémon cannot learn any moves"); + pokemod.validationMsg("No moves can be learned"); valid = false; } if (!maxMoney) @@ -99,7 +99,7 @@ bool PokeMod::Rules::validate() const valid = false; } } - if (.05 < pokerusChance) + if (.005 < pokerusChance) pokemod.validationMsg("Pokérus chance is unusually high", Pokemod::V_Warn); return valid; } @@ -115,8 +115,8 @@ void PokeMod::Rules::load(const QString& fname) throw(Exception) ini.getValue("criticalDomains", criticalDomains, false); ini.getValue("abilityAllowed", abilityAllowed, false); ini.getValue("natureAllowed", natureAllowed, false); - ini.getValue("numPokemonBoxes", numPokemonBoxes, 0); - ini.getValue("numPokemonPerBox", numPokemonPerBox, 1); + ini.getValue("numBoxes", numBoxes, 0); + ini.getValue("boxSize", boxSize, 1); ini.getValue("maxParty", maxParty, 1); ini.getValue("maxFight", maxFight, 1); ini.getValue("maxMoves", maxMoves, 1); @@ -147,8 +147,8 @@ void PokeMod::Rules::save() const throw(Exception) ini.addField("criticalDomains", criticalDomains); ini.addField("abilityAllowed", abilityAllowed); ini.addField("natureAllowed", natureAllowed); - ini.addField("numPokemonBoxes", numPokemonBoxes); - ini.addField("numPokemonPerBox", numPokemonPerBox); + ini.addField("numBoxes", numBoxes); + ini.addField("boxSize", boxSize); ini.addField("maxParty", maxParty); ini.addField("maxFight", maxFight); ini.addField("maxMoves", maxMoves); @@ -204,14 +204,14 @@ void PokeMod::Rules::setNatureAllowed(const bool n) natureAllowed = n; } -void PokeMod::Rules::setNumPokemonBoxes(const unsigned n) +void PokeMod::Rules::setNumBoxes(const unsigned n) { - numPokemonBoxes = n; + numBoxes = n; } -void PokeMod::Rules::setNumPokemonPerBox(const unsigned n) +void PokeMod::Rules::setBoxSize(const unsigned b) { - numPokemonPerBox = n; + boxSize = b; } void PokeMod::Rules::setMaxParty(const unsigned m) throw(BoundsException) @@ -355,14 +355,14 @@ bool PokeMod::Rules::getNatureAllowed() const return natureAllowed; } -unsigned PokeMod::Rules::getNumPokemonBoxes() const +unsigned PokeMod::Rules::getNumBoxes() const { - return numPokemonBoxes; + return numBoxes; } -unsigned PokeMod::Rules::getNumPokemonPerBox() const +unsigned PokeMod::Rules::getBoxSize() const { - return numPokemonPerBox; + return boxSize; } unsigned PokeMod::Rules::getMaxParty() const @@ -460,8 +460,8 @@ PokeMod::Rules& PokeMod::Rules::operator=(const Rules& rhs) criticalDomains = rhs.criticalDomains; abilityAllowed = rhs.abilityAllowed; natureAllowed = rhs.natureAllowed; - numPokemonBoxes = rhs.numPokemonBoxes; - numPokemonPerBox = rhs.numPokemonPerBox; + numBoxes = rhs.numBoxes; + boxSize = rhs.boxSize; maxParty = rhs.maxParty; maxFight = rhs.maxFight; maxMoves = rhs.maxMoves; |
