From 2c0a3866e09140d8d5ff84178decddc22db15778 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 6 Oct 2008 00:50:02 +0000 Subject: [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 --- sigscript/RulesWrapper.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'sigscript/RulesWrapper.cpp') 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("pausedATB")) + if (sigmod()->singlePlayer() && hasValueOfType("pausedATB")) return valueOfType("pausedATB"); return m_rules->pausedATB(); } int Sigscript::RulesWrapper::numBoxes() const { - if (hasValueOfType("numBoxes")) + if (sigmod()->singlePlayer() && hasValueOfType("numBoxes")) return valueOfType("numBoxes"); return m_rules->numBoxes(); } int Sigscript::RulesWrapper::boxSize() const { - if (hasValueOfType("boxSize")) + if (sigmod()->singlePlayer() && hasValueOfType("boxSize")) return valueOfType("boxSize"); return m_rules->boxSize(); } int Sigscript::RulesWrapper::maxParty() const { - if (hasValueOfType("maxParty")) + if (sigmod()->singlePlayer() && hasValueOfType("maxParty")) return valueOfType("maxParty"); return m_rules->maxParty(); } int Sigscript::RulesWrapper::maxFight() const { - if (hasValueOfType("maxFight")) + if (sigmod()->singlePlayer() && hasValueOfType("maxFight")) return valueOfType("maxFight"); return m_rules->maxFight(); } int Sigscript::RulesWrapper::maxPlayers() const { - if (hasValueOfType("maxFight")) + if (sigmod()->singlePlayer() && hasValueOfType("maxFight")) return valueOfType("maxFight"); return m_rules->maxPlayers(); } int Sigscript::RulesWrapper::maxHeldItems() const { - if (hasValueOfType("maxHeldItems")) + if (sigmod()->singlePlayer() && hasValueOfType("maxHeldItems")) return valueOfType("maxHeldItems"); return m_rules->maxHeldItems(); } @@ -115,35 +115,35 @@ int Sigscript::RulesWrapper::maxNatures() const int Sigscript::RulesWrapper::maxMoves() const { - if (hasValueOfType("maxMoves")) + if (sigmod()->singlePlayer() && hasValueOfType("maxMoves")) return valueOfType("maxMoves"); return m_rules->maxMoves(); } int Sigscript::RulesWrapper::maxLevel() const { - if (hasValueOfType("maxLevel")) + if (sigmod()->singlePlayer() && hasValueOfType("maxLevel")) return valueOfType("maxLevel"); return m_rules->maxLevel(); } int Sigscript::RulesWrapper::maxStages() const { - if (hasValueOfType("maxStages")) + if (sigmod()->singlePlayer() && hasValueOfType("maxStages")) return valueOfType("maxStages"); return m_rules->maxStages(); } int Sigscript::RulesWrapper::maxMoney() const { - if (hasValueOfType("maxMoney")) + if (sigmod()->singlePlayer() && hasValueOfType("maxMoney")) return valueOfType("maxMoney"); return m_rules->maxMoney(); } int Sigscript::RulesWrapper::maxTotalWeight() const { - if (hasValueOfType("maxTotalWeight")) + if (sigmod()->singlePlayer() && hasValueOfType("maxTotalWeight")) return valueOfType("maxTotalWeight"); return m_rules->maxTotalWeight(); } @@ -155,7 +155,7 @@ bool Sigscript::RulesWrapper::hardCash() const bool Sigscript::RulesWrapper::allowSwitchStyle() const { - if (hasValueOfType("allowSwitchStyle")) + if (sigmod()->singlePlayer() && hasValueOfType("allowSwitchStyle")) return valueOfType("allowSwitchStyle"); return m_rules->allowSwitchStyle(); } @@ -177,14 +177,14 @@ bool Sigscript::RulesWrapper::effortValuesAllowed() const int Sigscript::RulesWrapper::maxTotalEV() const { - if (hasValueOfType("maxTotalEV")) + if (sigmod()->singlePlayer() && hasValueOfType("maxTotalEV")) return valueOfType("maxTotalEV"); return m_rules->maxTotalEV(); } int Sigscript::RulesWrapper::maxEVPerStat() const { - if (hasValueOfType("maxEVPerStat")) + if (sigmod()->singlePlayer() && hasValueOfType("maxEVPerStat")) return valueOfType("maxEVPerStat"); return m_rules->maxEVPerStat(); } -- cgit