Now, NPC is a rather vague term that seems to include teammates in team-based battle games (like Halo coop mode)
For the sake of this, I am limiting NPC to only the characters in an rpg game that give quests or exchange helpful dialogue. And a bunch of games have ways to deal with players trying to attack an NPC.
Dragon Ball Z GBA 2 - The A for melee attack is also the "talk to them" button. Energy blasts pass right through NPCs.
Runescape - There is simply no option.
Pokemon: You can only call out pokemon in battle mode where there are no NPCs to be found.
Sonic DX: The NPCs are just walls that talk. Spins go around them, homing attack doesn't target them.
Now part of this thought came from a video about "If Pokemon Were Real" where there is a weak electric pokemon fighting a strong cocoon, and the protagonist realizes, why don't I attack the actual enemy instead of his pokemon?"
Is there a reason many games are so adamant about not being able to kill the NPCs (excluding killing them as part of the story as I hear how it is on God of War. I mean to deviate from the obvious plot by killing the ones who are supposed to give you the quests) Are most devs too lazy to accommodate for story impacts, is a plotline of that degree of nonlinearity just not realistic, or what?
The closest that any game has come to killing NPCs as far as I know is Pokemon Mystery Dungeon Explorers of Time/Darkness where you can try to kill a shopkeeper, but the shopkeeper turns out to be almost impossible to kill (if you can kill him, you may take all items from the shop). But outside of dungeons, you can't attack anyone. Are there any better examples, or is killing NPCs just taboo?