Author: sveinung Date: Wed May 27 17:35:35 2015 New Revision: 29128 URL: http://svn.gna.org/viewcvs/freeciv?rev=29128&view=rev Log: Allow getting caught outside of diplomat battle to cause an incident.
Tech theft, gold theft, city inciting and city sabotage can result in the unit performing the action getting caught even if no defending diplomat is present. Getting caught during a tech theft may, depending on the ruleset, cause an incident. Give ruleset authors the same option for the other actions where it's possible to get caught outside of a diplomatic battle. The bundled rulesets will still only cause an incident if the spy is caught while trying to steal a tech. See patch #6100 Modified: trunk/server/diplomats.c Modified: trunk/server/diplomats.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/diplomats.c?rev=29128&r1=29127&r2=29128&view=diff ============================================================================== --- trunk/server/diplomats.c (original) +++ trunk/server/diplomats.c Wed May 27 17:35:35 2015 @@ -763,6 +763,11 @@ nation_adjective_for_player(pplayer), unit_tile_link(pdiplomat), clink); + + /* This may cause a diplomatic incident */ + action_consequence_caught(ACTION_SPY_INCITE_CITY, pplayer, + cplayer, ctile, clink); + wipe_unit(pdiplomat, ULR_CAUGHT, cplayer); return; } @@ -878,6 +883,11 @@ nation_adjective_for_player(pplayer), unit_tile_link(pdiplomat), city_link(pcity)); + + /* This may cause a diplomatic incident */ + action_consequence_caught(action_id, pplayer, cplayer, + city_tile(pcity), city_link(pcity)); + wipe_unit(pdiplomat, ULR_CAUGHT, cplayer); return; } @@ -1038,6 +1048,11 @@ unit_tile_link(pdiplomat), improvement_name_translation(ptarget), city_link(pcity)); + + /* This may cause a diplomatic incident */ + action_consequence_caught(action_id, pplayer, cplayer, + city_tile(pcity), city_link(pcity)); + wipe_unit(pdiplomat, ULR_CAUGHT, cplayer); log_debug("sabotage: caught in capital or on city walls"); return; @@ -1144,6 +1159,10 @@ nation_adjective_for_player(act_player), unit_tile_link(act_unit), tgt_city_link); + + /* This may cause a diplomatic incident */ + action_consequence_caught(ACTION_SPY_STEAL_GOLD, act_player, + tgt_player, tgt_tile, tgt_city_link); /* Execute the caught thief. */ wipe_unit(act_unit, ULR_CAUGHT, tgt_player); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits