Summary: Citizens can migrate to a city with insufficient
food even with mgr_foodneeded set?
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Thursday 04/01/10 at 01:54
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 2.2.0
         Discussion Lock: Any
        Operating System: None
         Planned Release: 



With the migration and mgr_foodneeded options both set on the server,
do_city_migration() prevents migration if the proposed destination city
currently has a food surplus of less than zero (i.e., it's already

However, that's not sufficient to be sure that the city will have enough food
for the incoming citizens. Often the new citizens will be able to feed
themselves from the land, but it's not guaranteed, for instance if only
barren terrain remains unworked.

The attached (contrived) save game shows a citizen migrating and then
immediately starving to death, even with mgr_foodneeded set.

Wouldn't it be better to test for a food surplus of 2 or more? In that case,
the citizen will definitely not starve, although the city may never grow

I can trivially patch this, just wanted to check that I hadn't missed the
point first.


File Attachments:

Date: Thursday 04/01/10 at 01:54  Name: migration0.sav.bz2  Size: 16kB   By:
S2_2 savegame: citizen migrates then starves


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to