Source:NetHack 3.6.1/include/artilist.h

From NetHackWiki
(Redirected from Artilist.h)
Jump to: navigation, search

Below is the full text to artilist.h from the source code of NetHack 3.6.1. To link to a particular line, write [[Source:NetHack 3.6.1/include/artilist.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.

  1.  /* NetHack 3.6  artilist.h      $NHDT-Date: 1433050874 2015/05/31 05:41:14 $  $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */
  2.  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3.  /*-Copyright (c) Robert Patrick Rankin, 2017. */
  4.  /* NetHack may be freely redistributed.  See license for details. */
  5.  
  6.  #ifdef MAKEDEFS_C
  7.  /* in makedefs.c, all we care about is the list of names */
  8.  
  9.  #define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr) nam
  10.  
  11.  static const char *artifact_names[] = {
  12.  #else
  13.  /* in artifact.c, set up the actual artifact list structure */
  14.  
  15.  #define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr) \
  16.      {                                                                       \
  17.          typ, nam, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr    \
  18.      }
  19.  
  20.  /* clang-format off */
  21.  #define     NO_ATTK     {0,0,0,0}               /* no attack */
  22.  #define     NO_DFNS     {0,0,0,0}               /* no defense */
  23.  #define     NO_CARY     {0,0,0,0}               /* no carry effects */
  24.  #define     DFNS(c)     {0,c,0,0}
  25.  #define     CARY(c)     {0,c,0,0}
  26.  #define     PHYS(a,b)   {0,AD_PHYS,a,b}         /* physical */
  27.  #define     DRLI(a,b)   {0,AD_DRLI,a,b}         /* life drain */
  28.  #define     COLD(a,b)   {0,AD_COLD,a,b}
  29.  #define     FIRE(a,b)   {0,AD_FIRE,a,b}
  30.  #define     ELEC(a,b)   {0,AD_ELEC,a,b}         /* electrical shock */
  31.  #define     STUN(a,b)   {0,AD_STUN,a,b}         /* magical attack */
  32.  /* clang-format on */
  33.  
  34.  STATIC_OVL NEARDATA struct artifact artilist[] = {
  35.  #endif /* MAKEDEFS_C */
  36.  
  37.      /* Artifact cost rationale:
  38.       * 1.  The more useful the artifact, the better its cost.
  39.       * 2.  Quest artifacts are highly valued.
  40.       * 3.  Chaotic artifacts are inflated due to scarcity (and balance).
  41.       */
  42.  
  43.      /*  dummy element #0, so that all interesting indices are non-zero */
  44.      A("", STRANGE_OBJECT, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE,
  45.        NON_PM, NON_PM, 0L, NO_COLOR),
  46.  
  47.      A("Excalibur", LONG_SWORD, (SPFX_NOGEN | SPFX_RESTR | SPFX_SEEK
  48.                                  | SPFX_DEFN | SPFX_INTEL | SPFX_SEARCH),
  49.        0, 0, PHYS(5, 10), DRLI(0, 0), NO_CARY, 0, A_LAWFUL, PM_KNIGHT, NON_PM,
  50.        4000L, NO_COLOR),
  51.      /*
  52.       *      Stormbringer only has a 2 because it can drain a level,
  53.       *      providing 8 more.
  54.       */
  55.      A("Stormbringer", RUNESWORD,
  56.        (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN | SPFX_INTEL | SPFX_DRLI), 0, 0,
  57.        DRLI(5, 2), DRLI(0, 0), NO_CARY, 0, A_CHAOTIC, NON_PM, NON_PM, 8000L,
  58.        NO_COLOR),
  59.      /*
  60.       *      Mjollnir will return to the hand of the wielder when thrown
  61.       *      if the wielder is a Valkyrie wearing Gauntlets of Power.
  62.       */
  63.      A("Mjollnir", WAR_HAMMER, /* Mjo:llnir */
  64.        (SPFX_RESTR | SPFX_ATTK), 0, 0, ELEC(5, 24), NO_DFNS, NO_CARY, 0,
  65.        A_NEUTRAL, PM_VALKYRIE, NON_PM, 4000L, NO_COLOR),
  66.  
  67.      A("Cleaver", BATTLE_AXE, SPFX_RESTR, 0, 0, PHYS(3, 6), NO_DFNS, NO_CARY,
  68.        0, A_NEUTRAL, PM_BARBARIAN, NON_PM, 1500L, NO_COLOR),
  69.  
  70.      /*
  71.       *      Grimtooth glows in warning when elves are present, but its
  72.       *      damage bonus applies to all targets rather than just elves
  73.       *      (handled as special case in spec_dbon()).
  74.       */
  75.      A("Grimtooth", ORCISH_DAGGER, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAG2),
  76.        0, M2_ELF, PHYS(2, 6), NO_DFNS,
  77.        NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ORC, 300L, CLR_RED),
  78.      /*
  79.       *      Orcrist and Sting have same alignment as elves.
  80.       *
  81.       *      The combination of SPFX_WARN+SPFX_DFLAG2+M2_value will trigger
  82.       *      EWarn_of_mon for all monsters that have the M2_value flag.
  83.       *      Sting and Orcrist will warn of M2_ORC monsters.
  84.       */
  85.      A("Orcrist", ELVEN_BROADSWORD, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC,
  86.        PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 2000L,
  87.        CLR_BRIGHT_BLUE), /* bright blue is actually light blue */
  88.  
  89.      A("Sting", ELVEN_DAGGER, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC, PHYS(5, 0),
  90.        NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 800L, CLR_BRIGHT_BLUE),
  91.      /*
  92.       *      Magicbane is a bit different!  Its magic fanfare
  93.       *      unbalances victims in addition to doing some damage.
  94.       */
  95.      A("Magicbane", ATHAME, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
  96.        STUN(3, 4), DFNS(AD_MAGM), NO_CARY, 0, A_NEUTRAL, PM_WIZARD, NON_PM,
  97.        3500L, NO_COLOR),
  98.  
  99.      A("Frost Brand", LONG_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
  100.        COLD(5, 0), COLD(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L,
  101.        NO_COLOR),
  102.  
  103.      A("Fire Brand", LONG_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
  104.        FIRE(5, 0), FIRE(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L,
  105.        NO_COLOR),
  106.  
  107.      A("Dragonbane", BROADSWORD,
  108.        (SPFX_RESTR | SPFX_DCLAS | SPFX_REFLECT), 0, S_DRAGON,
  109.        PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 500L,
  110.        NO_COLOR),
  111.  
  112.      A("Demonbane", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_DEMON,
  113.        PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 2500L,
  114.        NO_COLOR),
  115.  
  116.      A("Werebane", SILVER_SABER, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_WERE,
  117.        PHYS(5, 0), DFNS(AD_WERE), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 1500L,
  118.        NO_COLOR),
  119.  
  120.      A("Grayswandir", SILVER_SABER, (SPFX_RESTR | SPFX_HALRES), 0, 0,
  121.        PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 8000L,
  122.        NO_COLOR),
  123.  
  124.      A("Giantslayer", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_GIANT,
  125.        PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 200L,
  126.        NO_COLOR),
  127.  
  128.      A("Ogresmasher", WAR_HAMMER, (SPFX_RESTR | SPFX_DCLAS), 0, S_OGRE,
  129.        PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L,
  130.        NO_COLOR),
  131.  
  132.      A("Trollsbane", MORNING_STAR, (SPFX_RESTR | SPFX_DCLAS), 0, S_TROLL,
  133.        PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L,
  134.        NO_COLOR),
  135.      /*
  136.       *      Two problems:  1) doesn't let trolls regenerate heads,
  137.       *      2) doesn't give unusual message for 2-headed monsters (but
  138.       *      allowing those at all causes more problems than worth the effort).
  139.       */
  140.      A("Vorpal Blade", LONG_SWORD, (SPFX_RESTR | SPFX_BEHEAD), 0, 0,
  141.        PHYS(5, 1), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 4000L,
  142.        NO_COLOR),
  143.      /*
  144.       *      Ah, never shall I forget the cry,
  145.       *              or the shriek that shrieked he,
  146.       *      As I gnashed my teeth, and from my sheath
  147.       *              I drew my Snickersnee!
  148.       *                      --Koko, Lord high executioner of Titipu
  149.       *                        (From Sir W.S. Gilbert's "The Mikado")
  150.       */
  151.      A("Snickersnee", KATANA, SPFX_RESTR, 0, 0, PHYS(0, 8), NO_DFNS, NO_CARY,
  152.        0, A_LAWFUL, PM_SAMURAI, NON_PM, 1200L, NO_COLOR),
  153.  
  154.      A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_UNDEAD,
  155.        PHYS(5, 0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 1500L,
  156.        NO_COLOR),
  157.  
  158.      /*
  159.       *      The artifacts for the quest dungeon, all self-willed.
  160.       */
  161.  
  162.      A("The Orb of Detection", CRYSTAL_BALL,
  163.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_ESP | SPFX_HSPDAM), 0,
  164.        NO_ATTK, NO_DFNS, CARY(AD_MAGM), INVIS, A_LAWFUL, PM_ARCHEOLOGIST,
  165.        NON_PM, 2500L, NO_COLOR),
  166.  
  167.      A("The Heart of Ahriman", LUCKSTONE,
  168.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), SPFX_STLTH, 0,
  169.        /* this stone does double damage if used as a projectile weapon */
  170.        PHYS(5, 0), NO_DFNS, NO_CARY, LEVITATION, A_NEUTRAL, PM_BARBARIAN,
  171.        NON_PM, 2500L, NO_COLOR),
  172.  
  173.      A("The Sceptre of Might", MACE,
  174.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DALIGN), 0, 0, PHYS(5, 0),
  175.        DFNS(AD_MAGM), NO_CARY, CONFLICT, A_LAWFUL, PM_CAVEMAN, NON_PM, 2500L,
  176.        NO_COLOR),
  177.  
  178.  #if 0 /* OBSOLETE */
  179.  A("The Palantir of Westernesse",        CRYSTAL_BALL,
  180.          (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL),
  181.                  (SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0,
  182.          NO_ATTK,        NO_DFNS,        NO_CARY,
  183.          TAMING,         A_CHAOTIC, NON_PM , PM_ELF, 8000L, NO_COLOR ),
  184.  #endif
  185.  
  186.      A("The Staff of Aesculapius", QUARTERSTAFF,
  187.        (SPFX_NOGEN | SPFX_RESTR | SPFX_ATTK | SPFX_INTEL | SPFX_DRLI
  188.         | SPFX_REGEN),
  189.        0, 0, DRLI(0, 0), DRLI(0, 0), NO_CARY, HEALING, A_NEUTRAL, PM_HEALER,
  190.        NON_PM, 5000L, NO_COLOR),
  191.  
  192.      A("The Magic Mirror of Merlin", MIRROR,
  193.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK), SPFX_ESP, 0,
  194.        NO_ATTK, NO_DFNS, CARY(AD_MAGM), 0, A_LAWFUL, PM_KNIGHT, NON_PM, 1500L,
  195.        NO_COLOR),
  196.  
  197.      A("The Eyes of the Overworld", LENSES,
  198.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_XRAY), 0, 0, NO_ATTK,
  199.        DFNS(AD_MAGM), NO_CARY, ENLIGHTENING, A_NEUTRAL, PM_MONK, NON_PM,
  200.        2500L, NO_COLOR),
  201.  
  202.      A("The Mitre of Holiness", HELM_OF_BRILLIANCE,
  203.        (SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAG2 | SPFX_INTEL | SPFX_PROTECT), 0,
  204.        M2_UNDEAD, NO_ATTK, NO_DFNS, CARY(AD_FIRE), ENERGY_BOOST, A_LAWFUL,
  205.        PM_PRIEST, NON_PM, 2000L, NO_COLOR),
  206.  
  207.      A("The Longbow of Diana", BOW,
  208.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_REFLECT), SPFX_ESP, 0,
  209.        PHYS(5, 0), NO_DFNS, NO_CARY, CREATE_AMMO, A_CHAOTIC, PM_RANGER, NON_PM,
  210.        4000L, NO_COLOR),
  211.  
  212.      /* MKoT has an additional carry property if the Key is not cursed (for
  213.         rogues) or blessed (for non-rogues):  #untrap of doors and chests
  214.         will always find any traps and disarming those will always succeed */
  215.      A("The Master Key of Thievery", SKELETON_KEY,
  216.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK),
  217.        (SPFX_WARN | SPFX_TCTRL | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY,
  218.        UNTRAP, A_CHAOTIC, PM_ROGUE, NON_PM, 3500L, NO_COLOR),
  219.  
  220.      A("The Tsurugi of Muramasa", TSURUGI,
  221.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_BEHEAD | SPFX_LUCK
  222.         | SPFX_PROTECT),
  223.        0, 0, PHYS(0, 8), NO_DFNS, NO_CARY, 0, A_LAWFUL, PM_SAMURAI, NON_PM,
  224.        4500L, NO_COLOR),
  225.  
  226.      A("The Platinum Yendorian Express Card", CREDIT_CARD,
  227.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DEFN),
  228.        (SPFX_ESP | SPFX_HSPDAM), 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM),
  229.        CHARGE_OBJ, A_NEUTRAL, PM_TOURIST, NON_PM, 7000L, NO_COLOR),
  230.  
  231.      A("The Orb of Fate", CRYSTAL_BALL,
  232.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_LUCK),
  233.        (SPFX_WARN | SPFX_HSPDAM | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY,
  234.        LEV_TELE, A_NEUTRAL, PM_VALKYRIE, NON_PM, 3500L, NO_COLOR),
  235.  
  236.      A("The Eye of the Aethiopica", AMULET_OF_ESP,
  237.        (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_EREGEN | SPFX_HSPDAM), 0,
  238.        NO_ATTK, DFNS(AD_MAGM), NO_CARY, CREATE_PORTAL, A_NEUTRAL, PM_WIZARD,
  239.        NON_PM, 4000L, NO_COLOR),
  240.  
  241.      /*
  242.       *  terminator; otyp must be zero
  243.       */
  244.      A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L,
  245.        0) /* 0 is CLR_BLACK rather than NO_COLOR but it doesn't matter here */
  246.  
  247.  }; /* artilist[] (or artifact_names[]) */
  248.  
  249.  #undef A
  250.  
  251.  #ifndef MAKEDEFS_C
  252.  #undef NO_ATTK
  253.  #undef NO_DFNS
  254.  #undef DFNS
  255.  #undef PHYS
  256.  #undef DRLI
  257.  #undef COLD
  258.  #undef FIRE
  259.  #undef ELEC
  260.  #undef STUN
  261.  #endif
  262.  
  263.  /*artilist.h*/