From 2c21c0633ef61f0f8af79ce11f849d6e4652d370 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Mon, 15 Mar 2021 23:04:31 +0100 Subject: [PATCH] multiplayer: make huts work again. Reported by Marko Lindqvist See osdn #41766 --- data/multiplayer/game.ruleset | 53 ++++++++++++++++++++++++++++++-- data/multiplayer/terrain.ruleset | 2 +- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/data/multiplayer/game.ruleset b/data/multiplayer/game.ruleset index 21fdeaabc2..0b6c16c3c5 100644 --- a/data/multiplayer/game.ruleset +++ b/data/multiplayer/game.ruleset @@ -270,7 +270,9 @@ conquer_city_2_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units", ; Forbid regular unit move if one of the actions below is legal. move_is_blocked_by = "Transport Disembark", "Transport Disembark 2", - "Conquer Extras", "Conquer Extras 2" + "Conquer Extras", "Conquer Extras 2", + "Enter Hut", "Enter Hut 2", + "Frighten Hut", "Frighten Hut 2" ; Actor units will - under certain circumstances - be forced to try ; performing the following actions in the specified order after successfully @@ -575,6 +577,18 @@ ui_name_transport_disembark_2 = _("%sDisembark from non native%s") ; /* TRANS: _Embark (100% chance of success). */ ui_name_transport_embark = _("%sEmbark%s") +; /* TRANS: Enter _Hut (100% chance of success). */ +ui_name_enter_hut = _("Enter %sHut%s") + +; /* TRANS: Enter _Hut (100% chance of success). */ +ui_name_enter_hut_2 = _("Enter %sHut%s") + +; /* TRANS: Frighten _Hut (100% chance of success). */ +ui_name_frighten_hut = _("Frighten %sHut%s") + +; /* TRANS: Frighten _Hut (100% chance of success). */ +ui_name_frighten_hut_2 = _("Frighten %sHut%s") + ; /* TRANS: Regular _Move (100% chance of success). */ ui_name_unit_move = _("%sKeep moving%s") @@ -606,12 +620,13 @@ diplchance_initial_odds = "Sabotage City", "Sabotage City Escape", ; "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 ; "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", - "Conquer Extras 2", "Unit Move" +quiet_actions = "Transport Disembark 2", "Conquer City 2", "Enter Hut 2", + "Frighten Hut 2", "Conquer Extras 2", "Unit Move" ; /* <-- avoid gettext warnings ; @@ -1385,6 +1400,38 @@ actor_reqs = "UnitState", "OnNativeTile", "Local", FALSE } +[actionenabler_hut_enter_from_native_tile] +action = "Enter Hut" +actor_reqs = + { "type", "name", "range" + "MinMoveFrags", "1", "Local" + "UnitState", "OnNativeTile", "Local" + } + +[actionenabler_hut_enter_from_non_native] +action = "Enter Hut 2" +actor_reqs = + { "type", "name", "range", "present" + "MinMoveFrags", "1", "Local", TRUE + "UnitState", "OnNativeTile", "Local", FALSE + } + +[actionenabler_hut_from_native_tile] +action = "Frighten Hut" +actor_reqs = + { "type", "name", "range" + "MinMoveFrags", "1", "Local" + "UnitState", "OnNativeTile", "Local" + } + +[actionenabler_hut_from_non_native] +action = "Frighten Hut 2" +actor_reqs = + { "type", "name", "range", "present" + "MinMoveFrags", "1", "Local", TRUE + "UnitState", "OnNativeTile", "Local", FALSE + } + [actionenabler_embark] action = "Transport Embark" actor_reqs = diff --git a/data/multiplayer/terrain.ruleset b/data/multiplayer/terrain.ruleset index 44987d19a7..336a9332b6 100644 --- a/data/multiplayer/terrain.ruleset +++ b/data/multiplayer/terrain.ruleset @@ -1284,7 +1284,7 @@ name = _("Minor Tribe Village") rule_name = "Hut" category = "Bonus" causes = "Hut" -;rmcauses = "" +rmcauses = "Enter" graphic = "tx.village" graphic_alt = "-" activity_gfx = "None" -- 2.20.1