Hello, it was in my game that this confusing and interesting discussion-stimulating event happened.
Here is the setup:
An 11th level cleric casts Spell Immunity on himself. His chosen spells are fireball and lightning bolt. He is attacked by a 15th level wizard who casts an empowered fireball with the Energy Substitution metamagic feat so that it deals electricity damage. As you might expect, the spell does some heavy damage, enough to kill the cleric.
SO, the question that came up in our group was this: Does a spell cast with Energy Substitution on it become a different spell, or is it the same spell in every respect except for its subtype? A reading of the feat mentions nothing about the spell actually becoming a different spell (i.e., fireball to lightningball), and says the spell's descriptor changes to reflect the new energy type, which, in my reading, presumes that nothing else about the spell changes. This is a pressing issue for my group, because depending on whether or not the spell failed against Spell Immunity, this player's character actually wouldn't have died.
I am leaning heavily toward a ruling that an Energy Substituted spell is always the same as its "base" spell and that it can be resisted by Spell Immunity just as if it hadn't been metamagic'ed (unless of course it is also heightened as was mentioned above). However, I haven't been able to find anything close to an official ruling on this, and would like to be sure I'm as correct as I can possibly be, since one of my players has quite a lot riding on the outcome. Thanks.