[SOLVED] How exactly does "TerrainAlter" requirement type work?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

[SOLVED] How exactly does "TerrainAlter" requirement type work?

Post by Corbeau »

I am trying to prevent the building of a certain base if there is irrigation or mine on a hill/mountain tile. Would this work?

Code: Select all

[base_resort]
name           = _("Resort")
graphic        = "base.buoy"
graphic_alt    = "base.ruins"
activity_gfx   = "unit.buoy"
act_gfx_alt    = "unit.fortress"
reqs           =
    { "type", "name", "range", "negated"
      "Tech", "Explosives", "Player", FALSE
      "Terrain", "Mountains", "Local", FALSE
      "UnitFlag", "Settlers", "Local", FALSE
      "CityTile", "Center", "Local", TRUE
      "TerrainAlter", "Irrigation", "Local", TRUE    <------------ THIS
      "TerrainAlter", "Mine", "Local", TRUE     <--------THIS
    }
Last edited by Corbeau on Mon Sep 02, 2019 8:46 pm, edited 1 time in total.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: How exactly does "TerrainAlter" requirement type work?

Post by cazfi »

"TerrainAlter" is about the potential of the terrain to be altered. Typically it's used to provide an irrigation bonus in the city center tile that is not irrigated, but could be ("CanIrrigate").
To test if there's an "Irrigation" or "Mine" extra in the tile, use "Extra" requirement (2.6 and later) or "Special" requirement (2.5 and earlier).
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: How exactly does "TerrainAlter" requirement type work?

Post by Corbeau »

Thanks.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Post Reply