; Modifying this file:
; You should not modify this file except to make bugfixes or
; for other "maintenance". If you want to make custom changes,
; you should create a new datadir subdirectory and copy this file
; into that directory, and then modify that copy. Then use the
; command "rulesetdir <mysubdir>" in the server to have freeciv
; use your new customized file.

; Note that the freeciv AI may not cope well with anything more
; than minor changes.

[datafile]
description = "Granularity effects data for Freeciv"
options = "+Freeciv-ruleset-3.4-Devel-2025.Jan.17"
format_version = 50

; /* <-- avoid gettext warnings
;
; User effect types
;
; type                    = Effect type to define. Must be one of user effects.
; ai_valued_as            = Hardcoded effect type that AI considers this to match
;
; */ <-- avoid gettext warnings

;[ueff_1]
;type         = "User_Effect_1"
;ai_valued_as = ""

; /* <-- avoid gettext warnings
;
; Effects
;
; type                    = What the effect does. Values of multiple active effects
;                           of the same type get summed for the total.
;                           See README.effects for list of possible types
; value                   = Value added for the effect type when this effect is active,
;                           i.e., all requirements are fulfilled
; multiplier              = Name of the policy that gives a multiplier for effect's value
; reqs                    = Requirements for the effect to be active.
;                           See README.effects for help on requirements
; comment                 = Comment for the benefit to someone examining the ruleset
;                           Not used by freeciv any other way.
;
; */ <-- avoid gettext warnings

; Specialists

[effect_entertainer]
type    = "Specialist_Output"
value   = 2
reqs    =
    { "type",       "name",        "range"
      "Specialist", "Entertainer", "Local"
      "OutputType", "Luxury",      "Local"
    }

[effect_philosopher]
type    = "Specialist_Output"
value   = 3
reqs    =
    { "type",       "name",        "range"
      "Specialist", "Philosopher", "Local"
      "OutputType", "Science",     "Local"
    }

; Base vision range - radius of vision is sqrt(5) = 2.24
[effect_city_vision]
type    = "City_Vision_Radius_Sq"
value   = 2

[effect_wheel_vision]
type    = "City_Vision_Radius_Sq"
value   = 3
reqs    =
    { "type", "name", "range"
      "Tech", "The Wheel", "Player"
    }

[effect_wheel_city_radius]
type  = "City_Radius_Sq"
value = 3
reqs  =
    { "type", "name", "range"
      "Tech", "The Wheel", "Player"
    }

[effect_master_explorer_vision]
type    = "Unit_Vision_Radius_Sq"
value   = 5
reqs    =
    { "type",         "name",            "range"
      "Achievement",  "Master Explorer", "Player"
      "UnitTypeFlag", "Explorer",        "Local"
    }

[effect_base_unit_upkeep]
type	= "Upkeep_Pct"
value	= 100

[effect_empire_size_base]
type    = "Empire_Size_Base"
value   = 1

[effect_empire_size_step_base]
type    = "Empire_Size_Step"
value   = 2

[effect_max_rates_base]
type    = "Max_Rates"
value   = 50

[effect_tech_cost_base]
type    = "Tech_Cost_Pct"
value   = 100

[effect_tech_leakage]
type    = "Tech_Leakage"
value   = 1
reqs    =
    { "type", "name",       "range"
      "Tech", "Literature", "Player"
    }

[effect_tile_land_workable]
type    = "Tile_Workable"
value   = 1
reqs    =
    { "type", "name", "range"
      "TerrainClass", "Land", "Tile"
    }

[effect_tile_ocean_workable]
type    = "Tile_Workable"
value   = 1
reqs    =
    { "type", "name", "range"
      "Tech", "Fishing", "Player"
    }

[effect_early_research]
type    = "Output_Bonus"
value	= 30
reqs	=
    { "type",       "name",    "range",  "present"
      "MinTechs",   "4",       "Player", FALSE
      "OutputType", "Science", "Local",  TRUE
    }

; Each city has at least one slot to build units
[effect_city_build_slots_basic]
type    = "City_Build_Slots"
value   = 1

[effect_unhappysize]
type    = "City_Unhappy_Size"
value   = 4

; Base max city size of 3
[effect_city_size_limit_base]
type    = "Size_Adj"
value   = 3

[effect_city_size_limit_housing]
type    = "Size_Adj"
value   = 1
reqs	=
    { "type",     "name", "range"
      "Building", "Housing", "city"
    }

[effect_city_size_limit_fire]
type    = "Size_Adj"
value   = 2
reqs	=
    { "type", "name", "range"
      "Tech", "Fire", "Player"
    }

[effect_city_size_limit_medicine]
type    = "Size_Adj"
value   = 2
reqs	=
    { "type", "name", "range"
      "Tech", "Medicine", "Player"
    }

