41
41
//! Loading constructor.
42
42
ArmyProtoBase(XML_Helper* helper);
44
//! Create an empty army prototype base.
44
//! Default constructor. Create an empty army prototype base.
52
52
void setTypeId(guint32 type_id) {d_type_id = type_id;};
54
54
//! Sets the descriptive text for this Army.
55
55
void setDescription(std::string text) {d_description = text;};
57
//! Set the gold pieces needed to add this Army to a city's production.
57
//! Set the gold pieces needed to make an Army unit of this kind.
58
58
void setProductionCost(guint32 production_cost)
59
59
{d_production_cost = production_cost;}
61
//! Set the gold pieces needed to add this Army to a city's production.
62
void setNewProductionCost(guint32 new_production_cost)
63
{d_new_production_cost = new_production_cost;}
61
65
//! Sets the armyset id for this army.
62
66
void setArmyset(guint32 id) {d_armyset = id;};
66
//! Get the Id of the Armyset to which the Army's type belongs.
67
guint32 getTypeId() const {return d_type_id;}
69
//! Returns the descriptive text of this Army.
70
std::string getDescription() const {return _(d_description.c_str());}
72
//! Returns how much gold setting up the production costs
74
* @return The amount of gold pieces required to add this Army
75
* into the City's suite of 4 production slots.
77
guint32 getProductionCost() const {return d_production_cost;}
79
//! Returns the armyset id for this army.
80
guint32 getArmyset() const {return d_armyset;};
82
68
//! Set the army bonus of the army prototype.
83
69
void setArmyBonus(guint32 bonus) {d_army_bonus = bonus;};
94
80
//! Set the name of the Army.
95
81
void setName(std::string name){d_name = name;}
83
//! Set how many turns this unit type needs to be produced.
84
void setProduction(guint32 production){d_production = production;};
89
//! Get the Id of the Armyset to which the Army's type belongs.
90
guint32 getTypeId() const {return d_type_id;}
92
//! Returns the descriptive text of this Army.
93
std::string getDescription() const {return _(d_description.c_str());}
95
//! Returns how much gold making one of these army units costs.
96
guint32 getProductionCost() const {return d_production_cost;}
98
//! Returns how much gold setting up the production costs
100
* @return The amount of gold pieces required to add this Army
101
* into the City's suite of 4 production slots.
103
guint32 getNewProductionCost() const {return d_new_production_cost;}
105
//! Returns the armyset id for this army.
106
guint32 getArmyset() const {return d_armyset;};
97
108
//! Returns the name of the Army.
98
109
std::string getName() const {return _(d_name.c_str());};
100
111
//! Returns how many turns this Army needs to be produced.
101
112
guint32 getProduction() const {return d_production;};
103
//! Set how many turns this unit type needs to be produced.
104
void setProduction(guint32 production){d_production = production;};
115
//! Callback method for loading this object from an opened file.
107
116
bool saveData(XML_Helper* helper) const;
109
118
//! The name of the Army unit. e.g. Scouts.
115
124
//! The description of the Army unit.
116
125
std::string d_description;
127
//! How many gold pieces needed to create an army of this kind.
129
* Every time an army unit is created of this kind, it costs the
130
* player this many gold pieces.
132
guint32 d_production_cost;
118
134
//! How many gold pieces needed to add this Army to a city's production.
120
136
* If d_production_cost is over zero, then the Army can be purchased.