Maybe Undyne, Sans, and Asgore were summoned by powerful, very determined humans?
Or maybe, Sans and Papyrus could've been successful attempts by W.D. Gaster to replicate that magic?
Maybe that's why him and Papyrus know eachother.
Maybe they met in Gasters lab.
Maybe Gaster wasn't even a monster, maybe he was a human who took a liking to the monsters and went underground to join them and help them escape. Maybe he did experiments on himself to learn about Determination. Maybe he built and got stuck in a
DT-harnessing machine and it spread his DT across time and space.
I think it would depend on the attack. Like, Undyne's spears and Toriel/Asgore's Fireballs probably aren't alive, but the Mini Mettatons might be. And perhaps the Froggit attacks, or any other that takes form of a living creature.
SERIOUS QUESTION; MONSTERS ARE MADE OUT OF MAGIC, AND SO ARE THEIR ATTACKS. SO, DOES THAT MEAN THEIR ATTACKS ARE ALIVE, BUT DIE WHEN WE GET HIT BY THEM?