Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule problem: should not offer option to retreat #4688

Open
panther2 opened this issue Feb 16, 2019 · 10 comments
Open

Rule problem: should not offer option to retreat #4688

panther2 opened this issue Feb 16, 2019 · 10 comments
Labels
Impact: Bad Game Rules Core game rules are not enforced properly and require an edit to fix. Problem A problem, bug, defect - something to fix

Comments

@panther2
Copy link
Contributor

panther2 commented Feb 16, 2019

Engine version

1.9.0.0.13066
1.10.14019

Map name

ww2-global_1940

Can you describe how to trigger the error? (eg: what sequence of actions will recreate it?)

(1) only a defending AAA-gun is left.

TripleA should not offer the attacker's option to retreat, if after a round of combat only a defending AAA-gun is left. In the attached savegames (1.9/1.10) the remaining infantry is incorrectly offered a retreat option when facing only a "defending" AAA gun.

(2) only a "defending" Transport is left

TripleA should not offer the attacker's option to retreat, if after a round of combat in a seazone only a "defending" Transport is left. In the attached savegame (1.10) the attacking submarines are incorrectly given the option to retreat/submerge:
subs

Instead of this error, what should have happened?

(1) The AAA gun is autodestroyed, the territory is taken by the attacker. There is nothing to retreat from.

(2) The defending destroyer transport should be autodestroyed.

Any additional information that may help

Reference: #1270, an issue that had already been solved is back again.

@simon33-2 mentioned in https://www.axisandallies.org/forums/post/1258083

What about the retreat rules? Issue #1270. #2080 was reverted due to performance problems in #2544. So there’s still problems - if you attack and only have a transport or an AA Gun defending, you are still permitted a retreat.

I could reproduce the AA Gun issue as mentioned above:
savedGames.zip

The transport issue is reproducible in case the attacking units are submarines:
defTrp_2.zip
(1.10 file here)

@panther2 panther2 changed the title Re-introduction of a retreat rule issue Re-introduction of retreat rule issues Feb 16, 2019
@simon33-2
Copy link
Contributor

Just pointing out there is a typo above where you say "destroyer" instead of "transport"

Also, there's a good improvement here potentially, that when you send a sub to kill an undefended transport, you shouldn't get a prompt to submerge the sub like you do in 1.9.

There's actually two ways of achieving this, I was thinking you'd need an incompatible release way (1) is to change the order so that undefended transports are removed before the submerge prompt (2) is to remove the prompt when only defenseless units are defending.

Actually (2) may be better because in (1) you would still get the submerge prompt which would be annoying.

@panther2
Copy link
Contributor Author

panther2 commented Feb 17, 2019

Just pointing out there is a typo above where you say "destroyer" instead of "transport"

Fixed that, thank you @simon33-2 .

@DanVanAtta DanVanAtta changed the title Re-introduction of retreat rule issues Rule problem: should not offer option to retreat Feb 19, 2019
@DanVanAtta DanVanAtta added Impact: Bad Game Rules Core game rules are not enforced properly and require an edit to fix. Problem A problem, bug, defect - something to fix labels Feb 19, 2019
@ron-murhammer
Copy link
Member

@panther2 It appears the check for submerging subs is done before the check for undefended transports. Would flipping the order of those 2 checks solve the issue? Or would that create a different problem?

@panther2
Copy link
Contributor Author

panther2 commented Apr 26, 2019

@ron-murhammer
In case there are undefended transports the battle ends with the transports being destroyed and the subs remaining. So there shouldn't be an offer for the subs to submerge/retreat at all. If that was the (only) result of your idea it would be fine.

Regarding possible different problems: Is there anything else behind the check for undefended transports?

@Cernelius
Copy link
Contributor

Since TripleA is not only about some games, and I guess you are not hardcoding this to work only with these specific games and nothing else, I believe you should also decide what that AA gun rule means in general terms. Like, does it mean that anytime the defender has no rolls available (also notice that this doesn't mean all cases you are powerless, as you may also have some rolls hitting at 0, thus never; still, in this case, you would have 0 total strength yet not 0 rolls (so, a unit with 0 rolls would be autodestroyed while a unit with 1 roll at 0 wouldn't)), then all defending not-infrastructure units are autodestroyed and the attacker cannot retreat? Or adding a unit option to define if that unit is autodestroyed if only such units are left, beside infrastructures? Or what?