[effect_max_rates_alphabet]
type    = "Max_Rates"
value   = 20
reqs	=
    { "type", "name", "range"
      "Tech", "Alphabet", "Player"
    }

[effect_base_granary_shrink]
type    = "Shrink_Food"
value   = 10
reqs	=
    { "type", "name", "range"
      "Tech", "Pottery", "Player"
    }

[effect_granary_pottery_grow]
type    = "Growth_Food"
value   = 15
reqs	=
    { "type", "name", "range"
      "Tech", "Pottery", "Player"
    }

[effect_granary_pottery_shrink]
type    = "Shrink_Food"
value   = 15
reqs	=
    { "type", "name", "range"
      "Tech", "Pottery", "Player"
    }

[effect_library]
type    = "Output_Bonus"
value	= 50
reqs	=
    { "type",       "name",    "range"
      "Building",   "Library", "City"
      "OutputType", "Science", "Local"
    }

[effect_science_library]
type    = "Output_Bonus"
value	= 25
reqs	=
    { "type",       "name",    "range"
      "Building",   "Library", "City"
      "Tech",       "Science", "Player"
      "OutputType", "Science", "Local"
    }

[effect_marketplace_gold]
type    = "Output_Bonus"
value	= 50
reqs	=
    { "type",       "name",        "range"
      "Building",   "Marketplace", "City"
      "OutputType", "Gold",        "Local"
    }

[effect_marketplace_luxury]
type    = "Output_Bonus"
value	= 30
reqs	=
    { "type",       "name",        "range"
      "Building",   "Marketplace", "City"
      "OutputType", "Luxury",      "Local"
    }

[effect_brewery_gold]
type    = "Output_Bonus"
value	= 15
reqs	=
    { "type",       "name",    "range"
      "Building",   "Brewery", "City"
      "OutputType", "Gold",    "Local"
    }

[effect_brewery_luxury]
type    = "Output_Bonus"
value	= 25
reqs	=
    { "type",       "name",    "range"
      "Building",   "Brewery", "City"
      "OutputType", "Luxury",  "Local"
    }

[effect_culture_tech]
type    = "Culture_Pct"
value   = 50
reqs	=
    { "type", "name",    "range"
      "Tech", "Culture", "Player"
    }

[effect_library_culture]
type    = "History"
value	= 2
reqs	=
    { "type",     "name",    "range"
      "Building", "Library", "City"
    }

[effect_library_literature_culture]
type    = "History"
value	= 1
reqs	=
    { "type",     "name",       "range"
      "Building", "Library",    "City"
      "Tech",     "Literature", "Player"
    }

[effect_stone_circle_all_cities]
type    = "History"
value	= 2
reqs	=
    { "type",     "name",         "range"
      "Building", "Stone Circle", "Player"
    }

[effect_stone_circle_local]
type    = "History"
value	= 3
reqs	=
    { "type",     "name",         "range"
      "Building", "Stone Circle", "City"
    }

[effect_palace_culture]
type    = "History"
value	= 3
reqs	=
    { "type",     "name",   "range"
      "Building", "Palace", "City"
    }

[effect_center_trade_village]
type    = "Output_Add_Tile"
value   = 25
reqs	=
    { "type",       "name",   "range"
      "CityTile",   "Center", "Tile"
      "OutputType", "Trade",  "Local"
    }

[effect_center_trade_town]
type    = "Output_Add_Tile"
value   = 75
reqs	=
    { "type",       "name",   "range"
      "CityTile",   "Center", "Tile"
      "MinSize",    "8",      "City"
      "OutputType", "Trade",  "Local"
    }

[effect_rock_pile_food]
type    = "Output_Add_Tile"
value   = 100
reqs	=
    { "type",       "name",              "range"
      "Building",   "Central Rock Pile", "City"
      "CityTile",   "Center",            "Tile"
      "OutputType", "Food",              "Local"
    }

[effect_iron]
type    = "Output_Add_Tile"
value   = 200
reqs	=
    { "type",       "name",         "range"
      "Extra",      "Iron",         "Tile"
      "Tech",       "Iron Working", "Player"
      "OutputType", "Shield",       "Local"
    }

[effect_brewery_wheat]
type    = "Output_Add_Tile"
value   = 50
reqs	=
    { "type",       "name",    "range"
      "Extra",      "Wheat",   "Tile"
      "Building",   "Brewery", "City"
      "OutputType", "Food",    "Local"
    }

[effect_rock_pile_capital]
type    = "Capital_City"
value	= 1
reqs	=
    { "type",     "name",              "range", "present"
      "Building", "Throne",            "Player", FALSE
      "Building", "Central Rock Pile", "City",   TRUE
    }

