Support group Guild-rate reserve shipments
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
1eeeb32566
commit
b89c225d5b
9 files changed
+297
-26
No files matched your search
@@ -1,4 +1,15 @@
|
||||
import type { FactionId } from './catalog';
|
||||
import { areCoalitionAllies, type CoalitionState } from './coalition-alliance';
|
||||
|
||||
/** Public group membership only; legacy pair and Guild self rates stay with
|
||||
* the caller's native rules. This grants no separate Guild transport action. */
|
||||
export function groupGuildShipmentRate(
|
||||
players: readonly {id:string; faction:FactionId; ally:string|null; allySinceTurn?:number}[],
|
||||
player: string, state?: CoalitionState,
|
||||
): boolean {
|
||||
const guild = players.find(seat => seat.faction === 'guild');
|
||||
return !!state && !!guild && guild.id !== player && areCoalitionAllies(players, state, player, guild.id);
|
||||
}
|
||||
|
||||
/** Ordinary reserve shipment; other transport powers have separate prices. */
|
||||
export function reserveShipmentCost(
|
||||
|
||||
Reference in new issue
Block a user