1 /* NetHack 3.6 artilist.h $NHDT-Date: 1564351548 2019/07/28 22:05:48 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.20 $ */ 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 can be thrown when wielded if hero has 25 Strength 61 * (usually via gauntlets of power but possible with rings of 62 * gain strength). If the thrower is a Valkyrie, Mjollnir will 63 * usually (99%) return and then usually (separate 99%) be caught 64 * and automatically be re-wielded. When returning Mjollnir is 65 * not caught, there is a 50:50 chance of hitting hero for damage 66 * and its lightning shock might destroy some wands and/or rings. 67 * 68 * Monsters don't throw Mjollnir regardless of strength (not even 69 * fake-player valkyries). 70 */ 71 A("Mjollnir", WAR_HAMMER, /* Mjo:llnir */ 72 (SPFX_RESTR | SPFX_ATTK), 0, 0, ELEC(5, 24), NO_DFNS, NO_CARY, 0, 73 A_NEUTRAL, PM_VALKYRIE, NON_PM, 4000L, NO_COLOR), 74 75 A("Cleaver", BATTLE_AXE, SPFX_RESTR, 0, 0, PHYS(3, 6), NO_DFNS, NO_CARY, 76 0, A_NEUTRAL, PM_BARBARIAN, NON_PM, 1500L, NO_COLOR), 77 78 /* 79 * Grimtooth glows in warning when elves are present, but its 80 * damage bonus applies to all targets rather than just elves 81 * (handled as special case in spec_dbon()). 82 */ 83 A("Grimtooth", ORCISH_DAGGER, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAG2), 84 0, M2_ELF, PHYS(2, 6), NO_DFNS, 85 NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ORC, 300L, CLR_RED), 86 /* 87 * Orcrist and Sting have same alignment as elves. 88 * 89 * The combination of SPFX_WARN+SPFX_DFLAG2+M2_value will trigger 90 * EWarn_of_mon for all monsters that have the M2_value flag. 91 * Sting and Orcrist will warn of M2_ORC monsters. 92 */ 93 A("Orcrist", ELVEN_BROADSWORD, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC, 94 PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 2000L, 95 CLR_BRIGHT_BLUE), /* bright blue is actually light blue */ 96 97 A("Sting", ELVEN_DAGGER, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC, PHYS(5, 0), 98 NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 800L, CLR_BRIGHT_BLUE), 99 /* 100 * Magicbane is a bit different! Its magic fanfare 101 * unbalances victims in addition to doing some damage. 102 */ 103 A("Magicbane", ATHAME, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0, 104 STUN(3, 4), DFNS(AD_MAGM), NO_CARY, 0, A_NEUTRAL, PM_WIZARD, NON_PM, 105 3500L, NO_COLOR), 106 107 A("Frost Brand", LONG_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0, 108 COLD(5, 0), COLD(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L, 109 NO_COLOR), 110 111 A("Fire Brand", LONG_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0, 112 FIRE(5, 0), FIRE(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L, 113 NO_COLOR), 114 115 A("Dragonbane", BROADSWORD, 116 (SPFX_RESTR | SPFX_DCLAS | SPFX_REFLECT), 0, S_DRAGON, 117 PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 500L, 118 NO_COLOR), 119 120 A("Demonbane", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_DEMON, 121 PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 2500L, 122 NO_COLOR), 123 124 A("Werebane", SILVER_SABER, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_WERE, 125 PHYS(5, 0), DFNS(AD_WERE), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 1500L, 126 NO_COLOR), 127 128 A("Grayswandir", SILVER_SABER, (SPFX_RESTR | SPFX_HALRES), 0, 0, 129 PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 8000L, 130 NO_COLOR), 131 132 A("Giantslayer", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_GIANT, 133 PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 200L, 134 NO_COLOR), 135 136 A("Ogresmasher", WAR_HAMMER, (SPFX_RESTR | SPFX_DCLAS), 0, S_OGRE, 137 PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L, 138 NO_COLOR), 139 140 A("Trollsbane", MORNING_STAR, (SPFX_RESTR | SPFX_DCLAS), 0, S_TROLL, 141 PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L, 142 NO_COLOR), 143 /* 144 * Two problems: 1) doesn't let trolls regenerate heads, 145 * 2) doesn't give unusual message for 2-headed monsters (but 146 * allowing those at all causes more problems than worth the effort). 147 */ 148 A("Vorpal Blade", LONG_SWORD, (SPFX_RESTR | SPFX_BEHEAD), 0, 0, 149 PHYS(5, 1), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 4000L, 150 NO_COLOR), 151 /* 152 * Ah, never shall I forget the cry, 153 * or the shriek that shrieked he, 154 * As I gnashed my teeth, and from my sheath 155 * I drew my Snickersnee! 156 * --Koko, Lord high executioner of Titipu 157 * (From Sir W.S. Gilbert's "The Mikado") 158 */ 159 A("Snickersnee", KATANA, SPFX_RESTR, 0, 0, PHYS(0, 8), NO_DFNS, NO_CARY, 160 0, A_LAWFUL, PM_SAMURAI, NON_PM, 1200L, NO_COLOR), 161 162 A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_UNDEAD, 163 PHYS(5, 0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 1500L, 164 NO_COLOR), 165 166 /* 167 * The artifacts for the quest dungeon, all self-willed. 168 */ 169 170 A("The Orb of Detection", CRYSTAL_BALL, 171 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_ESP | SPFX_HSPDAM), 0, 172 NO_ATTK, NO_DFNS, CARY(AD_MAGM), INVIS, A_LAWFUL, PM_ARCHEOLOGIST, 173 NON_PM, 2500L, NO_COLOR), 174 175 A("The Heart of Ahriman", LUCKSTONE, 176 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), SPFX_STLTH, 0, 177 /* this stone does double damage if used as a projectile weapon */ 178 PHYS(5, 0), NO_DFNS, NO_CARY, LEVITATION, A_NEUTRAL, PM_BARBARIAN, 179 NON_PM, 2500L, NO_COLOR), 180 181 A("The Sceptre of Might", MACE, 182 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DALIGN), 0, 0, PHYS(5, 0), 183 DFNS(AD_MAGM), NO_CARY, CONFLICT, A_LAWFUL, PM_CAVEMAN, NON_PM, 2500L, 184 NO_COLOR), 185 186 #if 0 /* OBSOLETE */ 187 A("The Palantir of Westernesse", CRYSTAL_BALL, 188 (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), 189 (SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0, 190 NO_ATTK, NO_DFNS, NO_CARY, 191 TAMING, A_CHAOTIC, NON_PM , PM_ELF, 8000L, NO_COLOR ), 192 #endif 193 194 A("The Staff of Aesculapius", QUARTERSTAFF, 195 (SPFX_NOGEN | SPFX_RESTR | SPFX_ATTK | SPFX_INTEL | SPFX_DRLI 196 | SPFX_REGEN), 197 0, 0, DRLI(0, 0), DRLI(0, 0), NO_CARY, HEALING, A_NEUTRAL, PM_HEALER, 198 NON_PM, 5000L, NO_COLOR), 199 200 A("The Magic Mirror of Merlin", MIRROR, 201 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK), SPFX_ESP, 0, 202 NO_ATTK, NO_DFNS, CARY(AD_MAGM), 0, A_LAWFUL, PM_KNIGHT, NON_PM, 1500L, 203 NO_COLOR), 204 205 A("The Eyes of the Overworld", LENSES, 206 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_XRAY), 0, 0, NO_ATTK, 207 DFNS(AD_MAGM), NO_CARY, ENLIGHTENING, A_NEUTRAL, PM_MONK, NON_PM, 208 2500L, NO_COLOR), 209 210 A("The Mitre of Holiness", HELM_OF_BRILLIANCE, 211 (SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAG2 | SPFX_INTEL | SPFX_PROTECT), 0, 212 M2_UNDEAD, NO_ATTK, NO_DFNS, CARY(AD_FIRE), ENERGY_BOOST, A_LAWFUL, 213 PM_PRIEST, NON_PM, 2000L, NO_COLOR), 214 215 A("The Longbow of Diana", BOW, 216 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_REFLECT), SPFX_ESP, 0, 217 PHYS(5, 0), NO_DFNS, NO_CARY, CREATE_AMMO, A_CHAOTIC, PM_RANGER, NON_PM, 218 4000L, NO_COLOR), 219 220 /* MKoT has an additional carry property if the Key is not cursed (for 221 rogues) or blessed (for non-rogues): #untrap of doors and chests 222 will always find any traps and disarming those will always succeed */ 223 A("The Master Key of Thievery", SKELETON_KEY, 224 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK), 225 (SPFX_WARN | SPFX_TCTRL | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY, 226 UNTRAP, A_CHAOTIC, PM_ROGUE, NON_PM, 3500L, NO_COLOR), 227 228 A("The Tsurugi of Muramasa", TSURUGI, 229 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_BEHEAD | SPFX_LUCK 230 | SPFX_PROTECT), 231 0, 0, PHYS(0, 8), NO_DFNS, NO_CARY, 0, A_LAWFUL, PM_SAMURAI, NON_PM, 232 4500L, NO_COLOR), 233 234 A("The Platinum Yendorian Express Card", CREDIT_CARD, 235 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DEFN), 236 (SPFX_ESP | SPFX_HSPDAM), 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM), 237 CHARGE_OBJ, A_NEUTRAL, PM_TOURIST, NON_PM, 7000L, NO_COLOR), 238 239 A("The Orb of Fate", CRYSTAL_BALL, 240 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_LUCK), 241 (SPFX_WARN | SPFX_HSPDAM | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY, 242 LEV_TELE, A_NEUTRAL, PM_VALKYRIE, NON_PM, 3500L, NO_COLOR), 243 244 A("The Eye of the Aethiopica", AMULET_OF_ESP, 245 (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_EREGEN | SPFX_HSPDAM), 0, 246 NO_ATTK, DFNS(AD_MAGM), NO_CARY, CREATE_PORTAL, A_NEUTRAL, PM_WIZARD, 247 NON_PM, 4000L, NO_COLOR), 248 249 /* 250 * terminator; otyp must be zero 251 */ 252 A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L, 253 0) /* 0 is CLR_BLACK rather than NO_COLOR but it doesn't matter here */ 254 255 }; /* artilist[] (or artifact_names[]) */ 256 257 #undef A 258 259 #ifndef MAKEDEFS_C 260 #undef NO_ATTK 261 #undef NO_DFNS 262 #undef DFNS 263 #undef PHYS 264 #undef DRLI 265 #undef COLD 266 #undef FIRE 267 #undef ELEC 268 #undef STUN 269 #endif 270 271 /*artilist.h*/ 272