Source:NetHack 3.3.0/spell.h

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to spell.h from the source code of NetHack 3.3.0. To link to a particular line, write [[NetHack 3.3.0/spell.h#line123]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

1.    /*	SCCS Id: @(#)spell.h	3.3	95/06/01	*/
2.    /* Copyright 1986, M. Stephenson				  */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef SPELL_H
6.    #define SPELL_H
7.    
8.    struct spell {
9.        short	sp_id;			/* spell id (== object.otyp) */
10.       xchar	sp_lev;			/* power level */
11.       int		sp_know;		/* knowlege of spell */
12.   };
13.   
14.   /* levels of memory destruction with a scroll of amnesia */
15.   #define ALL_MAP		0x1
16.   #define ALL_SPELLS	0x2
17.   
18.   #define decrnknow(spell)	spl_book[spell].sp_know--
19.   #define spellid(spell)		spl_book[spell].sp_id
20.   #define spellknow(spell)	spl_book[spell].sp_know
21.   
22.   #endif /* SPELL_H */