• Compute, without touching Foundry, how a batch of newly created combatants should be seeded into CombatantGroups.

    For each combatant lacking a group, the desired name (falling back to DEFAULT_COMBAT_GROUP when blank) is matched case-insensitively against existing groups and against names already queued for creation. A distinct new name is queued for creation exactly once — never N racing creates for the same group. Each assignment resolves to the canonical stored name (the existing group's name, or the first-seen casing for a new one) so the caller can map name → id after creation.

    Does not mutate its inputs.

    Parameters

    • newCombatants: SeedingCombatant[]

      The newly created combatants to seed into groups.

    • existingGroups: ExistingGroup[]

      The combatant groups that already exist.

    Returns GroupSeedingPlan

    The plan describing which groups to create and how to assign combatants.