[effect_rock_pile_gov_center]
type    = "Gov_Center"
value	= 1
reqs	=
    { "type",     "name",              "range", "present"
      "Building", "Throne",            "Player", FALSE
      "Building", "Central Rock Pile", "City",   TRUE
    }

[effect_throne_capital]
type    = "Capital_City"
value	= 2
reqs	=
    { "type",     "name",   "range"
      "Building", "Throne", "City"
    }

[effect_throne_gov_center]
type    = "Gov_Center"
value	= 1
reqs	=
    { "type",     "name",   "range"
      "Building", "Throne", "City"
    }

[effect_corruption_base]
type    = "Output_Waste_By_Distance"
value	= 400
reqs	=
    { "type",       "name",  "range"
      "OutputType", "Trade", "Local"
    }

[effect_corruption_palace]
type    = "Output_Waste_By_Distance"
value	= -50
reqs	=
    { "type",       "name",   "range"
      "Building",   "Palace", "Player"
      "OutputType", "Trade",  "Local"
    }

[effect_courthouse]
type    = "Output_Waste_Pct"
value	= 30
reqs	=
    { "type",       "name",       "range", "present"
      "Building",   "Courthouse", "City",  TRUE
      "OutputType", "Trade",      "Local", TRUE
    }

[effect_throne_infra]
type    = "Infra_Points"
value	= 200
reqs	=
    { "type",     "name",   "range"
      "Building", "Throne", "City"
    }

[effect_quarry_infra]
type    = "Infra_Points"
value	= 300
reqs	=
    { "type", "name", "range"
      "Building", "Quarry", "City"
    }

[effect_farming_time_food]
type       = "Output_Bonus"
value	   = 10
multiplier = "Farming Time"
reqs	   =
    { "type",       "name", "range"
      "OutputType", "Food", "Local"
    }

[effect_farming_time_shield]
type       = "Output_Bonus"
value	   = -10
multiplier = "Farming Time"
reqs	   =
    { "type",       "name",   "range"
      "OutputType", "Shield", "Local"
    }

[effect_sacred_grove]
type    = "Make_Content"
value	= 1
reqs	=
    { "type", "name", "range"
      "Building", "Sacred Grove", "City"
    }

[effect_sacred_grove_culture]
type    = "History"
value	= 1
reqs	=
    { "type",     "name",         "range"
      "Building", "Sacred Grove", "City"
    }

[effect_temple]
type    = "Make_Content"
value	= 1
reqs	=
    { "type",     "name",   "range"
      "Building", "Temple", "City"
    }

[effect_temple_culture]
type    = "History"
value	= 2
reqs	=
    { "type",     "name",   "range"
      "Building", "Temple", "City"
    }

[effect_granary_famine]
type    = "Shrink_Food"
value   = 50
reqs	=
    { "type",     "name",    "range"
      "Building", "Granary", "City"
    }

[effect_granary_growth]
type    = "Growth_Food"
value   = 10
reqs	=
    { "type",     "name",    "range"
      "Building", "Granary", "City"
    }

[effect_barracks]
type    = "Veteran_Build"
value	= 1
reqs	=
    { "type",      "name",     "range", "present"
      "Building",  "Barracks", "City",  TRUE
      "UnitClass", "Land",     "Local", TRUE
    }

[effect_fortified]
type    = "Fortify_Defense_Bonus"
value   = 50
reqs    =
    { "type", "name", "range"
      "Activity", "Fortified", "Local"
    }

[effect_city_fortified]
type    = "Fortify_Defense_Bonus"
value   = 50
reqs    =
    { "type",          "name",         "range", "present"
      "CityTile",      "Center",       "Tile",  TRUE
      "Activity",      "Fortified",    "Local", FALSE
      "UnitClassFlag", "CanFortify",   "Local", TRUE
      "UnitTypeFlag",  "Cant_Fortify", "Local", FALSE
    }

[effect_base_regen]
type    = "HP_Regen_2"
value   = 10

[effect_city_walls]
type    = "Defend_Bonus"
value	= 200
reqs	=
    { "type",      "name",       "range"
      "Building",  "City Walls", "City"
      "UnitClass", "Land",       "Local"
    }

[effect_morale_boost_attack]
type    = "Attack_Bonus"
value	= 20
reqs	=
    { "type", "name",    "range"
      "Tech", "Rituals", "Player"
    }

[effect_offensive_strategy_attack]
type       = "Attack_Bonus"
value      = 5
multiplier = "Offensive Strategies"

[effect_offensive_strategy_defense]
type       = "Defend_Bonus"
value      = -5
multiplier = "Offensive Strategies"

