Axis & Allies Wiki
Advertisement

This attachment provides several options for applying rules to an individual player.

Property/Option Interactions:


xml Example:

<attatchment name="rulesAttatchment" attatchTo="Chinese" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">
<option name="movementRestrictionTerritories" value="Chinghai:Ningxia:Sikang:Yunnan:Hupeh:Fukien:Suiyuan:Manchuria:Kiangsu:Kwangtung"/>
<option name="movementRestrictionType" value="allowed"/>
<option name="productionPerXTerritories" value="2"/>
<option name="placementAnyTerritory" value="true"/>
<option name="placementCapturedTerritory" value="true"/>
<option name="placementPerTerritory" value="3"/>
</attatchment>

note: in order for a ruleAttachment to add Pu's during the end phase(NatO) it must still be prefixed "objectiveAttachment", any other ruleAttachment may be named as you please (as long as the names are unique per player), and NatO's can be used for all the uses described below.

<attatchment name="condition" attatchTo="Russians" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">

  <option name="turns" value="2"/>
  <option name="techs" value="warBonds" count=1/>

</attatchment> turns places restriction on which turns the RA may be satisfied. can be a list "1:3" means turns 1 and 3. can include ranges "1:3-5" means turns 1,3,4,5. use + to represent infinity "1-2:4-+" means turns 1,2,4 and every turn after 4. techs places a restriction based on which techs the player has. may be a list, count is the minimum number that must be had. count = 0 means precisely 0 (i.e. have none of the listed techs), and omitting defaults to 0.

<attatchment name="coolstuffhappens" attatchTo="Russians" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">

  <option name="trigger" value="objectiveAttachment1"/>
  <option name="frontier" value="productionRussian"/>
  <option name="placement" value="3 Sea Zone:battleship:transport" count="2"/>
  <option name="placement" value="5 Sea Zone:battleship" count="3"/>
  <option name="purchase" value="tank:cruiser" count="2"/>
  <option name="tech" value="warBonds"/>
  <option name="invert" value="true"/>

</attatchment> trigger, any ruleAttachment, this is the conditional tested to activate whatever changes this attachment represents. frontier, a frontier change. the frontier must already be defined. this _replaces_ the old frontier not adds to it. This triggers at the begining of the purchase phase.

placement adds units to the map. first string in the list should be a territory, then an arbitrary list of unitTypes, Count multiplies all listed unit types. so <option name="placement" value="3 Sea Zone:battleship:transport" count="2"/> adds 2 battleships and 2 transports. <option name="placement" value="3 Sea Zone:battleship:transport:transport" count="1"/> would add 1 battleship and 2 transports. <option name="placement" value="3 Sea Zone:battleship"/> <option name="placement" value="3 Sea Zone:transport" count="2"/> would also add 1 battleship and 2 transports (i.e. unlike usual you can stack up more than one option call) A special note about placement. you can place in enemy territories, and it will trigger a battle. this triggers at the beginning of combat movement.

purchase adds the following units the player's purchase for the turn

tech grants the corresponding technology this triggers at the end of the techadvance phase.

invert. false if omitted. if set to true this inverts the result of the triggering ruleAttachment. it does _not_ reverse the effect of this triggerAttachment. i.e. if the RA says "hold poland", then we trigger whenever we do not hold poland.

it probably to be wise to give some examples. example 1 the burma road.

the frontiers <productionFrontier name="productionChinese">

  <frontierRules name="buyInfantry"/>

</productionFrontier> <productionFrontier name="productionChineseBurma">

  <frontierRules name="buyInfantry"/>
  <frontierRules name="buyArtillery"/>

</productionFrontier> the objective <attatchment name="objectiveAttachment1" attatchTo="Chinese" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">

  <option name="objectiveValue" value="6"/>
  <option name="alliedOwnershipTerritories" value="India:Burma:Yunnan:Szechwan" count="4"/>

</attatchment> the trigger to change to art production <attatchment name="burmaOn" attatchTo="Chinese" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">

  <option name="trigger" value="objectiveAttachment1"/>
  <option name="frontier" value="productionChineseBurma"/>

</attatchment> the trigger to revert to normal production <attatchment name="burmaOff" attatchTo="Chinese" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">

  <option name="trigger" value="objectiveAttachment1"/>
  <option name="frontier" value="productionChinese"/>
  <option name="invert" value="true"/>

</attatchment>

example 2 giving tech, we give shipyards to japan if it gets some islands by turn 2. <attatchment name="pwnage" attatchTo="Japanese" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">

  <option name="alliedOwnershipTerritories" value="Java:Sumatra:Borneo:Celebes" count="4"/>
  <option name="turns" value="1:2"/>

</attatchment> <attatchment name="japanesePwnsSEA" attatchTo="Japanese" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">

  <option name="trigger" value="pwnage"/>
  <option name="tech" value="shipyards"/>

</attatchment>

example 3 french resistance, frogs start showing up on turn 3. <attatchment name="VivaLaFrance!" attatchTo="British" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">

  <option name="turns" value="3-+"/>

</attatchment> <attatchment name="sendInTheClowns" attatchTo="British" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">

  <option name="trigger" value="VivaLaFrance!"/>
  <option name="placement" value="France:froggy" count="2"/>
  <option name="placement" value="West germany:froggy"/>

</attatchment>

Advertisement