import type { IntroductionState } from '@/game/introduction'; import { introductionAlliance } from '@/game/introduction-alliance'; import { TERRITORIES } from '@/game/board'; import styles from './introduction.module.css'; export function AllianceLesson({ state, update }: { state: IntroductionState; update: (patch: Partial) => void; }) { const practice = introductionAlliance(state); const reset = (patch: Partial = {}) => update({ allianceActions: [], allianceClosed: false, allianceChecked: false, ...patch, }); return <>

Shai-Hulud has brought a Nexus during the Spice Blow phase of turn 2. This separate four-player Basic example starts after the worm and spice effects. You are Atreides; the Emperor is a possible partner. Harkonnen and the Guild stay unallied.

These fixed responses demonstrate consent, not an AI’s strategy. Changing an option starts a new example.

{state.allianceChecked ? practice.winner.length ? 'You win together' : 'No stronghold victory yet' : state.allianceClosed ? 'Nexus finished' : practice.allied ? 'Your alliance is public' : state.allianceActions.includes('leave') ? 'You remain unallied' : 'Choose whether to ally'}

{practice.allied ? 'You and the Emperor are allied. The ordinary alliance limit is two players.' : practice.outgoing ? `${state.allianceClosed ? 'Your offer was not accepted.' : 'Your offer is pending.'} You and the Emperor still count separately.` : practice.incoming && !state.allianceActions.length && !state.allianceClosed ? 'The Emperor has offered. You decide whether to accept.' : 'You are unallied.'}

{state.allianceActions.includes('leave') && !state.allianceClosed &&

In a live Nexus you may continue negotiating. Restart this example to try another choice.

}

Your stronghold progress

{practice.progress.strongholds.length} / {practice.progress.target} strongholds {practice.allied ? ' held by your alliance' : ' held by you'}.

    {practice.progress.strongholds.map(id =>
  • {TERRITORIES.find(t => t.id === id)!.name}
  • )}

You occupy Arrakeen and Carthag. The Emperor occupies {state.allianceHoldings === 2 ? 'Sietch Tabr and Habbanya Sietch' : 'Sietch Tabr'}. Harkonnen holds Tuek’s Sietch; the Guild has a force in the Polar Sink.

{!state.allianceChecked &&

This is prospective progress. Forming an alliance does not end the game during the Nexus.

} {state.allianceClosed &&

Ordinary alliances cannot now change until another Nexus. For this exercise, the later phases leave every force in place; check this unchanged position at the Mentat Pause.

} {state.allianceChecked &&

{practice.winner.length ? 'Atreides and the Emperor jointly hold four strongholds at the Mentat Pause and share the victory.' : `You need ${practice.progress.target - practice.progress.strongholds.length} more stronghold${practice.progress.target - practice.progress.strongholds.length === 1 ? '' : 's'} for an ordinary ${practice.allied ? 'alliance' : 'solo'} victory. The game continues.`}

}

Nexus history

{practice.transcript.length ?
    {practice.transcript.map((entry, i) =>
  1. {entry}
  2. )}
:

No offers yet. You may offer an alliance or stay unallied.

}

Both players must agree to form an alliance. Either partner may break it during a Nexus. In this ordinary four-player game, a solo player needs three strongholds and an alliance needs four at the Mentat Pause.

An alliance shares the victory and grants the faction’s listed alliance power, not every faction advantage. Forces and cards remain owned by their players. Funding, movement restrictions, special victories and expansion exceptions are separate rules in the reference.

; }