Convoy intent, coasts in support, and what a disrupted convoy is

122 of 139 movement cases now.

Intent, which decides whether two units swapping bounce or sail past each
other: an army goes by convoy if it was ordered to, or if its own power gave
a legal convoy order for that move. Somebody else's fleets offering a route
is not intent however good the route, and your own fleet offering from a sea
it could never do it from is not intent either, because that was not an
order. Once intent exists any ordered route may carry it, foreign or not.

A convoy order is only an order if water could actually carry that army past
that fleet, which is a question about the map and is now asked.

Support is given to a province, not to a coast of one: a fleet in Marseilles
may support an attack on the north coast of Spain although it could never
sail there. And a support is only as legal as the move underneath it.

Two bugs of my own. Convoy routing could not start from or arrive at a
province with two coasts, because the fleet graph has no bare entry for one
-- there is no 'bul', only 'bul/ec' and 'bul/sc' -- so an army boarding in
Bulgaria found no sea and stayed home. And I had read 'disrupted' as the
escort being sunk when it means the army not arriving; in Pandin's Paradox
the fleet survives and the army still does not get there.
This commit is contained in:
2026-09-09 06:19:45 -07:00
parent c27e4cad81
commit 6c388f5bc4
3 changed files with 125 additions and 17 deletions
+14 -1
View File
@@ -52,10 +52,23 @@ describe('DATC', () => {
break
case 'fails':
case 'cut':
case 'disrupted':
case 'illegal':
expect(outcome.success.get(province), `${province} ${mark}`).toBe(false)
break
case 'disrupted': {
/*
* A disrupted convoy is one that did not deliver its army. That
* is not the same as its fleet being sunk -- in Pandin's Paradox
* the fleet survives and the army still does not arrive -- so
* the thing to check is the army, not the escort.
*/
const convoy = c.orders.find(
(o) => o.type === 'convoy' && o.at.split('/')[0] === province,
)
const army = convoy && 'from' in convoy ? convoy.from.split('/')[0] : province
expect(outcome.success.get(army), `${province} disrupted`).toBe(false)
break
}
case 'dislodged':
expect(outcome.dislodged.has(province), `${province} dislodged`).toBe(true)
break