Why don't you just stop saving space and split the event into three subevents?
First event:
set global1 to: Attack.Value('BaseDamage')*Attack.Value('lightning')*Defender.Value('Lightning')
set global2 to: Attack.Value('BaseDamage')*Attack.Value('Fire')*Defender.Value('Fire')
set global3 to: Attack.Value('BaseDamage')*Attack.Value('Earth')*Defender.Value('Earth')
set global4 to: Attack.Value('BaseDamage')*Attack.Value('Water')*Defender.Value('Water')
Second event:
if any of the global variables 1 to 4 are "0" set them to "1"
and finally:
set global('Attack') to : global1*global2*global3*global4*global('AttackStrength')*global('ExtraDamage')
I know that's a lot of global variables and events but I don't think there's another simple and easily understandable way to do it.
Hope this helps.