TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    Can a condition check how many units were built?

    Scheduled Pinned Locked Moved Map Making
    18 Posts 4 Posters 2.1k Views 4 Watching
    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.
    • B Offline
      beelee @beelee
      last edited by

      @beelee hmm ... yea i don't think that can be done. Or very easily. You'd need a shitload of triggers and that won't work.

      We better ask the master @wc_sumpton 🙂

      1 Reply Last reply Reply Quote 1
      • wc_sumptonW Offline
        wc_sumpton @beelee
        last edited by

        @beelee
        :beaming_face_with_smiling_eyes:

        Cheers...

        1 Reply Last reply Reply Quote 1
        • wc_sumptonW Offline
          wc_sumpton @Jason Green-Lowe
          last edited by

          @jason-green-lowe

          Sorry no. You can't save values in TripleA. A condition could be used to check for greater than 'X' units, compared to another condition that checks for less than 'X' units. Just to check for up to 3 units would take about 9 conditions, so to check for 100 units, would take up to 900 conditions. If these conditions were created, there would be no place to store the answer, and yet another 900 conditions would need to be checked for the increase.

          And even if you could do something like 'save the value as a unit', you would still have the problem of querying produced units, which also cannot be done.

          Sorry, I can think of no workaround for these limitations.

          Cheers...

          B 1 Reply Last reply Reply Quote 1
          • B Offline
            beelee @wc_sumpton
            last edited by beelee

            @wc_sumpton would a "special" unit that gets built and then turns into a "normal" one possibly work ? Like would change at endtTurn ?

            edit
            or next turn i guess lol Start of next players turn ? idk lol

            wc_sumptonW 1 Reply Last reply Reply Quote 0
            • wc_sumptonW Offline
              wc_sumpton @beelee
              last edited by

              @beelee

              The problem is not the unit, but the counting of units to determine if objective for USA is achieved. @Jason-Green-Lowe wants to know if the units in the Western US territory have increased by 2 between the end of Noncombat Movement, and the end of the Placement phase. And if these units were purchased during that player turn. Maybe the count can be finagled, but there is no way to determine when these units were purchased.

              Cheers...

              B 1 Reply Last reply Reply Quote 1
              • B Offline
                beelee @wc_sumpton
                last edited by beelee

                @wc_sumpton can a little tiny almost invisible tty be added and then those units get moved to Western USA ?

                Edit
                or maybe a box ?
                Can check the box then at when could change to WUSA

                Jason Green-LoweJ 1 Reply Last reply Reply Quote 1
                • wc_sumptonW Offline
                  wc_sumpton @Jason Green-Lowe
                  last edited by

                  @jason-green-lowe

                  The only way I can think of to accomplish this is to ask USA if they wish to produce the 2 infantry units for Western US.

                  Cheers...

                  1 Reply Last reply Reply Quote 0
                  • Jason Green-LoweJ Offline
                    Jason Green-Lowe @beelee
                    last edited by

                    @beelee This ought to work, I think. Put a minor factory in the box, allow the US player to deploy units there if he wishes, and then have a condition check after placement if there are 2+ units in that box. If so, the player gets their bonus PUs. Immediately afterward, if there are 1+ units in the box, then another trigger automatically moves the units from the box to the main Western US territory. The box is not adjacent to Western US, so players cannot cheat by moving units back into the box.

                    Thanks for the idea!

                    wc_sumptonW 1 Reply Last reply Reply Quote 0
                    • wc_sumptonW Offline
                      wc_sumpton @Jason Green-Lowe
                      last edited by

                      @jason-green-lowe

                      Going a step further, and playing off of @beelee brilliant out of the box thinking, allow the USA to only purchase 'mock Infantry'. Which are the same as regular infantry to fool the AI, with the added ability 'createsUnitsList', to create an infantry unit at the end of the USA turn. Check Western US for the necessary 'mock infantry', then remove.

                      LOL sometime @beelee has the strangest of ideas!!

                      Cheers...

                      Jason Green-LoweJ 1 Reply Last reply Reply Quote 0
                      • Jason Green-LoweJ Offline
                        Jason Green-Lowe @wc_sumpton
                        last edited by

                        @wc_sumpton Well, that's interesting, but the way I'm supposed to make this NO work is that the units can be any units at all -- including sea units in the adjacent sea zone. Creating ~15 new unit types with associated triggers sounds like trouble.

                        wc_sumptonW 1 Reply Last reply Reply Quote 0
                        • wc_sumptonW Offline
                          wc_sumpton @Jason Green-Lowe
                          last edited by

                          @jason-green-lowe

                          Let's talk about the counting first. Western US and two adjacent sea zones, Sea Zone 1 and Sea Zone 2:

                          <!-- Checking to see if a territory has two units -->
                          <attachment name="conditionAttachment2UnitsIn1Territory" attachTo="USA" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                             <option name="directPresenceTerritories" value="Western US:Sea Zone 1:Sea Zone 2" count="1"/>
                             <option name="unitPresence" value="mock_Infantry:mock_Armor:etc..." count="2"/>
                          </attachment>
                          
                          <!-- Checking to see if 2 territories have 1 unit -->
                          <attachment name="conditionAttachment1UnitIn2Territories" attachTo="USA" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                             <option name="directPresenceTerritories" value="Western US:Sea Zone 1:Sea Zone 2" count="2"/>
                             <option name="unitPresence" value="mock Infantry:mock Armor:etc..." count="1"/>
                          </attachment>
                          

                          With two conditions, using mock units, it is easier to determine the additional units.

                          Cheers...

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

                            What is BBR?

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

                              @rogercooper

                              Bloodbath Rules

                              Cheers...

                              1 Reply Last reply Reply Quote 0

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              • 1 / 1
                              • First post
                                Last post
                              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums