Raid abilities care only that you attacked with a creature. It doesn't matter how many creatures you attacked with or which player, planeswalker, or battle those creatures attacked.

Artwork
Loading artwork…
Midnight Snack
Foundations · #65 · EN
Nonfoil—Foil—
Card rules
Raid — At the beginning of your end step, if you attacked this turn, create a Food token. (It's an artifact with "2,
, Sacrifice this token: You gain 3 life.")
2
, Sacrifice this enchantment: Target opponent loses X life, where X is the amount of life you gained this turn.
Uncommon · Illustrated by Kai Carpenter
Format legality
Alchemy Legal
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Future Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
The value of X is determined only once, as Midnight Snack's last ability resolves.
Raid abilities evaluate the entire turn to see if you attacked with a creature. That creature doesn't have to still be on the battlefield. Similarly, the player, planeswalker, or battle it attacked doesn't have to still be in the game or on the battlefield.