In any case, I suggest this matter being discussed in forum, as it is liable to impact on present and future custom games (for example, the trenches of Domination 1914).

DanVanAtta added a commit that referenced this issue May 21, 2020
If subs are attacking undefended V3 transports, or if after
a round of combat only V3 transports are left, then subs should
not be able to retreat and the transports are auto-destroyed.

This update adds a check to see if we have such a case and if so
skips the subs submerge prompt.

Address: Part (2) of #4688
@DanVanAtta
Copy link
Member

I've proposed a fix for part (2) relating to the subs with: #6505

#6505 adds a check if subs are attacking only undefended transports. If so, then the submerge prompt is suppressed and in both cases of attacking only undefended transports or if we have at the end of combat killed all non-transports, then the undefended transports are auto-destroyed and there is no option to submerge.

@Cernelius
Copy link
Contributor

Can we please have, for custom games, a property for allowing retreating when all enemy units left are defenceless (basically, keeping the current behaviour as an option for gamemakers that prefer it)?

I personally prefer the current (wrong) behaviour, as it avoids the (in my opinion weird) trick of selectively removing your non-defenceless units to take away the option to retreat from your opponent.

@DanVanAtta
Copy link
Member

@Cernelius I'm not sure that applies here. The transport in this case is not eligible as a casualty. For example, 3 subs vs 1 cruiser and 1 transport, the cruiser is the only available casualty selection and is auto-selected.

If the transport is available as casualty, then A) I don't think that is in the scope of this problem report, and B) would not change with #6505

@Cernelius
Copy link
Contributor

Cernelius commented May 21, 2020

@Cernelius I'm not sure that applies here. The transport in this case is not eligible as a casualty. For example, 3 subs vs 1 cruiser and 1 transport, the cruiser is the only available casualty selection and is auto-selected.

If you mean the second paragraph at my previous post, correct, as, since you must always take transports last, there is no trick in this case (still, in this case, I think it makes sense that you can decide to retreat instead of proceeding finishing off all transports left, but I would agree this is consistent with the fact that, on land, you must conquer a territory after destroying all enemy war units in it). However, I was actually referring to the v5 aaGun case (but it also applies to any custom maps having defenceless war units that are not deprioritized, for example the trenches of D1914NML), where, as the defender, if you take a number of hits that is less that the total hitpoints you have in the battle but as many as or more than the total hitpoints discounting the defenceless units, then you can take out all defenceless units, obliging the attacker automatically to destroy the remaining defenceless units, thus making it unable to retreat.

I'll use D1914NML, with Low Luck enabled and no Tech, to make an example of what I mean.

6 infantry and 6 field_gun attack 1 territory defended by 2 trench and 1 infantry. During the first round of combat, the defender takes out 1 infantry and 1 trench, while only 1 damaged trench remains in the battle, on the defensive side.

CURRENT BEHAVIOUR: The attacker can retreat.
CORRECT BEHAVIOUR: The attacker cannot retreat and it is forced to kill the remaining trench and take the territory.

The consequence of that is that, under the correct behaviour, you can never strafe such a territory safely, as the defender can always pull the trick of taking out the infantry (thus, even if you score only 1 hit, the defender can take out the infantry and leave 4 hitpoints of trenches that you will be obliged to kill).

I personally prefer the current wrong behaviour, so I was suggesting leaving it as an option (property) for mapmakers. I also guess the players of D1914NML are currently playing by the (wrong) engine behaviour, since I'm under the impression either almost no one reads any rulebooks or most people just prefer going with the engine anyway, or both.

DanVanAtta added a commit that referenced this issue May 22, 2020
…ts (#6505)

If subs are attacking undefended V3 transports, or if after
a round of combat only V3 transports are left, then subs should
not be able to retreat and the transports are auto-destroyed.

This update adds a check to see if we have such a case and if so
skips the subs submerge prompt.

Address: Part (2) of #4688
@simon33-2
Copy link
Contributor

I agree with @Cernelius .

I just wonder if there is a better way of requiring units to be taken as casualties last. I tried to enable that a while back for AA Guns but couldn't see a way of doing it.

Should there be a separate property on the unit attachment which forces it to be taken last (or even a group number) and/or a property which causes that unit type to not be counted for the purposes of determining if a retreat is valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: Bad Game Rules Core game rules are not enforced properly and require an edit to fix. Problem A problem, bug, defect - something to fix
Projects
None yet
Development

No branches or pull requests

5 participants