I want to add a unit for my civilization that will cost 60% less production if you are at war. I already have a unit template:
How can I add this ability to him?
Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
<Types>
<!-- Melee-->
<Row Type="UNIT_TERDEF" Kind="KIND_UNIT"/>
</Types>
<UnitAiInfos>
<!-- Melee-->
<Row UnitType="UNIT_TERDEF" AiType="UNITAI_COMBAT"/>
<Row UnitType="UNIT_TERDEF" AiType="UNITAI_EXPLORE"/>
<Row UnitType="UNIT_TERDEF" AiType="UNITTYPE_MELEE"/>
<Row UnitType="UNIT_TERDEF" AiType="UNITTYPE_LAND_COMBAT"/>
</UnitAiInfos>
<UnitReplaces>
<Row CivUniqueUnitType="UNIT_TERDEF" ReplacesUnitType="UNIT_INFANTRY"/>
</UnitReplaces>
<UnitUpgrades>
<Row Unit="UNIT_TERDEF" UpgradeUnit="UNIT_MECHANIZED_INFANTRY"/>
</UnitUpgrades>
<TypeTags>
<Row Type="UNIT_TERDEF" Tag="CLASS_MELEE"/>
<Row Type="UNIT_TERDEF" Tag="CLASS_TERDEF"/>
</TypeTags>
<Units>
<Row UnitType="UNIT_TERDEF" BaseMoves="2" Cost="450" AdvisorType="ADVISOR_CONQUEST" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_LAND" FormationClass="FORMATION_CLASS_LAND_COMBAT" Name="LOC_UNIT_TERDEF_NAME" Description="LOC_UNIT_TERDEF_DESCRIPTION" PurchaseYield="YIELD_GOLD" PromotionClass="PROMOTION_CLASS_MELEE" Maintenance="8" Combat="75" PrereqTech="TECH_REPLACEABLE_PARTS" TraitType="TRAIT_CIVILIZATION_UNIT_TERDEF"/>
</Units>
</GameInfo>