implemented NPC attack and fixed NPC damage taking