Jun 21, 2018, 12:32 PM

Development news

Cave dweller was a bit underwhelming, as being a "creature" as opposed to heavy infantry gave you more bonus in a cave than being cave dweller, and caves are rather rare anyway. Now it gives +2 attack and defense instead of +1. Forest dweller has a similar problem, but there are more forest territories, so I'm still thinking about that.

For mapmakers

TagX has a new feature: it can do set operations. ˇ is "or", or join; ^ is "and", or intersection, ~ is "and not", or set difference / except.

What this means is that now territory effects are done. Once and for all. No matter how many new units I add, I won't even have to touch territory effects, they will be implemented automagically. Heck, it can even handle fortification units with raider ability, lest I should decide to go full retard.

This is just to demonstrate the full power of the dark side TagX.

<attachment name="territoryEffectAttachment" attachTo="settlement" javaClass="games.strategy.triplea.attachments.TerritoryEffectAttachment" type="territoryEffect">
		<option name="combatOffenseEffect" value="@((infantry^melee)~(armor1ˇarmor2ˇarmor3))~raider@" count="0"/>
		<option name="combatDefenseEffect" value="@((infantry^melee)~(armor1ˇarmor2ˇarmor3))~garrison@" count="1"/>
		<option name="combatOffenseEffect" value="@(infantry^melee)^(armor1ˇarmor2ˇarmor3)~raider@" count="1"/>
		<option name="combatDefenseEffect" value="@(infantry^melee)^(armor1ˇarmor2ˇarmor3)~garrison@" count="2"/>
		<option name="combatOffenseEffect" value="@(ranged^infantry)~raider@" count="0"/>
		<option name="combatDefenseEffect" value="@(ranged^infantry)~garrison@" count="3"/>
		<option name="combatOffenseEffect" value="@cavalry~raider@" count="-2"/>
		<option name="combatDefenseEffect" value="@cavalry~garrison@" count="-1"/>
		<option name="combatOffenseEffect" value="@creature~raider@" count="-1"/>
		<option name="combatDefenseEffect" value="@creature~garrison@" count="-1"/>
		<option name="combatOffenseEffect" value="@flying~raider@" count="-1"/>
		<option name="combatDefenseEffect" value="@flying~garrison@" count="-1"/>
		<option name="combatOffenseEffect" value="@fortification~raider@" count="0"/>
		<option name="combatDefenseEffect" value="@fortification~garrison@" count="1"/>
		<option name="combatOffenseEffect" value="@noneˇraider^((infantry^melee)~(armor1ˇarmor2ˇarmor3))@" count="2"/>
		<option name="combatDefenseEffect" value="@noneˇgarrison^((infantry^melee)~(armor1ˇarmor2ˇarmor3))@" count="3"/>
		<option name="combatOffenseEffect" value="@noneˇraider^(infantry^melee)^(armor1ˇarmor2ˇarmor3)@" count="3"/>
		<option name="combatDefenseEffect" value="@noneˇgarrison^(infantry^melee)^(armor1ˇarmor2ˇarmor3)@" count="4"/>
		<option name="combatOffenseEffect" value="@noneˇraider^(ranged^infantry)@" count="2"/>
		<option name="combatDefenseEffect" value="@noneˇgarrison^(ranged^infantry)@" count="5"/>
		<option name="combatOffenseEffect" value="@noneˇraider^cavalry@" count="0"/>
		<option name="combatDefenseEffect" value="@noneˇgarrison^cavalry@" count="1"/>
		<option name="combatOffenseEffect" value="@noneˇraider^creature@" count="1"/>
		<option name="combatDefenseEffect" value="@noneˇgarrison^creature@" count="1"/>
		<option name="combatOffenseEffect" value="@noneˇraider^flying@" count="1"/>
		<option name="combatDefenseEffect" value="@noneˇgarrison^flying@" count="1"/>
		<option name="combatOffenseEffect" value="@noneˇraider^fortification@" count="2"/>
		<option name="combatDefenseEffect" value="@noneˇgarrison^fortification@" count="3"/>
	</attachment>

(Note: "none" is just a tag, and only one unit, named "none", has it. This is necessary to avoid empty lists.)