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

From NetHackWiki
Jump to navigation Jump to search
(Created page with "__MIXEDSYNTAXHIGHLIGHT__ Below is the full text to '''artifact.h''' from the source code of NetHack 3.6.0. To link to a particular line, writ...")
 
 
Line 3: Line 3:
  
 
{{NGPL}}
 
{{NGPL}}
  <span id="line1">1.   /* NetHack 3.6 artifact.h $NHDT-Date: 1433050871 2015/05/31 05:41:11 $  $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */</span>
+
  <span id="line1">1. /* NetHack 3.6 artifact.h $NHDT-Date: 1433050871 2015/05/31 05:41:11 $  $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */</span>
  <span id="line2">2.   /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */</span>
+
  <span id="line2">2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */</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 ARTIFACT_H</span>
+
  <span id="line5">5. #ifndef ARTIFACT_H</span>
  <span id="line6">6.   #define ARTIFACT_H</span>
+
  <span id="line6">6. #define ARTIFACT_H</span>
  <span id="line7">7.   </span>
+
  <span id="line7">7. </span>
  <span id="line8">8.   #define SPFX_NONE 0x00000000L  /* no special effects, just a bonus */</span>
+
  <span id="line8">8. #define SPFX_NONE 0x00000000L  /* no special effects, just a bonus */</span>
  <span id="line9">9.   #define SPFX_NOGEN 0x00000001L  /* item is special, bequeathed by gods */</span>
+
  <span id="line9">9. #define SPFX_NOGEN 0x00000001L  /* item is special, bequeathed by gods */</span>
  <span id="line10">10.   #define SPFX_RESTR 0x00000002L  /* item is restricted - can't be named */</span>
+
  <span id="line10">10. #define SPFX_RESTR 0x00000002L  /* item is restricted - can't be named */</span>
  <span id="line11">11.   #define SPFX_INTEL 0x00000004L  /* item is self-willed - intelligent */</span>
+
  <span id="line11">11. #define SPFX_INTEL 0x00000004L  /* item is self-willed - intelligent */</span>
  <span id="line12">12.   #define SPFX_SPEAK 0x00000008L  /* item can speak (not implemented) */</span>
+
  <span id="line12">12. #define SPFX_SPEAK 0x00000008L  /* item can speak (not implemented) */</span>
  <span id="line13">13.   #define SPFX_SEEK 0x00000010L  /* item helps you search for things */</span>
+
  <span id="line13">13. #define SPFX_SEEK 0x00000010L  /* item helps you search for things */</span>
  <span id="line14">14.   #define SPFX_WARN 0x00000020L  /* item warns you of danger */</span>
+
  <span id="line14">14. #define SPFX_WARN 0x00000020L  /* item warns you of danger */</span>
  <span id="line15">15.   #define SPFX_ATTK 0x00000040L  /* item has a special attack (attk) */</span>
+
  <span id="line15">15. #define SPFX_ATTK 0x00000040L  /* item has a special attack (attk) */</span>
  <span id="line16">16.   #define SPFX_DEFN 0x00000080L  /* item has a special defence (defn) */</span>
+
  <span id="line16">16. #define SPFX_DEFN 0x00000080L  /* item has a special defence (defn) */</span>
  <span id="line17">17.   #define SPFX_DRLI 0x00000100L  /* drains a level from monsters */</span>
+
  <span id="line17">17. #define SPFX_DRLI 0x00000100L  /* drains a level from monsters */</span>
  <span id="line18">18.   #define SPFX_SEARCH 0x00000200L /* helps searching */</span>
+
  <span id="line18">18. #define SPFX_SEARCH 0x00000200L /* helps searching */</span>
  <span id="line19">19.   #define SPFX_BEHEAD 0x00000400L /* beheads monsters */</span>
+
  <span id="line19">19. #define SPFX_BEHEAD 0x00000400L /* beheads monsters */</span>
  <span id="line20">20.   #define SPFX_HALRES 0x00000800L /* blocks hallucinations */</span>
+
  <span id="line20">20. #define SPFX_HALRES 0x00000800L /* blocks hallucinations */</span>
  <span id="line21">21.   #define SPFX_ESP 0x00001000L    /* ESP (like amulet of ESP) */</span>
+
  <span id="line21">21. #define SPFX_ESP 0x00001000L    /* ESP (like amulet of ESP) */</span>
  <span id="line22">22.   #define SPFX_STLTH 0x00002000L  /* Stealth */</span>
