|
@@ -59,7 +59,6 @@ void Unit::loadUnitBaseClass(QString unit_folder) {
|
|
|
|
|
|
void Unit::loadUnitTraits(QString unit_folder) {
|
|
|
QSettings traits(unit_folder + "traits.ini", QSettings::IniFormat);
|
|
|
- //traits.beginGroup("CharactersTraits");
|
|
|
level_ = traits.value("lvl", -1).toInt();
|
|
|
cost_ = traits.value("cost", -1).toInt();
|
|
|
starting_activity_points_ = traits.value("starting_ap", -1).toInt();
|
|
@@ -68,8 +67,6 @@ void Unit::loadUnitTraits(QString unit_folder) {
|
|
|
initiative_ = traits.value("initiative", -1).toInt();
|
|
|
magic_defence_ = traits.value("magic_def", -1).toInt();
|
|
|
physic_defence_ = traits.value("physic_def", -1).toInt();
|
|
|
- //traits.endGroup();
|
|
|
- qDebug() << unit_folder + "traits.ini" << " " << level_;
|
|
|
}
|
|
|
|
|
|
void Unit::loadUnitIcon(QString unit_folder) {
|
|
@@ -145,6 +142,14 @@ void Unit::setLocation(Cell* to) {
|
|
|
location_ = to;
|
|
|
}
|
|
|
|
|
|
+int Unit::getMaxHealthPoints(){
|
|
|
+ return max_health_points_;
|
|
|
+}
|
|
|
+
|
|
|
+void Unit::setHealthPoints(int value){
|
|
|
+ health_points_ = value;
|
|
|
+}
|
|
|
+
|
|
|
int Unit::getInitiative() {
|
|
|
return initiative_;
|
|
|
}
|