Trigger createsUnitsList count from 1 to 0 ?


  • Admin

    I have a trigger that at some point must modify a unit called “Marryk. It goes like this…

    <option name="unitProperty" value="createsUnitsList" count="1:Battle-Chicken"/>
    

    But I would also like to have it so, that when the unit “Battle-Chicken” unit is on the map, then Marryk unit does no longer generate 1:Battle-Chicken at end of turn. Then of course tried this…

    <option name="unitProperty" value="createsUnitsList" count="0:Battle-Chicken"/>
    

    But this results in an error:
    When0Battle-Chicke.png

    I cannot just use the count="-reset-" as this would also remove any other units that Marryk is generating.

    Why does the "0:Battle-Chicken" not work and just override the "1:Battle-Chicken", but instead give an error?


  • Admin

    Currently there is a check that the value is greater than 0 otherwise it throws an error. So for example, if you made the count 2 then it would work. I would have to think about whether that limitation can be changed to allow setting to 0.


  • Admin

    @Frostion I did a quick check and looks like 0 can be allowed and shouldn't cause any issues. Here is a quick PR: https://github.com/triplea-game/triplea/pull/6373. Once that is merged, you can test with the latest pre-release to see if that solves it.


  • Admin

    @redrum Nice 🙂 I will keep an eye out for this.



  • Me too - this has some intriguing applications...


Log in to reply