CannotTarget not working
-
@redrum I wait until this is fully implemented before changing the scenario. Please let me know when your are ready.
-
@RogerCooper Ok. If you do have a zip with some of the examples you posted that would be helpful for testing.
-
-
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).
-
So how to set "canNotTarget" and "canNotBeTargetedBy" to all air units?
-
@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.
-
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/5363I'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)?
-
@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.
-
@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).
-
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.
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