diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-10-06 00:50:02 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-10-06 00:50:02 +0000 |
| commit | 2c0a3866e09140d8d5ff84178decddc22db15778 (patch) | |
| tree | 8d780290c2b1738cb17cec832dd866b068b9a31f /sigscript/RulesWrapper.cpp | |
| parent | 61276d172306a14c110a7c3631b484ccf93f9ffa (diff) | |
| download | sigen-2c0a3866e09140d8d5ff84178decddc22db15778.tar.gz sigen-2c0a3866e09140d8d5ff84178decddc22db15778.tar.xz sigen-2c0a3866e09140d8d5ff84178decddc22db15778.zip | |
[FIX] Added single player option to Sigmod
[FIX] Doxygen generation cleaned up
[FIX] Can no longer override variables in the Sigmod if not a single player game
[FIX] When checking for modified move priority, blean up afterwards
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@271 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigscript/RulesWrapper.cpp')
| -rw-r--r-- | sigscript/RulesWrapper.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sigscript/RulesWrapper.cpp b/sigscript/RulesWrapper.cpp index a5374678..662383f3 100644 --- a/sigscript/RulesWrapper.cpp +++ b/sigscript/RulesWrapper.cpp @@ -56,49 +56,49 @@ bool Sigscript::RulesWrapper::useTurns() const bool Sigscript::RulesWrapper::pausedATB() const { - if (hasValueOfType<bool>("pausedATB")) + if (sigmod()->singlePlayer() && hasValueOfType<bool>("pausedATB")) return valueOfType<bool>("pausedATB"); return m_rules->pausedATB(); } int Sigscript::RulesWrapper::numBoxes() const { - if (hasValueOfType<int>("numBoxes")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("numBoxes")) return valueOfType<int>("numBoxes"); return m_rules->numBoxes(); } int Sigscript::RulesWrapper::boxSize() const { - if (hasValueOfType<int>("boxSize")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("boxSize")) return valueOfType<int>("boxSize"); return m_rules->boxSize(); } int Sigscript::RulesWrapper::maxParty() const { - if (hasValueOfType<int>("maxParty")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxParty")) return valueOfType<int>("maxParty"); return m_rules->maxParty(); } int Sigscript::RulesWrapper::maxFight() const { - if (hasValueOfType<int>("maxFight")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxFight")) return valueOfType<int>("maxFight"); return m_rules->maxFight(); } int Sigscript::RulesWrapper::maxPlayers() const { - if (hasValueOfType<int>("maxFight")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxFight")) return valueOfType<int>("maxFight"); return m_rules->maxPlayers(); } int Sigscript::RulesWrapper::maxHeldItems() const { - if (hasValueOfType<int>("maxHeldItems")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxHeldItems")) return valueOfType<int>("maxHeldItems"); return m_rules->maxHeldItems(); } @@ -115,35 +115,35 @@ int Sigscript::RulesWrapper::maxNatures() const int Sigscript::RulesWrapper::maxMoves() const { - if (hasValueOfType<int>("maxMoves")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxMoves")) return valueOfType<int>("maxMoves"); return m_rules->maxMoves(); } int Sigscript::RulesWrapper::maxLevel() const { - if (hasValueOfType<int>("maxLevel")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxLevel")) return valueOfType<int>("maxLevel"); return m_rules->maxLevel(); } int Sigscript::RulesWrapper::maxStages() const { - if (hasValueOfType<int>("maxStages")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxStages")) return valueOfType<int>("maxStages"); return m_rules->maxStages(); } int Sigscript::RulesWrapper::maxMoney() const { - if (hasValueOfType<int>("maxMoney")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxMoney")) return valueOfType<int>("maxMoney"); return m_rules->maxMoney(); } int Sigscript::RulesWrapper::maxTotalWeight() const { - if (hasValueOfType<int>("maxTotalWeight")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxTotalWeight")) return valueOfType<int>("maxTotalWeight"); return m_rules->maxTotalWeight(); } @@ -155,7 +155,7 @@ bool Sigscript::RulesWrapper::hardCash() const bool Sigscript::RulesWrapper::allowSwitchStyle() const { - if (hasValueOfType<bool>("allowSwitchStyle")) + if (sigmod()->singlePlayer() && hasValueOfType<bool>("allowSwitchStyle")) return valueOfType<bool>("allowSwitchStyle"); return m_rules->allowSwitchStyle(); } @@ -177,14 +177,14 @@ bool Sigscript::RulesWrapper::effortValuesAllowed() const int Sigscript::RulesWrapper::maxTotalEV() const { - if (hasValueOfType<int>("maxTotalEV")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxTotalEV")) return valueOfType<int>("maxTotalEV"); return m_rules->maxTotalEV(); } int Sigscript::RulesWrapper::maxEVPerStat() const { - if (hasValueOfType<int>("maxEVPerStat")) + if (sigmod()->singlePlayer() && hasValueOfType<int>("maxEVPerStat")) return valueOfType<int>("maxEVPerStat"); return m_rules->maxEVPerStat(); } |
