Can a condition check how many units were built?
-
@jason-green-lowe yea was just explaining the -+ in the example. Too be clearer, hopefully heh heh, you'd want todo a condition for each rd and add it to the trigger that sees if the dudes are there or not.
So <attachment name="conditionAttachmentTurn1" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="rounds" value="1"/>
</attachment>
<attachment name="conditionAttachmentTurn1OrHigher" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="rounds" value="1-+"/>
</attachment>first one will only check rd 1
-
@beelee ahh ok just reread your post. I'll think on it a minute
-
@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

-
@beelee
:beaming_face_with_smiling_eyes:Cheers...
-
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...
-
@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 -
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...
-
@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 -
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...
-
@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!
-
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...
-
@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.
-
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...
-
What is BBR?
-
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