Previously "loyal" got a zero upkeep by virtual of evaluating to zero...

...when casted to an int. I put in an explicit test for this.  On a
related note I updated the wiki to say loyal units are free, removed
the description of "free" and added a note that you could put an
integer there to set a specific upkeep cost.
This commit is contained in:
Bruno Wolff III 2006-06-11 02:15:06 +00:00
parent 1a8959da93
commit 30a7e712fa

View file

@ -1813,6 +1813,9 @@ int unit::upkeep() const
if(cfg_["upkeep"] == "full") {
return level();
}
if(cfg_["upkeep"] == "loyal") {
return 0;
}
return lexical_cast_default<int>(cfg_["upkeep"]);
}