Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #691637 » 3.1-Escape-split-the-action-Poison-City.patch

Sveinung Kvilhaugsvik, 2017-08-18 06:48 PM

View differences:

ai/default/aicity.c
1187 1187

  
1188 1188
  /* Bad for the city owner. */
1189 1189
  case ACTION_SPY_POISON:
1190
  case ACTION_SPY_POISON_ESC:
1190 1191
  case ACTION_SPY_SABOTAGE_CITY:
1191 1192
  case ACTION_SPY_SABOTAGE_CITY_ESC:
1192 1193
  case ACTION_SPY_TARGETED_SABOTAGE_CITY:
ai/default/aidata.c
217 217
  BV_CLR_ALL(ai->stats.diplomat_reservations);
218 218
  unit_list_iterate(pplayer->units, punit) {
219 219
    if ((unit_can_do_action(punit, ACTION_SPY_POISON)
220
         || unit_can_do_action(punit, ACTION_SPY_POISON_ESC)
220 221
         || unit_can_do_action(punit, ACTION_SPY_SABOTAGE_CITY)
221 222
         || unit_can_do_action(punit, ACTION_SPY_SABOTAGE_CITY_ESC)
222 223
         || unit_can_do_action(punit, ACTION_SPY_TARGETED_SABOTAGE_CITY)
ai/default/aidiplomat.c
456 456
  T(ACTION_STEAL_MAPS, 0);
457 457

  
458 458
  /* last resort */
459
  T(ACTION_SPY_POISON_ESC, 0);
459 460
  T(ACTION_SPY_POISON, 0);
460 461

  
461 462
   /* absolutely last resort */
......
492 493
              || utype_can_do_action(unit_type_get(punit),
493 494
                                     ACTION_SPY_POISON)
494 495
              || utype_can_do_action(unit_type_get(punit),
496
                                     ACTION_SPY_POISON_ESC)
497
              || utype_can_do_action(unit_type_get(punit),
495 498
                                     ACTION_SPY_STEAL_GOLD)
496 499
              || utype_can_do_action(unit_type_get(punit),
497 500
                                     ACTION_SPY_STEAL_GOLD_ESC)
client/gui-gtk-3.0/action_dialog.c
815 815
}
816 816

  
817 817
/****************************************************************
818
  User selected "Poison City Escape" from choice dialog
819
*****************************************************************/
820
static void spy_poison_esc_callback(GtkWidget *w, gpointer data)
821
{
822
  struct action_data *args = (struct action_data *)data;
823

  
824
  if (NULL != game_unit_by_number(args->actor_unit_id)
825
      && NULL != game_city_by_number(args->target_city_id)) {
826
    request_do_action(ACTION_SPY_POISON_ESC, args->actor_unit_id,
827
                      args->target_city_id, 0, "");
828
  }
829

  
830
  gtk_widget_destroy(act_sel_dialog);
831
  free(args);
832
}
833

  
834
/****************************************************************
818 835
  User selected suitcase nuke from choice dialog
819 836
*****************************************************************/
820 837
static void spy_nuke_city_callback(GtkWidget *w, gpointer data)
......
1637 1654
  [ACTION_SPY_INVESTIGATE_CITY] = (GCallback)spy_investigate_callback,
1638 1655
  [ACTION_INV_CITY_SPEND] = (GCallback)diplomat_investigate_callback,
1639 1656
  [ACTION_SPY_POISON] = (GCallback)spy_poison_callback,
1657
  [ACTION_SPY_POISON_ESC] = (GCallback)spy_poison_esc_callback,
1640 1658
  [ACTION_SPY_STEAL_GOLD] = (GCallback)spy_steal_gold_callback,
1641 1659
  [ACTION_SPY_STEAL_GOLD_ESC] = (GCallback)spy_steal_gold_esc_callback,
1642 1660
  [ACTION_STEAL_MAPS] = (GCallback)spy_steal_maps_callback,
client/gui-gtk-3.22/action_dialog.c
815 815
}
816 816

  
817 817
/****************************************************************
818
  User selected "Poison City Escape" from choice dialog
819
*****************************************************************/
820
static void spy_poison_esc_callback(GtkWidget *w, gpointer data)
821
{
822
  struct action_data *args = (struct action_data *)data;
823

  
824
  if (NULL != game_unit_by_number(args->actor_unit_id)
825
      && NULL != game_city_by_number(args->target_city_id)) {
826
    request_do_action(ACTION_SPY_POISON_ESC, args->actor_unit_id,
827
                      args->target_city_id, 0, "");
828
  }
829

  
830
  gtk_widget_destroy(act_sel_dialog);
831
  free(args);
832
}
833

  
834
/****************************************************************
818 835
  User selected suitcase nuke from choice dialog
819 836
*****************************************************************/
820 837
static void spy_nuke_city_callback(GtkWidget *w, gpointer data)
......
1631 1648
  [ACTION_SPY_INVESTIGATE_CITY] = (GCallback)spy_investigate_callback,
1632 1649
  [ACTION_INV_CITY_SPEND] = (GCallback)diplomat_investigate_callback,
1633 1650
  [ACTION_SPY_POISON] = (GCallback)spy_poison_callback,
1651
  [ACTION_SPY_POISON_ESC] = (GCallback)spy_poison_esc_callback,
1634 1652
  [ACTION_SPY_STEAL_GOLD] = (GCallback)spy_steal_gold_callback,
1635 1653
  [ACTION_SPY_STEAL_GOLD_ESC] = (GCallback)spy_steal_gold_esc_callback,
1636 1654
  [ACTION_STEAL_MAPS] = (GCallback)spy_steal_maps_callback,
client/gui-gtk-4.0/action_dialog.c
815 815
}
816 816

  
817 817
/****************************************************************
818
  User selected "Poison City Escape" from choice dialog
819
*****************************************************************/
820
static void spy_poison_esc_callback(GtkWidget *w, gpointer data)
821
{
822
  struct action_data *args = (struct action_data *)data;
823

  
824
  if (NULL != game_unit_by_number(args->actor_unit_id)
825
      && NULL != game_city_by_number(args->target_city_id)) {
826
    request_do_action(ACTION_SPY_POISON_ESC, args->actor_unit_id,
827
                      args->target_city_id, 0, "");
828
  }
829

  
830
  gtk_widget_destroy(act_sel_dialog);
831
  free(args);
832
}
833

  
834
/****************************************************************
818 835
  User selected suitcase nuke from choice dialog
819 836
*****************************************************************/
820 837
static void spy_nuke_city_callback(GtkWidget *w, gpointer data)
......
1631 1648
  [ACTION_SPY_INVESTIGATE_CITY] = (GCallback)spy_investigate_callback,
