Refactorings

I don't know if what I did to monster.cpp (and the way I did it) is desired, but those four identical blocks almost scream to be extracted to their own function.

Additionally, npc.cpp has a similar issue. The same function should handle both cases, as far as I understand it, I am just not sure about where to place it.