triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.35k stars 399 forks source link

Revised - Useless submerge subs prompt #6504

Open DanVanAtta opened 4 years ago

DanVanAtta commented 4 years ago

How can the problem be recreated?

What is an expected fix?

Clicking 'retreat' sends the sub back to the territory from whence it came, the submerge prompt seems to have no effect and probably should not be displayed in such cases.

(Optional) Additional information

This is an example scenario set up for this situation: Screenshot from 2020-05-20 19-03-40

test-revised-vs-solo-transport.tsvg.zip

Save game is captured @ SHA: edafc921297149a7ace2f41a1f8b15694a9c2a25 (May 20, 2020)

If you can get both sub and transport to miss, then you'll see the following submerge prompt: Screenshot from 2020-05-20 19-06-19

And then if you click submerge, you'll be presented with this retreat prompt: Screenshot from 2020-05-20 19-06-19

DanVanAtta commented 4 years ago

@panther2 would you mind having a look at this scenario, could you confirm that indeed a submerge prompt is incorrect and there should only be a retreat prompt?

panther2 commented 4 years ago

@DanVanAtta I have recreated the battle using a newer pre-release - and I get these windows after the dice have been rolled for both sides for the first time: 1_Retreat_by_submerge and klicking "Remain" I get: 2_Retreat_by Retreat

Indeed the Revised ruleset allows submarines to retreat by submerging. So the retreat/submerge prompt is correct. By this procedure the attacker can decide to end the battle by either staying in the embattled seazone (submerged) or leave that seazone.

DanVanAtta commented 4 years ago

Does clicking 'remain' actually lead the sub to submerging? I honestly had not considered the game engine would do that, 'Remain' typically means "remain in combat" in every other context. It seems that the "remain" option would actually be better worded as the proper submerge option.

It sounds like we probably should have one dialog with four options:

In this way it is clear submerge ends the battle and remain retains the meaning it does in other battle prompts (stays consistent). WDYT @panther2?

Cernelius commented 4 years ago

It sounds like we probably should have one dialog with four options:

Submerge Retreat Remain Ask me Later

Four options, if you have 1 submarine on the offensive. Otherwise, a number of options equal to 3 plus the number of submarines on the offensive, since you can submerge submarines individually (not sure if this applies to every ruleset) (of course, no submarine ever both submerges and retreats).

Cernelius commented 4 years ago

Also, even with an offensive force of 2 or more units of which (only) 1 is a submarine, what I understand is your full set of options, as the offender, during the "retreat" step, is:

  1. Remain in the battle with everything.
  2. Submerge the submarine and remain in the battle with everything else.
  3. Retreat everything.
  4. Submerge the submarine and retreat everything else.
  5. To which one would add the "Ask me later" utility option.
panther2 commented 4 years ago

@DanVanAtta

Does clicking 'remain' actually lead the sub to submerging?

Klicking "Submerge" in the first dialogue leads to submerging. Klicking "Remain" leads to the second dialogue.

I second @Cernelius postings.

DanVanAtta commented 4 years ago

What I see, first dialog:

On the second dialog if you clicked remain in the first:

On the second dialog, if you clicked submerge in the first:

The problem is that "remain" changes meaning depending on the selection from the first dialog. Remain generally means "stay in battle and continue combat", the changing meaning is confusing.

Cernelius commented 4 years ago

Instead of the first prompt, you should have the ability to select all units you want to submerge (in this case, from 0 to X submarines, where X is the total number of not yet submerged submarines, but there may be games in which you have different unit types able to submerge). Then, the second prompt should be unrelated to what you just submerged, since submerged units stay in the zone of the battle while anything else retreats.

Cernelius commented 4 years ago

And, of course, you can submerge units over several battle rounds, whereas retreat happens only once (though it is not necessarily the end of the battle, therefore you can still submerge in a battle round after the battle round in which you retreated (talking about land units able to submerge in partially sea borne land battles)).

DanVanAtta commented 4 years ago

Yeah, after clicking submerge we should ask how many, then if any left show the retreat dialog. Seems to make more sense

On Sat, May 23, 2020, 1:53 PM Cernelius notifications@github.com wrote:

And, of course, you can submerge units over several battle rounds, whereas retreat happens only once (though it is not necessarily the end of the battle, therefore you can still submerge in a battle round after the battle round in which you retreated (talking about land units able to submerge in partially sea borne land battles)).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/triplea-game/triplea/issues/6504#issuecomment-633138321, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6SZOJRNHE7HELQIELIJ23RTAZUDANCNFSM4NGO3KJA .

Cernelius commented 4 years ago

It should work like selecting casualties, with 0 being the default for each type. Conceptually, submerging is most similar to casualties selection, as in both cases you are removing units from the battle, selectively.

panther2 commented 4 years ago

4821 is related to this issue.

trevan commented 4 years ago

I've been looking at the retreat logic as part of the steps conversion. I can fix the issue where it retreats the sub after it has been submerged. And I can also fix the logic where it asks you to retreat even when you only have submerged subs.

trevan commented 4 years ago

7007 prevents the second dialog that asks you to retreat after you've submerged all of the units. This is a by-product of fixing the second issue mentioned in #4821