Elemental Savant

Elemental savants study the basic building blocks of existence — air, earth, fire, and water — learning to harness their powers.
==== Requirements ====
Skills: Knowledge (arcana) 5 ranks , Knowledge (the planes) 2 ranks
Feats: Energy Substitution (acid, cold, electricity, or fire)
Spells: Able to cast at least three spells that have one of the following descriptors in common: acid, cold, electricity, or fire. One of the spells must be at least 3rd level.
Special: Must have made peaceful contact with an elemental or outsider that has an elemental subtype (air, earth, fire, or water).
==== Hit die ====
d4
==== Skill points ====
2 + Int
==== Class Features ====
Weapon and Armor Proficiency: Elemental savants gain no proficiency with any weapon or armor.
Spells per Day/Spells Known: At each level except 5th and 10th, an elemental savant gains new spells per day (and spells known, if applicable) as if she had also gained a level in a spellcasting class to which she belonged before adding the prestige class level. She does not, however, gain any other benefit a character of that class would have gained (improved chance of turning or destroying undead, a bonus feat, and so on). If she had more than one spellcasting class before becoming an elemental savant, she must decide to which class to add each level for the purpose of determining spells per day and spells known.
Elemental Specialty (Ex): The first step toward transcending mortal form requires an elemental savant to choose her elemental specialty. Upon entering the class, she must select an element and its associated energy type (air = electricity, earth = acid, fire = fire, or water = cold). This choice must match the Energy Substitution feat that the savant selected to gain entry to the prestige class. When the savant casts a spell that normally deals energy damage, its energy descriptor changes to the savants chosen energy type, and it deals damage of that energy type instead of its normal energy type. For example, an elemental savant choosing to specialize in fire could still cast meld into stone, and its descriptor would not change because it does not deal energy damage. However, if she casts Melf's acid arrow, the spell would deal fire damage and have the fire descriptor instead of dealing acid damage and having the acid descriptor.
Resistance to Energy (Ex): As an elemental savant gains levels in this prestige class, she becomes more resistant to the type of energy allied with her chosen element. At 1st level, she gains resistance 5 against this energy type. This resistance rises to 10 at 4th level and 20 at 7th level.
Immunity to Sleep (Ex): At 2nd level, as an elemental savant continues to transcend her mortal form, she gains immunity to sleep effects.
Energy Penetration (Ex): Beginning at 3rd level, an elemental savant further refines her ability to wield energy associated with her chosen element. When she casts a spell using that type of energy, she gains a +2 competence bonus on caster level checks (1d20 + caster level) to overcome a creatures spell resistance. At 8th level, this bonus increases to +4. These bonuses stack with those granted by the Spell Penetration and Greater Spell Penetration feats.
Energy Focus (Ex): From 5th level on, an elemental savant is better able to manipulate energy associated with her chosen element. The save DC for any spell with that energy descriptor increases by 1. At 10th level, these save DCs increase by 1 again (total increase of 2). These increases are cumulative with those granted by the Spell Focus and Greater Spell Focus feats.
Darkvision (Ex): At 6th level, an elemental savant gains darkvision out to 60 feet.
Immunity to Paralysis and Poison (Ex): As an elemental savant approaches elemental perfection, she gains immunity to paralysis and poison at 9th level.
Elemental Perfection: At 10th level, an elemental savant, through long association with elemental entities and extensive study of their secrets, completely transcends her mortal form to become an elemental creature. Her type changes to elemental. She no longer needs to eat, sleep, or breathe (though she must still rest to regain spells). She gains an elemental creatures immunity to stunning, and she is no longer subject to extra damage from critical hits or flanking. An elemental savant gains the speed and movement modes, natural attacks, special attacks, and special qualities of a Medium elemental of the type appropriate to her elemental specialty, as noted in the Monster Manual, except that the save DC against her elemental attack form, if any (whirlwind, burn, or vortex) is 20 + her Con modifier. Upon achieving this state, an elemental savants appearance undergoes a minor physical change, usually to the skin or eyes. An earth elemental savant, for example, might acquire gemlike eyes and hard, pebbly skin. Anyone who shares the elemental savants predilection for study of her chosen plane immediately recognizes her transcendent nature. She gains a +2 circumstance bonus on all Charisma-based skill and ability checks when interacting with creatures that share her elemental subtype (air, earth, fire, or water) and with other elemental savants who have chosen her element. Unlike a normal elemental, an elemental savant retains a soul separate from her body. She can be raised from the dead as normal for a creature of her previous type.
Energy Immunity (Ex): From 10th level on, an elemental savant gains immunity to the type of energy associated with her chosen element.
=== Advancement ===
Level	BAB	Fort	Ref	Will	Special 	Spellcasting
1st 	+0 	+0 	+0 	+2 	Elemental specialty, resistance to energy 5 	+1 level of existing spellcasting class
2nd 	+1 	+0 	+0 	+3 	Immunity to sleep 	+1 level of existing spellcasting class
3rd 	+1 	+1 	+1 	+3 	Energy penetration +2 	+1 level of existing spellcasting class
4th 	+2 	+1 	+1 	+4 	Resistance to energy 10 	+1 level of existing spellcasting class
5th 	+2 	+1 	+1 	+4 	Energy focus +1 	–
6th 	+3 	+2 	+2 	+5 	Darkvision 	+1 level of existing spellcasting class
7th 	+3 	+2 	+2 	+5 	Resistance to energy 20 	+1 level of existing spellcasting class
8th 	+4 	+2 	+2 	+6 	Energy penetration +4 	+1 level of existing spellcasting class
9th 	+4 	+3 	+3 	+6 	Immunity to paralysis and poison 	+1 level of existing spellcasting class
10th 	+5 	+3 	+3 	+7 	Elemental perfection, energy focus +2, energy immunity	–
=== Class skills ===
Skill name 	Key ability	Trained only	Armor check penalty
Concentration 	CON 	 	
Knowledge (arcana) 	INT 	 	
Knowledge (the planes)	INT 	 	
Profession 	WIS 	 	
Spellcraft 	INT