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

    CannotTarget not working

    Scheduled Pinned Locked Moved Map Making
    15 Posts 4 Posters 1.9k 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.
    • RogerCooperR Offline
      RogerCooper @redrum
      last edited by RogerCooper

      @redrum I wait until this is fully implemented before changing the scenario. Please let me know when your are ready.

      redrumR 1 Reply Last reply Reply Quote 0
      • redrumR Offline
        redrum Admin @RogerCooper
        last edited by

        @RogerCooper Ok. If you do have a zip with some of the examples you posted that would be helpful for testing.

        TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

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

          @redrum D-Day_3. Feel free to use this for testing.

          1 Reply Last reply Reply Quote 0
          • C Offline
            Cernel Moderators
            last edited by

            I remember one of the first things I thought about Axis & Allies is that battleships should not sink submarines, though in the Axis & Allies world submarines fight only when they are not submerged, and never when they are submerged, that I'm pretty sure goes completely against what everyone pictures about submarines (though reading about WW2 I, then, learned that submarines often fought on the surface, actually).

            1 Reply Last reply Reply Quote 0
            • C Offline
              Cernel Moderators
              last edited by

              So how to set "canNotTarget" and "canNotBeTargetedBy" to all air units?

              redrumR 1 Reply Last reply Reply Quote 0
              • redrumR Offline
                redrum Admin @Cernel
                last edited by

                @Cernel either use isSub or set it to any valid unit type. The engine just checks if those properties are not empty and hard code to all air units.

                TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                1 Reply Last reply Reply Quote 1
                • C Offline
                  Cernel Moderators
                  last edited by

                  Having an expanded possibility of excluding unit types from the set of eligible targets should preferably come with clearer and better ways of defining the total destruction situations, like the autoremoval of undefended transports in v3 or alone aa guns in v5.

                  I've opened a GitHub issue, for at least clarifying what currently is for the latter:
                  https://github.com/triplea-game/triplea/issues/5363

                  I've a case, I'm experimenting with, that is the following, code-wise (I'm excluding a couple of related units, namely onager and fort):

                                  <attachment name="unitAttachment" attachTo="ballista" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                           <option name="movement" value="1"/>
                                           <option name="transportCost" value="3"/>
                                           <option name="attack" value="2"/>
                                           <option name="defense" value="2"/>
                                           <option name="isFirstStrike" value="true"/>
                                           <option name="canNotTarget" value="wall:fort"/>
                                           <option name="requiresUnits" value="city"/>
                                  </attachment>
                  
                  				<attachment name="unitAttachment" attachTo="wall" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                           <option name="movement" value="0"/>
                                           <option name="attack" value="0"/>
                                           <option name="defense" value="0"/>
                                           <option name="hitPoints" value="1"/>
                                           <option name="whenHitPointsDamagedChangesInto" value="1:true:wall_breached"/>
                                           <option name="requiresUnits" value="city"/>
                                           <option name="isAir" value="true"/>
                                  </attachment>
                  				
                  				<attachment name="unitAttachment" attachTo="wall_breached" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                           <option name="isInfrastructure" value="true"/>
                                           <option name="movement" value="0"/>
                                           <option name="attack" value="0"/>
                                           <option name="defense" value="0"/>
                                           <option name="hitPoints" value="2"/>
                                           <option name="whenHitPointsRepairedChangesInto" value="0:false:wall"/>
                                  </attachment>
                  

                  Practically, this means that "ballista" cannot kill "wall", that is actually a positive disability, as the defender almost always wants to take "wall" as casualty (practically, the same concept as the "gas" of Domination NML, that is better against territories defended by trenches for the fact of being unable to hit them).

                  However, this creates the issue that you may have only ballistas attacking only walls, a battle that may never end (and will never end if the ballistas were offloaded) (practically, the same concept as ending up with only fighters or bombers against only submarines in v3).

                  I wish that, in this scenario, the walls would be destroyed, and also turning into 1 hitpoint damaged wall_breacheds. Is there a way I can already obtain this, especially with reference to having the wall behaving the same way as the v5 aa guns (I don't know what it takes)?

                  C 2 Replies Last reply Reply Quote 0
                  • C Offline
                    Cernel Moderators @Cernel
                    last edited by

                    @Cernel I meant beside making ballista into an offensive AA units that autokills infinite walls and forts if other combat units but walls and forts are absent in the territory. I suppose, for now at least, I'll do it this way; though that is going to be confusing in the generated tooltips.

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      Cernel Moderators @Cernel
                      last edited by

                      @Cernel I also wish, for example, 1 spearman attacking 10 walls alone (beside the city) could instantly destroy them all (like the v5 aa guns), but them still turning into wall_breacheds, like in the case I would keep rolling the battle until destroying them all (this is just for making the game faster and for the theory, as in practice experienced players can just edit the situation, in similar cases).

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        BaronMunchhausen @redrum
                        last edited by BaronMunchhausen

                        @redrum @Cernel

                        Hi, I'm just a newbie into all this.
                        Do you know if there is any development about being able to use these special Sub abilities?

                        If I want to restrict Subs in First Strike phase to only hit surface warships, excluding aircraft (of course) and submarine (also), do you believe this small step can be more easily implemented?

                        It will not add another screen, or other phase at all. Just make aircraft and Subs not available as valid target.

                        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