private function checkNPCStats(SR_NPC $npc) { $mods = $npc->getNPCModifiers(); foreach ($mods as $key => $value) { if (!$this->checkNPCStat($key)) { die(sprintf('The NPC %s has an invalid modifier: %s.', get_class($npc), $key)); } } }