Open QuintillusCFC opened 2 years ago
Some notes:
Mountain rules Mountains see two unless blocked Other mountains block mountains Hills do not block mountain visibility Forest/jungle do not block mountain visibility
Abe Lincoln can see two tiles across the jungle from the Mountain
Hills rules
Hills see two unless blocked Hills block hills Forest/jungle block hills Mountains block hills
The Scout can see distance 2, with nothing blocking the view
Flatland rules
Hills and mountains visible at distance 2 over Marsh Mountains visible at distance 2 over Jungle and Forest Hills not visible at distance 2 over Jungle Cannot see forests/jungle at distance 2 Mountains visible at distance 2 over Hills
The settler can see the Hill at distance 2 across the Marsh
Theodora cannot see the Hill across the Jungle
Theodora can see the Mountain across the Jungle
Theodora cannot see the forest that is SE of the game
The Worker can see the Mountain despite the Hill in front of it
Coast rules
Can see distance 2 over water, but cannot use water to see around obstacles Can see distance 2 across water even when it's across a pond into an ocean
Abe Lincoln can see distance 2 across water, but not around the forest.
Theodora can see across the fish-pond into the ocean even though there's a strait across the pond
General Rules
Either of the tiles that connect your tile to the tile two tiles away can be used for visibility
Theodora's view of the Hill is blocked by another Hill in one direction, but she can still see it over the Grassland
Based on these observations, I think the height property idea is still valid, although my understanding has evolved a bit, particularly with regards to forest/jungle (but not marsh) blocking hill visibility.
One potential approach:
Tiles with a height of 2 are visible from distance 2, as long as the tile in between has a height at least 2 less than their height.
You can also see tiles whose height is at least 2 lower than where you are standing at distance 2, as long as the tile in between has a height at least 2 lower than where you are standing.
Can these values be configurable and the logic made more generally applicable? For example if we add new terrain types or want the terrain to have different visibility modifiers in mods/scenarios?
I think it should be configurable. The imported-from-Civ3 rules would have values that would cause equivalent behavior to Civ3, but by making the visibility depend on a general elevation system, a scenario could add/modify terrains to cause it to behave differently.
Using the numbers I proposed previously, this would allow something like a "Highlands" terrain with a value of 3.
Certain type of terrain affect fog of war.
Hills and mountains and volcanoes let you see farther, but also prevent you from seeing past them.
This issue is to consider and implement that.
We should probably do this by adding a Height property to TerrainType, and setting it appropriately when importing from Civ3.
TBD whether Babylon or Carthage.