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:
parent
1a8959da93
commit
30a7e712fa
1 changed files with 3 additions and 0 deletions
|
@ -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"]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue