If some but not all of Boulderfall's targets become illegal, you can't change the division of damage. Damage that would have been dealt to illegal targets simply isn't dealt.

Artwork
Loading artwork…
Boulderfall
Theros · #115 · EN
Nonfoil—Foil—
Card rules
Boulderfall deals 5 damage divided as you choose among any number of targets.
"Defeating the Meletians was not so difficult. I needed only to move a mountain." —Eocles, oracle of Purphoros
Common · Illustrated by Ralph Horsley
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If an effect creates a copy of Boulderfall, the division of damage and number of targets can't be changed. The effect that creates the copy may allow you to change targets, however.
You divide the damage as you cast the spell, not as it resolves. Each target must be assigned at least 1 damage.