diff --git a/include/hack.h b/include/hack.h index d3e182223..cd37508bf 100644 --- a/include/hack.h +++ b/include/hack.h @@ -85,9 +85,6 @@ #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 @@ -163,8 +160,6 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */ #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 */ diff --git a/include/spell.h b/include/spell.h index 807ed9731..26a9fc9de 100644 --- a/include/spell.h +++ b/include/spell.h @@ -1,10 +1,15 @@ -/* 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 */ diff --git a/src/spell.c b/src/spell.c index b161c78c9..a9a961727 100644 --- a/src/spell.c +++ b/src/spell.c @@ -772,17 +772,21 @@ boolean atme; 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(