freeciv21
freeciv21 copied to clipboard
Add some protection measures for a players alliances
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.
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
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
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.
Might be good for some LTX game?
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.
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.
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.