wishing fix
name_to_mon() has a bunch of alternate monster names, such as "gray-elf" to match "grey-elf" and "ki rin" to match "ki-rin". Those worked as intended when they occurred at the end of a wish, but only worked in the middle if their length was the same or one character less than the canonical name in mons[].mname. djinni figurine -> h - a figurine of a djinni genie figurine -> i - a figurine of a djinni figurine of mumak -> j - a figurine of a mumak mumak figurine -> k - a figurine of a mumak figurine of mumakil -> l - a figurine of a mumak mumakil figurine -> nothing fitting that description exists (The one-less case worked because its following space ended up being implicitly removed when skipping ahead by the length of mons[].mname; subsequent explicit removal didn't find a space so was a no-op.)
This commit is contained in:
@@ -329,7 +329,8 @@ int *rank_indx, *title_length;
|
||||
register int i, j;
|
||||
|
||||
/* Loop through each of the roles */
|
||||
for (i = 0; roles[i].name.m; i++)
|
||||
for (i = 0; roles[i].name.m; i++) {
|
||||
/* loop through each of the rank titles for role #i */
|
||||
for (j = 0; j < 9; j++) {
|
||||
if (roles[i].rank[j].m
|
||||
&& !strncmpi(str, roles[i].rank[j].m,
|
||||
@@ -351,6 +352,9 @@ int *rank_indx, *title_length;
|
||||
: roles[i].malenum;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (title_length)
|
||||
*title_length = 0;
|
||||
return NON_PM;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user