Function max_bridges

Source
pub fn max_bridges(config: &GameConfig, cores: &CoresState, extra: i64) -> i64
Expand description

bridges = min(real_level, fantasy_level, max_slot_level) - 1 + extra, floored at 0. With one core still at level 1 and no artifact, no bridge is allowed at all.

extra is BL-01 Extra Span’s “+1 bridge” (crate::mechanics::artifacts::LawColumnMods::extra_bridges), 0 for everyone else. It is worth exactly one bridge only because the slot ladder was refitted with it: at one slot per level and five slots, min(level) − 1 is always one short of what the slots physically allow, so the extra bridge always has somewhere to go (post-merge plan §8). Under the old “a slot every two levels, cap 10” pair the limit stopped binding from level 4 and this half of the stone was dead.

The max_slot_level clamp is what keeps that true now that core levels are unbounded: without it a level-9999 core would allow 9998 bridges against 5 possible, the limit would stop binding, and BL-01 would go dead exactly the way the refit existed to prevent.