1632 1649
  [ACTION_INV_CITY_SPEND] = (GCallback)diplomat_investigate_callback,
1633 1650
  [ACTION_SPY_POISON] = (GCallback)spy_poison_callback,
1651
  [ACTION_SPY_POISON_ESC] = (GCallback)spy_poison_esc_callback,
1634 1652
  [ACTION_SPY_STEAL_GOLD] = (GCallback)spy_steal_gold_callback,
1635 1653
  [ACTION_SPY_STEAL_GOLD_ESC] = (GCallback)spy_steal_gold_esc_callback,
1636 1654
  [ACTION_STEAL_MAPS] = (GCallback)spy_steal_maps_callback,
client/gui-qt/dialogs.cpp
88 88
static void diplomat_steal(QVariant data1, QVariant data2);
89 89
static void diplomat_steal_esc(QVariant data1, QVariant data2);
90 90
static void spy_poison(QVariant data1, QVariant data2);
91
static void spy_poison_esc(QVariant data1, QVariant data2);
91 92
static void spy_steal_gold(QVariant data1, QVariant data2);
92 93
static void spy_steal_gold_esc(QVariant data1, QVariant data2);
93 94
static void spy_steal_maps(QVariant data1, QVariant data2);
......
160 161
  action_function[ACTION_SPY_INVESTIGATE_CITY] = spy_investigate;
161 162
  action_function[ACTION_INV_CITY_SPEND] = diplomat_investigate;
162 163
  action_function[ACTION_SPY_POISON] = spy_poison;
164
  action_function[ACTION_SPY_POISON_ESC] = spy_poison_esc;
163 165
  action_function[ACTION_SPY_STEAL_GOLD] = spy_steal_gold;
164 166
  action_function[ACTION_SPY_STEAL_GOLD_ESC] = spy_steal_gold_esc;
165 167
  action_function[ACTION_SPY_SABOTAGE_CITY] = diplomat_sabotage;
......
2419 2421
}
2420 2422

  
2421 2423
/***************************************************************************
2424
  Action Poison City Escape for choice dialog
2425
***************************************************************************/
2426
static void spy_poison_esc(QVariant data1, QVariant data2)
2427
{
2428
  int diplomat_id = data1.toInt();
2429
  int diplomat_target_id = data2.toInt();
2430

  
2431
  if (NULL != game_unit_by_number(diplomat_id)
2432
      && NULL != game_city_by_number(diplomat_target_id)) {
2433
    request_do_action(ACTION_SPY_POISON_ESC,
2434
                      diplomat_id, diplomat_target_id, 0, "");
2435
  }
2436
}
2437

  
2438
/***************************************************************************
2422 2439
  Action suitcase nuke for choice dialog
2423 2440
***************************************************************************/
2424 2441
static void spy_nuke_city(QVariant data1, QVariant data2)
client/gui-qt/menu.cpp
1488 1488
  action_vs_city->addAction(act);
1489 1489
  connect(act, SIGNAL(triggered()), this, SLOT(slot_action_vs_city()));
1490 1490

  
1491
  act = action_city_menu->addAction(_("Poison City Escape"));
1492
  act->setCheckable(true);
1493
  act->setChecked(false);
1494
  act->setData(ACTION_SPY_POISON_ESC);
1495
  action_vs_city->addAction(act);
1496
  connect(act, SIGNAL(triggered()), this, SLOT(slot_action_vs_city()));
1497

  
1491 1498
  /* Civilization menu */
1492 1499
  menu = this->addMenu(_("Civilization"));
1493 1500
  act = menu->addAction(_("Tax Rates..."));
client/gui-sdl2/action_dialog.c
379 379
  return -1;
380 380
}
381 381

  
382
/***************************************************************************
383
  User clicked "Poison City Escape"
384
***************************************************************************/
385
static int spy_poison_esc_callback(struct widget *pWidget)
386
{
387
  if (Main.event.button.button == SDL_BUTTON_LEFT) {
388
    if (NULL != game_unit_by_number(pDiplomat_Dlg->actor_unit_id)
389
        && NULL != game_city_by_number(
390
          pDiplomat_Dlg->target_ids[ATK_CITY])) {
391
      request_do_action(ACTION_SPY_POISON_ESC, pDiplomat_Dlg->actor_unit_id,
392
                        pDiplomat_Dlg->target_ids[ATK_CITY],
393
                        0, "");
394
    }
395

  
396
    popdown_diplomat_dialog();
397
  }
398

  
399
  return -1;
400
}
401

  
382 402
/****************************************************************
383 403
  User clicked "Suitcase Nuke"
384 404
*****************************************************************/
......
1408 1428
  [ACTION_SPY_INVESTIGATE_CITY] = spy_investigate_callback,
