Files
nethack/include/spell.h
nethack.rankin 458c90fd7e couple of spell bits (trunk only)
Move NO_SPELL and MAX_SPELL_STUDY from hack.h to spell.h.  I didn't
even remember that the latter existed when I put MAX_SPELL_STUDY in the
former recently.

     Add a couple of new "spell is almost gone" messages that occur when
casting spells.  One matches up with yesterday's change for when you can
re-read a spellbook to reinforce memory of a known spell.

     When "too hungry", you can't cast any spells, except detect food so
that you can find something to eat.  When "too weak" you couldn't cast any
spells at all; now you can cast restore ability so that you can recover
lost strength.  [We still need to come up with a better crowning bonus for
monks than spellbook of restore ability.]  I couldn't think of a reasonable
exception for the "can't cast when carrying too much" restriction.  If we
can come up with one (levitation?), then remove curse could/should become
an exception for the "no free hands" restriction.
2006-02-12 06:24:25 +00:00

28 lines
729 B
C

/* 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 */
int sp_know; /* knowlege of spell */
};
/* levels of memory destruction with a scroll of amnesia */
#define ALL_MAP 0x1
#define ALL_SPELLS 0x2
#define decrnknow(spell) spl_book[spell].sp_know--
#define spellid(spell) spl_book[spell].sp_id
#define spellknow(spell) spl_book[spell].sp_know
#endif /* SPELL_H */