Author: cazfi Date: Fri Jan 22 16:32:26 2016 New Revision: 31538 URL: http://svn.gna.org/viewcvs/freeciv?rev=31538&view=rev Log: Barbarians may continue pillaging even when they have move points, so they sometimes finish it.
See bug #23305 Modified: branches/S2_5/ai/default/aiunit.c Modified: branches/S2_5/ai/default/aiunit.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/ai/default/aiunit.c?rev=31538&r1=31537&r2=31538&view=diff ============================================================================== --- branches/S2_5/ai/default/aiunit.c (original) +++ branches/S2_5/ai/default/aiunit.c Fri Jan 22 16:32:26 2016 @@ -1659,6 +1659,13 @@ struct city *pcity = NULL; CHECK_UNIT(punit); + + /* Barbarians pillage, and might keep on doing that so they sometimes + * even finish it. */ + if (punit->activity == ACTIVITY_PILLAGE && is_barbarian(pplayer) + && fc_rand(2) == 1) { + return; + } /* First find easy nearby enemies, anything better than pillage goes. * NB: We do not need to repeat dai_military_rampage, it is repeats itself _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits