Feature #614
closed
Tile relationship requirement
Added by Alina Lenk 6 months ago.
Updated 6 months ago.
Description
Add new requirement type "TileRel" that checks relative placement of target tile and other tile (initially mostly for action enablers and #588). Initial simple values should be "Same Region" at tile/c/adjacent range (the other tile's continent/ocean is the same as that of some tile in the range), and "Only Other Region" at c/adjacent range (the other tile's continent/ocean is the only one in the range other than that of the target tile).
Files
- Blocked by Feature #613: requirements: Make other_player an entire req_context added
I see use-cases for generic "max distance between tiles" requirement type (e.g. trade route length). Unfortunately it couldn't distinguish between adjacent and cadjacent (both are distance 1), nor could it tell if the tiles are on the same continent.
Marko Lindqvist wrote in #note-2:
Unfortunately it couldn't distinguish between adjacent and cadjacent (both are distance 1)
Could do that with a "max squared distance" requirement; 0-1-2 would be tile-cadjacent-adjacent. That would leave just continent-related requirements (the simple "same continent" as well as the extra stuff required for border claiming logic) for a more specialized type. Yeah, that is a lot more versatile than what I was gonna do here.
- Blocks Feature #588: Unhardcode tile claimability rules added
- Description updated (diff)
Given that the "same tile"-related stuff is now handled by #616, I'm reframing this to be about the things that can be directly implemented with information already available.
- Blocks Feature #654: TileRel requirement "Region Surrounded" added
Updated patch to use #656 instead of using raw adjc_dirlist_iterate. Still depends on #602.
Updated patch: Minor fixes (indentation, strings that weren't marked for translation).
Updated patch: Added are_requirements_contradictions() code.
- Blocks Feature #678: TileRel requirement "Same Terrain Class" added
Rebased patch on top of #696. Also sorted the tile rel types.
- Status changed from In Review to Closed
Also available in: Atom
PDF