+
  <span id="line22">22. #define SPFX_STLTH 0x00002000L  /* Stealth */</span>
  <span id="line23">23.   #define SPFX_REGEN 0x00004000L  /* Regeneration */</span>
+
  <span id="line23">23. #define SPFX_REGEN 0x00004000L  /* Regeneration */</span>
  <span id="line24">24.   #define SPFX_EREGEN 0x00008000L /* Energy Regeneration */</span>
+
  <span id="line24">24. #define SPFX_EREGEN 0x00008000L /* Energy Regeneration */</span>
  <span id="line25">25.   #define SPFX_HSPDAM 0x00010000L /* 1/2 spell damage (on player) in combat */</span>
+
  <span id="line25">25. #define SPFX_HSPDAM 0x00010000L /* 1/2 spell damage (on player) in combat */</span>
  <span id="line26">26.   #define SPFX_HPHDAM \</span>
+
  <span id="line26">26. #define SPFX_HPHDAM \</span>
  <span id="line27">27.       0x00020000L                /* 1/2 physical damage (on player) in combat */</span>
+
  <span id="line27">27.     0x00020000L                /* 1/2 physical damage (on player) in combat */</span>
  <span id="line28">28.   #define SPFX_TCTRL 0x00040000L /* Teleportation Control */</span>
+
  <span id="line28">28. #define SPFX_TCTRL 0x00040000L /* Teleportation Control */</span>
  <span id="line29">29.   #define SPFX_LUCK 0x00080000L  /* Increase Luck (like Luckstone) */</span>
+
  <span id="line29">29. #define SPFX_LUCK 0x00080000L  /* Increase Luck (like Luckstone) */</span>
  <span id="line30">30.   #define SPFX_DMONS 0x00100000L /* attack bonus on one monster type */</span>
+
  <span id="line30">30. #define SPFX_DMONS 0x00100000L /* attack bonus on one monster type */</span>
  <span id="line31">31.   #define SPFX_DCLAS 0x00200000L /* attack bonus on monsters w/ symbol mtype \</span>
+
  <span id="line31">31. #define SPFX_DCLAS 0x00200000L /* attack bonus on monsters w/ symbol mtype \</span>
  <span id="line32">32.                                     */</span>
+
  <span id="line32">32.                                   */</span>
  <span id="line33">33.   #define SPFX_DFLAG1 0x00400000L  /* attack bonus on monsters w/ mflags1 flag \</span>
+
  <span id="line33">33. #define SPFX_DFLAG1 0x00400000L  /* attack bonus on monsters w/ mflags1 flag \</span>
  <span id="line34">34.                                       */</span>
+
  <span id="line34">34.                                     */</span>
  <span id="line35">35.   #define SPFX_DFLAG2 0x00800000L  /* attack bonus on monsters w/ mflags2 flag \</span>
+
  <span id="line35">35. #define SPFX_DFLAG2 0x00800000L  /* attack bonus on monsters w/ mflags2 flag \</span>
  <span id="line36">36.                                       */</span>
+
  <span id="line36">36.                                     */</span>
  <span id="line37">37.   #define SPFX_DALIGN 0x01000000L  /* attack bonus on non-aligned monsters  */</span>
+
  <span id="line37">37. #define SPFX_DALIGN 0x01000000L  /* attack bonus on non-aligned monsters  */</span>
  <span id="line38">38.   #define SPFX_DBONUS 0x01F00000L  /* attack bonus mask */</span>
+
  <span id="line38">38. #define SPFX_DBONUS 0x01F00000L  /* attack bonus mask */</span>
  <span id="line39">39.   #define SPFX_XRAY 0x02000000L    /* gives X-RAY vision to player */</span>
+
  <span id="line39">39. #define SPFX_XRAY 0x02000000L    /* gives X-RAY vision to player */</span>
  <span id="line40">40.   #define SPFX_REFLECT 0x04000000L /* Reflection */</span>
+
  <span id="line40">40. #define SPFX_REFLECT 0x04000000L /* Reflection */</span>
  <span id="line41">41.   #define SPFX_PROTECT 0x08000000L /* Protection */</span>
+
  <span id="line41">41. #define SPFX_PROTECT 0x08000000L /* Protection */</span>
  <span id="line42">42.   </span>
