Difference between revisions of "Source:NetHack 3.6.0/include/spell.h"

From NetHackWiki
Jump to navigation Jump to search
(Created page with "__MIXEDSYNTAXHIGHLIGHT__ Below is the full text to '''spell.h''' from the source code of NetHack 3.6.0. To link to a particular line, write [...")
 
 
Line 3: Line 3:
  
 
{{NGPL}}
 
{{NGPL}}
  <span id="line1">1.   /* NetHack 3.6 spell.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */</span>
+
  <span id="line1">1. /* NetHack 3.6 spell.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */</span>
  <span id="line2">2.   /* Copyright 1986, M. Stephenson   */</span>
+
  <span id="line2">2. /* Copyright 1986, M. Stephenson   */</span>
  <span id="line3">3.   /* NetHack may be freely redistributed.  See license for details. */</span>
+
  <span id="line3">3. /* NetHack may be freely redistributed.  See license for details. */</span>
  <span id="line4">4.   </span>
+
  <span id="line4">4. </span>
  <span id="line5">5.   #ifndef SPELL_H</span>
+
  <span id="line5">5. #ifndef SPELL_H</span>
  <span id="line6">6.   #define SPELL_H</span>
+
  <span id="line6">6. #define SPELL_H</span>
  <span id="line7">7.   </span>
+
  <span id="line7">7. </span>
  <span id="line8">8.   #define NO_SPELL 0</span>
+
  <span id="line8">8. #define NO_SPELL 0</span>
  <span id="line9">9.   </span>
+
  <span id="line9">9. </span>
  <span id="line10">10.   /* spellbook re-use control; used when reading and when polymorphing */</span>
+
  <span id="line10">10. /* spellbook re-use control; used when reading and when polymorphing */</span>
  <span id="line11">11.   #define MAX_SPELL_STUDY 3</span>
+
  <span id="line11">11. #define MAX_SPELL_STUDY 3</span>
  <span id="line12">12.   </span>
+
  <span id="line12">12. </span>
  <span id="line13">13.   struct spell {</span>
+
  <span id="line13">13. struct spell {</span>
  <span id="line14">14.       short sp_id;  /* spell id (== object.otyp) */</span>
+
  <span id="line14">14.     short sp_id;  /* spell id (== object.otyp) */</span>
  <span id="line15">15.       xchar sp_lev; /* power level */</span>
+
  <span id="line15">15.     xchar sp_lev; /* power level */</span>
  <span id="line16">16.       int sp_know;  /* knowlege of spell */</span>
+
  <span id="line16">16.     int sp_know;  /* knowlege of spell */</span>
  <span id="line17">17.   };</span>
+
  <span id="line17">17. };</span>
  <span id="line18">18.   </span>
+
  <span id="line18">18. </span>
  <span id="line19">19.   /* levels of memory destruction with a scroll of amnesia */</span>
+
  <span id="line19">19. /* levels of memory destruction with a scroll of amnesia */</span>
  <span id="line20">20.   #define ALL_MAP 0x1</span>
+
  <span id="line20">20. #define ALL_MAP 0x1</span>
  <span id="line21">21.   #define ALL_SPELLS 0x2</span>
+
  <span id="line21">21. #define ALL_SPELLS 0x2</span>
  <span id="line22">22.   </span>
+
  <span id="line22">22. </span>
  <span id="line23">23.   #define decrnknow(spell) spl_book[spell].sp_know--</span>
+
  <span id="line23">23. #define decrnknow(spell) spl_book[spell].sp_know--</span>
  <span id="line24">24.   #define spellid(spell) spl_book[spell].sp_id</span>
+
  <span id="line24">24. #define spellid(spell) spl_book[spell].sp_id</span>
  <span id="line25">25.   #define spellknow(spell) spl_book[spell].sp_know</span>
+
  <span id="line25">25. #define spellknow(spell) spl_book[spell].sp_know</span>
  <span id="line26">26.   </span>
+
  <span id="line26">26. </span>
  <span id="line27">27.   #endif /* SPELL_H */</span>
+
  <span id="line27">27. #endif /* SPELL_H */</span>
 
[[Category:NetHack 3.6.0 source code|include/spell.h]]
 
[[Category:NetHack 3.6.0 source code|include/spell.h]]

Latest revision as of 13:41, 15 December 2015

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

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.

 /* NetHack 3.6	spell.h	$NHDT-Date: 1432512780 2015/05/25 00:13:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
 /* 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 */