Which creatures are dealt damage is based on which creatures were declared as attackers during the declare attackers step.

Artwork
Loading artwork…
Lightmine Field
Rise of the Eldrazi · #32 · EN
Nonfoil—Foil—
Card rules
Whenever one or more creatures attack, this enchantment deals damage to each of those creatures equal to the number of attacking creatures.
If you want to kill a lot of goblins, just make sure your defenses look like fun.
Rare · Illustrated by Eric Deschamps
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
PreDH 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
Pauper Not Legal
Pauper Commander Not Legal
Pioneer 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
Lightmine Field’s ability triggers when any creatures attack, including your own.
For example: If a creature attacks but is removed from combat before Lightmine Field’s ability resolves (because it would be destroyed and regenerates, perhaps), that creature is dealt damage by Lightmine Field but isn’t counted when determining the amount of damage. On the other hand, if a creature is put onto the battlefield attacking (due to Preeminent Captain’s ability, perhaps), it isn’t dealt damage by Lightmine Field, but it is counted when determining the amount of damage.
How much damage each of those creatures is dealt is based how many creatures are attacking at the time the ability resolves.