
BEGIN {
        # Read the attack-types (and immune/protection)
        while ((getline buff < living_c) == 1) {
                if (buff ~ /static long levels\[/) {
                        lev = 1;
                        while (1) {
                                getline buff < living_c;
                                if(lev==1) getline buff < living_c;
                                # if (buff ~ "^}")
                                if (buff ~ /};/)
                                        break;
                                gsub("[ \t]*\"", "", buff);
                                nr = split(buff, arr, ",");
				# printf("nr=%d: %s\n",nr, buff);
                                for (i = 1; i<6 && (arr[i]!="") ; i++) { 
					printf("%d & %s \\\\ \n",lev++,arr[i]); 
				}
				if(lev>9) break; # get only first 10 levels 
                        }
                        break;
                }
        }
        close(living_c);
}

