Connect staged group Nexus negotiations
Verify and publish checkpoint container / container (push) Successful in 10m24s
Verify and publish checkpoint container / container (push) Successful in 10m24s
This commit is contained in:
1 parent
4798a3579b
commit
624f95dde4
9 files changed
+348
-14
No files matched your search
@@ -284,6 +284,7 @@ import { MoritaniRetention } from './moritani-retention';
|
||||
import { MoritaniAssassinate, MoritaniAssassinateHistory } from './moritani-assassinate';
|
||||
import { MoritaniExtortion, MoritaniExtortionNotice } from './moritani-extortion';
|
||||
import { AdvancedAllySeparation } from './advanced-ally-separation';
|
||||
import { CoalitionNexus } from './coalition-nexus';
|
||||
import { NexusEmperorPayment } from './nexus-emperor-payment';
|
||||
import { NexusEmperorSellerPurchase } from './nexus-emperor-seller-purchase';
|
||||
import { NexusEmperorAmbassadorPurchase } from './nexus-emperor-ambassador-purchase';
|
||||
@@ -301,6 +302,8 @@ export function GameTable({
|
||||
exitDisabled?: boolean;
|
||||
}) {
|
||||
const me = g.players.find((p) => p.id === g.me)!;
|
||||
const groupNexus = g.coalitionNexus;
|
||||
const inGroup = groupNexus?.groups.some(group => group.members.length === 3 && group.members.includes(me.id));
|
||||
const outgoingAlliance = g.allianceOffers[me.id];
|
||||
const outgoingAllianceName = g.players.find((p) => p.id === outgoingAlliance)?.name;
|
||||
const shipmentAvailable = nexusGuildShipmentAvailable(g);
|
||||
@@ -4350,6 +4353,14 @@ export function GameTable({
|
||||
<p className="muted">
|
||||
A sandworm has opened a Nexus. Alliances may change now.
|
||||
</p>
|
||||
{groupNexus && <CoalitionNexus view={groupNexus} disabled={busy} onIntent={(intent) => {
|
||||
if (intent.kind === 'propose') act({type: 'coalitionPropose', groupId: intent.groupId,
|
||||
entrant: intent.entrant, expectedRevision: intent.expectedRevision});
|
||||
else if (intent.kind === 'answer') act({type: 'coalitionAnswer', event: intent.event,
|
||||
nexus: intent.nexus, turn: intent.turn, accept: intent.accept, expectedRevision: intent.expectedRevision});
|
||||
else act({type: 'coalitionLeave', expectedRevision: intent.expectedRevision});
|
||||
}} />}
|
||||
{!groupNexus?.proposal && !inGroup && <>
|
||||
{outgoingAlliance && !me.ally && (
|
||||
<div className="nexus-offer">
|
||||
<p className="notice">
|
||||
@@ -4367,7 +4378,8 @@ export function GameTable({
|
||||
>
|
||||
<option value="">Choose a player</option>
|
||||
{g.players
|
||||
.filter((p) => p.id !== me.id)
|
||||
.filter((p) => p.id !== me.id && !groupNexus?.groups.some(group =>
|
||||
group.members.length === 3 && group.members.includes(p.id)))
|
||||
.map((p) => (
|
||||
<option value={p.id} key={p.id}
|
||||
disabled={!!g.homeworldAllianceBlocks?.[p.id]}>
|
||||
@@ -4385,6 +4397,7 @@ export function GameTable({
|
||||
}, !target || !!g.homeworldAllianceBlocks?.[target])}
|
||||
{me.ally &&
|
||||
actionButton('Break alliance', { type: 'alliance' })}
|
||||
</>}
|
||||
</>
|
||||
)}
|
||||
{g.phase === 1 && !g.nexus && !g.spiceWindow && (
|
||||
|
||||
Reference in new issue
Block a user