Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs @ 458:680db2462e34
Re #379:
* Move GetObjectCountFromArmy(Army, OBJECT_TYPE) to top level and implement
* Fix army validation for appropriate "NA" returns
* Make basic "Requires..." requirements abstract so that we always need to make specific versions (e.g. UnitRequires... that knows how to check amount of units)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 26 Feb 2012 20:16:33 +0000 |
parents | 8e01c3174cc3 |
children | f0594621e4a0 |
line wrap: on
line diff
--- a/API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs Sun Feb 26 15:14:01 2012 +0000 +++ b/API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs Sun Feb 26 20:16:33 2012 +0000 @@ -68,6 +68,11 @@ return isApplicable; } + + protected override int GetObjectCountFromArmy(Army toArmy, UnitType obj) + { + return toArmy.GetUnitTypeCount(obj); + } } }