# HG changeset patch # User IBBoard # Date 1301158980 0 # Node ID 3319955829908117ab235bf8250148a0936193c7 # Parent e0580a009e7586d0d68a12a17f92bc60a3688733 Re #27: Define unit requirements * First skeleton of first new style requirement diff -r e0580a009e75 -r 331995582990 IBBoard.WarFoundry.API.csproj --- a/IBBoard.WarFoundry.API.csproj Sat Mar 12 20:32:08 2011 +0000 +++ b/IBBoard.WarFoundry.API.csproj Sat Mar 26 17:03:00 2011 +0000 @@ -185,6 +185,7 @@ + diff -r e0580a009e75 -r 331995582990 api/Objects/UnitRequiresAtLeastNUnitsRequirement.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/api/Objects/UnitRequiresAtLeastNUnitsRequirement.cs Sat Mar 26 17:03:00 2011 +0000 @@ -0,0 +1,28 @@ +// This file (UnitRequiresAtLeastNUnitsRequirement.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2011 IBBoard +// +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. +using System; +using System.Collections.Generic; +using IBBoard.WarFoundry.API.Objects; + +namespace IBBoard.WarFoundry.API.Objects +{ + /// + /// A requirement where a Unit requires at least N units of one or more unit types before it can be taken. + /// + public class UnitRequiresAtLeastNUnitsRequirement + { + private List requiredTypes; + + public UnitRequiresAtLeastNUnitsRequirement(params UnitType[] requiredUnitTypes) + { + requiredTypes = new List(requiredUnitTypes); + } + + public bool CanAddToArmy(Unit unit, Army army) + { + return false; + } + } +} +