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 #691360 » 3.1-Escape-split-action-Sabotage-Unit.patch
ai/default/aicity.c | ||
---|---|---|
1229 | 1229 |
/* Shouldn't happen. */ |
1230 | 1230 |
case ACTION_SPY_BRIBE_UNIT: |
1231 | 1231 |
case ACTION_SPY_SABOTAGE_UNIT: |
1232 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
1232 | 1233 |
case ACTION_EXPEL_UNIT: |
1233 | 1234 |
case ACTION_DISBAND_UNIT: |
1234 | 1235 |
case ACTION_CAPTURE_UNITS: |
ai/default/aidiplomat.c | ||
---|---|---|
518 | 518 |
|| utype_can_do_action(unit_type_get(punit), |
519 | 519 |
ACTION_SPY_BRIBE_UNIT) |
520 | 520 |
|| utype_can_do_action(unit_type_get(punit), |
521 |
ACTION_SPY_SABOTAGE_UNIT_ESC) |
|
522 |
|| utype_can_do_action(unit_type_get(punit), |
|
521 | 523 |
ACTION_SPY_SABOTAGE_UNIT))) { |
522 | 524 |
return TRUE; |
523 | 525 |
} |
... | ... | |
778 | 780 |
return FALSE; |
779 | 781 |
} |
780 | 782 |
} else if (action_prob_possible(action_prob_vs_unit(punit, |
781 |
ACTION_SPY_SABOTAGE_UNIT, |
|
783 |
ACTION_SPY_SABOTAGE_UNIT_ESC,
|
|
782 | 784 |
pvictim)) |
783 | 785 |
&& threat) { |
784 | 786 |
/* don't stand around waiting for the final blow */ |
785 | 787 |
handle_unit_do_action(pplayer, punit->id, |
786 | 788 |
pvictim->id, -1, "", |
787 |
ACTION_SPY_SABOTAGE_UNIT); |
|
789 |
ACTION_SPY_SABOTAGE_UNIT_ESC);
|
|
788 | 790 |
/* autoattack might kill us as we move in */ |
789 | 791 |
if (game_unit_by_number(sanity) && punit->moves_left > 0) { |
790 | 792 |
return TRUE; |
client/gui-gtk-3.0/action_dialog.c | ||
---|---|---|
611 | 611 |
free(args); |
612 | 612 |
} |
613 | 613 | |
614 |
/**************************************************************** |
|
615 |
User selected "Sabotage Unit Escape" from choice dialog |
|
616 |
*****************************************************************/ |
|
617 |
static void spy_sabotage_unit_esc_callback(GtkWidget *w, gpointer data) |
|
618 |
{ |
|
619 |
struct action_data *args = (struct action_data *)data; |
|
620 | ||
621 |
request_do_action(ACTION_SPY_SABOTAGE_UNIT_ESC, args->actor_unit_id, |
|
622 |
args->target_unit_id, 0, ""); |
|
623 | ||
624 |
gtk_widget_destroy(act_sel_dialog); |
|
625 |
free(args); |
|
626 |
} |
|
627 | ||
614 | 628 |
/***************************************************************** |
615 | 629 |
User selected "Heal Unit" from choice dialog |
616 | 630 |
*****************************************************************/ |
... | ... | |
1656 | 1670 |
/* Unit acting against a unit target. */ |
1657 | 1671 |
[ACTION_SPY_BRIBE_UNIT] = (GCallback)diplomat_bribe_callback, |
1658 | 1672 |
[ACTION_SPY_SABOTAGE_UNIT] = (GCallback)spy_sabotage_unit_callback, |
1673 |
[ACTION_SPY_SABOTAGE_UNIT_ESC] = (GCallback)spy_sabotage_unit_esc_callback, |
|
1659 | 1674 |
[ACTION_EXPEL_UNIT] = (GCallback)expel_unit_callback, |
1660 | 1675 |
[ACTION_HEAL_UNIT] = (GCallback)heal_unit_callback, |
1661 | 1676 |
client/gui-gtk-3.22/action_dialog.c | ||
---|---|---|
611 | 611 |
free(args); |
612 | 612 |
} |
613 | 613 | |
614 |
/**************************************************************** |
|
615 |
User selected "Sabotage Unit Escape" from choice dialog |
|
616 |
*****************************************************************/ |
|
617 |
static void spy_sabotage_unit_esc_callback(GtkWidget *w, gpointer data) |
|
618 |
{ |
|
619 |
struct action_data *args = (struct action_data *)data; |
|
620 | ||
621 |
request_do_action(ACTION_SPY_SABOTAGE_UNIT_ESC, args->actor_unit_id, |
|
622 |
args->target_unit_id, 0, ""); |
|
623 | ||
624 |
gtk_widget_destroy(act_sel_dialog); |
|
625 |
free(args); |
|
626 |
} |
|
627 | ||
614 | 628 |
/***************************************************************** |
615 | 629 |
User selected "Heal Unit" from choice dialog |
616 | 630 |
*****************************************************************/ |
... | ... | |
1650 | 1664 |
/* Unit acting against a unit target. */ |
1651 | 1665 |
[ACTION_SPY_BRIBE_UNIT] = (GCallback)diplomat_bribe_callback, |
1652 | 1666 |
[ACTION_SPY_SABOTAGE_UNIT] = (GCallback)spy_sabotage_unit_callback, |
1667 |
[ACTION_SPY_SABOTAGE_UNIT_ESC] = (GCallback)spy_sabotage_unit_esc_callback, |
|
1653 | 1668 |
[ACTION_EXPEL_UNIT] = (GCallback)expel_unit_callback, |
1654 | 1669 |
[ACTION_HEAL_UNIT] = (GCallback)heal_unit_callback, |
1655 | 1670 |
client/gui-gtk-4.0/action_dialog.c | ||
---|---|---|
611 | 611 |
free(args); |
612 | 612 |
} |
613 | 613 | |
614 |
/**************************************************************** |
|
615 |
User selected "Sabotage Unit Escape" from choice dialog |
|
616 |
*****************************************************************/ |
|
617 |
static void spy_sabotage_unit_esc_callback(GtkWidget *w, gpointer data) |
|
618 |
{ |
|
619 |
struct action_data *args = (struct action_data *)data; |
|
620 | ||
621 |
request_do_action(ACTION_SPY_SABOTAGE_UNIT_ESC, args->actor_unit_id, |
|
622 |
args->target_unit_id, 0, ""); |
|
623 | ||
624 |
gtk_widget_destroy(act_sel_dialog); |
|
625 |
free(args); |
|
626 |
} |
|
627 | ||
614 | 628 |
/***************************************************************** |
615 | 629 |
User selected "Heal Unit" from choice dialog |
616 | 630 |
*****************************************************************/ |
... | ... | |
1650 | 1664 |
/* Unit acting against a unit target. */ |
1651 | 1665 |
[ACTION_SPY_BRIBE_UNIT] = (GCallback)diplomat_bribe_callback, |
1652 | 1666 |
[ACTION_SPY_SABOTAGE_UNIT] = (GCallback)spy_sabotage_unit_callback, |
1667 |
[ACTION_SPY_SABOTAGE_UNIT_ESC] = (GCallback)spy_sabotage_unit_esc_callback, |
|
1653 | 1668 |
[ACTION_EXPEL_UNIT] = (GCallback)expel_unit_callback, |
1654 | 1669 |
[ACTION_HEAL_UNIT] = (GCallback)heal_unit_callback, |
1655 | 1670 |
client/gui-qt/dialogs.cpp | ||
---|---|---|
98 | 98 |
static void diplomat_embassy(QVariant data1, QVariant data2); |
99 | 99 |
static void spy_embassy(QVariant data1, QVariant data2); |
100 | 100 |
static void spy_sabotage_unit(QVariant data1, QVariant data2); |
101 |
static void spy_sabotage_unit_esc(QVariant data1, QVariant data2); |
|
101 | 102 |
static void spy_investigate(QVariant data1, QVariant data2); |
102 | 103 |
static void diplomat_investigate(QVariant data1, QVariant data2); |
103 | 104 |
static void diplomat_sabotage(QVariant data1, QVariant data2); |
... | ... | |
191 | 192 |
/* Unit acting against a unit target. */ |
192 | 193 |
action_function[ACTION_SPY_BRIBE_UNIT] = diplomat_bribe; |
193 | 194 |
action_function[ACTION_SPY_SABOTAGE_UNIT] = spy_sabotage_unit; |
195 |
action_function[ACTION_SPY_SABOTAGE_UNIT_ESC] = spy_sabotage_unit_esc; |
|
194 | 196 |
action_function[ACTION_EXPEL_UNIT] = expel_unit; |
195 | 197 |
action_function[ACTION_HEAL_UNIT] = heal_unit; |
196 | 198 | |
... | ... | |
2128 | 2130 |
} |
2129 | 2131 | |
2130 | 2132 |
/*************************************************************************** |
2133 |
Action Sabotage Unit Escape for choice dialog |
|
2134 |
***************************************************************************/ |
|
2135 |
static void spy_sabotage_unit_esc(QVariant data1, QVariant data2) |
|
2136 |
{ |
|
2137 |
int diplomat_id = data1.toInt(); |
|
2138 |
int diplomat_target_id = data2.toInt(); |
|
2139 | ||
2140 |
request_do_action(ACTION_SPY_SABOTAGE_UNIT_ESC, diplomat_id, |
|
2141 |
diplomat_target_id, 0, ""); |
|
2142 |
} |
|
2143 | ||
2144 |
/*************************************************************************** |
|
2131 | 2145 |
Action "Heal Unit" for choice dialog |
2132 | 2146 |
***************************************************************************/ |
2133 | 2147 |
static void heal_unit(QVariant data1, QVariant data2) |
client/gui-qt/menu.cpp | ||
---|---|---|
1410 | 1410 |
action_vs_unit->addAction(act); |
1411 | 1411 |
connect(act, SIGNAL(triggered()), this, SLOT(slot_action_vs_unit())); |
1412 | 1412 | |
1413 |
act = action_unit_menu->addAction(_("Sabotage Unit Escape")); |
|
1414 |
act->setCheckable(true); |
|
1415 |
act->setChecked(false); |
|
1416 |
act->setData(ACTION_SPY_SABOTAGE_UNIT_ESC); |
|
1417 |
action_vs_unit->addAction(act); |
|
1418 |
connect(act, SIGNAL(triggered()), this, SLOT(slot_action_vs_unit())); |
|
1419 | ||
1413 | 1420 |
action_city_menu = multiplayer_menu->addMenu(_("Default action vs city")); |
1414 | 1421 |
act = action_city_menu->addAction(_("Ask")); |
1415 | 1422 |
act->setCheckable(true); |
client/gui-sdl2/action_dialog.c | ||
---|---|---|
1096 | 1096 |
} |
1097 | 1097 | |
1098 | 1098 |
/**************************************************************** |
1099 |
User clicked "Sabotage Unit Escape" |
|
1100 |
*****************************************************************/ |
|
1101 |
static int spy_sabotage_unit_esc_callback(struct widget *pWidget) |
|
1102 |
{ |
|
1103 |
if (Main.event.button.button == SDL_BUTTON_LEFT) { |
|
1104 |
int diplomat_id = MAX_ID - pWidget->ID; |
|
1105 |
int target_id = pWidget->data.unit->id; |
|
1106 | ||
1107 |
popdown_diplomat_dialog(); |
|
1108 |
request_do_action(ACTION_SPY_SABOTAGE_UNIT_ESC, |
|
1109 |
diplomat_id, target_id, 0, ""); |
|
1110 |
} |
|
1111 | ||
1112 |
return -1; |
|
1113 |
} |
|
1114 | ||
1115 |
/**************************************************************** |
|
1099 | 1116 |
User clicked "Heal Unit" |
1100 | 1117 |
*****************************************************************/ |
1101 | 1118 |
static int heal_unit_callback(struct widget *pWidget) |
... | ... | |
1421 | 1438 |
/* Unit acting against a unit target. */ |
1422 | 1439 |
[ACTION_SPY_BRIBE_UNIT] = diplomat_bribe_callback, |
1423 | 1440 |
[ACTION_SPY_SABOTAGE_UNIT] = spy_sabotage_unit_callback, |
1441 |
[ACTION_SPY_SABOTAGE_UNIT_ESC] = spy_sabotage_unit_esc_callback, |
|
1424 | 1442 |
[ACTION_HEAL_UNIT] = heal_unit_callback, |
1425 | 1443 |
[ACTION_EXPEL_UNIT] = expel_unit_callback, |
1426 | 1444 |
client/helpdata.c | ||
---|---|---|
2515 | 2515 |
_(" * Veterans have improved chances in diplomatic " |
2516 | 2516 |
"contests.\n")); |
2517 | 2517 |
if ((utype_has_flag(utype, UTYF_SPY) && |
2518 |
(utype_can_do_action(utype, ACTION_SPY_POISON)
|
|
2519 |
|| utype_can_do_action(utype, ACTION_SPY_SABOTAGE_UNIT)))
|
|
2518 |
utype_can_do_action(utype, ACTION_SPY_POISON))
|
|
2519 |
|| utype_can_do_action(utype, ACTION_SPY_SABOTAGE_UNIT_ESC)
|
|
2520 | 2520 |
|| utype_can_do_action(utype, ACTION_SPY_STEAL_TECH_ESC) |
2521 | 2521 |
|| utype_can_do_action(utype, ACTION_SPY_TARGETED_STEAL_TECH_ESC) |
2522 | 2522 |
|| utype_can_do_action(utype, ACTION_SPY_SABOTAGE_CITY_ESC) |
client/packhand.c | ||
---|---|---|
4549 | 4549 |
case ACTION_HELP_WONDER: |
4550 | 4550 |
case ACTION_SPY_BRIBE_UNIT: |
4551 | 4551 |
case ACTION_SPY_SABOTAGE_UNIT: |
4552 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
4552 | 4553 |
case ACTION_FOUND_CITY: |
4553 | 4554 |
case ACTION_JOIN_CITY: |
4554 | 4555 |
case ACTION_STEAL_MAPS: |
common/actions.c | ||
---|---|---|
334 | 334 |
actions[ACTION_SPY_SABOTAGE_UNIT] = |
335 | 335 |
action_new(ACTION_SPY_SABOTAGE_UNIT, ATK_UNIT, |
336 | 336 |
TRUE, FALSE, FALSE, TRUE, |
337 |
0, 1, TRUE); |
|
338 |
actions[ACTION_SPY_SABOTAGE_UNIT_ESC] = |
|
339 |
action_new(ACTION_SPY_SABOTAGE_UNIT_ESC, ATK_UNIT, |
|
340 |
TRUE, FALSE, FALSE, TRUE, |
|
337 | 341 |
0, 1, FALSE); |
338 | 342 |
actions[ACTION_SPY_BRIBE_UNIT] = |
339 | 343 |
action_new(ACTION_SPY_BRIBE_UNIT, ATK_UNIT, |
... | ... | |
789 | 793 |
case ACTION_SPY_INCITE_CITY_ESC: |
790 | 794 |
case ACTION_SPY_BRIBE_UNIT: |
791 | 795 |
case ACTION_SPY_SABOTAGE_UNIT: |
796 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
792 | 797 |
case ACTION_STEAL_MAPS: |
793 | 798 |
case ACTION_STEAL_MAPS_ESC: |
794 | 799 |
case ACTION_SPY_NUKE: |
... | ... | |
1602 | 1607 |
case ACTION_HELP_WONDER: |
1603 | 1608 |
case ACTION_SPY_BRIBE_UNIT: |
1604 | 1609 |
case ACTION_SPY_SABOTAGE_UNIT: |
1610 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
1605 | 1611 |
case ACTION_CAPTURE_UNITS: |
1606 | 1612 |
case ACTION_FOUND_CITY: |
1607 | 1613 |
case ACTION_STEAL_MAPS: |
... | ... | |
1740 | 1746 |
case ACTION_HELP_WONDER: |
1741 | 1747 |
case ACTION_SPY_BRIBE_UNIT: |
1742 | 1748 |
case ACTION_SPY_SABOTAGE_UNIT: |
1749 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
1743 | 1750 |
case ACTION_CAPTURE_UNITS: |
1744 | 1751 |
case ACTION_FOUND_CITY: |
1745 | 1752 |
case ACTION_JOIN_CITY: |
... | ... | |
2261 | 2268 |
case ACTION_SPY_INCITE_CITY: |
2262 | 2269 |
case ACTION_SPY_INCITE_CITY_ESC: |
2263 | 2270 |
case ACTION_SPY_SABOTAGE_UNIT: |
2271 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
2264 | 2272 |
case ACTION_STEAL_MAPS: |
2265 | 2273 |
case ACTION_STEAL_MAPS_ESC: |
2266 | 2274 |
case ACTION_SPY_NUKE: |
... | ... | |
3007 | 3015 |
/* TODO */ |
3008 | 3016 |
break; |
3009 | 3017 |
case ACTION_SPY_SABOTAGE_UNIT: |
3018 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
3010 | 3019 |
/* All uncertainty comes from potential diplomatic battles. */ |
3011 | 3020 |
chance = ap_diplomat_battle(actor_unit, target_unit); |
3012 | 3021 |
break; |
common/actions.h | ||
---|---|---|
91 | 91 |
#define SPECENUM_VALUE20NAME "Bribe Unit" |
92 | 92 |
#define SPECENUM_VALUE21 ACTION_SPY_SABOTAGE_UNIT |
93 | 93 |
#define SPECENUM_VALUE21NAME "Sabotage Unit" |
94 |
#define SPECENUM_VALUE22 ACTION_CAPTURE_UNITS |
|
95 |
#define SPECENUM_VALUE22NAME "Capture Units" |
|
96 |
#define SPECENUM_VALUE23 ACTION_FOUND_CITY |
|
97 |
#define SPECENUM_VALUE23NAME "Found City" |
|
98 |
#define SPECENUM_VALUE24 ACTION_JOIN_CITY |
|
99 |
#define SPECENUM_VALUE24NAME "Join City" |
|
100 |
#define SPECENUM_VALUE25 ACTION_STEAL_MAPS |
|
101 |
#define SPECENUM_VALUE25NAME "Steal Maps" |
|
102 |
#define SPECENUM_VALUE26 ACTION_STEAL_MAPS_ESC |
|
103 |
#define SPECENUM_VALUE26NAME "Steal Maps Escape" |
|
104 |
#define SPECENUM_VALUE27 ACTION_BOMBARD |
|
105 |
#define SPECENUM_VALUE27NAME "Bombard" |
|
106 |
#define SPECENUM_VALUE28 ACTION_SPY_NUKE |
|
107 |
#define SPECENUM_VALUE28NAME "Suitcase Nuke" |
|
108 |
#define SPECENUM_VALUE29 ACTION_SPY_NUKE_ESC |
|
109 |
#define SPECENUM_VALUE29NAME "Suitcase Nuke Escape" |
|
110 |
#define SPECENUM_VALUE30 ACTION_NUKE |
|
111 |
#define SPECENUM_VALUE30NAME "Explode Nuclear" |
|
112 |
#define SPECENUM_VALUE31 ACTION_DESTROY_CITY |
|
113 |
#define SPECENUM_VALUE31NAME "Destroy City" |
|
114 |
#define SPECENUM_VALUE32 ACTION_EXPEL_UNIT |
|
115 |
#define SPECENUM_VALUE32NAME "Expel Unit" |
|
116 |
#define SPECENUM_VALUE33 ACTION_RECYCLE_UNIT |
|
117 |
#define SPECENUM_VALUE33NAME "Recycle Unit" |
|
118 |
#define SPECENUM_VALUE34 ACTION_DISBAND_UNIT |
|
119 |
#define SPECENUM_VALUE34NAME "Disband Unit" |
|
120 |
#define SPECENUM_VALUE35 ACTION_HOME_CITY |
|
121 |
#define SPECENUM_VALUE35NAME "Home City" |
|
122 |
#define SPECENUM_VALUE36 ACTION_UPGRADE_UNIT |
|
123 |
#define SPECENUM_VALUE36NAME "Upgrade Unit" |
|
124 |
#define SPECENUM_VALUE37 ACTION_PARADROP |
|
125 |
#define SPECENUM_VALUE37NAME "Paradrop Unit" |
|
126 |
#define SPECENUM_VALUE38 ACTION_AIRLIFT |
|
127 |
#define SPECENUM_VALUE38NAME "Airlift Unit" |
|
128 |
#define SPECENUM_VALUE39 ACTION_ATTACK |
|
129 |
#define SPECENUM_VALUE39NAME "Attack" |
|
130 |
#define SPECENUM_VALUE40 ACTION_CONQUER_CITY |
|
131 |
#define SPECENUM_VALUE40NAME "Conquer City" |
|
132 |
#define SPECENUM_VALUE41 ACTION_HEAL_UNIT |
|
133 |
#define SPECENUM_VALUE41NAME "Heal 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" |
|
134 | 136 |
#define SPECENUM_BITVECTOR bv_actions |
135 | 137 |
/* Limited by what values num2char() can store in unit orders in |
136 | 138 |
* savegames. */ |
common/aicore/pf_tools.c | ||
---|---|---|
695 | 695 |
} |
696 | 696 |
if (utype_can_do_action(parameter->utype, ACTION_SPY_POISON) |
697 | 697 |
|| utype_can_do_action(parameter->utype, ACTION_SPY_SABOTAGE_UNIT) |
698 |
|| utype_can_do_action(parameter->utype, ACTION_SPY_SABOTAGE_UNIT_ESC) |
|
698 | 699 |
|| utype_can_do_action(parameter->utype, ACTION_SPY_BRIBE_UNIT) |
699 | 700 |
|| utype_can_do_action(parameter->utype, ACTION_SPY_SABOTAGE_CITY) |
700 | 701 |
|| utype_can_do_action(parameter->utype, |
common/unittype.c | ||
---|---|---|
860 | 860 |
* be split in an actor consuming and a non actor consuming version. */ |
861 | 861 |
switch (paction->id) { |
862 | 862 |
case ACTION_SPY_POISON: |
863 |
case ACTION_SPY_SABOTAGE_UNIT: |
|
864 | 863 |
/* A Spy has a chance to escape after performing the action. */ |
865 | 864 |
return !utype_has_flag(utype, UTYF_SPY); |
866 | 865 |
case ACTION_ATTACK: |
data/civ2/effects.ruleset | ||
---|---|---|
2410 | 2410 |
value = 1 |
2411 | 2411 |
reqs = |
2412 | 2412 |
{ "type", "name", "range", "present" |
2413 |
"Action", "Sabotage Unit", "Local", TRUE |
|
2413 |
"Action", "Sabotage Unit Escape", "Local", TRUE
|
|
2414 | 2414 |
"DiplRel", "War", "Local", FALSE |
2415 | 2415 |
} |
2416 | 2416 |
data/civ2/game.ruleset | ||
---|---|---|
240 | 240 |
ui_name_suitcase_nuke_escape = _("Plant %sNuclear Device%s") |
241 | 241 | |
242 | 242 |
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */ |
243 |
ui_name_sabotage_unit = _("%sSabotage Enemy Unit%s") |
|
243 |
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
|
|
244 | 244 | |
245 | 245 |
; /* TRANS: _Bribe Enemy Unit (3% chance of success). */ |
246 | 246 |
ui_name_bribe_unit = _("%sBribe Enemy Unit%s") |
... | ... | |
527 | 527 |
} |
528 | 528 | |
529 | 529 |
[actionenabler_sabotage_unit] |
530 |
action = "Sabotage Unit" |
|
530 |
action = "Sabotage Unit Escape"
|
|
531 | 531 |
actor_reqs = |
532 | 532 |
{ "type", "name", "range" |
533 | 533 |
"UnitFlag", "Spy", "Local" |
data/civ2civ3/effects.ruleset | ||
---|---|---|
4302 | 4302 |
value = 1 |
4303 | 4303 |
reqs = |
4304 | 4304 |
{ "type", "name", "range", "present" |
4305 |
"Action", "Sabotage Unit", "Local", TRUE |
|
4305 |
"Action", "Sabotage Unit Escape", "Local", TRUE
|
|
4306 | 4306 |
"DiplRel", "War", "Local", FALSE |
4307 | 4307 |
} |
4308 | 4308 |
data/civ2civ3/game.ruleset | ||
---|---|---|
248 | 248 |
ui_name_poison_city = _("%sPoison City%s") |
249 | 249 | |
250 | 250 |
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */ |
251 |
ui_name_sabotage_unit = _("%sSabotage Enemy Unit%s") |
|
251 |
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
|
|
252 | 252 | |
253 | 253 |
; /* TRANS: _Bribe Enemy Unit (3% chance of success). */ |
254 | 254 |
ui_name_bribe_unit = _("%sBribe Enemy Unit%s") |
... | ... | |
577 | 577 |
} |
578 | 578 | |
579 | 579 |
[actionenabler_sabotage_unit] |
580 |
action = "Sabotage Unit" |
|
580 |
action = "Sabotage Unit Escape"
|
|
581 | 581 |
actor_reqs = |
582 | 582 |
{ "type", "name", "range" |
583 | 583 |
"UnitFlag", "Spy", "Local" |
data/classic/effects.ruleset | ||
---|---|---|
2477 | 2477 |
value = 1 |
2478 | 2478 |
reqs = |
2479 | 2479 |
{ "type", "name", "range", "present" |
2480 |
"Action", "Sabotage Unit", "Local", TRUE |
|
2480 |
"Action", "Sabotage Unit Escape", "Local", TRUE
|
|
2481 | 2481 |
"DiplRel", "War", "Local", FALSE |
2482 | 2482 |
} |
2483 | 2483 |
data/classic/game.ruleset | ||
---|---|---|
241 | 241 |
ui_name_poison_city = _("%sPoison City%s") |
242 | 242 | |
243 | 243 |
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */ |
244 |
ui_name_sabotage_unit = _("%sSabotage Enemy Unit%s") |
|
244 |
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
|
|
245 | 245 | |
246 | 246 |
; /* TRANS: _Bribe Enemy Unit (3% chance of success). */ |
247 | 247 |
ui_name_bribe_unit = _("%sBribe Enemy Unit%s") |
... | ... | |
539 | 539 |
} |
540 | 540 | |
541 | 541 |
[actionenabler_sabotage_unit] |
542 |
action = "Sabotage Unit" |
|
542 |
action = "Sabotage Unit Escape"
|
|
543 | 543 |
actor_reqs = |
544 | 544 |
{ "type", "name", "range" |
545 | 545 |
"UnitFlag", "Spy", "Local" |
data/experimental/effects.ruleset | ||
---|---|---|
2860 | 2860 |
value = 1 |
2861 | 2861 |
reqs = |
2862 | 2862 |
{ "type", "name", "range", "present" |
2863 |
"Action", "Sabotage Unit", "Local", TRUE |
|
2863 |
"Action", "Sabotage Unit Escape", "Local", TRUE
|
|
2864 | 2864 |
"DiplRel", "War", "Local", FALSE |
2865 | 2865 |
} |
2866 | 2866 |
data/experimental/game.ruleset | ||
---|---|---|
246 | 246 |
ui_name_poison_city = _("%sPoison City%s") |
247 | 247 | |
248 | 248 |
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */ |
249 |
ui_name_sabotage_unit = _("%sSabotage Enemy Unit%s") |
|
249 |
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
|
|
250 | 250 | |
251 | 251 |
; /* TRANS: _Bribe Enemy Unit (3% chance of success). */ |
252 | 252 |
ui_name_bribe_unit = _("%sBribe Enemy Unit%s") |
... | ... | |
558 | 558 |
} |
559 | 559 | |
560 | 560 |
[actionenabler_sabotage_unit] |
561 |
action = "Sabotage Unit" |
|
561 |
action = "Sabotage Unit Escape"
|
|
562 | 562 |
actor_reqs = |
563 | 563 |
{ "type", "name", "range" |
564 | 564 |
"UnitFlag", "Spy", "Local" |
data/multiplayer/effects.ruleset | ||
---|---|---|
2512 | 2512 |
value = 1 |
2513 | 2513 |
reqs = |
2514 | 2514 |
{ "type", "name", "range", "present" |
2515 |
"Action", "Sabotage Unit", "Local", TRUE |
|
2515 |
"Action", "Sabotage Unit Escape", "Local", TRUE
|
|
2516 | 2516 |
"DiplRel", "War", "Local", FALSE |
2517 | 2517 |
} |
2518 | 2518 |
data/multiplayer/game.ruleset | ||
---|---|---|
246 | 246 |
ui_name_poison_city = _("%sPoison City%s") |
247 | 247 | |
248 | 248 |
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */ |
249 |
ui_name_sabotage_unit = _("%sSabotage Enemy Unit%s") |
|
249 |
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
|
|
250 | 250 | |
251 | 251 |
; /* TRANS: _Bribe Enemy Unit (3% chance of success). */ |
252 | 252 |
ui_name_bribe_unit = _("%sBribe Enemy Unit%s") |
... | ... | |
538 | 538 |
} |
539 | 539 | |
540 | 540 |
[actionenabler_sabotage_unit] |
541 |
action = "Sabotage Unit" |
|
541 |
action = "Sabotage Unit Escape"
|
|
542 | 542 |
actor_reqs = |
543 | 543 |
{ "type", "name", "range" |
544 | 544 |
"UnitFlag", "Spy", "Local" |
data/sandbox/effects.ruleset | ||
---|---|---|
4362 | 4362 |
value = 1 |
4363 | 4363 |
reqs = |
4364 | 4364 |
{ "type", "name", "range", "present" |
4365 |
"Action", "Sabotage Unit", "Local", TRUE |
|
4365 |
"Action", "Sabotage Unit Escape", "Local", TRUE
|
|
4366 | 4366 |
"DiplRel", "War", "Local", FALSE |
4367 | 4367 |
} |
4368 | 4368 |
data/sandbox/game.ruleset | ||
---|---|---|
245 | 245 |
ui_name_poison_city = _("%sPoison City%s") |
246 | 246 | |
247 | 247 |
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */ |
248 |
ui_name_sabotage_unit = _("%sSabotage Enemy Unit%s") |
|
248 |
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
|
|
249 | 249 | |
250 | 250 |
; /* TRANS: _Bribe Enemy Unit (3% chance of success). */ |
251 | 251 |
ui_name_bribe_unit = _("%sBribe Enemy Unit%s") |
... | ... | |
593 | 593 |
} |
594 | 594 | |
595 | 595 |
[actionenabler_sabotage_unit] |
596 |
action = "Sabotage Unit" |
|
596 |
action = "Sabotage Unit Escape"
|
|
597 | 597 |
actor_reqs = |
598 | 598 |
{ "type", "name", "range" |
599 | 599 |
"UnitFlag", "Spy", "Local" |
data/webperimental/effects.ruleset | ||
---|---|---|
2596 | 2596 |
value = 1 |
2597 | 2597 |
reqs = |
2598 | 2598 |
{ "type", "name", "range", "present" |
2599 |
"Action", "Sabotage Unit", "Local", TRUE |
|
2599 |
"Action", "Sabotage Unit Escape", "Local", TRUE
|
|
2600 | 2600 |
"DiplRel", "War", "Local", FALSE |
2601 | 2601 |
} |
2602 | 2602 |
data/webperimental/game.ruleset | ||
---|---|---|
246 | 246 |
ui_name_poison_city = _("%sPoison City%s") |
247 | 247 | |
248 | 248 |
; /* TRANS: _Sabotage Enemy Unit (3% chance of success). */ |
249 |
ui_name_sabotage_unit = _("%sSabotage Enemy Unit%s") |
|
249 |
ui_name_sabotage_unit_escape = _("%sSabotage Enemy Unit%s")
|
|
250 | 250 | |
251 | 251 |
; /* TRANS: _Bribe Enemy Unit (3% chance of success). */ |
252 | 252 |
ui_name_bribe_unit = _("%sBribe Enemy Unit%s") |
... | ... | |
584 | 584 |
} |
585 | 585 | |
586 | 586 |
[actionenabler_sabotage_unit] |
587 |
action = "Sabotage Unit" |
|
587 |
action = "Sabotage Unit Escape"
|
|
588 | 588 |
actor_reqs = |
589 | 589 |
{ "type", "name", "range", "present" |
590 | 590 |
"UnitFlag", "Spy", "Local", TRUE |
... | ... | |
600 | 600 |
} |
601 | 601 | |
602 | 602 |
[actionenabler_sabotage_unit_killstack_enabled] |
603 |
action = "Sabotage Unit" |
|
603 |
action = "Sabotage Unit Escape"
|
|
604 | 604 |
actor_reqs = |
605 | 605 |
{ "type", "name", "range" |
606 | 606 |
"UnitFlag", "Spy", "Local" |
doc/README.actions | ||
---|---|---|
405 | 405 |
=========================================== |
406 | 406 |
"Sabotage Unit" - Halve the target unit's hit points. |
407 | 407 |
* UI name can be set using ui_name_sabotage_unit |
408 |
* spends the actor unit |
|
409 |
* actor must be on the same tile as the target or on the tile next to it. |
|
410 |
* target must be visible for the actor. |
|
411 | ||
412 |
"Sabotage Unit Escape" - Halve the target unit's hit points. |
|
413 |
* UI name can be set using ui_name_sabotage_unit_escape |
|
408 | 414 |
* actor must be on the same tile as the target or on the tile next to it. |
409 | 415 |
* target must be visible for the actor. |
410 | 416 |
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.11"
|
|
59 |
NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.1-2017.Aug.19"
|
|
60 | 60 |
NETWORK_CAPSTRING_OPTIONAL="" |
61 | 61 | |
62 | 62 |
FREECIV_DISTRIBUTOR="" |
server/advisors/advdata.c | ||
---|---|---|
873 | 873 |
case ACTION_SPY_TARGETED_STEAL_TECH: |
874 | 874 |
case ACTION_SPY_TARGETED_STEAL_TECH_ESC: |
875 | 875 |
case ACTION_SPY_SABOTAGE_UNIT: |
876 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
876 | 877 |
case ACTION_CAPTURE_UNITS: |
877 | 878 |
case ACTION_STEAL_MAPS: |
878 | 879 |
case ACTION_STEAL_MAPS_ESC: |
server/ruleset.c | ||
---|---|---|
6077 | 6077 |
text); |
6078 | 6078 | |
6079 | 6079 |
text = secfile_lookup_str_default(file, |
6080 |
/* TRANS: S_abotage Enemy Unit and Escape (3% chance of success). */ |
|
6081 |
N_("S%sabotage Enemy Unit and Escape%s"), |
|
6082 |
"actions.ui_name_sabotage_unit_escape"); |
|
6083 |
sz_strlcpy(action_by_number(ACTION_SPY_SABOTAGE_UNIT_ESC)->ui_name, |
|
6084 |
text); |
|
6085 | ||
6086 |
text = secfile_lookup_str_default(file, |
|
6080 | 6087 |
/* TRANS: Bribe Enemy _Unit (3% chance of success). */ |
6081 | 6088 |
N_("Bribe Enemy %sUnit%s"), |
6082 | 6089 |
"actions.ui_name_bribe_unit"); |
server/savegame3.c | ||
---|---|---|
5609 | 5609 |
case ACTION_HELP_WONDER: |
5610 | 5610 |
case ACTION_SPY_BRIBE_UNIT: |
5611 | 5611 |
case ACTION_SPY_SABOTAGE_UNIT: |
5612 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
5612 | 5613 |
case ACTION_CAPTURE_UNITS: |
5613 | 5614 |
case ACTION_FOUND_CITY: |
5614 | 5615 |
case ACTION_JOIN_CITY: |
server/unithand.c | ||
---|---|---|
594 | 594 |
case ACTION_HELP_WONDER: |
595 | 595 |
case ACTION_SPY_BRIBE_UNIT: |
596 | 596 |
case ACTION_SPY_SABOTAGE_UNIT: |
597 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
597 | 598 |
case ACTION_CAPTURE_UNITS: /* Only foreign is a hard req. */ |
598 | 599 |
case ACTION_FOUND_CITY: |
599 | 600 |
case ACTION_JOIN_CITY: |
... | ... | |
2412 | 2413 |
paction)); |
2413 | 2414 |
break; |
2414 | 2415 |
case ACTION_SPY_SABOTAGE_UNIT: |
2416 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
2417 |
/* Difference is caused by data in the action structure. */ |
|
2415 | 2418 |
ACTION_STARTED_UNIT_UNIT(action_type, actor_unit, punit, |
2416 | 2419 |
spy_sabotage_unit(pplayer, actor_unit, |
2417 | 2420 |
punit, paction)); |
... | ... | |
4780 | 4783 |
case ACTION_HELP_WONDER: |
4781 | 4784 |
case ACTION_SPY_BRIBE_UNIT: |
4782 | 4785 |
case ACTION_SPY_SABOTAGE_UNIT: |
4786 |
case ACTION_SPY_SABOTAGE_UNIT_ESC: |
|
4783 | 4787 |
case ACTION_CAPTURE_UNITS: |
4784 | 4788 |
case ACTION_FOUND_CITY: |
4785 | 4789 |
case ACTION_JOIN_CITY: |
tools/ruleutil/rulesave.c | ||
---|---|---|
1048 | 1048 |
action_by_number(ACTION_SPY_SABOTAGE_UNIT)->ui_name, |
1049 | 1049 |
"actions.ui_name_sabotage_unit"); |
1050 | 1050 |
secfile_insert_str(sfile, |
1051 |
action_by_number(ACTION_SPY_SABOTAGE_UNIT_ESC)->ui_name, |
|
1052 |
"actions.ui_name_sabotage_unit_escape"); |
|
1053 |
secfile_insert_str(sfile, |
|
1051 | 1054 |
action_by_number(ACTION_SPY_BRIBE_UNIT)->ui_name, |
1052 | 1055 |
"actions.ui_name_bribe_unit"); |
1053 | 1056 |
secfile_insert_str(sfile, |
1054 |
- |