+
  <span id="line42">42. </span>
  <span id="line43">43.   struct artifact {</span>
+
  <span id="line43">43. struct artifact {</span>
  <span id="line44">44.       short otyp;</span>
+
  <span id="line44">44.     short otyp;</span>
  <span id="line45">45.       const char *name;</span>
+
  <span id="line45">45.     const char *name;</span>
  <span id="line46">46.       unsigned long spfx;  /* special effect from wielding/wearing */</span>
+
  <span id="line46">46.     unsigned long spfx;  /* special effect from wielding/wearing */</span>
  <span id="line47">47.       unsigned long cspfx; /* special effect just from carrying obj */</span>
+
  <span id="line47">47.     unsigned long cspfx; /* special effect just from carrying obj */</span>
  <span id="line48">48.       unsigned long mtype; /* monster type, symbol, or flag */</span>
+
  <span id="line48">48.     unsigned long mtype; /* monster type, symbol, or flag */</span>
  <span id="line49">49.       struct attack attk, defn, cary;</span>
+
  <span id="line49">49.     struct attack attk, defn, cary;</span>
  <span id="line50">50.       uchar inv_prop;    /* property obtained by invoking artifact */</span>
+
  <span id="line50">50.     uchar inv_prop;    /* property obtained by invoking artifact */</span>
  <span id="line51">51.       aligntyp alignment; /* alignment of bequeathing gods */</span>
+
  <span id="line51">51.     aligntyp alignment; /* alignment of bequeathing gods */</span>
  <span id="line52">52.       short role;        /* character role associated with */</span>
+
  <span id="line52">52.     short role;        /* character role associated with */</span>
  <span id="line53">53.       short race;        /* character race associated with */</span>
+
  <span id="line53">53.     short race;        /* character race associated with */</span>
  <span id="line54">54.       long cost; /* price when sold to hero (default 100 x base cost) */</span>
+
  <span id="line54">54.     long cost; /* price when sold to hero (default 100 x base cost) */</span>
  <span id="line55">55.       char acolor;        /* color to use if artifact 'glows' */</span>
+
  <span id="line55">55.     char acolor;        /* color to use if artifact 'glows' */</span>
  <span id="line56">56.   };</span>
+
  <span id="line56">56. };</span>
  <span id="line57">57.   </span>
+
  <span id="line57">57. </span>
  <span id="line58">58.   /* invoked properties with special powers */</span>
+
  <span id="line58">58. /* invoked properties with special powers */</span>
  <span id="line59">59.   #define TAMING (LAST_PROP + 1)</span>
+
  <span id="line59">59. #define TAMING (LAST_PROP + 1)</span>
  <span id="line60">60.   #define HEALING (LAST_PROP + 2)</span>
+
  <span id="line60">60. #define HEALING (LAST_PROP + 2)</span>
  <span id="line61">61.   #define ENERGY_BOOST (LAST_PROP + 3)</span>
+
  <span id="line61">61. #define ENERGY_BOOST (LAST_PROP + 3)</span>
  <span id="line62">62.   #define UNTRAP (LAST_PROP + 4)</span>
+
  <span id="line62">62. #define UNTRAP (LAST_PROP + 4)</span>
  <span id="line63">63.   #define CHARGE_OBJ (LAST_PROP + 5)</span>
+
  <span id="line63">63. #define CHARGE_OBJ (LAST_PROP + 5)</span>
  <span id="line64">64.   #define LEV_TELE (LAST_PROP + 6)</span>
+
  <span id="line64">64. #define LEV_TELE (LAST_PROP + 6)</span>
  <span id="line65">65.   #define CREATE_PORTAL (LAST_PROP + 7)</span>
+
  <span id="line65">65. #define CREATE_PORTAL (LAST_PROP + 7)</span>
  <span id="line66">66.   #define ENLIGHTENING (LAST_PROP + 8)</span>
+
  <span id="line66">66. #define ENLIGHTENING (LAST_PROP + 8)</span>
  <span id="line67">67.   #define CREATE_AMMO (LAST_PROP + 9)</span>
+
  <span id="line67">67. #define CREATE_AMMO (LAST_PROP + 9)</span>
  <span id="line68">68.   </span>
+
  <span id="line68">68. </span>
  <span id="line69">69.   #endif /* ARTIFACT_H */</span>