1409 1429
  [ACTION_INV_CITY_SPEND] = diplomat_investigate_callback,
1410 1430
  [ACTION_SPY_POISON] = spy_poison_callback,
1431
  [ACTION_SPY_POISON_ESC] = spy_poison_esc_callback,
1411 1432
  [ACTION_SPY_STEAL_GOLD] = spy_steal_gold_callback,
1412 1433
  [ACTION_SPY_STEAL_GOLD_ESC] = spy_steal_gold_esc_callback,
1413 1434
  [ACTION_STEAL_MAPS] = spy_steal_maps_callback,
client/helpdata.c
2513 2513
        CATLSTR(buf, bufsz,
2514 2514
                _("  * Veterans have improved chances in diplomatic "
2515 2515
                  "contests.\n"));
2516
        if ((utype_has_flag(utype, UTYF_SPY) &&
2517
             utype_can_do_action(utype, ACTION_SPY_POISON))
2516
        if (utype_can_do_action(utype, ACTION_SPY_POISON_ESC)
2518 2517
            || utype_can_do_action(utype, ACTION_SPY_SABOTAGE_UNIT_ESC)
2519 2518
            || utype_can_do_action(utype, ACTION_SPY_STEAL_TECH_ESC)
2520 2519
            || utype_can_do_action(utype, ACTION_SPY_TARGETED_STEAL_TECH_ESC)
client/packhand.c
4532 4532
      case ACTION_SPY_INVESTIGATE_CITY:
4533 4533
      case ACTION_INV_CITY_SPEND:
4534 4534
      case ACTION_SPY_POISON:
4535
      case ACTION_SPY_POISON_ESC:
4535 4536
      case ACTION_SPY_STEAL_GOLD:
4536 4537
      case ACTION_SPY_STEAL_GOLD_ESC:
4537 4538
      case ACTION_SPY_SABOTAGE_CITY:
common/actions.c
330 330
{
331 331
  actions[ACTION_SPY_POISON] = action_new(ACTION_SPY_POISON, ATK_CITY,
332 332
                                          TRUE, FALSE, FALSE, TRUE,
333
                                          0, 1, FALSE);
333
                                          0, 1, TRUE);
334
  actions[ACTION_SPY_POISON_ESC] =
335
      action_new(ACTION_SPY_POISON_ESC, ATK_CITY,
336
                 TRUE, FALSE, FALSE, TRUE,
337
                 0, 1, FALSE);
334 338
  actions[ACTION_SPY_SABOTAGE_UNIT] =
335 339
      action_new(ACTION_SPY_SABOTAGE_UNIT, ATK_UNIT,
336 340
                 TRUE, FALSE, FALSE, TRUE,
......
779 783
  case ACTION_ATTACK:
780 784
    return ABK_STANDARD;
781 785
  case ACTION_SPY_POISON:
786
  case ACTION_SPY_POISON_ESC:
782 787
  case ACTION_SPY_STEAL_GOLD:
783 788
  case ACTION_SPY_STEAL_GOLD_ESC:
784 789
  case ACTION_SPY_SABOTAGE_CITY:
......
1590 1595
  case ACTION_SPY_INVESTIGATE_CITY:
1591 1596
  case ACTION_INV_CITY_SPEND:
1592 1597
  case ACTION_SPY_POISON:
1598
  case ACTION_SPY_POISON_ESC:
1593 1599
  case ACTION_SPY_STEAL_GOLD:
1594 1600
  case ACTION_SPY_STEAL_GOLD_ESC:
1595 1601
  case ACTION_SPY_SABOTAGE_CITY:
......
1731 1737
  case ACTION_SPY_INVESTIGATE_CITY:
1732 1738
  case ACTION_INV_CITY_SPEND:
1733 1739
  case ACTION_SPY_POISON:
1740
  case ACTION_SPY_POISON_ESC:
1734 1741
  case ACTION_SPY_STEAL_GOLD:
1735 1742
  case ACTION_SPY_STEAL_GOLD_ESC:
1736 1743
  case ACTION_SPY_SABOTAGE_CITY:
......
2259 2266
  case ACTION_SPY_INVESTIGATE_CITY:
2260 2267
  case ACTION_INV_CITY_SPEND:
2261 2268
  case ACTION_SPY_POISON:
2269
  case ACTION_SPY_POISON_ESC:
2262 2270
  case ACTION_SPY_SABOTAGE_CITY:
2263 2271
  case ACTION_SPY_SABOTAGE_CITY_ESC:
2264 2272
  case ACTION_SPY_TARGETED_SABOTAGE_CITY:
......
3002 3010
  case ACTION_SPY_POISON:
3003 3011
    /* TODO */
3004 3012
    break;
3013
  case ACTION_SPY_POISON_ESC:
3014
    /* TODO */
3015
    break;
3005 3016
  case ACTION_SPY_STEAL_GOLD:
3006 3017
    /* TODO */
3007 3018
    break;
common/actions.h
57 57
#define SPECENUM_VALUE3NAME "Investigate City Spend Unit"
58 58
#define SPECENUM_VALUE4 ACTION_SPY_POISON
59 59
#define SPECENUM_VALUE4NAME "Poison City"
60
#define SPECENUM_VALUE5 ACTION_SPY_STEAL_GOLD
61
#define SPECENUM_VALUE5NAME "Steal Gold"
62
#define SPECENUM_VALUE6 ACTION_SPY_STEAL_GOLD_ESC
63
#define SPECENUM_VALUE6NAME "Steal Gold Escape"
64
#define SPECENUM_VALUE7 ACTION_SPY_SABOTAGE_CITY
65
#define SPECENUM_VALUE7NAME "Sabotage City"
66
#define SPECENUM_VALUE8 ACTION_SPY_SABOTAGE_CITY_ESC
67
#define SPECENUM_VALUE8NAME "Sabotage City Escape"
68
#define SPECENUM_VALUE9 ACTION_SPY_TARGETED_SABOTAGE_CITY
69
#define SPECENUM_VALUE9NAME "Targeted Sabotage City"
70
#define SPECENUM_VALUE10 ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC
71
#define SPECENUM_VALUE10NAME "Targeted Sabotage City Escape"
72
#define SPECENUM_VALUE11 ACTION_SPY_STEAL_TECH
73
#define SPECENUM_VALUE11NAME "Steal Tech"
74
#define SPECENUM_VALUE12 ACTION_SPY_STEAL_TECH_ESC
75
#define SPECENUM_VALUE12NAME "Steal Tech Escape"
76
#define SPECENUM_VALUE13 ACTION_SPY_TARGETED_STEAL_TECH
77
#define SPECENUM_VALUE13NAME "Targeted Steal Tech"
78
#define SPECENUM_VALUE14 ACTION_SPY_TARGETED_STEAL_TECH_ESC
79
#define SPECENUM_VALUE14NAME "Targeted Steal Tech Escape"
80
#define SPECENUM_VALUE15 ACTION_SPY_INCITE_CITY
81
#define SPECENUM_VALUE15NAME "Incite City"
82
#define SPECENUM_VALUE16 ACTION_SPY_INCITE_CITY_ESC
83
#define SPECENUM_VALUE16NAME "Incite City Escape"
84
#define SPECENUM_VALUE17 ACTION_TRADE_ROUTE
85
#define SPECENUM_VALUE17NAME "Establish Trade Route"
86
#define SPECENUM_VALUE18 ACTION_MARKETPLACE
87
#define SPECENUM_VALUE18NAME "Enter Marketplace"
88
#define SPECENUM_VALUE19 ACTION_HELP_WONDER
89
#define SPECENUM_VALUE19NAME "Help Wonder"
90
#define SPECENUM_VALUE20 ACTION_SPY_BRIBE_UNIT
91
#define SPECENUM_VALUE20NAME "Bribe Unit"
92
#define SPECENUM_VALUE21 ACTION_SPY_SABOTAGE_UNIT
93
#define SPECENUM_VALUE21NAME "Sabotage Unit"
94
#define SPECENUM_VALUE22 ACTION_SPY_SABOTAGE_UNIT_ESC
95
#define SPECENUM_VALUE22NAME "Sabotage Unit Escape"
96
#define SPECENUM_VALUE23 ACTION_CAPTURE_UNITS
97
#define SPECENUM_VALUE23NAME "Capture Units"
98
#define SPECENUM_VALUE24 ACTION_FOUND_CITY
99
#define SPECENUM_VALUE24NAME "Found City"
100
#define SPECENUM_VALUE25 ACTION_JOIN_CITY
101
#define SPECENUM_VALUE25NAME "Join City"
102
#define SPECENUM_VALUE26 ACTION_STEAL_MAPS
103
#define SPECENUM_VALUE26NAME "Steal Maps"
104
#define SPECENUM_VALUE27 ACTION_STEAL_MAPS_ESC
105
#define SPECENUM_VALUE27NAME "Steal Maps Escape"
106
#define SPECENUM_VALUE28 ACTION_BOMBARD
107
#define SPECENUM_VALUE28NAME "Bombard"
108
#define SPECENUM_VALUE29 ACTION_SPY_NUKE
109
#define SPECENUM_VALUE29NAME "Suitcase Nuke"
110
#define SPECENUM_VALUE30 ACTION_SPY_NUKE_ESC
111
#define SPECENUM_VALUE30NAME "Suitcase Nuke Escape"
112
#define SPECENUM_VALUE31 ACTION_NUKE
113
#define SPECENUM_VALUE31NAME "Explode Nuclear"
114
#define SPECENUM_VALUE32 ACTION_DESTROY_CITY
115
#define SPECENUM_VALUE32NAME "Destroy City"
116
#define SPECENUM_VALUE33 ACTION_EXPEL_UNIT
117
#define SPECENUM_VALUE33NAME "Expel Unit"
118
#define SPECENUM_VALUE34 ACTION_RECYCLE_UNIT
119
#define SPECENUM_VALUE34NAME "Recycle Unit"
120
#define SPECENUM_VALUE35 ACTION_DISBAND_UNIT
121
#define SPECENUM_VALUE35NAME "Disband Unit"
122
#define SPECENUM_VALUE36 ACTION_HOME_CITY
123
#define SPECENUM_VALUE36NAME "Home City"
124
#define SPECENUM_VALUE37 ACTION_UPGRADE_UNIT
125
#define SPECENUM_VALUE37NAME "Upgrade Unit"
126
#define SPECENUM_VALUE38 ACTION_PARADROP
127
#define SPECENUM_VALUE38NAME "Paradrop Unit"
128
#define SPECENUM_VALUE39 ACTION_AIRLIFT
129
#define SPECENUM_VALUE39NAME "Airlift Unit"
130
#define SPECENUM_VALUE40 ACTION_ATTACK
131
#define SPECENUM_VALUE40NAME "Attack"
132
#define SPECENUM_VALUE41 ACTION_CONQUER_CITY
133
#define SPECENUM_VALUE41NAME "Conquer City"
134
#define SPECENUM_VALUE42 ACTION_HEAL_UNIT
135
#define SPECENUM_VALUE42NAME "Heal Unit"
60
#define SPECENUM_VALUE5 ACTION_SPY_POISON_ESC
61
#define SPECENUM_VALUE5NAME "Poison City Escape"
62
#define SPECENUM_VALUE6 ACTION_SPY_STEAL_GOLD
63
#define SPECENUM_VALUE6NAME "Steal Gold"
64
#define SPECENUM_VALUE7 ACTION_SPY_STEAL_GOLD_ESC
65
#define SPECENUM_VALUE7NAME "Steal Gold Escape"
66
#define SPECENUM_VALUE8 ACTION_SPY_SABOTAGE_CITY
67
#define SPECENUM_VALUE8NAME "Sabotage City"
68
#define SPECENUM_VALUE9 ACTION_SPY_SABOTAGE_CITY_ESC
69
#define SPECENUM_VALUE9NAME "Sabotage City Escape"
70
#define SPECENUM_VALUE10 ACTION_SPY_TARGETED_SABOTAGE_CITY
71
#define SPECENUM_VALUE10NAME "Targeted Sabotage City"
72
#define SPECENUM_VALUE11 ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC
73
#define SPECENUM_VALUE11NAME "Targeted Sabotage City Escape"
74
#define SPECENUM_VALUE12 ACTION_SPY_STEAL_TECH
75
#define SPECENUM_VALUE12NAME "Steal Tech"
76
#define SPECENUM_VALUE13 ACTION_SPY_STEAL_TECH_ESC
77
#define SPECENUM_VALUE13NAME "Steal Tech Escape"
78
#define SPECENUM_VALUE14 ACTION_SPY_TARGETED_STEAL_TECH
79
#define SPECENUM_VALUE14NAME "Targeted Steal Tech"
80
#define SPECENUM_VALUE15 ACTION_SPY_TARGETED_STEAL_TECH_ESC
81
#define SPECENUM_VALUE15NAME "Targeted Steal Tech Escape"
82
#define SPECENUM_VALUE16 ACTION_SPY_INCITE_CITY
83
#define SPECENUM_VALUE16NAME "Incite City"
84
#define SPECENUM_VALUE17 ACTION_SPY_INCITE_CITY_ESC
85
#define SPECENUM_VALUE17NAME "Incite City Escape"
86
#define SPECENUM_VALUE18 ACTION_TRADE_ROUTE
87
#define SPECENUM_VALUE18NAME "Establish Trade Route"
88
#define SPECENUM_VALUE19 ACTION_MARKETPLACE
89
#define SPECENUM_VALUE19NAME "Enter Marketplace"
90
#define SPECENUM_VALUE20 ACTION_HELP_WONDER
91
#define SPECENUM_VALUE20NAME "Help Wonder"
92
#define SPECENUM_VALUE21 ACTION_SPY_BRIBE_UNIT
93
#define SPECENUM_VALUE21NAME "Bribe Unit"
94
#define SPECENUM_VALUE22 ACTION_SPY_SABOTAGE_UNIT
95
#define SPECENUM_VALUE22NAME "Sabotage Unit"
96
#define SPECENUM_VALUE23 ACTION_SPY_SABOTAGE_UNIT_ESC
97
#define SPECENUM_VALUE23NAME "Sabotage Unit Escape"
98
#define SPECENUM_VALUE24 ACTION_CAPTURE_UNITS
99
#define SPECENUM_VALUE24NAME "Capture Units"
100
#define SPECENUM_VALUE25 ACTION_FOUND_CITY
101
#define SPECENUM_VALUE25NAME "Found City"
102
#define SPECENUM_VALUE26 ACTION_JOIN_CITY
103
#define SPECENUM_VALUE26NAME "Join City"
104
#define SPECENUM_VALUE27 ACTION_STEAL_MAPS
105
#define SPECENUM_VALUE27NAME "Steal Maps"
106
#define SPECENUM_VALUE28 ACTION_STEAL_MAPS_ESC
107
#define SPECENUM_VALUE28NAME "Steal Maps Escape"
108
#define SPECENUM_VALUE29 ACTION_BOMBARD
109
#define SPECENUM_VALUE29NAME "Bombard"
110
#define SPECENUM_VALUE30 ACTION_SPY_NUKE
111
#define SPECENUM_VALUE30NAME "Suitcase Nuke"
112
#define SPECENUM_VALUE31 ACTION_SPY_NUKE_ESC
113
#define SPECENUM_VALUE31NAME "Suitcase Nuke Escape"
114
#define SPECENUM_VALUE32 ACTION_NUKE
115
#define SPECENUM_VALUE32NAME "Explode Nuclear"
116
#define SPECENUM_VALUE33 ACTION_DESTROY_CITY
117
#define SPECENUM_VALUE33NAME "Destroy City"
118
#define SPECENUM_VALUE34 ACTION_EXPEL_UNIT
119
#define SPECENUM_VALUE34NAME "Expel Unit"
120
#define SPECENUM_VALUE35 ACTION_RECYCLE_UNIT
121
#define SPECENUM_VALUE35NAME "Recycle Unit"
122
#define SPECENUM_VALUE36 ACTION_DISBAND_UNIT
123
#define SPECENUM_VALUE36NAME "Disband Unit"
124
#define SPECENUM_VALUE37 ACTION_HOME_CITY
125
#define SPECENUM_VALUE37NAME "Home City"
126
#define SPECENUM_VALUE38 ACTION_UPGRADE_UNIT
127
#define SPECENUM_VALUE38NAME "Upgrade Unit"
128
#define SPECENUM_VALUE39 ACTION_PARADROP
129
#define SPECENUM_VALUE39NAME "Paradrop Unit"
130
#define SPECENUM_VALUE40 ACTION_AIRLIFT
131
#define SPECENUM_VALUE40NAME "Airlift Unit"
132
#define SPECENUM_VALUE41 ACTION_ATTACK
133
#define SPECENUM_VALUE41NAME "Attack"
134
#define SPECENUM_VALUE42 ACTION_CONQUER_CITY
135
#define SPECENUM_VALUE42NAME "Conquer City"
136
#define SPECENUM_VALUE43 ACTION_HEAL_UNIT
137
#define SPECENUM_VALUE43NAME "Heal Unit"
136 138
#define SPECENUM_BITVECTOR bv_actions
137 139
/* Limited by what values num2char() can store in unit orders in
138 140
 * savegames. */
common/aicore/pf_tools.c
694 694
      parameter->actions |= PF_AA_TRADE_ROUTE;
695 695
    }
696 696
    if (utype_can_do_action(parameter->utype, ACTION_SPY_POISON)
697
        || utype_can_do_action(parameter->utype, ACTION_SPY_POISON_ESC)
697 698
        || utype_can_do_action(parameter->utype, ACTION_SPY_SABOTAGE_UNIT)
698 699
        || utype_can_do_action(parameter->utype, ACTION_SPY_SABOTAGE_UNIT_ESC)
699 700
        || utype_can_do_action(parameter->utype, ACTION_SPY_BRIBE_UNIT)
common/unittype.c
859 859
   * consume the actor unit based on unit type alone they should probably
860 860
   * be split in an actor consuming and a non actor consuming version. */
861 861
  switch (paction->id) {
862
  case ACTION_SPY_POISON:
863
    /* A Spy has a chance to escape after performing the action. */
864
    return !utype_has_flag(utype, UTYF_SPY);
865 862
  case ACTION_ATTACK:
866 863
    return uclass_has_flag(utype->uclass, UCF_MISSILE);
867 864
  default:
data/alien/game.ruleset
226 226
force_explode_nuclear = FALSE
227 227

  
228 228
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
229
; will empty the food stock.
229
; or "Poison City Escape" will empty the food stock.
230 230
;poison_empties_food_stock = FALSE
231 231

  
232 232
; The maximum distance from the actor unit to the target of the "Bombard"
data/civ1/game.ruleset
199 199
force_explode_nuclear = TRUE
200 200

  
201 201
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
202
; will empty the food stock.
202
; or "Poison City Escape" will empty the food stock.
203 203
;poison_empties_food_stock = FALSE
204 204

  
205 205
; The maximum distance from the actor unit to the target of the "Bombard"
data/civ2/effects.ruleset
2437 2437
value	= 1
2438 2438
reqs	=
2439 2439
    { "type", "name", "range", "present"
2440
      "Action", "Poison City", "Local", TRUE
2440
      "Action", "Poison City Escape", "Local", TRUE
2441 2441
      "DiplRel", "War", "Local", FALSE
2442 2442
    }
2443 2443

  
data/civ2/game.ruleset
217 217
force_explode_nuclear = TRUE
218 218

  
219 219
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
220
; will empty the food stock.
220
; or "Poison City Escape" will empty the food stock.
221 221
poison_empties_food_stock = FALSE
222 222

  
223 223
; The maximum distance from the actor unit to the target of the "Bombard"
......
234 234
; The second %s marks where extra details should be inserted.
235 235

  
236 236
; /* TRANS: _Poison City (3% chance of success). */
237
ui_name_poison_city = _("%sPoison City%s")
237
ui_name_poison_city_escape = _("%sPoison City%s")
238 238

  
239 239
; /* TRANS: Plant _Nuclear Device (3% chance of success). */
240 240
ui_name_suitcase_nuke_escape = _("Plant %sNuclear Device%s")
......
412 412
    }
413 413

  
414 414
[actionenabler_poison_city]
415
action = "Poison City"
415
action = "Poison City Escape"
416 416
actor_reqs    =
417 417
    { "type",   "name", "range"
418 418
      "UnitFlag", "Spy", "Local"
data/civ2civ3/effects.ruleset
4329 4329
value	= 1
4330 4330
reqs	=
4331 4331
    { "type", "name", "range", "present"
4332
      "Action", "Poison City", "Local", TRUE
4332
      "Action", "Poison City Escape", "Local", TRUE
4333 4333
      "DiplRel", "War", "Local", FALSE
4334 4334
    }
4335 4335

  
data/civ2civ3/game.ruleset
228 228
force_explode_nuclear = TRUE
229 229

  
230 230
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
231
; will empty the food stock.
231
; or "Poison City Escape" will empty the food stock.
232 232
poison_empties_food_stock = FALSE
233 233

  
234 234
; The maximum distance from the actor unit to the target of the "Bombard"
......
245 245
; The second %s marks where extra details should be inserted.
246 246

  
247 247
; /* TRANS: _Poison City (3% chance of success). */
248
ui_name_poison_city = _("%sPoison City%s")
248
ui_name_poison_city_escape = _("%sPoison City%s")
249 249

  
250 250
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */
251 251
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
......
502 502
    }
503 503

  
504 504
[actionenabler_poison_city]
505
action = "Poison City"
505
action = "Poison City Escape"
506 506
actor_reqs    =
507 507
    { "type",   "name", "range"
508 508
      "UnitFlag", "Spy", "Local"
data/classic/effects.ruleset
2504 2504
value	= 1
2505 2505
reqs	=
2506 2506
    { "type", "name", "range", "present"
2507
      "Action", "Poison City", "Local", TRUE
2507
      "Action", "Poison City Escape", "Local", TRUE
2508 2508
      "DiplRel", "War", "Local", FALSE
2509 2509
    }
2510 2510

  
data/classic/game.ruleset
221 221
force_explode_nuclear = TRUE
222 222

  
223 223
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
224
; will empty the food stock.
224
; or "Poison City Escape" will empty the food stock.
225 225
poison_empties_food_stock = FALSE
226 226

  
227 227
; The maximum distance from the actor unit to the target of the "Bombard"
......
238 238
; The second %s marks where extra details should be inserted.
239 239

  
240 240
; /* TRANS: _Poison City (3% chance of success). */
241
ui_name_poison_city = _("%sPoison City%s")
241
ui_name_poison_city_escape = _("%sPoison City%s")
242 242

  
243 243
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */
244 244
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
......
428 428
    }
429 429

  
430 430
[actionenabler_poison_city]
431
action = "Poison City"
431
action = "Poison City Escape"
432 432
actor_reqs    =
433 433
    { "type",   "name", "range"
434 434
      "UnitFlag", "Spy", "Local"
data/experimental/effects.ruleset
2887 2887
value	= 1
2888 2888
reqs	=
2889 2889
    { "type", "name", "range", "present"
2890
      "Action", "Poison City", "Local", TRUE
2890
      "Action", "Poison City Escape", "Local", TRUE
2891 2891
      "DiplRel", "War", "Local", FALSE
2892 2892
    }
2893 2893

  
data/experimental/game.ruleset
226 226
force_explode_nuclear = TRUE
227 227

  
228 228
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
229
; will empty the food stock.
229
; or "Poison City Escape" will empty the food stock.
230 230
poison_empties_food_stock = FALSE
231 231

  
232 232
; The maximum distance from the actor unit to the target of the "Bombard"
......
243 243
; The second %s marks where extra details should be inserted.
244 244

  
245 245
; /* TRANS: _Poison City (3% chance of success). */
246
ui_name_poison_city = _("%sPoison City%s")
246
ui_name_poison_city_escape = _("%sPoison City%s")
247 247

  
248 248
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */
249 249
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
......
448 448
    }
449 449

  
450 450
[actionenabler_poison_city]
451
action = "Poison City"
451
action = "Poison City Escape"
452 452
actor_reqs    =
453 453
    { "type",   "name", "range"
454 454
      "UnitFlag", "Spy", "Local"
data/multiplayer/effects.ruleset
2539 2539
value	= 1
2540 2540
reqs	=
2541 2541
    { "type", "name", "range", "present"
2542
      "Action", "Poison City", "Local", TRUE
2542
      "Action", "Poison City Escape", "Local", TRUE
2543 2543
      "DiplRel", "War", "Local", FALSE
2544 2544
    }
2545 2545

  
data/multiplayer/game.ruleset
226 226
force_explode_nuclear = TRUE
227 227

  
228 228
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
229
; will empty the food stock.
229
; or "Poison City Escape" will empty the food stock.
230 230
poison_empties_food_stock = FALSE
231 231

  
232 232
; The maximum distance from the actor unit to the target of the "Bombard"
......
243 243
; The second %s marks where extra details should be inserted.
244 244

  
245 245
; /* TRANS: _Poison City (3% chance of success). */
246
ui_name_poison_city = _("%sPoison City%s")
246
ui_name_poison_city_escape = _("%sPoison City%s")
247 247

  
248 248
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */
249 249
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
......
427 427
    }
428 428

  
429 429
[actionenabler_poison_city]
430
action = "Poison City"
430
action = "Poison City Escape"
431 431
actor_reqs    =
432 432
    { "type",   "name", "range"
433 433
      "UnitFlag", "Spy", "Local"
data/sandbox/effects.ruleset
4389 4389
value	= 1
4390 4390
reqs	=
4391 4391
    { "type", "name", "range", "present"
4392
      "Action", "Poison City", "Local", TRUE
4392
      "Action", "Poison City Escape", "Local", TRUE
4393 4393
      "DiplRel", "War", "Local", FALSE
4394 4394
    }
4395 4395

  
data/sandbox/game.ruleset
225 225
force_explode_nuclear = TRUE
226 226

  
227 227
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
228
; will empty the food stock.
228
; or "Poison City Escape" will empty the food stock.
229 229
poison_empties_food_stock = FALSE
230 230

  
231 231
; The maximum distance from the actor unit to the target of the "Bombard"
......
242 242
; The second %s marks where extra details should be inserted.
243 243

  
244 244
; /* TRANS: _Poison City (3% chance of success). */
245
ui_name_poison_city = _("%sPoison City%s")
245
ui_name_poison_city_escape = _("%sPoison City%s")
246 246

  
247 247
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */
248 248
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
......
519 519
    }
520 520

  
521 521
[actionenabler_poison_city]
522
action = "Poison City"
522
action = "Poison City Escape"
523 523
actor_reqs    =
524 524
    { "type",   "name", "range"
525 525
      "UnitFlag", "Spy", "Local"
data/stub/game.ruleset
211 211
force_explode_nuclear = FALSE
212 212

  
213 213
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
214
; will empty the food stock.
214
; or "Poison City Escape" will empty the food stock.
215 215
;poison_empties_food_stock = FALSE
216 216

  
217 217
; The maximum distance from the actor unit to the target of the "Bombard"
data/webperimental/effects.ruleset
2623 2623
value	= 1
2624 2624
reqs	=
2625 2625
    { "type", "name", "range", "present"
2626
      "Action", "Poison City", "Local", TRUE
2626
      "Action", "Poison City Escape", "Local", TRUE
2627 2627
      "DiplRel", "War", "Local", FALSE
2628 2628
    }
2629 2629

  
data/webperimental/game.ruleset
226 226
force_explode_nuclear = TRUE
227 227

  
228 228
; If poison_empties_food_stock is set to TRUE a successful "Poison City"
229
; will empty the food stock.
229
; or "Poison City Escape" will empty the food stock.
230 230
poison_empties_food_stock = FALSE
231 231

  
232 232
; The maximum distance from the actor unit to the target of the "Bombard"
......
243 243
; The second %s marks where extra details should be inserted.
244 244

  
245 245
; /* TRANS: _Poison City (3% chance of success). */
246
ui_name_poison_city = _("%sPoison City%s")
246
ui_name_poison_city_escape = _("%sPoison City%s")
247 247

  
248 248
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */
249 249
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
......
454 454
    }
455 455

  
456 456
[actionenabler_poison_city]
457
action = "Poison City"
457
action = "Poison City Escape"
458 458
actor_reqs    =
459 459
    { "type",   "name", "range"
460 460
      "UnitFlag", "Spy", "Local"
doc/README.actions
212 212

  
213 213
"Poison City" - Kill a citizen in the target city.
214 214
 * UI name can be set using ui_name_poison_city
215
 * spends the actor unit
216
 * actor must be aware that the target exists
217
 * actor must be on the same tile as the target or on the tile next to it.
218

  
219
"Poison City Escape" - Kill a citizen in the target city and escape.
220
 * UI name can be set using ui_name_poison_city_escape
215 221
 * actor must be aware that the target exists
216 222
 * actor must be on the same tile as the target or on the tile next to it.
217 223

  
fc_version
56 56
#   - Avoid adding a new mandatory capability to the development branch for
57 57
#     as long as possible.  We want to maintain network compatibility with
58 58
#     the stable branch for as long as possible.
59
NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.1-2017.Aug.19"
59
NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.1-2017.Aug.21"
60 60
NETWORK_CAPSTRING_OPTIONAL=""
61 61

  
62 62
FREECIV_DISTRIBUTOR=""
server/advisors/advdata.c
862 862
          case ACTION_SPY_INVESTIGATE_CITY:
863 863
          case ACTION_INV_CITY_SPEND:
864 864
          case ACTION_SPY_POISON:
865
          case ACTION_SPY_POISON_ESC:
865 866
          case ACTION_SPY_STEAL_GOLD:
866 867
          case ACTION_SPY_STEAL_GOLD_ESC:
867 868
          case ACTION_SPY_SABOTAGE_CITY:
server/ruleset.c
6015 6015
               ACTION_NUKE);
6016 6016
      }
6017 6017

  
6018
      /* If the poison city action should empty the granary. */
6018
      /* If the "Poison City" action or the "Poison City Escape" action
6019
       * should empty the granary. */
6019 6020
      /* TODO: empty granary and reduce population should become separate
6020 6021
       * action effect flags when actions are generalized. */
6021 6022
      game.info.poison_empties_food_stock
......
6070 6071
                 text);
6071 6072

  
6072 6073
      text = secfile_lookup_str_default(file,
6074
          /* TRANS: _Poison City and Escape (3% chance of success). */
6075
          N_("%sPoison City and Escape%s"),
6076
          "actions.ui_name_poison_city_escape");
6077
      sz_strlcpy(action_by_number(ACTION_SPY_POISON_ESC)->ui_name,
6078
                 text);
6079

  
6080
      text = secfile_lookup_str_default(file,
6073 6081
          /* TRANS: S_abotage Enemy Unit (3% chance of success). */
6074 6082
          N_("S%sabotage Enemy Unit%s"),
6075 6083
          "actions.ui_name_sabotage_unit");
server/savegame3.c
5596 5596
          case ACTION_SPY_INVESTIGATE_CITY:
5597 5597
          case ACTION_INV_CITY_SPEND:
5598 5598
          case ACTION_SPY_POISON:
5599
          case ACTION_SPY_POISON_ESC:
5599 5600
          case ACTION_SPY_STEAL_GOLD:
5600 5601
          case ACTION_SPY_STEAL_GOLD_ESC:
5601 5602
          case ACTION_SPY_SABOTAGE_CITY:
server/unithand.c
577 577
  case ACTION_SPY_INVESTIGATE_CITY:
578 578
  case ACTION_INV_CITY_SPEND:
579 579
  case ACTION_SPY_POISON:
580
  case ACTION_SPY_POISON_ESC:
580 581
  case ACTION_SPY_STEAL_GOLD:
581 582
  case ACTION_SPY_STEAL_GOLD_ESC:
582 583
  case ACTION_SPY_SABOTAGE_CITY:
......
2446 2447
                                               value - 1, paction));
