Use decimals instead of integers to allow relative templates for resource costs, as proposed by sanderd17, fixes #3818. Use relative templates following 68f87cb556.

This was SVN commit r18500.
This commit is contained in:
fatherbushido 2016-07-08 15:33:50 +00:00
parent ff4e751dce
commit e38665d7a6
3 changed files with 8 additions and 8 deletions

View file

@ -24,10 +24,10 @@ Cost.prototype.Schema =
"</element>" +
"<element name='Resources' a:help='Resource costs to construct/train this unit'>" +
"<interleave>" +
"<element name='food'><data type='nonNegativeInteger'/></element>" +
"<element name='wood'><data type='nonNegativeInteger'/></element>" +
"<element name='stone'><data type='nonNegativeInteger'/></element>" +
"<element name='metal'><data type='nonNegativeInteger'/></element>" +
"<element name='food'><ref name='nonNegativeDecimal'/></element>" +
"<element name='wood'><ref name='nonNegativeDecimal'/></element>" +
"<element name='stone'><ref name='nonNegativeDecimal'/></element>" +
"<element name='metal'><ref name='nonNegativeDecimal'/></element>" +
"</interleave>" +
"</element>";

View file

@ -2,9 +2,9 @@
<Entity parent="template_structure_military_fortress">
<Cost>
<PopulationBonus>15</PopulationBonus>
<BuildTime>750</BuildTime>
<BuildTime op="mul">1.5</BuildTime>
<Resources>
<stone>1200</stone>
<stone op="mul">1.2</stone>
</Resources>
</Cost>
<Health>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_fortress">
<Cost>
<BuildTime>350</BuildTime>
<BuildTime op="mul">0.7</BuildTime>
<Resources>
<stone>800</stone>
<stone op="mul">0.8</stone>
</Resources>
</Cost>
<Footprint>