Summary: Civil war should try to avoid conflicts_with nations
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Fri Jul 27 22:46:38 2012
                Category: None
                Severity: 2 - Minor
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: jtn
        Originator Email: 
             Open/Closed: Open
                 Release: 2.3.2
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.3.3,2.4.0,2.5.0



Currently, when picking a civil war nation, no attempt is made to avoid
nations which conflict with a nation in the game -- ignore_conflicts is set in

This means that the game can end up with nations with gratuitously clashing
flags (e.g. Scottish and Scottish Gaelic).

It would be better if it at least tried to avoid conflicting nations first,
and only used them if unavoidable.

This patch unsets ignore_conflicts in this case (split_player()), and in
addition, changes pick_a_nation so that if it falls back to conflicting
nations, it revisits any supplied choice list. So in descending order of
preference we pick:
* a non-conflicting nation from the civilwar list
* a random non-conflicting nation
* a conflicting nation from the civilwar list
* a random conflicting nation

(This change in behaviour of pick_a_nation() can't affect anything else, as it
only makes a difference when a choice list is supplied, which only happens in
civil war, which can't ever reach this bit of code before this patch.)


File Attachments:

Date: Fri Jul 27 22:46:38 2012  Name:
trunk-S2_4-S2_3-civilwar-avoid-conflicts.patch  Size: 3kB   By: jtn



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to