ensure tribute handles conduct correctly
This commit is contained in:
+8
-2
@@ -3336,13 +3336,14 @@ int tribpassage;
|
|||||||
int scope = 0, section = 0, passage = 0, book = 0;
|
int scope = 0, section = 0, passage = 0, book = 0;
|
||||||
int linect = 0, passagecnt = 0, targetpassage = 0, textcnt = 0;
|
int linect = 0, passagecnt = 0, targetpassage = 0, textcnt = 0;
|
||||||
char *sectionnm = "", *booknm = "";
|
char *sectionnm = "", *booknm = "";
|
||||||
|
const char *badtranslation = "an incomprehensible foreign translation";
|
||||||
boolean matchedsection = FALSE, matchedtitle = FALSE;
|
boolean matchedsection = FALSE, matchedtitle = FALSE;
|
||||||
winid tribwin = WIN_ERR;
|
winid tribwin = WIN_ERR;
|
||||||
|
|
||||||
/* check for mandatories */
|
/* check for mandatories */
|
||||||
if (!tribsection || !tribtitle) {
|
if (!tribsection || !tribtitle) {
|
||||||
pline("It's an incomprehensible foreign translation of \"%s\"!",
|
pline("It's %s of \"%s\"!",
|
||||||
tribtitle);
|
badtranslation, tribtitle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3452,7 +3453,12 @@ cleanup:
|
|||||||
display_nhwindow(tribwin, FALSE);
|
display_nhwindow(tribwin, FALSE);
|
||||||
destroy_nhwindow(tribwin);
|
destroy_nhwindow(tribwin);
|
||||||
tribwin = WIN_ERR;
|
tribwin = WIN_ERR;
|
||||||
|
u.uconduct.literate++;
|
||||||
|
} else {
|
||||||
|
pline("It seems to be %s of \"%s\"!",
|
||||||
|
badtranslation, tribtitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* ---------- END TRIBUTE ----------- */
|
/* ---------- END TRIBUTE ----------- */
|
||||||
|
|||||||
+3
-1
@@ -152,9 +152,11 @@ doread()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Actions required to win the game aren't counted towards conduct */
|
/* Actions required to win the game aren't counted towards conduct */
|
||||||
|
/* Novel conduct is handled in read_tribute so exclude it too*/
|
||||||
if (scroll->otyp != SPE_BOOK_OF_THE_DEAD &&
|
if (scroll->otyp != SPE_BOOK_OF_THE_DEAD &&
|
||||||
scroll->otyp != SPE_BLANK_PAPER &&
|
scroll->otyp != SPE_BLANK_PAPER &&
|
||||||
scroll->otyp != SCR_BLANK_PAPER)
|
scroll->otyp != SCR_BLANK_PAPER &&
|
||||||
|
scroll->otyp != SPE_NOVEL)
|
||||||
u.uconduct.literate++;
|
u.uconduct.literate++;
|
||||||
|
|
||||||
if(scroll->oclass == SPBOOK_CLASS) {
|
if(scroll->oclass == SPBOOK_CLASS) {
|
||||||
|
|||||||
Reference in New Issue
Block a user