From aba17be6e28fa3ca4dbe4c7bfe743c2af6efabf2 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 17 Feb 2024 09:42:50 +0200 Subject: [PATCH 26/26] Fake Generalize Pillage Requested by kvilhaugsvik See osdn #41526 Signed-off-by: Marko Lindqvist --- common/actions.c | 14 ++++++++++++++ doc/README.actions | 5 +++++ gen_headers/enums/actions_enums.def | 1 + 3 files changed, 20 insertions(+) diff --git a/common/actions.c b/common/actions.c index c03913dd16..4cd0c3f2b5 100644 --- a/common/actions.c +++ b/common/actions.c @@ -548,6 +548,10 @@ static void hard_code_actions(void) unit_action_new(ACTION_PILLAGE, ACTRES_PILLAGE, TRUE, FALSE, MAK_STAYS, 0, 0, FALSE); + actions[ACTION_PILLAGE2] = + unit_action_new(ACTION_PILLAGE2, ACTRES_PILLAGE, + TRUE, FALSE, + MAK_STAYS, 0, 0, FALSE); actions[ACTION_CLEAN] = unit_action_new(ACTION_CLEAN, ACTRES_CLEAN, TRUE, FALSE, @@ -5857,6 +5861,8 @@ const char *action_ui_name_ruleset_var_name(int act) return "ui_name_plant_2"; case ACTION_PILLAGE: return "ui_name_pillage"; + case ACTION_PILLAGE2: + return "ui_name_pillage_2"; case ACTION_CLEAN: return "ui_name_clean"; case ACTION_CLEAN2: @@ -6205,6 +6211,7 @@ const char *action_ui_name_default(int act) /* TRANS: Transform by _Planting (3% chance of success). */ return N_("Transform by %sPlanting%s"); case ACTION_PILLAGE: + case ACTION_PILLAGE2: /* TRANS: Pilla_ge (100% chance of success). */ return N_("Pilla%sge%s"); case ACTION_CLEAN: @@ -6407,6 +6414,7 @@ const char *action_min_range_ruleset_var_name(int act) case ACTION_PLANT: case ACTION_PLANT2: case ACTION_PILLAGE: + case ACTION_PILLAGE2: case ACTION_CLEAN: case ACTION_CLEAN2: case ACTION_FORTIFY: @@ -6577,6 +6585,7 @@ const char *action_max_range_ruleset_var_name(int act) case ACTION_PLANT: case ACTION_PLANT2: case ACTION_PILLAGE: + case ACTION_PILLAGE2: case ACTION_CLEAN: case ACTION_CLEAN2: case ACTION_FORTIFY: @@ -6829,6 +6838,8 @@ const char *action_target_kind_ruleset_var_name(int act) return "nuke_city_target_kind"; case ACTION_PILLAGE: return "pillage_target_kind"; + case ACTION_PILLAGE2: + return "pillage_2_target_kind"; case ACTION_USER_ACTION1: return "user_action_1_target_kind"; case ACTION_USER_ACTION2: @@ -6925,6 +6936,7 @@ const char *action_actor_consuming_always_ruleset_var_name(action_id act) case ACTION_PLANT: case ACTION_PLANT2: case ACTION_PILLAGE: + case ACTION_PILLAGE2: case ACTION_CLEAN: case ACTION_CLEAN2: case ACTION_FORTIFY: @@ -7146,6 +7158,7 @@ const char *action_blocked_by_ruleset_var_name(const struct action *act) case ACTION_PLANT: case ACTION_PLANT2: case ACTION_PILLAGE: + case ACTION_PILLAGE2: case ACTION_CLEAN: case ACTION_CLEAN2: case ACTION_FORTIFY: @@ -7305,6 +7318,7 @@ action_post_success_forced_ruleset_var_name(const struct action *act) case ACTION_PLANT: case ACTION_PLANT2: case ACTION_PILLAGE: + case ACTION_PILLAGE2: case ACTION_CLEAN: case ACTION_CLEAN2: case ACTION_FORTIFY: diff --git a/doc/README.actions b/doc/README.actions index ca9a7e2324..5bf2e641e7 100644 --- a/doc/README.actions +++ b/doc/README.actions @@ -1202,6 +1202,11 @@ Actions done by a unit against a tile * the target extra must be the rule chosen extra if the civstyle section's pillage_select is FALSE +"Pillage 2" - Pillage extra from tile + * UI name can be set using ui_name_pillage_2 + * target kind can be changed with pillage_2_target_kind + ** See "Pillage" for everything else. + "Clean" - Clean extra from the target tile. * UI name can be set using ui_name_clean * actor must be on the same tile as the target. diff --git a/gen_headers/enums/actions_enums.def b/gen_headers/enums/actions_enums.def index 1cd1b871db..0b9eed166c 100644 --- a/gen_headers/enums/actions_enums.def +++ b/gen_headers/enums/actions_enums.def @@ -75,6 +75,7 @@ values ACTION_BASE "Build Base" ACTION_BASE2 "Build Base 2" ACTION_PILLAGE "Pillage" + ACTION_PILLAGE2 "Pillage 2" ACTION_TRANSPORT_BOARD "Transport Board" ACTION_TRANSPORT_BOARD2 "Transport Board 2" ACTION_TRANSPORT_BOARD3 "Transport Board_3" -- 2.43.0