There are several ways to do it indeed (Lua modules, message passing etc.)
Here is an approach I would consider (using Lua modules) if I had to implement such a system (maybe others would think of better options) - hope this will be clear enough to give you some leads
(this is probably how I’ll implement AoE spells in my game, but not 100% sure so at this point this is just an opinion)
1/ In a shared Lua module, you have the following nuke parameters:
=> “is_nuking” boolean / set to false by default (until it’s launched)
=> the nuke world position (can be set to “empty” position until it’s launched - depends if the bomb already exists before exploding… up to you)
=> damage, radius, and any other nuke attribute (in a “constants” module or not, up to you again / depends on your game and how you structured your project)
2/ When the bomb explodes, you set the boolean to true and update the nuke position (via the nuke script).
3/ At this moment, all the enemies (that were waiting for the shared “is_nuking” to be set to true, in the enemy script) know that the bomb is exploding.
4/ In the same enemy script, each enemy checks the distance between the nuke world position (shared via the Lua module) and its own world position.
5/ If an enemy is within the explosion radius => is hit by the explosion => takes the damage
(you can even make the damage proportional to the distance etc.)
Note
If you want to be able to launch not only 1 nuke at a time but multiple nukes, then you should have a shared table, where 1 entry = 1 nuke. Each entry would contain all the values mentioned above. (boolean, position and anything you want) And the enemy would not only check 1 boolean but traverse the table, check each boolean and take the damage of any nuke set to true.*
Once a nuke is used, you need to update/clean/remove its entry in the table, but it really depends on your game works, how you manage your nukes, whether they are consumed after being used, or just reloaded etc.)