Anti-Hero (3.5e Feat)
From D&D Wiki
 Anti-Hero [Archetype]
You do some not-so heroic actions, but you're still a (relatively) good guy or gal.
Prerequisite: Any non-good.
Benefit: See below
Special: If you ever stop qualifying for this feat, you can trade it for another archetype feat that you meet the prerequisites of.
Archetype Feat Bonuses are based on HD.
- 1 HD: You are considered good for the purpose of qualifying for feats, prestige classes or other prerequisites.
- 3 HD: You are no longer prone on losing class features by doing non-good actions. You also gain a +2 misc. bonus to all saves.
- 8 HD: You are considered good whenever it is advantegous to you (you can for example wield a holy weapon without penalty or being affected by holy word).
- 15 HD: You can no longer be affected by any alignment-based effect, such as smite evil or blasphemy.