2447 2448
    break;
2448 2449
  case ACTION_SPY_POISON:
2450
  case ACTION_SPY_POISON_ESC:
2451
    /* Difference is caused by data in the action structure. */
2449 2452
    ACTION_STARTED_UNIT_CITY(action_type, actor_unit, pcity,
2450 2453
                             spy_poison(pplayer, actor_unit, pcity,
2451 2454
                                        paction));
......
4770 4773
      case ACTION_SPY_INVESTIGATE_CITY:
4771 4774
      case ACTION_INV_CITY_SPEND:
4772 4775
      case ACTION_SPY_POISON:
4776
      case ACTION_SPY_POISON_ESC:
4773 4777
      case ACTION_SPY_STEAL_GOLD:
4774 4778
      case ACTION_SPY_STEAL_GOLD_ESC:
4775 4779
      case ACTION_SPY_SABOTAGE_CITY:
tools/ruleutil/rulesave.c
1045 1045
                     action_by_number(ACTION_SPY_POISON)->ui_name,
1046 1046
                     "actions.ui_name_poison_city");
1047 1047
  secfile_insert_str(sfile,
1048
                     action_by_number(ACTION_SPY_POISON_ESC)->ui_name,
1049
                     "actions.ui_name_poison_city_escape");
1050
  secfile_insert_str(sfile,
1048 1051
                     action_by_number(ACTION_SPY_SABOTAGE_UNIT)->ui_name,
1049 1052
                     "actions.ui_name_sabotage_unit");
1050 1053
  secfile_insert_str(sfile,
1051
- 
(2-2/2)