| 1 |
root |
1.1 |
|
| 2 |
|
|
BEGIN { |
| 3 |
|
|
# Read the attack-types (and immune/protection) |
| 4 |
|
|
while ((getline buff < living_c) == 1) { |
| 5 |
|
|
if (buff ~ /static uint32 levels\[/) { |
| 6 |
|
|
lev = 1; |
| 7 |
|
|
while (1) { |
| 8 |
|
|
getline buff < living_c; |
| 9 |
|
|
if(lev==1) getline buff < living_c; |
| 10 |
|
|
# if (buff ~ "^}") |
| 11 |
|
|
if (buff ~ /};/) |
| 12 |
|
|
break; |
| 13 |
|
|
gsub("[ \t]*\"", "", buff); |
| 14 |
|
|
nr = split(buff, arr, ","); |
| 15 |
|
|
# printf("nr=%d: %s\n",nr, buff); |
| 16 |
|
|
for (i = 1; i<6 && (arr[i]!="") ; i++) { |
| 17 |
|
|
printf("%d & %s \\\\ \n",lev++,arr[i]); |
| 18 |
|
|
} |
| 19 |
|
|
if(lev>9) break; # get only first 10 levels |
| 20 |
|
|
} |
| 21 |
|
|
break; |
| 22 |
|
|
} |
| 23 |
|
|
} |
| 24 |
|
|
close(living_c); |
| 25 |
|
|
} |
| 26 |
|
|
|