diff --git a/source/glest_game/types/unit_type.cpp b/source/glest_game/types/unit_type.cpp index a9b264d0..960b19c5 100644 --- a/source/glest_game/types/unit_type.cpp +++ b/source/glest_game/types/unit_type.cpp @@ -250,6 +250,14 @@ void UnitType::loaddd(int id,const string &dir, const TechTree *techTree, } addItemToVault(&(this->epRegeneration),this->epRegeneration); + // Check that we don't use both start-value and start-percentage, as they are mutually + // exclusive + if(parametersNode->getChild("max-ep")->hasAttribute("start-value") && + parametersNode->getChild("max-ep")->hasAttribute("start-percentage")) { + throw megaglest_runtime_error("Unit " + name + + " has both start-value and start-percentage for EP", validationMode); + } + //startEpValue -- the *absolute* value to use for starting EP if(parametersNode->getChild("max-ep")->hasAttribute("start-value")) { //checkItemInVault(&(this->startEp),this->startEp);