freeciv21 icon indicating copy to clipboard operation
freeciv21 copied to clipboard

Add some protection measures for a players alliances

Open blabber opened this issue 10 months ago • 6 comments

This is a follow-up PR for #2214 and #2239.

Closes #2177.

In games with complex alliance systems, declaring war can have unintended consequences. To protect the user from cancelling alliances by accident:

  • When declaring war would result in an alliance being cancelled, require the user to cancel the alliance first.
  • When declaring war would force one of your team mates to cancel an existing alliance, require this alliance to be cancelled first.
  • When a cease-fire running out would result in an alliance being cancelled, automatically lengthen the cease-fire until the alliance gets cancelled.

blabber avatar Apr 05 '24 22:04 blabber

On Discord at least one voice was cast against these changes: https://discord.com/channels/378908274113904641/857286127165112370/1225396755789512715

In the previous PR, there was still a discussion about whether casus belli still had to be handled in a special way. This discussion was still ongoing and started here: https://github.com/longturn/freeciv21/pull/2239#issuecomment-2028815566

blabber avatar Apr 05 '24 22:04 blabber

I've likely missed the messages about this, sorry. What was the conclusion of the revert-or-fix discussion? This doesn't seem to be a revert, but a fix in a different way than #2239? Missing some context before reviewing

lmoureaux avatar Apr 08 '24 21:04 lmoureaux

As part of beta.1 blabber was kind enough to revert an earlier patch. He also closed the PR that was supposed to "fix" the patch. This PR includes the original + fixes.

I think we should look at setting up a game or something to test this out.

jwrober avatar Apr 08 '24 21:04 jwrober

Might be good for some LTX game?

lmoureaux avatar Apr 08 '24 22:04 lmoureaux

I was leaning more towards something small to do a really good edge case test of varying scenarios. Something short and to the point. Kind of like an autogame, but with humans.

jwrober avatar Apr 08 '24 22:04 jwrober

We could use Sketlux' Soviet Revolution scenario for that. It has many players that should naturally ally and many players that won't even meet.

lmoureaux avatar Apr 25 '24 23:04 lmoureaux

I've been playing with this on a local game off and on for the past few weeks. It seems to work as expected. Merging.

jwrober avatar Jun 19 '24 20:06 jwrober