+
  <span id="line69">69. #endif /* ARTIFACT_H */</span>
 
[[Category:NetHack 3.6.0 source code|include/artifact.h]]
 
[[Category:NetHack 3.6.0 source code|include/artifact.h]]

Latest revision as of 13:10, 15 December 2015

Below is the full text to artifact.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/artifact.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	artifact.h	$NHDT-Date: 1433050871 2015/05/31 05:41:11 $  $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
 #ifndef ARTIFACT_H
 #define ARTIFACT_H
 
 #define SPFX_NONE 0x00000000L   /* no special effects, just a bonus */
 #define SPFX_NOGEN 0x00000001L  /* item is special, bequeathed by gods */
 #define SPFX_RESTR 0x00000002L  /* item is restricted - can't be named */
 #define SPFX_INTEL 0x00000004L  /* item is self-willed - intelligent */
 #define SPFX_SPEAK 0x00000008L  /* item can speak (not implemented) */
 #define SPFX_SEEK 0x00000010L   /* item helps you search for things */
 #define SPFX_WARN 0x00000020L   /* item warns you of danger */
 #define SPFX_ATTK 0x00000040L   /* item has a special attack (attk) */
 #define SPFX_DEFN 0x00000080L   /* item has a special defence (defn) */
 #define SPFX_DRLI 0x00000100L   /* drains a level from monsters */
 #define SPFX_SEARCH 0x00000200L /* helps searching */
 #define SPFX_BEHEAD 0x00000400L /* beheads monsters */
 #define SPFX_HALRES 0x00000800L /* blocks hallucinations */
 #define SPFX_ESP 0x00001000L    /* ESP (like amulet of ESP) */
 #define SPFX_STLTH 0x00002000L  /* Stealth */
 #define SPFX_REGEN 0x00004000L  /* Regeneration */
 #define SPFX_EREGEN 0x00008000L /* Energy Regeneration */
 #define SPFX_HSPDAM 0x00010000L /* 1/2 spell damage (on player) in combat */
 #define SPFX_HPHDAM \
     0x00020000L                /* 1/2 physical damage (on player) in combat */
 #define SPFX_TCTRL 0x00040000L /* Teleportation Control */
 #define SPFX_LUCK 0x00080000L  /* Increase Luck (like Luckstone) */
 #define SPFX_DMONS 0x00100000L /* attack bonus on one monster type */
 #define SPFX_DCLAS 0x00200000L /* attack bonus on monsters w/ symbol mtype \
                                   */
 #define SPFX_DFLAG1 0x00400000L  /* attack bonus on monsters w/ mflags1 flag \
                                     */
 #define SPFX_DFLAG2 0x00800000L  /* attack bonus on monsters w/ mflags2 flag \
                                     */
 #define SPFX_DALIGN 0x01000000L  /* attack bonus on non-aligned monsters  */
 #define SPFX_DBONUS 0x01F00000L  /* attack bonus mask */
 #define SPFX_XRAY 0x02000000L    /* gives X-RAY vision to player */
 #define SPFX_REFLECT 0x04000000L /* Reflection */
 #define SPFX_PROTECT 0x08000000L /* Protection */
 
 struct artifact {
     short otyp;
     const char *name;
     unsigned long spfx;  /* special effect from wielding/wearing */
     unsigned long cspfx; /* special effect just from carrying obj */
     unsigned long mtype; /* monster type, symbol, or flag */
     struct attack attk, defn, cary;
     uchar inv_prop;     /* property obtained by invoking artifact */
     aligntyp alignment; /* alignment of bequeathing gods */
     short role;         /* character role associated with */
     short race;         /* character race associated with */
     long cost; /* price when sold to hero (default 100 x base cost) */
     char acolor;        /* color to use if artifact 'glows' */
 };
 
 /* invoked properties with special powers */
 #define TAMING (LAST_PROP + 1)
 #define HEALING (LAST_PROP + 2)
 #define ENERGY_BOOST (LAST_PROP + 3)
 #define UNTRAP (LAST_PROP + 4)
 #define CHARGE_OBJ (LAST_PROP + 5)
 #define LEV_TELE (LAST_PROP + 6)
 #define CREATE_PORTAL (LAST_PROP + 7)
 #define ENLIGHTENING (LAST_PROP + 8)
 #define CREATE_AMMO (LAST_PROP + 9)
 
 #endif /* ARTIFACT_H */