* Returns the total defense value of all * the facilities in the base. * @return Defense value. */
| 830 | * @return Defense value. |
| 831 | */ |
| 832 | int Base::getDefenseValue() const |
| 833 | { |
| 834 | int total = 0; |
| 835 | for (std::vector<BaseFacility*>::const_iterator i = _facilities.begin(); i != _facilities.end(); ++i) |
| 836 | { |
| 837 | if ((*i)->getBuildTime() == 0) |
| 838 | { |
| 839 | total += (*i)->getRules()->getDefenseValue(); |
| 840 | } |
| 841 | } |
| 842 | return total; |
| 843 | } |
| 844 | |
| 845 | /** |
| 846 | * Returns the total amount of short range |
no test coverage detected