add Jason Short's additional lenses use patch
add new Gnomish Mines levels from Kelly Bailey's patch
jousting by players wielding a lance while riding
+when reading spellbooks, don't "continue studying" wrong book if original one
+ gets destroyed after previous reading attempt has been interrupted
Platform- and/or Interface-Specific New Features
E int NDECL(learn);
#endif
E int FDECL(study_book, (struct obj *));
+E void FDECL(book_disappears, (struct obj *));
E void FDECL(book_substitution, (struct obj *,struct obj *));
E void NDECL(age_spells);
E int NDECL(docast);
-/* SCCS Id: @(#)save.c 3.3 2000/07/27 */
+/* SCCS Id: @(#)save.c 3.3 2002/01/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (Has_contents(otmp))
saveobjchn(fd,otmp->cobj,mode);
if (release_data(mode)) {
- if(otmp->oclass == FOOD_CLASS) food_disappears(otmp);
+ if (otmp->oclass == FOOD_CLASS) food_disappears(otmp);
+ if (otmp->oclass == SPBOOK_CLASS) book_disappears(otmp);
otmp->where = OBJ_FREE; /* set to free so dealloc will work */
otmp->timed = 0; /* not timed any more */
otmp->lamplit = 0; /* caller handled lights */
-/* SCCS Id: @(#)shk.c 3.3 2001/12/06 */
+/* SCCS Id: @(#)shk.c 3.3 2002/01/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
register struct bill_x *bpm;
register struct monst *shkp;
-
if (obj->otyp == LEASH && obj->leashmon) o_unleash(obj);
if (obj->oclass == FOOD_CLASS) food_disappears(obj);
+ if (obj->oclass == SPBOOK_CLASS) book_disappears(obj);
if (Has_contents(obj)) delete_contents(obj);
shkp = 0;
-/* SCCS Id: @(#)spell.c 3.3 2001/12/03 */
+/* SCCS Id: @(#)spell.c 3.3 2002/01/19 */
/* Copyright (c) M. Stephenson 1988 */
/* NetHack may be freely redistributed. See license for details. */
return(1);
}
+/* a spellbook has been destroyed or the character has changed levels;
+ the stored address for the current book is no longer valid */
+void
+book_disappears(obj)
+struct obj *obj;
+{
+ if (obj == book) book = (struct obj *)0;
+}
+
/* renaming an object usually results in it having a different address;
so the sequence start reading, get interrupted, name the book, resume
reading would read the "new" book from scratch */
return;
}
-
/*spell.c*/