Merge branch 'feature-starting-vals' into feature-looting
This commit is contained in:
commit
9883bf7656
|
@ -1959,7 +1959,7 @@ void Unit::born(const CommandType *ct) {
|
|||
this->hp= type->getStartHpValue();
|
||||
}
|
||||
else {
|
||||
this->hp= type->getStartHpPercentage() * type->getTotalMaxHp(&totalUpgrade);
|
||||
this->hp= type->getTotalMaxHp(&totalUpgrade) * 100 / type->getStartHpPercentage();
|
||||
}
|
||||
|
||||
if(original_hp != this->hp) {
|
||||
|
@ -1975,7 +1975,7 @@ void Unit::born(const CommandType *ct) {
|
|||
this->ep= type->getStartEpValue();
|
||||
}
|
||||
else {
|
||||
this->ep= type->getStartEpPercentage() * type->getTotalMaxEp(&totalUpgrade);
|
||||
this->ep= type->getTotalMaxEp(&totalUpgrade) * 100 / type->getStartEpPercentage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ void UnitType::loaddd(int id,const string &dir, const TechTree *techTree,
|
|||
|
||||
//startHpPercentage -- the *relative* value to use for starting HP
|
||||
if(parametersNode->getChild("max-hp")->hasAttribute("start-percentage")) {
|
||||
startHpPercentage= parametersNode->getChild("max-hp")->getAttribute("start-percentage")->getFloatValue();
|
||||
startHpPercentage= parametersNode->getChild("max-hp")->getAttribute("start-percentage")->getIntValue();
|
||||
startHpType= stPercentage;
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ void UnitType::loaddd(int id,const string &dir, const TechTree *techTree,
|
|||
|
||||
//startEpPercentage -- the *relative* value to use for starting EP
|
||||
if(parametersNode->getChild("max-ep")->hasAttribute("start-percentage")) {
|
||||
startEpPercentage= parametersNode->getChild("max-ep")->getAttribute("start-percentage")->getFloatValue();
|
||||
startEpPercentage= parametersNode->getChild("max-ep")->getAttribute("start-percentage")->getIntValue();
|
||||
startEpType= stPercentage;
|
||||
}
|
||||
addItemToVault(&(this->startEpPercentage),this->startEpPercentage);
|
||||
|
|
|
@ -150,12 +150,12 @@ private:
|
|||
int id;
|
||||
int maxHp;
|
||||
int startHpValue;
|
||||
double startHpPercentage;
|
||||
int startHpPercentage;
|
||||
StartType startHpType;
|
||||
int hpRegeneration;
|
||||
int maxEp;
|
||||
int startEpValue;
|
||||
double startEpPercentage;
|
||||
int startEpPercentage;
|
||||
StartType startEpType;
|
||||
int epRegeneration;
|
||||
int maxUnitCount;
|
||||
|
@ -231,12 +231,12 @@ public:
|
|||
inline int getMaxHp() const {return maxHp;}
|
||||
inline int getHpRegeneration() const {return hpRegeneration;}
|
||||
inline int getStartHpValue() const {return startHpValue;}
|
||||
inline double getStartHpPercentage() const {return startHpPercentage;}
|
||||
inline int getStartHpPercentage() const {return startHpPercentage;}
|
||||
inline StartType getStartHpType() const {return startHpType;}
|
||||
inline int getMaxEp() const {return maxEp;}
|
||||
inline int getEpRegeneration() const {return epRegeneration;}
|
||||
inline int getStartEpValue() const {return startEpValue;}
|
||||
inline double getStartEpPercentage() const {return startEpPercentage;}
|
||||
inline int getStartEpPercentage() const {return startEpPercentage;}
|
||||
inline StartType getStartEpType() const {return startEpType;}
|
||||
inline int getMaxUnitCount() const {return maxUnitCount;}
|
||||
inline bool getField(Field field) const {return fields[field];}
|
||||
|
|
Loading…
Reference in New Issue