Author: sveinung Date: Mon Dec 29 12:46:02 2014 New Revision: 27440 URL: http://svn.gna.org/viewcvs/freeciv?rev=27440&view=rev Log: AI: Only units capable of spy actions vs a city can reserve a city.
Reported by Marko Lindqvist <cazfi> See bug #23120 Modified: trunk/ai/default/aidata.c Modified: trunk/ai/default/aidata.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aidata.c?rev=27440&r1=27439&r2=27440&view=diff ============================================================================== --- trunk/ai/default/aidata.c (original) +++ trunk/ai/default/aidata.c Mon Dec 29 12:46:02 2014 @@ -206,7 +206,15 @@ BV_CLR_ALL(ai->stats.diplomat_reservations); unit_list_iterate(pplayer->units, punit) { - if (is_actor_unit(punit) + if ((unit_can_do_action(punit, ACTION_SPY_POISON) + || unit_can_do_action(punit, ACTION_SPY_SABOTAGE_CITY) + || unit_can_do_action(punit, ACTION_SPY_TARGETED_SABOTAGE_CITY) + || unit_can_do_action(punit, ACTION_SPY_INCITE_CITY) + || unit_can_do_action(punit, ACTION_ESTABLISH_EMBASSY) + || unit_can_do_action(punit, ACTION_SPY_STEAL_TECH) + || unit_can_do_action(punit, ACTION_SPY_TARGETED_STEAL_TECH) + || unit_can_do_action(punit, ACTION_SPY_INVESTIGATE_CITY) + || unit_can_do_action(punit, ACTION_SPY_STEAL_GOLD)) && def_ai_unit_data(punit, ait)->task == AIUNIT_ATTACK) { /* Heading somewhere on a mission, reserve target. */ struct city *pcity = tile_city(punit->goto_tile); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits