There's two specific types of spells I want to make, but I've got no clue how to make them work. Both spells make the player faster, stronger, tougher and all that, but rather than being on all the time or manually activated, they react to certain situations. The first spell would automatically empower the player whenever the weather was stormy. The second spell would automatically empower the player for about 30 seconds whenever an enemy or trap casted lightning at the player.
Perhaps this would be more like abilities than spells, but regardless these abilities would only work in the conditions I described.
The whole idea being, this is a part of an electromancer type mod, the player would have to use lightning as the primary weapon, and also be empowered by lightning as well, temporarily gaining superhuman abilities but only during stormy weather, or after being hit with lightning from enemies or environmental sources. Basically I'm trying to make a mod focused on lightning destruction specialized mages, who not only have powerful lightning abilities, but who are also empowered by lightning or shock damage as well.
I have a basic understanding of making spells, though these two seem to be very complicated. Is it even possible to make spells like these?
Could someone please tell me how to go about making these types of spells if it's possible? I'd be really thankful if anyone has the answers to this.