I am trying to create an Ability that is 15% Unrest - 5% Unrest per Essence.
The 15% is easy, but have been unable to do the 5% Unrest per Essence, unless I tie it to a new building, or city spell.
I do the 15% on the ability with
Code: xml
- <GameModifier>
- <ModType>Player</ModType>
- <Attribute>AbilityBonus</Attribute>
- <StrVal>A_Additive_Unrest</StrVal>
- <Value>15</Value>
- <Provides>+15% Unrest</Provides>
- </GameModifier>
The closest I could do was create a building with 0 LaborToBuild, so it can be built on the first turn after a city is created, that does:
Code: xml
- <GameModifier>
- <ModType>Resource</ModType>
- <Attribute>Unrest</Attribute>
- <PerTurn>1</PerTurn>
- <Provides>-5% Unrest per Essence</Provides>
- <UpgradeComparisonID>1</UpgradeComparisonID>
- <UpgradeComparisonText>Unrest</UpgradeComparisonText>
- <Calculate InternalName="Calc" ValueOwner="OwnerCity">
- <Expression><![CDATA[[TileYieldEssence] * 5]]></Expression>
- </Calculate>
- <Calculate InternalName="Value">
- <Expression><![CDATA[[Calc] * -1]]></Expression>
- </Calculate>
- </GameModifier>
Is there a way in the AbilityBonus itself to do something like this (Affect the City using TileYieldEssence)