added a gold_add member to class team

This commit is contained in:
Eugen Jiresch 2009-07-09 12:01:48 +00:00
parent e7ebf1fa0c
commit ace44ff441
2 changed files with 4 additions and 0 deletions

View file

@ -81,6 +81,7 @@ team::team_info::team_info(const config& cfg) :
name(cfg["name"]),
gold(lexical_cast_default<int>(cfg["gold"])),
start_gold(0),
gold_add(false),
income(lexical_cast_default<int>(cfg["income"])),
income_per_village(0),
average_price(0),

View file

@ -76,6 +76,7 @@ public:
std::string name;
int gold;
int start_gold;
bool gold_add;
int income;
int income_per_village;
size_t average_price;
@ -145,6 +146,7 @@ public:
int gold() const { return gold_; }
int start_gold() const { return info_.start_gold; }
bool gold_add() const { return info_.gold_add; }
int base_income() const { return info_.income + game_config::base_income; }
int village_gold() const { return info_.income_per_village; }
void set_village_gold(int income) { info_.income_per_village = income; }
@ -154,6 +156,7 @@ public:
void get_shared_maps();
void set_gold(int amount) { gold_ = amount; }
void spend_gold(const int amount) { gold_ -= amount; }
void set_gold_add(bool b) {info_.gold_add = b; }
void set_base_income(int amount) { info_.income = amount - game_config::base_income; }
int countdown_time() const { return countdown_time_; }
void set_countdown_time(const int amount)