[effect_morale_boost_defense]
type    = "Defend_Bonus"
value	= 20
reqs	=
    { "type", "name",    "range"
      "Tech", "Rituals", "Player"
    }

[effect_sailing_shallowsea]
type    = "Move_Bonus"
value   = 1
reqs	=
    { "type", "name",    "range"
      "Tech", "Sailing", "Player"
    }

[effect_action_success_move_cost_from_non_native]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type",          "name",                  "range", "present"
      "Action",        "Transport Disembark 2", "Local", TRUE
      "UnitState",     "OnNativeTile",          "Local", TRUE
      "UnitClassFlag", "TerrainSpeed",          "Local", TRUE
    }

[effect_action_success_relocate]
type    = "Action_Success_Actor_Move_Cost"
value   = 100
reqs    =
    { "type",          "name",                  "range", "present"
      "Action",        "Teleport",              "Local", TRUE
    }

[effect_action_success_bombard]
type    = "Action_Success_Actor_Move_Cost"
value   = 100
reqs    =
    { "type",   "name",    "range", "present"
      "Action", "Bombard", "Local", TRUE
    }

[effect_action_success_short_range_bombard]
type    = "Action_Success_Actor_Move_Cost"
value   = 100
reqs    =
    { "type",   "name",      "range", "present"
      "Action", "Bombard 2", "Local", TRUE
    }

[effect_action_success_surgical_strike]
type    = "Action_Success_Actor_Move_Cost"
value   = 100
reqs    =
    { "type",   "name",                     "range", "present"
      "Action", "Surgical Strike Building", "Local", TRUE
    }

[effect_no_tools]
type    = "Output_Bonus"
value   = -50
reqs    =
    { "type",       "name",   "range", "present"
      "Tech",       "Tools",  "Player", FALSE
      "OutputType", "Shield", "Local",  TRUE
    }

[effect_no_counting]
type    = "Output_Bonus"
value   = -50
reqs    =
    { "type",       "name",     "range", "present"
      "Tech",       "Counting", "Player", FALSE
      "OutputType", "Gold",     "Local",  TRUE
    }

[effect_city_regen]
type    = "HP_Regen_2"
value   = 10
reqs    =
    { "type",     "name",   "range"
      "CityTile", "Center", "Tile"
    }

[effect_barracks_regen]
type    = "HP_Regen_2"
value   = 20
reqs    =
    { "type",     "name",     "range"
      "Building", "Barracks", "City"
    }

[effect_herbs_regen]
type    = "HP_Regen_2"
value   = 10
reqs    =
    { "type", "name",  "range"
      "Tech", "Herbs", "Player"
    }

[effect_irrigation]
type    = "Irrigation_Pct"
value   = 75
reqs    =
    { "type", "name", "range"
      "Extra", "Irrigation", "Tile"
    }

[effect_plow]
type    = "Irrigation_Pct"
value   = 25
reqs    =
    { "type", "name",        "range"
      "Extra", "Irrigation", "Tile"
      "Tech",  "Plow",       "Player"
    }

[effect_nets]
type    = "Irrigation_Pct"
value   = 100
reqs    =
    { "type", "name", "range"
      "Extra", "Nets", "Tile"
    }

[effect_mine]
type    = "Mining_Pct"
value   = 100
reqs    =
    { "type", "name", "range"
      "Extra", "Mine", "Tile"
    }

[effect_claim_land]
type    = "Tile_Claimable"
value   = 1
reqs    =
    { "type",         "name",        "range"
      "TerrainClass", "Land",        "Tile"
      "TileRel",      "Same Region", "Tile"
    }

[effect_claim_ocean_adj]
type    = "Tile_Claimable"
value   = 1
reqs    =
    { "type",          "name",    "range"
      "TerrainClass",  "Oceanic", "Tile"
      "MaxDistanceSq", "2",       "Tile"
    }

[effect_claim_ocean_lake]
type    = "Tile_Claimable"
value   = 1
reqs    =
    { "type",           "name",              "range"
      "TerrainClass",   "Oceanic",           "Tile"
      "MaxRegionTiles", "20",                "Continent"
      "TileRel",        "Region Surrounded", "Tile"
; implicit with Region Surrounded
;     "TileRel",        "Same Terrain Class", "Tile", FALSE
    }

[effect_claim_ocean_from_land_bay]
type    = "Tile_Claimable"
value   = 1
reqs    =
    { "type",           "name",               "range",    "present"
      "TerrainClass",   "Oceanic",            "Tile",     TRUE
      "TileRel",        "Same Terrain Class", "Tile",     FALSE
      "MaxRegionTiles", "3",                  "Adjacent", TRUE
      "TileRel",        "Only Other Region",  "Adjacent", TRUE
    }
