Skip to content

Rival-city routing: right-of-passage and combat routing follow-ups (#371) #1019

Open

Description

@Billytifft

Follow-up to #371 ("Units shouldn't route through rival cities") and to review
feedback on PR #1002.

The routing-around-rival-cities behavior is already provided by the
intent-based movement refactor (MapUnit.ResolveIntent), and PR #1002 dropped
its early regression tests rather than merge coverage-only, provisional tests
in that PR. Remaining work, to be affirmed before adding tests:

  • Right of passage. The real reported gap (Units shouldn't route through rival cities #371) is players/human units not
    respecting rights-of-passage — i.e. routing through cities of a civ you have
    a RoP with should be allowed, and routing through disallowed city tiles
    should not happen. Fix this in the movement layer.
  • Combat routing through enemy cities. Decide the intended behavior for a
    combat unit pathing toward a target beyond an enemy city (at war): must it
    always go around the city, or may it enter the city tile en route to attack
    it? This is part of larger strategic AI (deep targets inside an enemy
    empire) that is not yet affirmed. Adding tests now would bake in assumptions.
  • Regression coverage. Once the above are settled, add tests as xUnit
    [Theory] (owner x war-state) to avoid the duplicated test bodies.

Separate from #213 (settler AI re-picking an unreachable destination).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions