Connect Semuta to Moritani initial battle discards

This commit is contained in:
Quintine committed 2026-10-28 20:29:19 +11:00
1 parent d0e4c177e4
commit 0406fc1869
10 files changed
+283 -15

No files matched your search

+12 -8
View File
@@ -156,6 +156,9 @@ export type BattleResolutionInput = {
physicalCards: readonly { id: string }[];
pendingAuditorPresent: boolean;
pendingRetentionPresent: boolean;
/** Selected Basic Semuta serialization: dispose mandatory loser cards before
* reserving the eligible native Moritani ally-retention choices. */
nativeMoritaniEarlyMandatoryDiscard?: boolean;
/** Open the same loser window regardless of private Moritani Nexus custody. */
nexusMoritani?: boolean;
};
@@ -966,16 +969,17 @@ function calculate(input: BattleResolutionInput): BattleResolutionQuote {
const loser = winner === a ? d : a,
loserPlayed = loser === a ? played.attacker : played.defender;
const retainablePlayed = loserPlayed.filter(
(selected) => !mandatorySkillDiscard(loser, selected),
);
const eligible = retainablePlayed.filter(
(selected) =>
canRetainBattleCard(
card(loser, selected)!,
ac || dc,
!!loser.poisonTooth,
),
!mandatorySkillDiscard(loser, selected) &&
(!input.nativeMoritaniEarlyMandatoryDiscard || !moritani ||
canRetainBattleCard(
card(loser, selected)!,
ac || dc,
!!loser.poisonTooth,
)),
);
const eligible = retainablePlayed.filter((selected) =>
canRetainBattleCard(card(loser, selected)!, ac || dc, !!loser.poisonTooth));
if (
moritani &&
loser.id !== moritani.id &&