diff --git a/data/classic/effects.ruleset b/data/classic/effects.ruleset index 5215edb749..41ab0494fe 100644 --- a/data/classic/effects.ruleset +++ b/data/classic/effects.ruleset @@ -1030,6 +1030,15 @@ reqs = "Building", "Palace", "City", FALSE } +[effect_reduce_crime] +type = "Output_Waste_Pct" +value = 50 +reqs = + { "type", "name", "range" + "Extra", "Marshall's Office", "City" + "OutputType", "Trade", "Local" + } + ;[effect_courthouse_1] ;type = "Waste_Pct" ;value = 50 diff --git a/data/classic/game.ruleset b/data/classic/game.ruleset index cc4b895074..e0361127df 100644 --- a/data/classic/game.ruleset +++ b/data/classic/game.ruleset @@ -661,11 +661,11 @@ ui_name_unit_move = _("%sKeep moving%s") ; Blank ruleset defined user actions. ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" -;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "Unit" -;user_action_1_min_range = 1 -;user_action_1_max_range = 3 -;user_action_1_actor_consuming_always = FALSE +ui_name_user_action_1 = _("%sFound Marshall's Office%s") +user_action_1_target_kind = "City" +user_action_1_min_range = 0 +user_action_1_max_range = 1 +user_action_1_actor_consuming_always = TRUE ; Some actions have a action dice roll before the action starts where it can ; fail. The initial probability of success is 100% unless the action appears @@ -1595,6 +1595,14 @@ target_reqs = "CityTile", "Extras Owned", "Local", FALSE } +[actionenabler_marshall] +action = "User Action 1" +actor_reqs = + { "type", "name", "range", "present" + "UnitFlag", "Diplomat", "Local", TRUE + "MinMoveFrags", "1", "Local", TRUE + } + [borders] ; Base border radius from city. radius_sq_city = 17 diff --git a/data/classic/script.lua b/data/classic/script.lua index dc4e2daaaa..b7b7bee21c 100644 --- a/data/classic/script.lua +++ b/data/classic/script.lua @@ -96,3 +96,12 @@ function place_map_labels() end signal.connect("map_generated", "place_map_labels") + + +function action_started_callback(action, actor, target) + if action:rule_name() == "User Action 1" then + target.tile:create_extra("Marshall's Office"); + end +end + +signal.connect("action_started_unit_city", "action_started_callback") diff --git a/data/classic/terrain.ruleset b/data/classic/terrain.ruleset index 4fb1aeea80..60b7b8524b 100644 --- a/data/classic/terrain.ruleset +++ b/data/classic/terrain.ruleset @@ -1527,6 +1527,19 @@ Ruins mark the former site of a city that was destroyed or abandoned. \ They have no effect on gameplay.\ ") +[extra_marshalls_office] +name = _("Marshall's Office") +category = "Infra" +;causes = +;rmcauses = +graphic = "extra.ruins" ; placeholder +activity_gfx = "None" +rmact_gfx = "None" +buildable = FALSE +helptext = _("\ +Marshall's office can be created to the city center by a Marshall, and it reduces waste in the city.\ +") + [extra_road] name = _("Road") category = "Infra"