Skip to content

Start sea routes only from land joined to the capital - #264

Open
Drefvelin wants to merge 1 commit into
mainfrom
fix/sea-claims-same-zone
Open

Drefvelin wants to merge 1 commit into
mainfrom
fix/sea-claims-same-zone

Conversation

@Drefvelin

Copy link
Copy Markdown
Contributor

Why

The Brotherhood of Alms holds 23 bog provinces (458–485) although its own land (157, 200–205) touches no sea or water. Since #259, a vassal's capital opened sea routes for its overlord even when it was not joined to the overlord's capital. New Waters Port's capital (251) borders sea 796, and that sea's routes reach the bog's rivers. Sea-mode claims and guild capitals could also start new routes from overseas holdings, vassal land or other colonies.

Rule

A claim across water must be reachable by sea from the realm's main region:

  • The capital blob is land joined by land to the faction capital, through its own provinces or vassal land that connects to it.
  • Sea routes may cross any number of connected sea and water zones, but only from the capital blob. Vassal capitals, overseas holdings and guild capitals never start one, so one colony can no longer anchor the next.
  • Vassal land elsewhere still anchors land claims next to it (Let vassal land anchor an overlord's realm #259). An overlord can reach a distant coast only once the vassal holds a province on that shore.
  • Rivers and lakes are unchanged: one WATER tile still connects any traced land.
  • Guild capitals keep their seat when they're in the capital blob, on land joined to vassal land, on a shore the capital's sea routes reach, or across one river or lake from traced land.
  • A realm without a seated capital still sails from what it holds, in sea mode only.

Effect on Main

A simulation against Main's current data shows the Brotherhood's bog (458, 460–463, 468–485) as the only land that changes. It drops on the Brotherhood's next revalidation (unclaim, capital move, guild change or war outcome); nothing is stripped live. The Clockwork's islands stay legal because its capital's sea reaches them. No guild capital loses its seat. FIG's 180/184 are disconnected before and after this change.

Tests

  • ProvinceHandlerVassalLandTest:
    • A distant vassal's capital and overseas land no longer set sail, in either claim mode or for relocation.
    • Land taken that way drops on revalidation.
    • Vassal land joined to the capital still opens the sea.
    • A vassal's shore still anchors land claims next to it.
    • A relocation still sails from the capital's coast, and only in sea mode without a seated capital.
  • ProvinceHandlerSeaClaimTest: an overseas holding doesn't start a second route; sea mode without a seated capital still sails.
  • ProvinceHandlerEnclaveTest: a colony can't anchor another colony across a different sea, and a colony across one river from traced land keeps its seat.
  • FactionMenusCoverageTest: the release-preview fixture now puts the far colony on water the capital's sea reaches.

Local full suite: 9,447 tests, one failure, the known root-only QuarantineCommandsTest. The only coverage misses are the known environment-only lines.

🤖 Generated with Claude Code

A landlocked overlord could claim across the sea from a vassal's capital
that did not touch its own, and a guild capital or overseas holding could
open a further sea route. That let the Brotherhood of Alms reach the bog
through New Waters Port's coast.

Sea routes (any number of connected sea or water zones) now start only
from the capital's land blob: land joined by land to the faction capital,
through its own provinces or vassal land that connects to it. Vassal
land elsewhere still anchors land claims next to it, but never sets sail.
Sea-mode claims and relocation follow the same rule; a realm without a
seated capital still sails from what it holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 91eb90c3-196c-4262-8765-09f9c32b2554
Commits

Reviewing files that changed from the base of the PR and between d57dc42 and 2276c72.

Files selected for processing: 5

  • src/main/java/net/tfminecraft/simplefactions/objects/handler/ProvinceHandler.java
  • src/test/java/net/tfminecraft/simplefactions/managers/inventory/FactionMenusCoverageTest.java
  • src/test/java/net/tfminecraft/simplefactions/objects/handler/ProvinceHandlerEnclaveTest.java
  • src/test/java/net/tfminecraft/simplefactions/objects/handler/ProvinceHandlerSeaClaimTest.java
  • src/test/java/net/tfminecraft/simplefactions/objects/handler/ProvinceHandlerVassalLandTest.java
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added the size:L 100-499 effective changed lines (tests excluded in mixed PRs). label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant