#define CXN_ARTICLE 8 /* include a/an/the prefix */
#define CXN_NOCORPSE 16 /* suppress " corpse" suffix */
-/* spellbook re-use control; used when reading and when polymorphing */
-#define MAX_SPELL_STUDY 3
-
/*
* This is the way the game ends. If these are rearranged, the arrays
* in end.c and topten.c will need to be changed. Some parts of the
#include "extern.h"
#endif /* USE_TRAMPOLI */
-#define NO_SPELL 0
-
/* flags to control makemon() */
#define NO_MM_FLAGS 0x00000 /* use this rather than plain 0 */
#define NO_MINVENT 0x00001 /* suppress minvent when creating mon */
-/* SCCS Id: @(#)spell.h 3.5 1995/06/01 */
+/* SCCS Id: @(#)spell.h 3.5 2006/02/11 */
/* Copyright 1986, M. Stephenson */
/* NetHack may be freely redistributed. See license for details. */
#ifndef SPELL_H
#define SPELL_H
+#define NO_SPELL 0
+
+/* spellbook re-use control; used when reading and when polymorphing */
+#define MAX_SPELL_STUDY 3
+
struct spell {
short sp_id; /* spell id (== object.otyp) */
xchar sp_lev; /* power level */
pline("It invokes nightmarish images in your mind...");
spell_backfire(spell);
return(0);
- } else if (spellknow(spell) <= 100) {
+ } else if (spellknow(spell) <= KEEN / 200) { /* 100 turns left */
You("strain to recall the spell.");
- } else if (spellknow(spell) <= 1000) {
+ } else if (spellknow(spell) <= KEEN / 40) { /* 500 turns left */
+ You("have difficulty remembering the spell.");
+ } else if (spellknow(spell) <= KEEN / 20) { /* 1000 turns left */
Your("knowledge of this spell is growing faint.");
+ } else if (spellknow(spell) <= KEEN / 10) { /* 2000 turns left */
+ Your("recall of this spell is gradually fading.");
}
energy = (spellev(spell) * 5); /* 5 <= energy <= 35 */
if (u.uhunger <= 10 && spellid(spell) != SPE_DETECT_FOOD) {
You("are too hungry to cast that spell.");
return(0);
- } else if (ACURR(A_STR) < 4) {
+ } else if (ACURR(A_STR) < 4 && spellid(spell) != SPE_RESTORE_ABILITY) {
You("lack the strength to cast spells.");
return(0);
} else if(check_capacity(