1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

* campaign against magic numbers

* ArtifactID was misleading and wrongly used in one place -- renamed and fixed
* minor changes
This commit is contained in:
mateuszb
2012-09-23 18:01:04 +00:00
parent 3fcba4fb5c
commit 6a81c8b1af
32 changed files with 567 additions and 511 deletions

View File

@@ -65,10 +65,10 @@ public:
ui32 skillLimit; //how many secondary skills can hero learn
std::string name;
double aggression;
int initialAttack, initialDefence, initialPower, initialKnowledge; //initial values of primary skills
int initialPrimSkills[GameConstants::PRIMARY_SKILLS]; //initial values of primary skills, uses PrimarySkill enum
std::vector<std::pair<int,int> > primChance;//primChance[PRIMARY_SKILL_ID] - first is for levels 2 - 9, second for 10+;;; probability (%) of getting point of primary skill when getting new level
std::vector<int> proSec; //probabilities of gaining secondary skills (out of 112), in id order
int selectionProbability[9]; //probability of selection in towns
int selectionProbability[GameConstants::F_NUMBER]; //probability of selection in towns
int chooseSecSkill(const std::set<int> & possibles) const; //picks secondary skill out from given possibilities
CHeroClass(); //c-tor
@@ -76,10 +76,10 @@ public:
template <typename Handler> void serialize(Handler &h, const int version)
{
h & skillLimit & name & aggression & initialAttack & initialDefence & initialPower & initialKnowledge & primChance
h & skillLimit & name & aggression & initialPrimSkills & primChance
& proSec & selectionProbability & alignment;
}
EAlignment::EAlignment getAlignment();
EAlignment::EAlignment getAlignment() const;
};
struct DLL_LINKAGE CObstacleInfo