Project

General

Profile

Feature #765 ยป 0014-Rename-Conquer-City-as-Conquer-City-Shrink.patch

Marko Lindqvist, 07/27/2024 02:50 AM

View differences:

ai/default/daitools.c
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
0, "", ACTION_SUICIDE_ATTACK);
} else if ((tcity = tile_city(ptile))
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY,
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY_SHRINK,
punit, tcity)) {
/* Choose "Conquer City". */
/* Choose "Conquer City Shrink". */
unit_do_action(unit_owner(punit), punit->id, tcity->id,
0, "", ACTION_CONQUER_CITY);
0, "", ACTION_CONQUER_CITY_SHRINK);
} else if ((tcity = tile_city(ptile))
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY2,
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY_SHRINK2,
punit, tcity)) {
/* Choose "Conquer City 2". */
/* Choose "Conquer City Shrink 2". */
unit_do_action(unit_owner(punit), punit->id, tcity->id,
0, "", ACTION_CONQUER_CITY2);
0, "", ACTION_CONQUER_CITY_SHRINK2);
} else if ((tcity = tile_city(ptile))
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY3,
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY_SHRINK3,
punit, tcity)) {
/* Choose "Conquer City 3". */
/* Choose "Conquer City Shrink 3". */
unit_do_action(unit_owner(punit), punit->id, tcity->id,
0, "", ACTION_CONQUER_CITY3);
0, "", ACTION_CONQUER_CITY_SHRINK3);
} else if ((tcity = tile_city(ptile))
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY4,
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY_SHRINK4,
punit, tcity)) {
/* Choose "Conquer City 4". */
/* Choose "Conquer City Shrink 4". */
unit_do_action(unit_owner(punit), punit->id, tcity->id,
0, "", ACTION_CONQUER_CITY4);
0, "", ACTION_CONQUER_CITY_SHRINK4);
} else if (!can_unit_survive_at_tile(nmap, punit, ptile)
&& ((ptrans = transporter_for_unit_at(punit, ptile)))
&& is_action_enabled_unit_on_unit(nmap, ACTION_TRANSPORT_EMBARK,
client/gui-qt/dialogs.cpp
static void unit_home_city(QVariant data1, QVariant data2);
static void unit_upgrade(QVariant data1, QVariant data2);
static void airlift(QVariant data1, QVariant data2);
static void conquer_city(QVariant data1, QVariant data2);
static void conquer_city2(QVariant data1, QVariant data2);
static void conquer_city_shrink(QVariant data1, QVariant data2);
static void conquer_city_shrink2(QVariant data1, QVariant data2);
static void conquer_extras(QVariant data1, QVariant data2);
static void conquer_extras2(QVariant data1, QVariant data2);
static void heal_unit(QVariant data1, QVariant data2);
......
action_function[ACTION_HOME_CITY] = unit_home_city;
action_function[ACTION_UPGRADE_UNIT] = unit_upgrade;
action_function[ACTION_AIRLIFT] = airlift;
action_function[ACTION_CONQUER_CITY] = conquer_city;
action_function[ACTION_CONQUER_CITY2] = conquer_city2;
action_function[ACTION_CONQUER_CITY_SHRINK] = conquer_city_shrink;
action_function[ACTION_CONQUER_CITY_SHRINK2] = conquer_city_shrink2;
action_function[ACTION_STRIKE_BUILDING] = spy_request_strike_bld_list;
action_function[ACTION_NUKE_CITY] = nuke_city;
......
/***********************************************************************//**
Action "Conquer City" for choice dialog
***************************************************************************/
static void conquer_city(QVariant data1, QVariant data2)
static void conquer_city_shrink(QVariant data1, QVariant data2)
{
int actor_id = data1.toInt();
int tgt_city_id = data2.toInt();
if (game_unit_by_number(actor_id) != nullptr
&& game_city_by_number(tgt_city_id) != nullptr) {
request_do_action(ACTION_CONQUER_CITY,
request_do_action(ACTION_CONQUER_CITY_SHRINK,
actor_id, tgt_city_id, 0, "");
}
}
......
/***********************************************************************//**
Action "Conquer City 2" for choice dialog
***************************************************************************/
static void conquer_city2(QVariant data1, QVariant data2)
static void conquer_city_shrink2(QVariant data1, QVariant data2)
{
int actor_id = data1.toInt();
int tgt_city_id = data2.toInt();
if (game_unit_by_number(actor_id) != nullptr
&& game_city_by_number(tgt_city_id) != nullptr) {
request_do_action(ACTION_CONQUER_CITY2,
request_do_action(ACTION_CONQUER_CITY_SHRINK2,
actor_id, tgt_city_id, 0, "");
}
}
client/packhand.c
ACTION_NUKE, ACTION_NUKE_CITY, ACTION_NUKE_UNITS,
ACTION_ATTACK, ACTION_SUICIDE_ATTACK,
ACTION_WIPE_UNITS,
ACTION_CONQUER_CITY, ACTION_CONQUER_CITY2,
ACTION_CONQUER_CITY3, ACTION_CONQUER_CITY4,
ACTION_CONQUER_CITY_SHRINK, ACTION_CONQUER_CITY_SHRINK2,
ACTION_CONQUER_CITY_SHRINK3, ACTION_CONQUER_CITY_SHRINK4,
ACTION_STRIKE_PRODUCTION,
ACTION_CONQUER_EXTRAS, ACTION_CONQUER_EXTRAS2,
ACTION_CONQUER_EXTRAS3, ACTION_CONQUER_EXTRAS4,
common/actions.c
unit_action_new(ACTION_STRIKE_PRODUCTION, ACTRES_STRIKE_PRODUCTION,
FALSE, FALSE,
MAK_STAYS, 1, 1, FALSE);
actions[ACTION_CONQUER_CITY] =
unit_action_new(ACTION_CONQUER_CITY, ACTRES_CONQUER_CITY,
actions[ACTION_CONQUER_CITY_SHRINK] =
unit_action_new(ACTION_CONQUER_CITY_SHRINK, ACTRES_CONQUER_CITY,
FALSE, TRUE,
MAK_REGULAR, 1, 1, FALSE);
actions[ACTION_CONQUER_CITY2] =
unit_action_new(ACTION_CONQUER_CITY2, ACTRES_CONQUER_CITY,
actions[ACTION_CONQUER_CITY_SHRINK2] =
unit_action_new(ACTION_CONQUER_CITY_SHRINK2, ACTRES_CONQUER_CITY,
FALSE, TRUE,
MAK_REGULAR, 1, 1, FALSE);
actions[ACTION_CONQUER_CITY3] =
unit_action_new(ACTION_CONQUER_CITY3, ACTRES_CONQUER_CITY,
actions[ACTION_CONQUER_CITY_SHRINK3] =
unit_action_new(ACTION_CONQUER_CITY_SHRINK3, ACTRES_CONQUER_CITY,
FALSE, TRUE,
MAK_REGULAR, 1, 1, FALSE);
actions[ACTION_CONQUER_CITY4] =
unit_action_new(ACTION_CONQUER_CITY4, ACTRES_CONQUER_CITY,
actions[ACTION_CONQUER_CITY_SHRINK4] =
unit_action_new(ACTION_CONQUER_CITY_SHRINK4, ACTRES_CONQUER_CITY,
FALSE, TRUE,
MAK_REGULAR, 1, 1, FALSE);
actions[ACTION_CONQUER_EXTRAS] =
......
return "ui_name_surgical_strike_building";
case ACTION_STRIKE_PRODUCTION:
return "ui_name_surgical_strike_production";
case ACTION_CONQUER_CITY:
return "ui_name_conquer_city";
case ACTION_CONQUER_CITY2:
return "ui_name_conquer_city_2";
case ACTION_CONQUER_CITY3:
return "ui_name_conquer_city_3";
case ACTION_CONQUER_CITY4:
return "ui_name_conquer_city_4";
case ACTION_CONQUER_CITY_SHRINK:
return "ui_name_conquer_city_shrink";
case ACTION_CONQUER_CITY_SHRINK2:
return "ui_name_conquer_city_shrink2";
case ACTION_CONQUER_CITY_SHRINK3:
return "ui_name_conquer_city_shrink3";
case ACTION_CONQUER_CITY_SHRINK4:
return "ui_name_conquer_city_shrink4";
case ACTION_CONQUER_EXTRAS:
return "ui_name_conquer_extras";
case ACTION_CONQUER_EXTRAS2:
......
case ACTION_STRIKE_PRODUCTION:
/* TRANS: Surgical Str_ike Production (100% chance of success). */
return N_("Surgical Str%sike Production%s");
case ACTION_CONQUER_CITY:
case ACTION_CONQUER_CITY3:
case ACTION_CONQUER_CITY4:
case ACTION_CONQUER_CITY_SHRINK:
case ACTION_CONQUER_CITY_SHRINK3:
case ACTION_CONQUER_CITY_SHRINK4:
/* TRANS: _Conquer City (100% chance of success). */
return N_("%sConquer City%s");
case ACTION_CONQUER_CITY2:
case ACTION_CONQUER_CITY_SHRINK2:
/* TRANS: _Conquer City 2 (100% chance of success). */
return N_("%sConquer City 2%s");
case ACTION_CONQUER_EXTRAS:
......
case ACTION_COLLECT_RANSOM:
case ACTION_STRIKE_BUILDING:
case ACTION_STRIKE_PRODUCTION:
case ACTION_CONQUER_CITY:
case ACTION_CONQUER_CITY2:
case ACTION_CONQUER_CITY3:
case ACTION_CONQUER_CITY4:
case ACTION_CONQUER_CITY_SHRINK:
case ACTION_CONQUER_CITY_SHRINK2:
case ACTION_CONQUER_CITY_SHRINK3:
case ACTION_CONQUER_CITY_SHRINK4:
case ACTION_HEAL_UNIT:
case ACTION_HEAL_UNIT2:
case ACTION_TRANSFORM_TERRAIN:
......
case ACTION_COLLECT_RANSOM:
case ACTION_STRIKE_BUILDING:
case ACTION_STRIKE_PRODUCTION:
case ACTION_CONQUER_CITY:
case ACTION_CONQUER_CITY2:
case ACTION_CONQUER_CITY3:
case ACTION_CONQUER_CITY4:
case ACTION_CONQUER_CITY_SHRINK:
case ACTION_CONQUER_CITY_SHRINK2:
case ACTION_CONQUER_CITY_SHRINK3:
case ACTION_CONQUER_CITY_SHRINK4:
case ACTION_HEAL_UNIT:
case ACTION_HEAL_UNIT2:
case ACTION_TRANSFORM_TERRAIN:
......
case ACTION_COLLECT_RANSOM:
case ACTION_STRIKE_BUILDING:
case ACTION_STRIKE_PRODUCTION:
case ACTION_CONQUER_CITY:
case ACTION_CONQUER_CITY2:
case ACTION_CONQUER_CITY3:
case ACTION_CONQUER_CITY4:
case ACTION_CONQUER_CITY_SHRINK:
case ACTION_CONQUER_CITY_SHRINK2:
case ACTION_CONQUER_CITY_SHRINK3:
case ACTION_CONQUER_CITY_SHRINK4:
case ACTION_HEAL_UNIT:
case ACTION_HEAL_UNIT2:
case ACTION_TRANSFORM_TERRAIN:
......
case ACTION_COLLECT_RANSOM:
case ACTION_STRIKE_BUILDING:
case ACTION_STRIKE_PRODUCTION:
case ACTION_CONQUER_CITY:
case ACTION_CONQUER_CITY2:
case ACTION_CONQUER_CITY3:
case ACTION_CONQUER_CITY4:
case ACTION_CONQUER_CITY_SHRINK:
case ACTION_CONQUER_CITY_SHRINK2:
case ACTION_CONQUER_CITY_SHRINK3:
case ACTION_CONQUER_CITY_SHRINK4:
case ACTION_HEAL_UNIT:
case ACTION_HEAL_UNIT2:
case ACTION_TRANSFORM_TERRAIN:
......
return "wipe_units_blocked_by";
case ACTION_COLLECT_RANSOM:
return "collect_ransom_blocked_by";
case ACTION_CONQUER_CITY:
return "conquer_city_blocked_by";
case ACTION_CONQUER_CITY2:
return "conquer_city_2_blocked_by";
case ACTION_CONQUER_CITY3:
return "conquer_city_3_blocked_by";
case ACTION_CONQUER_CITY4:
return "conquer_city_4_blocked_by";
case ACTION_CONQUER_CITY_SHRINK:
return "conquer_city_shrink_blocked_by";
case ACTION_CONQUER_CITY_SHRINK2:
return "conquer_city_shrink_2_blocked_by";
case ACTION_CONQUER_CITY_SHRINK3:
return "conquer_city_shrink_3_blocked_by";
case ACTION_CONQUER_CITY_SHRINK4:
return "conquer_city_shrink_4_blocked_by";
case ACTION_UNIT_MOVE:
return "move_blocked_by";
case ACTION_UNIT_MOVE2:
......
case ACTION_NUKE_UNITS:
case ACTION_SUICIDE_ATTACK:
case ACTION_SUICIDE_ATTACK2:
case ACTION_CONQUER_CITY:
case ACTION_CONQUER_CITY2:
case ACTION_CONQUER_CITY3:
case ACTION_CONQUER_CITY4:
case ACTION_CONQUER_CITY_SHRINK:
case ACTION_CONQUER_CITY_SHRINK2:
case ACTION_CONQUER_CITY_SHRINK3:
case ACTION_CONQUER_CITY_SHRINK4:
case ACTION_SPY_POISON:
case ACTION_SPY_POISON_ESC:
case ACTION_SPY_SABOTAGE_UNIT:
......
**************************************************************************/
const char *gen_action_name_update_cb(const char *old_name)
{
/* Uncomment and fill implementation, if compat mode
* action name conversions needed. */
#if 0
if (is_ruleset_compat_mode()) {
if (fc_strcasecmp("Conquer City", old_name)) {
return "Conquer City Shrink";
}
if (fc_strcasecmp("Conquer City 2", old_name)) {
return "Conquer City Shrink 2";
}
if (fc_strcasecmp("Conquer City 3", old_name)) {
return "Conquer City Shrink 3";
}
if (fc_strcasecmp("Conquer City 4", old_name)) {
return "Conquer City Shrink 4";
}
}
#endif
return old_name;
}
data/alien/actions.ruleset
; Forbid "Suicide Attack" if any one of the listed actions are legal.
suicide_attack_blocked_by = "Collect Ransom", "Capture Units", "Bombard"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Capture Units", "Bombard", "Attack",
"Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Capture Units", "Bombard", "Attack",
"Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Transport Disembark 2",
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
attack_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Conquer City 2",
"Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Transform Terrain (3% chance of success). */
ui_name_transform_terrain = _("%sTransform Terrain%s")
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
data/civ1/actions.ruleset
suicide_attack_blocked_by = "Collect Ransom", "Explode Nuclear",
"Nuke City", "Nuke Units"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Enter Hut", "Enter Hut 2"
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
attack_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Conquer City 2",
"Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Transform Terrain (3% chance of success). */
ui_name_transform_terrain = _("%sTransform Terrain%s")
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
data/civ2/actions.ruleset
suicide_attack_blocked_by = "Collect Ransom", "Explode Nuclear",
"Nuke City", "Nuke Units"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Enter Hut", "Frighten Hut"
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
attack_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Conquer City 2",
"Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Transform Terrain (3% chance of success). */
ui_name_transform_terrain = _("%sTransform Terrain%s")
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_marines]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
data/civ2civ3/actions.ruleset
suicide_attack_blocked_by = "Collect Ransom", "Capture Units", "Bombard",
"Explode Nuclear", "Nuke City", "Nuke Units"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Capture Units", "Bombard", "Explode Nuclear",
"Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Capture Units", "Bombard", "Explode Nuclear",
"Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City 2" if any one of the listed actions are legal.
conquer_city_2_blocked_by = "Capture Units", "Bombard", "Explode Nuclear",
"Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink 2" if any one of the listed actions are legal.
conquer_city_shrink_2_blocked_by = "Capture Units", "Bombard", "Explode Nuclear",
"Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Transport Disembark 2",
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
attack_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Conquer City 2",
"Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Conquer City from non native (100% chance of success). */
ui_name_conquer_city_2 = _("%sConquer City from non native%s")
ui_name_conquer_city_shrink_2 = _("%sConquer City from non native%s")
; /* TRANS: _Transform Terrain (3% chance of success). */
ui_name_transform_terrain = _("%sTransform Terrain%s")
......
; Can make the help text less redundant when you document it your self.
; "Transport Disembark 2" is "Transport Disembark" but from a non native
; tile. "Conquer City 2" has the same relation to "Conquer City". So is
; "Enter Hut 2" for "Enter Hut" and "Frighten Hut 2" for "Frighten Hut".
; tile. "Conquer City Shrink 2" has the same relation to "Conquer City Shrink".
; So is "Enter Hut 2" for "Enter Hut" and "Frighten Hut 2" for "Frighten Hut".
; The version from the non native tile and the native tile version won`t
; appear in the same action selection dialog given their opposite
; requirements. Avoid double entries in the auto help by silencing it.
quiet_actions = "Transport Disembark 2", "Conquer City 2", "Enter Hut 2",
quiet_actions = "Transport Disembark 2", "Conquer City Shrink 2", "Enter Hut 2",
"Frighten Hut 2", "Unit Move"
; /* <-- avoid gettext warnings
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_marines]
action = "Conquer City 2"
action = "Conquer City Shrink 2"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
data/civ2civ3/effects.ruleset
value = 65535
reqs =
{ "type", "name", "range", "present"
"Action", "Conquer City 2", "Local", TRUE
"Action", "Conquer City Shrink 2", "Local", TRUE
"UnitState", "OnNativeTile", "Local", TRUE
"UnitClassFlag", "TerrainSpeed", "Local", TRUE
}
data/classic/actions.ruleset
suicide_attack_blocked_by = "Collect Ransom", "Explode Nuclear",
"Nuke City", "Nuke Units"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City 2" if any one of the listed actions are legal.
conquer_city_2_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink 2" if any one of the listed actions are legal.
conquer_city_shrink_2_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Transport Disembark 2",
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
attack_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Conquer City 2",
"Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Conquer City from non native (100% chance of success). */
ui_name_conquer_city_2 = _("%sConquer City from non native%s")
ui_name_conquer_city_shrink_2 = _("%sConquer City from non native%s")
; /* TRANS: _Conquer Fortress (100% chance of success). */
ui_name_conquer_extras = _("%sConquer Fortress%s")
......
; Can make the help text less redundant when you document it your self.
; "Transport Disembark 2" is "Transport Disembark" but from a non native
; tile. "Conquer City 2" has the same relation to "Conquer City". So is
; "Enter Hut 2" for "Enter Hut", "Frighten Hut 2" for "Frighten Hut" and
; tile. "Conquer City Shrink 2" has the same relation to "Conquer City Shrink".
; So is "Enter Hut 2" for "Enter Hut", "Frighten Hut 2" for "Frighten Hut" and
; "Conquer Extras" for "Conquer Extras 2".
; The version from the non native tile and the native tile version won`t
; appear in the same action selection dialog given their opposite
; requirements. Avoid double entries in the auto help by silencing it.
quiet_actions = "Transport Disembark 2", "Conquer City 2", "Enter Hut 2",
quiet_actions = "Transport Disembark 2", "Conquer City Shrink 2", "Enter Hut 2",
"Frighten Hut 2", "Conquer Extras 2", "Unit Move"
; /* <-- avoid gettext warnings
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_marines]
action = "Conquer City 2"
action = "Conquer City Shrink 2"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
data/classic/effects.ruleset
value = 65535
reqs =
{ "type", "name", "range", "present"
"Action", "Conquer City 2", "Local", TRUE
"Action", "Conquer City Shrink 2", "Local", TRUE
"UnitState", "OnNativeTile", "Local", TRUE
"UnitClassFlag", "TerrainSpeed", "Local", TRUE
}
data/goldkeep/actions.ruleset
suicide_attack_blocked_by = "Collect Ransom", "Explode Nuclear",
"Nuke City", "Nuke Units"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City 2" if any one of the listed actions are legal.
conquer_city_2_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink 2" if any one of the listed actions are legal.
conquer_city_shrink_2_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Transport Disembark 2",
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
attack_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Conquer City 2",
"Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Conquer City from non native (100% chance of success). */
ui_name_conquer_city_2 = _("%sConquer City from non native%s")
ui_name_conquer_city_shrink_2 = _("%sConquer City from non native%s")
; /* TRANS: _Conquer Fortress (100% chance of success). */
ui_name_conquer_extras = _("%sConquer Fortress%s")
......
; Can make the help text less redundant when you document it your self.
; "Transport Disembark 2" is "Transport Disembark" but from a non native
; tile. "Conquer City 2" has the same relation to "Conquer City". So is
; "Enter Hut 2" for "Enter Hut" and "Frighten Hut 2" for "Frighten Hut" and
; tile. "Conquer City Shrink 2" has the same relation to "Conquer City Shrink".
; So is "Enter Hut 2" for "Enter Hut" and "Frighten Hut 2" for "Frighten Hut" and
; "Conquer Extras" for "Conquer Extras 2".
; The version from the non native tile and the native tile version won`t
; appear in the same action selection dialog given their opposite
; requirements. Avoid double entries in the auto help by silencing it.
quiet_actions = "Transport Disembark 2", "Conquer City 2", "Enter Hut 2",
quiet_actions = "Transport Disembark 2", "Conquer City Shrink 2", "Enter Hut 2",
"Frighten Hut 2", "Conquer Extras 2", "Unit Move"
; /* <-- avoid gettext warnings
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_marines]
action = "Conquer City 2"
action = "Conquer City Shrink 2"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
data/goldkeep/effects.ruleset
value = 65535
reqs =
{ "type", "name", "range", "present"
"Action", "Conquer City 2", "Local", TRUE
"Action", "Conquer City Shrink 2", "Local", TRUE
"UnitState", "OnNativeTile", "Local", TRUE
"UnitClassFlag", "TerrainSpeed", "Local", TRUE
}
data/granularity/actions.ruleset
; Forbid "Attack" if any one of the listed actions are legal.
attack_blocked_by = "Capture Units", "Bombard", "Bombard 2"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Attack", "Bombard", "Bombard 2"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Attack", "Bombard", "Bombard 2"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Transport Disembark 2"
......
ui_name_bombard_2 = _("%sBombard%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; Blank ruleset defined user actions.
; See the section "Ruleset defined actions" in doc/README.actions
......
}
[enabler_conquer_city_tribal]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_despotism]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_monarchy]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
data/multiplayer/actions.ruleset
suicide_attack_blocked_by = "Collect Ransom", "Explode Nuclear",
"Nuke City", "Nuke Units"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City 2" if any one of the listed actions are legal.
conquer_city_2_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink 2" if any one of the listed actions are legal.
conquer_city_shrink_2_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Transport Disembark 2",
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
attack_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Conquer City 2",
"Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Conquer City from non native (100% chance of success). */
ui_name_conquer_city_2 = _("%sConquer City from non native%s")
ui_name_conquer_city_shrink_2 = _("%sConquer City from non native%s")
; /* TRANS: _Conquer Fortress (100% chance of success). */
ui_name_conquer_extras = _("%sConquer Fortress%s")
......
; Can make the help text less redundant when you document it your self.
; "Transport Disembark 2" is "Transport Disembark" but from a non native
; tile. "Conquer City 2" has the same relation to "Conquer City". So is
; "Enter Hut 2" for "Enter Hut", "Frighten Hut 2" for "Frighten Hut" and
; tile. "Conquer City Shrink 2" has the same relation to "Conquer City Shrink".
; So is "Enter Hut 2" for "Enter Hut", "Frighten Hut 2" for "Frighten Hut" and
; "Conquer Extras" for "Conquer Extras 2".
; The version from the non native tile and the native tile version won`t
; appear in the same action selection dialog given their opposite
; requirements. Avoid double entries in the auto help by silencing it.
quiet_actions = "Transport Disembark 2", "Conquer City 2", "Enter Hut 2",
quiet_actions = "Transport Disembark 2", "Conquer City Shrink 2", "Enter Hut 2",
"Frighten Hut 2", "Conquer Extras 2", "Unit Move"
; /* <-- avoid gettext warnings
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_marines]
action = "Conquer City 2"
action = "Conquer City Shrink 2"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
data/multiplayer/effects.ruleset
value = 65535
reqs =
{ "type", "name", "range", "present"
"Action", "Conquer City 2", "Local", TRUE
"Action", "Conquer City Shrink 2", "Local", TRUE
"UnitState", "OnNativeTile", "Local", TRUE
"UnitClassFlag", "TerrainSpeed", "Local", TRUE
}
data/sandbox/actions.ruleset
suicide_attack_blocked_by = "Collect Ransom", "Capture Units", "Bombard",
"Explode Nuclear", "Nuke City", "Nuke Units"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Capture Units", "Bombard",
"Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Capture Units", "Bombard",
"Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City 2" if any one of the listed actions are legal.
conquer_city_2_blocked_by = "Capture Units", "Bombard",
"Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink 2" if any one of the listed actions are legal.
conquer_city_shrink_2_blocked_by = "Capture Units", "Bombard",
"Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Transport Disembark 2",
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
attack_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Conquer City 2",
"Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
; Actor units will be forced to try performing the following actions
; in the specified order after successfully performing "Wipe Units".
wipe_units_post_success_forced_actions = "Conquer City", "Conquer City 2",
wipe_units_post_success_forced_actions = "Conquer City Shrink", "Conquer City Shrink 2",
"Transport Disembark",
"Transport Disembark 2",
"Conquer Extras", "Conquer Extras 2",
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Conquer City from non native (100% chance of success). */
ui_name_conquer_city_2 = _("%sConquer City from non native%s")
ui_name_conquer_city_shrink_2 = _("%sConquer City from non native%s")
; /* TRANS: _Storm the Castle (100% chance of success). */
ui_name_conquer_extras = _("%sStorm the Castle%s")
......
; Can make the help text less redundant when you document it your self.
; "Transport Disembark 2" is "Transport Disembark" but from a non native
; tile. "Conquer City 2" has the same relation to "Conquer City". So is
; "Enter Hut 2" for "Enter Hut", "Frighten Hut 2" for "Frighten Hut" and
; tile. "Conquer City Shrink 2" has the same relation to "Conquer City Shrink".
; So is "Enter Hut 2" for "Enter Hut", "Frighten Hut 2" for "Frighten Hut" and
; "Conquer Extras" for "Conquer Extras 2".
; The version from the non native tile and the native tile version won`t
; appear in the same action selection dialog given their opposite
; requirements. Avoid double entries in the auto help by silencing it.
quiet_actions = "Transport Disembark 2", "Conquer City 2", "Enter Hut 2",
quiet_actions = "Transport Disembark 2", "Conquer City Shrink 2", "Enter Hut 2",
"Frighten Hut 2", "Conquer Extras 2", "Unit Move"
; /* <-- avoid gettext warnings
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_native_despite_treuga_dei]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present", "survives"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE, FALSE
......
}
[enabler_conquer_city_marines]
action = "Conquer City 2"
action = "Conquer City Shrink 2"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_marines_despite_treuga_dei]
action = "Conquer City 2"
action = "Conquer City Shrink 2"
actor_reqs =
{ "type", "name", "range", "present", "survives"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE, FALSE
data/sandbox/effects.ruleset
value = 65535
reqs =
{ "type", "name", "range", "present"
"Action", "Conquer City 2", "Local", TRUE
"Action", "Conquer City Shrink 2", "Local", TRUE
"UnitState", "OnNativeTile", "Local", TRUE
"UnitClassFlag", "TerrainSpeed", "Local", TRUE
}
......
type = "Casus_Belli_Success"
value = 1000
reqs =
{ "type", "name", "range", "survives"
"Action", "Conquer City", "Local", FALSE
"Building", "Treuga Dei", "World", TRUE
{ "type", "name", "range", "survives"
"Action", "Conquer City Shrink", "Local", FALSE
"Building", "Treuga Dei", "World", TRUE
}
; Treuga Dei Casus Belli
......
type = "Casus_Belli_Success"
value = 1000
reqs =
{ "type", "name", "range", "survives"
"Action", "Conquer City 2", "Local", FALSE
"Building", "Treuga Dei", "World", TRUE
{ "type", "name", "range", "survives"
"Action", "Conquer City Shrink 2", "Local", FALSE
"Building", "Treuga Dei", "World", TRUE
}
; Treuga Dei Casus Belli
data/webperimental/actions.ruleset
suicide_attack_blocked_by = "Collect Ransom", "Explode Nuclear",
"Nuke City", "Nuke Units"
; Forbid "Conquer City" if any one of the listed actions are legal.
conquer_city_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid "Conquer City Shrink" if any one of the listed actions are legal.
conquer_city_shrink_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units",
"Attack", "Suicide Attack"
; Forbid regular unit move if one of the actions below is legal.
move_blocked_by = "Transport Disembark", "Conquer Extras", "Enter Hut",
......
; Actor units will - under certain circumstances - be forced to try
; performing the following actions in the specified order after successfully
; performing "Attack".
attack_post_success_forced_actions = "Conquer City", "Transport Disembark",
attack_post_success_forced_actions = "Conquer City Shrink", "Transport Disembark",
"Conquer Extras",
"Enter Hut","Frighten Hut",
"Unit Move"
......
; performing the following actions in the specified order after successfully
; performing "Collect Ransom".
collect_ransom_post_success_forced_actions =
"Conquer City", "Transport Disembark",
"Conquer City Shrink", "Transport Disembark",
"Conquer Extras",
"Enter Hut","Frighten Hut",
"Unit Move"
......
ui_name_suicide_attack = _("%sExplode Missile%s")
; /* TRANS: _Conquer City (100% chance of success). */
ui_name_conquer_city = _("%sConquer City%s")
ui_name_conquer_city_shrink = _("%sConquer City%s")
; /* TRANS: _Conquer Fortress (100% chance of success). */
ui_name_conquer_extras = _("%sConquer Fortress%s")
......
}
[enabler_conquer_city_native]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
......
}
[enabler_conquer_city_marines]
action = "Conquer City"
action = "Conquer City Shrink"
actor_reqs =
{ "type", "name", "range", "present"
"UnitClassFlag", "CanOccupyCity", "Local", TRUE
doc/README.actions
* the target city is domestic or, if airliftingstyle permits it, allied
* the target city has Airlift
"Conquer City" - Conquer the target city.
* UI name can be set using ui_name_conquer_city
"Conquer City Shrink" - Shrink target city by one and conquer it.
* UI name can be set using ui_name_conquer_city_shrink
* actor must be aware that the target exists
* any action listed in conquer_city_blocked_by must be impossible
* any action listed in conquer_city_shrink_blocked_by must be impossible
* "Attack" must be impossible
* the actor unit must be on a tile next to the target.
* the actor player's nation can't be an animal barbarian. (!)
......
* the target must be foreign (!)
* the target city contains 0 units (!)
"Conquer City 2" - Conquer the target city.
* UI name can be set using ui_name_conquer_city_2
* any action listed in conquer_city_2_blocked_by must be impossible
* A copy of "Conquer City".
* See "Conquer City" for everything else.
"Conquer City 3" - Conquer the target city.
* UI name can be set using ui_name_conquer_city_3
* any action listed in conquer_city_3_blocked_by must be impossible
* A copy of "Conquer City".
* See "Conquer City" for everything else.
"Conquer City 4" - Conquer the target city.
* UI name can be set using ui_name_conquer_city_4
* any action listed in conquer_city_4_blocked_by must be impossible
* A copy of "Conquer City".
* See "Conquer City" for everything else.
"Conquer City Shrink 2" - Shrink target city by one and conquer it.
* UI name can be set using ui_name_conquer_city_shrink_2
* any action listed in conquer_city_shrink_2_blocked_by must be impossible
* A copy of "Conquer City Shrink".
* See "Conquer City Shrink" for everything else.
"Conquer City Shrink 3" - Shrink target city by one and conquer it.
* UI name can be set using ui_name_conquer_city_shrink_3
* any action listed in conquer_city_shrink_3_blocked_by must be impossible
* A copy of "Conquer City Shrink".
* See "Conquer City Shrink" for everything else.
"Conquer City Shrink 4" - Shrink target city by one and conquer it.
* UI name can be set using ui_name_conquer_city_shrink_4
* any action listed in conquer_city_shrink_4_blocked_by must be impossible
* A copy of "Conquer City Shrink".
* See "Conquer City Shrink" for everything else.
"Surgical Strike Building" - Destroy a specific building.
* UI name can be set using ui_name_surgical_strike_building
gen_headers/enums/actions_enums.def
ACTION_SUICIDE_ATTACK2 "Suicide Attack 2"
ACTION_STRIKE_BUILDING "Surgical Strike Building"
ACTION_STRIKE_PRODUCTION "Surgical Strike Production"
ACTION_CONQUER_CITY "Conquer City"
ACTION_CONQUER_CITY2 "Conquer City 2"
ACTION_CONQUER_CITY3 "Conquer City 3"
ACTION_CONQUER_CITY4 "Conquer City 4"
ACTION_CONQUER_CITY_SHRINK "Conquer City Shrink"
ACTION_CONQUER_CITY_SHRINK2 "Conquer City Shrink 2"
ACTION_CONQUER_CITY_SHRINK3 "Conquer City Shrink 3"
ACTION_CONQUER_CITY_SHRINK4 "Conquer City Shrink 4"
ACTION_BOMBARD "Bombard"
ACTION_BOMBARD2 "Bombard 2"
ACTION_BOMBARD3 "Bombard 3"
server/ruleset/rscompat.c
return old_name;
}
/**********************************************************************//**
Tell 3.2 blocked_by name matching 3.3 one
**************************************************************************/
const char *blocked_by_old_name_3_3(const char *new_name)
{
if (fc_strcasecmp("conquer_city_shrink_blocked_by", new_name)) {
return "conquer_city_blocked_by";
}
if (fc_strcasecmp("conquer_city_shrink_2_blocked_by", new_name)) {
return "conquer_city_2_blocked_by";
}
if (fc_strcasecmp("conquer_city_shrink_3_blocked_by", new_name)) {
return "conquer_city_3_blocked_by";
}
if (fc_strcasecmp("conquer_city_shrink_4_blocked_by", new_name)) {
return "conquer_city_4_blocked_by";
}
return nullptr;
}
/**********************************************************************//**
Tell 3.2 ui_name matching 3.3 one
**************************************************************************/
const char *ui_name_old_name_3_3(const char *new_name)
{
if (fc_strcasecmp("ui_name_conquer_city", new_name)) {
return "ui_name_conquer_city_shrink";
}
if (fc_strcasecmp("ui_name_conquer_city_2", new_name)) {
return "ui_name_conquer_city_shrink_2";
}
if (fc_strcasecmp("ui_name_conquer_city_3", new_name)) {
return "ui_name_conquer_city_shrink_3";
}
if (fc_strcasecmp("ui_name_conquer_city_4", new_name)) {
return "ui_name_conquer_city_shrink_4";
}
return nullptr;
}
server/ruleset/rscompat.h
const char *rscompat_utype_flag_name_3_3(const char *old_name);
const char *rscompat_universal_name_3_3(const char *old_name);
const char *blocked_by_old_name_3_3(const char *new_name);
const char *ui_name_old_name_3_3(const char *new_name);
#ifdef __cplusplus
}
#endif /* __cplusplus */
server/ruleset/ruleload.c
Load ui_name of one action
**************************************************************************/
static bool load_action_ui_name(struct section_file *file, int act,
const char *entry_name)
const char *entry_name,
struct rscompat_info *compat)
{
const char *text;
const char *def = action_ui_name_default(act);
if (entry_name == NULL) {
if (entry_name == nullptr) {
text = def;
} else {
text = secfile_lookup_str_default(file, def,
text = secfile_lookup_str_default(file, nullptr,
"actions.%s", entry_name);
if (text == nullptr && compat->compat_mode && compat->version < RSFORMAT_3_3) {
text = secfile_lookup_str_default(file, nullptr,
"actions.%s", ui_name_old_name_3_3(entry_name));
}
if (text == nullptr) {
text = def;
}
}
sz_strlcpy(action_by_number(act)->ui_name, text);
......
**************************************************************************/
static bool load_action_blocked_by_list(struct section_file *file,
const char *filename,
struct action *paction)
struct action *paction,
struct rscompat_info *compat)
{
if (action_blocked_by_ruleset_var_name(paction) != NULL) {
/* Action blocking can be loaded from the ruleset. */
const char *var_name = action_blocked_by_ruleset_var_name(paction);
if (var_name != nullptr) {
/* Action blocking can be loaded from the ruleset. */
char fullpath[1024];
fc_snprintf(fullpath, sizeof(fullpath), "actions.%s",
action_blocked_by_ruleset_var_name(paction));
fc_snprintf(fullpath, sizeof(fullpath), "actions.%s", var_name);
if (secfile_entry_by_path(file, fullpath)) {
enum gen_action *blocking_actions;
size_t asize;
int j;
blocking_actions =
secfile_lookup_enum_vec(file, &asize, gen_action, "%s", fullpath);
blocking_actions
= secfile_lookup_enum_vec(file, &asize, gen_action, "%s", fullpath);
if (!blocking_actions) {
/* Entity exists but couldn't read it. */
......
}
free(blocking_actions);
} else if (compat->compat_mode && compat->version < RSFORMAT_3_3) {
fc_snprintf(fullpath, sizeof(fullpath), "actions.%s", blocked_by_old_name_3_3(var_name));
if (secfile_entry_by_path(file, fullpath)) {
enum gen_action *blocking_actions;
size_t asize;
int j;
blocking_actions
= secfile_lookup_enum_vec(file, &asize, gen_action, "%s", fullpath);
if (!blocking_actions) {
/* Entity exists but couldn't read it. */
ruleset_error(NULL, LOG_ERROR,
"\"%s\": %s: bad action list",
filename, fullpath);
return FALSE;
}
for (j = 0; j < asize; j++) {
BV_SET(paction->blocked_by, blocking_actions[j]);
}
free(blocking_actions);
}
}
}
......
action_iterate(act_id) {
struct action *paction = action_by_number(act_id);
if (!load_action_blocked_by_list(file, filename, paction)) {
if (!load_action_blocked_by_list(file, filename, paction, compat)) {
ok = FALSE;
break;
}
......
entry_name = action_ui_name_ruleset_var_name(act_id);
}
load_action_ui_name(file, act_id, entry_name);
load_action_ui_name(file, act_id, entry_name, compat);
}
if (!ok) {
    (1-1/1)