Update of bug #15760 (project freeciv):

         Planned Release:                   2.3.0 => 2.2.1, 2.3.0           
                 Summary: Citizens can migrate to a city with insufficient
food even with mgr_foodneeded set? => Citizens can migrate to a city with
insufficient food even with mgr_foodneeded set


Follow-up Comment #3:

Good patch, pretty much the solution I was thinking of too.

(I was thinking about the effect of this change -- one implication is that
you may now be able to stop citizens from migrating to another nation by
laying siege to their city, so that there would be no food for the

However, there is a case where migration-then-starve can still happen: if the
destination city is starving (e.g., -1 food) and there's an available tile
with e.g. 2 food. That's enough for the migrating citizen, so migration will
happen, but the city will still be starving and someone will die. See new
savegame migration1.

The attached tweak fixes this. In the (contrived) savegame migration2, the
city is starving (-1) but there is a tile with 3 food available (which
implies someone's not been paying attention). Migration is allowed in this

Also attached a version for S2_2 (trivial change for city radius).

Hmmm... I wonder if food surplus (or deficit) should affect the migration
calculation? Citizens tend to flee from starving cities? (New ticket if so.)

(file #8781, file #8782, file #8783, file #8784)

Additional Item Attachment:

File name: trunk-check-food-in-the-case-of-migration-bis.diff Size:3 KB
File name: S2_2-check-food-in-the-case-of-migration-bis.diff Size:3 KB
File name: migration1.sav.bz2             Size:16 KB
File name: migration2.sav.bz2             Size:16 KB


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to