Ticket #3818: cost.diff

File cost.diff, 2.7 KB (added by fatherbushido, 8 years ago)
  • binaries/data/mods/public/simulation/components/Cost.js

    Cost.prototype.Schema =  
    2222    "<element name='BuildTime' a:help='Time taken to construct/train this unit (in seconds)'>" +
    2323        "<ref name='nonNegativeDecimal'/>" +
    2424    "</element>" +
    2525    "<element name='Resources' a:help='Resource costs to construct/train this unit'>" +
    2626        "<interleave>" +
    27             "<element name='food'><data type='nonNegativeInteger'/></element>" +
    28             "<element name='wood'><data type='nonNegativeInteger'/></element>" +
    29             "<element name='stone'><data type='nonNegativeInteger'/></element>" +
    30             "<element name='metal'><data type='nonNegativeInteger'/></element>" +
     27            "<element name='food'><ref name='nonNegativeDecimal'/></element>" +
     28            "<element name='wood'><ref name='nonNegativeDecimal'/></element>" +
     29            "<element name='stone'><ref name='nonNegativeDecimal'/></element>" +
     30            "<element name='metal'><ref name='nonNegativeDecimal'/></element>" +
    3131        "</interleave>" +
    3232    "</element>";
    3333
    3434Cost.prototype.Init = function()
    3535{
  • binaries/data/mods/public/simulation/templates/structures/iber_fortress.xml

     
    11<?xml version="1.0" encoding="utf-8"?>
    22<Entity parent="template_structure_military_fortress">
    33  <Cost>
    44    <PopulationBonus>15</PopulationBonus>
    5     <BuildTime>750</BuildTime>
     5    <BuildTime op="mul">1.5</BuildTime>
    66    <Resources>
    7       <stone>1200</stone>
     7      <stone op="mul">1.2</stone>
    88    </Resources>
    99  </Cost>
    1010  <Health>
    1111    <Max>6000</Max>
    1212  </Health>
  • binaries/data/mods/public/simulation/templates/structures/mace_fortress.xml

     
    11<?xml version="1.0" encoding="utf-8"?>
    22<Entity parent="template_structure_military_fortress">
    33  <Cost>
    4     <BuildTime>350</BuildTime>
     4    <BuildTime op="mul">0.7</BuildTime>
    55    <Resources>
    6       <stone>800</stone>
     6      <stone op="mul">0.8</stone>
    77    </Resources>
    88  </Cost>
    99  <Footprint>
    1010    <Square width="26.0" depth="28.0"/>
    1111    <Height>8.0</Height>