Opened 9 years ago
Closed 8 years ago
#350 closed defect (fixed)
Add requirement to allow N of unit for specific other units
Reported by: | ibboard | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | WarFoundry API 0.2 |
Component: | WarFoundry-API | Version: | |
Keywords: | Cc: | ||
Blocked By: | #349 | Blocking: | #27 |
Description (last modified by )
We need a requirement equivalent to Rollcall's "N,id" for a unit (i.e. "you can take N of a given unit for every 1 of unit with id"). This will also require a factory.
It needs to be able to handle future extension, multiple units and varying numbers. It would be best to allow N of a unit for every M of a unit with id. An additive option (e.g. 2,a|b when you have 2 unit a and 3 unit b giving 2 * (2 + 3) = 10) would also be useful.
Change History (31)
comment:1 Changed 9 years ago by
Status: | new → accepted |
---|
comment:2 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 8 years ago by
comment:4 Changed 8 years ago by
comment:5 Changed 8 years ago by
comment:6 Changed 8 years ago by
comment:7 Changed 8 years ago by
comment:8 Changed 8 years ago by
comment:9 Changed 8 years ago by
comment:10 Changed 8 years ago by
comment:11 Changed 8 years ago by
comment:12 Changed 8 years ago by
comment:13 Changed 8 years ago by
comment:14 Changed 8 years ago by
Format for requirements in data files should be something like:
<requirement requirementName="RequiresNUnitsForMUnits"><data>3:unitID1|2:unitID2</data></requirement>
to allow 3 of a unit for every one unitID1 and for every unitID2 (so 2 unitID1 and 2 unitID2 would allow up to 4 units, because 2*2 is the lowest).
comment:15 Changed 8 years ago by
comment:16 Changed 8 years ago by
comment:17 Changed 8 years ago by
comment:18 Changed 8 years ago by
Format for requirements in data files should now also allow something like:
<requirement requirementName="RequiresNUnitsForMUnits"><data>unitID1</data></requirement> <requirement requirementName="RequiresNUnitsForMUnits"><data>unitID2:3</data></requirement> <requirement requirementName="RequiresNUnitsForMUnits"><data>unitID3:2;3</data></requirement> <requirement requirementName="RequiresNUnitsForMUnits"><data>unitID4:2|unitID5</data></requirement>
and any other combination of the above. These examples allow:
- up to 1 of the unit for every unitID1
- up to 3 of the unit for every unitID2
- up to 3 of the unit for every 2 unitID3
- up to 2 of the unit for every unitID2 or up to 1 of the unit for every unitID5 (whichever is lower)
The additive option on unit types (e.g. 2 unit a and 3 unit b giving up to N*(2+3) units allowed) is to follow.
comment:19 Changed 8 years ago by
comment:20 Changed 8 years ago by
comment:21 Changed 8 years ago by
comment:22 Changed 8 years ago by
comment:23 Changed 8 years ago by
comment:24 Changed 8 years ago by
comment:25 Changed 8 years ago by
comment:26 Changed 8 years ago by
comment:27 Changed 8 years ago by
comment:28 Changed 8 years ago by
comment:29 Changed 8 years ago by
comment:31 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Actually mark as fixed.
In [0922851f6125558595522cd3be4552942a36c713/IBBoard.WarFoundry.API]: