Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    option name="unitPresence" value="Unit" count="0"

    Map Making
    4
    5
    263
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ebbe
      ebbe last edited by ebbe

      hej triple A code wizards! trying to solve another issue here (and kindly request some advice:)

      I want to have 1 specific unit automatically being replaced (by purchase) when slain
      *( why? representing automatic successsion of Clan leaders by a family member and keeping AI always with a leader ingame/ with only 1 turn absence; * )

      I tried to work with different variations of
      <option name="unitPresence" value="Daimyo" count="0"/> but it doesn't work,
      not on its own, not if combined with a <option name="directPresenceTerritories" value="map" count="1"/> or a "alliedExclusionTerritories"

        <attachment foreach="$AllRegularClans$:$AllRegularClansLC$" name="conditionAttachment_No_Daimyo_@AllRegularClans@" attachTo="@AllRegularClans@" javaClass="RulesAttachment" type="player">
              <option name="directPresenceTerritories" value="map" count="1"/>
              <option name="unitPresence" value="Daimyo" count="0"/>
               <option name="unitPresence" value="Shiro_(Castle):Shiro_1Hit:Kyuden_(Palace):Kyuden_1Hit:Jousai_(Citadel):Jousai_1Hit" count="1"/>
              <option name="rounds" value="2-+"/>
      	</attachment>
      	<attachment foreach="$AllRegularClans$:$AllRegularClansLC$" name="triggerAttachment_Place_New_Daimyo_@AllRegularClans@" attachTo="@AllRegularClans@" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachment_No_Daimyo_@AllRegularClans@"/>
      	    	<option name="when" value="before:@AllRegularClansLC@Purchase"/>
      	    	<option name="purchase" value="Daimyo" count="1"/>
        </attachment>
      

      what occurs now is that the Daimyo is purchased every turn now, whether he is on the map, or not. grrrrrr

      anyone got a clue or example?

      Jason Green-Lowe 1 Reply Last reply Reply Quote 1
      • Jason Green-Lowe
        Jason Green-Lowe @ebbe last edited by

        @ebbe Have you tried directExclusionTerritories? I think that would be the proper way to do it.

        AlliedExclusionTerritories would fail to trigger if any of your allies have a Daimyo on the map, and I imagine that's usually the case if each clan is supposed to have its own Daimyo most of the time.

        DirectPresenceTerritories is behaving as it was designed (although not how you want it to) by adding a Daimyo whenever there are 0 or more Daimyos on the map for your clan, i.e., always.

        1 Reply Last reply Reply Quote 1
        • W
          wc_sumpton last edited by

          @ebbe

          Try:

             <option name="unitPresence" value="Daimyo" count="1"/>
             <option name="invert" value="true"/>
          

          Thus if there is 1 or more "Daimyo"s the invert of the true statement will make if false, but if there is no Daimyo, the statement will be inverted to true!

          Cheers...

          RogerCooper 1 Reply Last reply Reply Quote 1
          • RogerCooper
            RogerCooper @wc_sumpton last edited by

            You could also make the Daimyo a cheap unit, but sent maxBuiltPerPlayer to 1.

            ebbe 1 Reply Last reply Reply Quote 0
            • ebbe
              ebbe @RogerCooper last edited by

              @rogercooper thanks for all feedback: this is the current trick I use.... but I like to free some space in the purchasing panel... 😉

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums