Skip to content

fix: refine siege occupation and battle pacing - #25

Merged
prayujt merged 2 commits into
mainfrom
fix/occupy-settlement-center
Aug 24, 2026
Merged

prayujt merged 2 commits into
mainfrom
fix/occupy-settlement-center

Conversation

@prayujt

@prayujt prayujt commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Separates siege staging from settlement occupation and makes combat resolve in faster, size-proportional rounds. Conquering armies fight from beside a settlement, enter its center after victory, and must physically hold that center before ownership transfers.

Conquest changes

  • Keeps initial conquest routing on the cheapest traversable tile adjacent to the center.
  • After all siege defenders are defeated, updates the same conquest order to route into the center.
  • Starts the 30-second occupation timer only after the army reaches the center.
  • Clears an active occupation timestamp if the army is no longer at its occupation destination.
  • Streams and persists the center movement transition so clients see the authoritative route and occupation phase.

Battle pacing and casualties

  • Changes the authoritative battle round interval from five seconds to three seconds.
  • Retains the proportional attack-power model: absolute losses increase with force size rather than using a fixed casualty count.
  • Preserves fractional casualty carry so small battles are not forced to lose at least one unit every round.
  • Adds a regression example where symmetric 15-v-15 soldiers lose 1 per side in the first round and 150-v-150 lose 10 per side.
  • Re-arms the next round only after the current round finishes, so delayed actor work still cannot create catch-up bursts.

Companion UI

The battle countdown and progress timing are updated in the companion web PR.

Verification

  • Regression tests for adjacent siege staging, center entry, center-only occupation, and occupation interruption
  • Regression tests for three-second cadence and force-size casualty scaling
  • go test ./...
  • go build ./...
  • go vet ./...
  • buf lint
  • goose -dir db/migrations validate
  • git diff --check

Keep siege combat on an adjacent staging tile, then move the victorious conquering army onto the settlement center before starting the occupation timer. Cancel active occupation if the army is no longer at its occupation destination.
Run combat rounds every three seconds and document the proportional attack-power model. Add regression coverage proving larger equivalent battles produce proportionally greater absolute casualties.
@prayujt prayujt changed the title fix: require settlement center occupation fix: refine siege occupation and battle pacing Aug 24, 2026
@prayujt
prayujt merged commit b1248b8 into main Aug 24, 2026
2 checks passed
@prayujt
prayujt deleted the fix/occupy-settlement-center branch August 24, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant