(further changes will be much smaller). Breaks savefile compatibility, and bumps the major savefile version up to 6.
Some changes made to some tiles files, but it hasn't been tested with a tiles build.
Overview of changes:
Unrand artefacts are now defined in art-data.txt and is turned into C code via util/art-data.pl. This has the dual advantage of being more readable by humans, and that if the unrand data structure changes then you can just change util/art-data.pl and regenerate the C code rather than having to change some 70 different C structs by hand.
util/art-data.pl automatically updates NO_UNRANDARTS, and also automatically generates an enumeration of all the unrands which are equal to their item.special field.
randart.cc and randart.h have been renamed to artefact.cc and artefact.h, since the files covers all types of artefacts, and the differences between randarts, unrandarts and (former) fixed arts have been minimized since the terms were introduced. Also renamed unrand.h to art-data.h
The brands and resistances of former fixed arts are now handled via artefact properties, but the rest of their special behaviours are still hardcoded.
Unrandarts are now distinguished between normal and "special", with the special ones currently just being identical to the list of the formed fixed arts. Special unrandarts are randomly generated less often than normal unrandarts, can be generated in the Abyss if they've been lost, can't be picked up by monsters, and can't be affected by Tukima's Dance.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10035 c06c8d41-db1a-0410-9941-cceddc491573
DCZMEKDHQWSQCQYQD6ZXB3XOMWLVLPSPVSBVVMPXMSZF7GO3BVCAC NXQOXIJVH2ZF5BJ4R7H5EVR42B7LJIIWPX4LCU6WTJ57IV5LQSXQC X2JRWUHAENBO4PN3T7DSXETECY6CPUFTUENUEOPHUTE25RFLST7QC 57CTUSCSSFLCH3ENOD7QZ3NPUKGM5IK26POZKHC4LY2CH3FU3ZQQC HIF5ANSHAX2LBOG43PTXWD3TLUAFFAOQ4NFDEBPXF4TGZ3LNU2FAC JARHTTSQIOBSGWJWF6PDPEVEIDKPLA4TJAXYTG23UCIUKK564AWQC 2HEJJUVBKA4IWE27MXPEV5IU26IH7PDT6HIEGOVE7BOWHL4MQ5NQC ZNSNW7MYF34AMFB3XMEBYSFVMGPCQCO5KIKVM2YTIT6KO7X34FZQC IVQBPPVE7FAEVTYK2LFYLES2IH6R5DVDG5RD66GAXGPKQ2EFGD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WORBN45P6ZPILC34AC SQEDRNEA7TOPFLWDDPQ65BJDOZAARVFHNMCWQG2SWDXP4W5Z3CLAC 36DYXIWAQTBOCZBCUPYWDKAXVWDU3TRMSM3OCQZGGMWE2KPERJMAC EJKHYV2Z6UPRVYUAL4WRW33GBNHYBFPMPA57HMBX2LQKXHIUO5VQC X3ZYEJMCHJC27L6YT2NRYB6EN2T3XFRJNUENVHGRPBUKMTVHAGVQC 2FHNLTLN3DVVD67N4QMAQ2LO7YY4GVZWXJAOIWGCCYYGIX7UHSVQC FIYBXLWALQINNQTHG2KNDUUTAQAZRDDLXW2XOVSKDKBADJ3XCJ4AC 3XCAUQHISGMK5SBFEVCMFQTCXN3ECJZVMKHO7SCZ2YKAWG2OK3DAC NJYEH3GBN6OXEMHKOTHVJNIPHXIVW3ZFCLIHYV7I5NFNJZACOYEQC PKXXBHS3LWLPZI2QVRX22MSQ4R2626IXRSNHFFYHXYTLJJQU54LQC N7CKO4LATD44HNNA6747FY7M4BA4UKTMSJRL7KXONYADP5VMHROAC KYKFOLADMUWUGJG2YWH2SSQRPRU5VOLSORANZKHDYGJSLIKVAXUQC UZ6N6HOUPGVSPC5NQROEEDWMEGJA5XUWUY2AKH5QG65AZ25PVXDAC ZTDYCQQQQSLWGFJOUB3HKGHMJLNY6UHF4OOC2XVVHXSZTTZK5A5AC R6XS2HO5QX2FJUGL5UQQRNETKCMYWTUFPHPPS5SYWK3OQA4UDUQQC MXOCLQAUGWLOS7AOTYZ46JZDMRL4EVRK5YN4JJUQ76GLKBOBHEVAC /** Written by: Linley Henzell*/#ifndef UNRAND_H#define UNRAND_H#include "defines.h"/*List of "unrandom" artefacts. Not the same as "fixed" artefacts, which arecompletely hardcoded (eg Singing Sword, Wrath of Trog).note: the order of the list doesn't matterBecause the list numbering starts at 1, the last entry is the highest valuewhich can be given to NO_UNRANDARTS (eg if the list consists of randarts no1, 2 or 3, NO_UNRANDARTS must be set to 3 or lower, but probably not to 0).Setting it higher could cause nasty problems.Okay, so the steps to adding a new unrandart go as follows:1) - Fill in a new entry below, using the following guidelines:true name: The name which is displayed when the item is id'dun-id'd name: obviousclass: weapon, armour etctype: long sword, plate mail etc. Jewellery unrandarts have the powers oftheir base types in addition to anything else.plus: For weapons, plus to-hit. For armour, plus. For jewellery, irrelevant.But add 100 to make the item stickycursed. Note that the values forwpns and armr are +50.plus2: For wpns, plus to-dam. Curses are irrelevant here. Mostly unusedcolour: Obvious. Don't use BLACK, use DARKGREY instead.* Note * any exact combination of class, type, plus & plus2 must be unique,so (for example) you can't have two +5, +5 long swords in the list. Cursesdon't count as distinguishing factors.brand: Weapons only. Have a look in enum.h for a list, and look in fight.ccand describe.cc for the effects.Range of possible values: see enum.h+/- to AC, ev, str, int, dex - These are pretty obvious. Be careful - a playerwith a negative str, int or dex dies instantly, so avoid high penaltiesto these stats.Range: any, but be careful.res fire, res cold: Resists. Can be above 1; multiple sources of fire or coldresist *are* cumulative. Can also be -1 (but probably not -2 or below)for susceptibility.Range: -1 to about 5, after which you'll become almost immune.res elec: Resist electricity. Unlike fire and cold, resist electricityreduces electrical damage to 0. This makes multiple resists irrelevant.Also is no susceptibility, so don't use -1.Range: 0 or 1.res poison: same as res electricity.Range: 0 or 1.life prot: Stops energy draining and negative energy attacks. Not cumulative,and no susceptibility here either.Range: 0 or 1.should be set to about 20 - 60.Range: 0 to MAXINT probably, but about 100 is a realistic ceiling.see invis: Lets you see invisible things, but not submerged water beasts.Range: 0 or 1.turn invis: Gives you the ability to turn invisible using the 'a' menu.levitate, blink, go berserk, sense surroundings: like turn invis.Ranges for all these: 0 or 1.make noise: Irritate nearby creatures and disrupts rest. Weapons only.no spells: Prevents any spellcasting (but not scrolls or wands etc)Range: 0 or 1.teleport: Every now and then randomly teleports you. *Really* annoying.Weapons only.Range: 0 to about 15 (higher means more teleporting).no teleport: Prevents the player from teleporting, except rarely when they'reforced to (eg banished to the Abyss).Range: 0 or 1.force berserk: Every time you attack, you go berserk. Weapons only.Range: 0 or 1.speed metabolism: Makes you consume food faster. No effect on mummies.Range: 0 to about 4. 4 would be horrible; 1 is annoying but tolerable.mutate: makes you mutate, sometimes after a long delay. No effect on someraces (espec undead).Range: 0 to about 4.+/- to-hit/to-dam: Obvious. Affects both melee and missile. Should be leftat 0 for weapons, which get +s normally.stealth: -100 to 80. Adds to stealth value.Some currently unused properties follow, then:If empty, uses the description of the unrandart's base type. Note: thebase type of a piece of unrandart jewellery is relevant to its function, sodon't obscure it unnecessarily.Then another unused string.2) - Add one to the #define NO_UNRANDARTS line in randart.h3) - Maybe increase the probability of an unrandart of the appropriatetype being created; look in dungeon.cc for this (search for "unrand").Forget this step if you don't understand it; it's of very little importance.Done! Now recompile and wait years for it to turn up.Note: changing NO_UNRANDARTS probably makes savefiles incompatible.*//* This is a dummy, but still counts for NO_UNRANDARTS *//* 1 */{"Dum", "",/* class, type, plus (to-hit), plus2 (depends on class), colour *//* Properties, all approx thirty of them: */{/* brand, +/- to AC, +/- to ev, +/- to str, +/- to int, +/- to dex */0, 0, 0, 0, 0, 0,/* res fire, res cold, res elec, res poison, life protection, res magic */0, 0, 0, 0, 0, 0,/* see invis, turn invis, levitate, blink, teleport at will, go berserk */0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,/* force berserk, speed metabolism, mutate, +/- to hit, +/- to dam (not weapons) */0, 0, 0, 0, 0,/* cursed, stealth */0, 0},/* Special description appended to the 'V' description */"",/* Base description of item */"",/* Unused string */""},/* 2 */"long sword \"Bloodbane\"", "blackened long sword",OBJ_WEAPONS, WPN_LONG_SWORD, +7, +8, DARKGREY,{SPWPN_VORPAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,1, 0, 0, 0, 0, // force berserk0, -20 // stealth},"","",""},/* 3 */"ring of Shadows", "black ring",OBJ_JEWELLERY, RING_INVISIBILITY, 0, 0, DARKGREY,{0, 0, 4, 0, 0, 0, // EV0, 0, 0, 0, 1, 0, // life prot1, 0, 0, 0, 0, 0, // see invis0, 0, 0, 0, 0,0, 0, 0, -3, 0, // to hit},"","",""},/* 4 */{{SPWPN_FLAMING, 0, 0, 0, 0, 0,2, -1, 0, 1, 0, 20, // res fire, cold, poison, magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},/* 5 */{"shield of Ignorance", "dull large shield",OBJ_ARMOUR, ARM_LARGE_SHIELD, +5, 0, BROWN,{0, 2, 2, 0, -6, 0, // AC, EV, int0, 0, 0, 0, 1, 0, // life prot0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,},"","",""},/* 6 */{{0, 0, 0, 0, 0,0, 0, 0, 0, 0,},"",""},/* 7 */{"robe of Augmentation", "silk robe",OBJ_ARMOUR, ARM_ROBE, +4, 0, LIGHTRED,{0, 0, 0, 2, 2, 2, // str, int, dex0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","A robe made of the finest silk.",""},/* 8 */{"mace of Brilliance", "brightly glowing mace",OBJ_WEAPONS, WPN_MACE, +5, +5, WHITE,{0, 0, 0, 0, 1, 0, // life prot1, 0, 0, 0, 0, 0, // see invis0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, -20 // stealth},"","",""},/* 9 */{"cloak of the Thief", "tattered cloak",OBJ_ARMOUR, ARM_CLOAK, +1, 0, DARKGREY,{0, 0, 2, 0, 0, 2, // EV, dex0, 0, 0, 0, 0, 0,1, 1, 1, 0, 0, 0, // see invis, turn invis, levitate0, 0, 0, 0, 0,0, 0, 0, 0, -3, // to dam0, 60 // stealth},"It allows its wearer to excel in the arts of thievery.","",""},/* 10 */{{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},/* 11 */{"crown of Dyrovepreva", "jewelled bronze crown",{0, 0, 0, 0, 2, 0, // int0, 0, 1, 0, 0, 0, // res elec1, 0, 0, 0, 0, 0, // see invis0, 0, 0, 0, 0,0, 1, 0, 0, 0, // speeds metabolism0, 0},"","A large crown of dull bronze, set with a dazzling array of gemstones.",""},/* 12 */{"demon blade \"Leech\"", "runed demon blade",OBJ_WEAPONS, WPN_DEMON_BLADE, +13, +4, MAGENTA,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,},"","",""},/* 13 */{"amulet of Cekugob", "crystal amulet",OBJ_JEWELLERY, AMU_WARDING, +0, 0, LIGHTGREY,{0, 1, 1, 0, 0, 0, // AC, EV0, 0, 1, 1, 1, 0, // res elec, poison, life prot0, 0, 0, 0, 0, 0,0, 0, 0, 0, 1, // prevent teleport0, 2, 0, 0, 0, // speed metabolism0, 0},"","",""},/* 14 */{"robe of Misfortune", "fabulously ornate robe",OBJ_ARMOUR, ARM_ROBE, -5, 0, MAGENTA,{0, 0, -4, -2, -2, -2, // EV, str, int, dex0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 1, 0, // prevent spellcasting, cause teleport0, 0, 5, 0, 0, // radiation1, -80 // cursed, stealth},"","A splendid flowing robe of fur and silk.",""},/* 15 */{"dagger of Chilly Death", "sapphire dagger",{SPWPN_FREEZING, 0, 0, 0, 0, 0,-1, 2, 0, 1, 0, 20, // res fire, cold, poison, magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","A dagger made of one huge piece of sapphire.",""},/* 16 */{"amulet of the Four Winds", "jade amulet",OBJ_JEWELLERY, AMU_CLARITY, +0, 0, LIGHTGREEN,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},/* 17 */{"dagger \"Morg\"", "rusty dagger",OBJ_WEAPONS, WPN_DAGGER, -1, +4, LIGHTRED,{SPWPN_PAIN, 0, 0, 0, 5, 0, // int0, 0, 0, 0, 0, 30, // res magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"Boris. He got lost in the Dungeon while seeking the Orb. ","An ugly rusty dagger. ",""},/* 18 */{"scythe \"Finisher\"", "blackened scythe",{SPWPN_SPEED, 0, 0, 3, 0, 0, // str0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,},"","A long and sharp scythe, specially modified for combat purposes.",""},/* 19 */{"sling \"Punk\"", "blue sling",{SPWPN_FROST, 0, 0, 0, 0, 0,0, 1, 0, 0, 0, 0, // res cold0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","A sling made of weird blue leather.",""},/* 20 */{"bow of Krishna \"Sharnga\"", "golden bow",OBJ_WEAPONS, WPN_BOW, +8, +8, YELLOW,{SPWPN_SPEED, 0, 0, 0, 0, 3, // dex0, 0, 0, 0, 0, 0,1, 0, 0, 0, 0, 0, // see invis0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"A wonderful golden bow. ",""},/* 21 */{"cloak of Flash", "vibrating cloak",{0, 0, 4, 0, 0, 0, // EV0, 0, 0, 0, 0, 0,0, 0, 1, 0, 1, 0, // levitate, teleport0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","A vibrating cloak.",""},/* 22 */{"giant club \"Skullcrusher\"", "brutal giant club",OBJ_WEAPONS, WPN_GIANT_CLUB, +0, +5, BROWN,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},/* 23 */{"boots of the Assassin", "soft boots",OBJ_ARMOUR, ARM_BOOTS, +2, 0, BROWN,{0, 0, 0, 0, 0, 3, // dex0, 0, 0, 0, 0, 0,0, 1, 0, 0, 0, 0, // turn invis0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 80 // stealth},"These boots were specially designed by the Assassin's Guild.","Some soft boots.",""},/* 24 */{"glaive of the Guard", "polished glaive",OBJ_WEAPONS, WPN_GLAIVE, +5, +8, LIGHTCYAN,{0, 0, 0, 0, 0, 0,1, 0, 0, 0, 0, 1, // see invis, go berserk0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"According to legend he was lost somewhere in the Dungeon.","",""},/* 25 */{"sword of Jihad", "crystal sword",{SPWPN_HOLY_WRATH, 0, 3, 0, 0, 0, // EV0, 0, 0, 0, 1, 20, // life prot, res magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,1, 0, 0, 0, 0, // force berserk0, -50 // stealth (TSO hates backstab)},"A long sword made of one huge piece of crystal.",""},/* 26 */{"Lear's chain mail", "golden chain mail",OBJ_ARMOUR, ARM_CHAIN_MAIL, -1, 0, YELLOW,{0, 0, 0, 0, 0, -3, // dex0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 0, 0, // prevent spellcasting0, 0, 0, 0, 0,},"","A chain mail made of pure gold.",""},/* 27 */{"skin of Zhor", "smelly skin",OBJ_ARMOUR, ARM_ANIMAL_SKIN, +4, 0, BROWN,{0, 0, 0, 0, 0, 0,0, 2, 0, 0, 0, 0, // res cold0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"",""},/* 28 */{{SPWPN_FLAME, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"",""},/* 29 */{"salamander hide armour", "red leather armour",OBJ_ARMOUR, ARM_LEATHER_ARMOUR, +3, 0, RED,{0, 0, 0, 0, 0, 0,2, 0, 0, 0, 0, 0, // res fire0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"",""},/* 30 */{"gauntlets of War", "thick gauntlets",OBJ_ARMOUR, ARM_GLOVES, +3, 0, BROWN,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 3, 3, // to hit, to dam0, 0},"","",""},/* 31 */{{SPWPN_PAIN, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 50, // res magic0, 0, 0, 0, 0, 0,0, 0, 1, 0, 0, // prevent spellcasting0, 0, 0, 0, 0,0, 0},"","An adamantine great sword.",""},/* 32 */{"shield of Resistance", "bronze shield",OBJ_ARMOUR, ARM_SHIELD, +3, 0, LIGHTRED,{0, 0, 0, 0, 0, 0,1, 1, 0, 0, 0, 40, // res fire, cold, magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","A bronze shield.",""},/* 33 */{"robe of Folly", "dull robe",{0, 0, 0, 0, -5, 0, // int0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 0, 0, // prevent spellcasting0, 0, 0, 0, 0,},"",""},/* 34 */{"necklace of Bloodlust", "blood-stained necklace",OBJ_JEWELLERY, AMU_RAGE, +0, 0, RED,{0, 0, 0, 2, -2, 0, // str, int0, 0, 0, 0, 0, 30, // res magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,1, 0, 0, 0, 3, // force berserk, to dam},"","",""},/* 35 */{"\"Eos\"", "encrusted morningstar",OBJ_WEAPONS, WPN_MORNINGSTAR, +5, +5, LIGHTCYAN,{SPWPN_ELECTROCUTION, 0, 0, 0, 0, 0, // morning -> bring light/sparks?0, 0, 1, 0, 0, 0, // res elec1, 0, 0, 0, 0, 0, // see invis0, 0, 0, 0, 1, // prevent teleportation0, 0, 0, 0, 0,0, 0},"","",""},/* 36 */{"ring of Shaolin", "jade ring",OBJ_JEWELLERY, RING_EVASION, +8, 0, LIGHTGREEN,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},/* 37 */{"ring of Robustness", "steel ring",{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},/* 38 */{OBJ_ARMOUR, ARM_PLATE_MAIL, +10, 0, LIGHTGREEN,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 0, 1, // prevent spellcasting, prevent teleport0, 0, 0, 0, 0,},"","A weird-looking armour.",""},/* 39 */{{SPWPN_VAMPIRICISM, 0, 0, 0, 0, 0,0, 0, 0, 1, 1, 0, // res poison, prot life0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, -30 // stealth},"",""},/* 40 */{OBJ_WEAPONS, WPN_TRIDENT, +10, +4, CYAN,{SPWPN_VENOM, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"",""},/* 41 */{"mask of the Dragon", "blue mask",{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 40, // res magic1, 0, 0, 0, 0, 0, // see invis0, 0, 0, 0, 0,0, 0, 0, 2, 2, // to hit, to dam0, 0},"","A blue mask.",""},/* 42 */{"mithril axe \"Arga\"", "mithril axe",OBJ_WEAPONS, WPN_WAR_AXE, +10, +6, WHITE,{SPWPN_SPEED, 0, 0, 2, 0, 0, // str0, 0, 0, 0, 0, 30, // resist magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","A beautiful mithril axe, probably lost by some dwarven hero.",""},/* 43 */{"Elemental Staff", "black staff",{SPWPN_PROTECTION, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 1, 0, 0, 0, // noise0, 0},"A black glyphic staff.",""},/* 44 */{"hand crossbow \"Sniper\"", "black crossbow",{SPWPN_VENOM, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,1, 0, 0, 0, 0, 0, // see invis0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","A hand crossbow made of some black material.",""},/* 45 */{{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"",""},/* 46 */{"robe of Night", "black robe",{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 30, // res magic1, 1, 0, 0, 0, 0, // see invis, turn invis0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 50 // stealth},"A long black robe made of strange flossy material.",""},/* 47 */{"plutonium sword", "glowing long sword",{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 6, 0, 0, // radiation1, -20 // cursed, stealth},"","A long sword made of weird glowing metal.",""},/* 48 */{{0, 0, 0, 0, 1, 0, // life prot0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},/* 49 */{"armour of the Dragon King", "shiny dragon armour",OBJ_ARMOUR, ARM_GOLD_DRAGON_ARMOUR, +5, 0, YELLOW,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 50, // res magic (base gives fire, cold, poison)0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},/* 50 */{"hat of the Alchemist", "dirty hat",{0, 0, 0, 0, 0, 0,1, 1, 1, 0, 0, 30, // res fire, cold, elec, magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","A dirty hat.",""},/* 51 */{"Fencer's gloves", "silk gloves",OBJ_ARMOUR, ARM_GLOVES, +2, 0, WHITE,{0, 0, 3, 0, 0, 3, // EV, dex0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 5, 0, // to hit0, 0},"",""},/* 52 */{"ring of the Mage", "sapphire ring",OBJ_JEWELLERY, RING_WIZARDRY, +0, 0, LIGHTBLUE,{0, 0, 0, 0, 3, 0, // int0, 0, 0, 0, 0, 50, // res magic0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","",""},{"Dum", "",/* class, type, plus (to-hit), plus2 (depends on class), colour *//* Properties, all approx thirty of them: */{/* brand, +/- to AC, +/- to ev, +/- to str, +/- to int, +/- to dex */0, 0, 0, 0, 0, 0,/* res fire, res cold, res elec, res poison, life protection, res magic *//* see invis, turn invis, levitate, blink, teleport at will, go berserk *//* force berserk, speed metabolism, mutate, +/- to hit, +/- to dam (not weapons) */},/* 3 strings for describing the item in the 'V' display. */"","",""}#endif0, 0, 0, 0, 0,/* cursed, stealth */0, 00, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,/* sense surroundings, make noise, no spells, teleport, no teleport */0, 0, 0, 0, 0, 0,OBJ_UNASSIGNED, 250, 250, 250, BLACK,/* 53 */{"blowgun of the Assassin", "tiny blowgun",OBJ_WEAPONS, WPN_BLOWGUN, +6, +6, WHITE,{0, 0, 0, 0, 0, 0,0, 1, 0, 0, 0, 0, // turn invisible0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 60 // stealth},"","It is designed for easy concealment, but still packs a nasty punch.",""},/* 54 */{"Wyrmbane", "scale-covered lance",{SPWPN_DRAGON_SLAYING, 5, 0, 0, 0, 0, // AC1, 0, 0, 1, 0, 0, // res fire, poison0, 0, 0, 0, 0, 1, // go berserk0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"","","A double-ended whip made from the cured hides of the ""Lair of Beasts' deadly grey snakes.",""},/* 59 */{// This used to be a fixed artefact but since it has no special// properties I decided it more closely fits here. (jpeg)"knife of Accuracy", "thin dagger",OBJ_WEAPONS, WPN_DAGGER, +27, -1, LIGHTCYAN,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"It is almost unerringly accurate.","",""},/* This is a dummy. *//* 60 */{// A play on the spell of the same name.// Colour taken from crystal walls."Lehudib's crystal spear", "crystal spear",OBJ_WEAPONS, WPN_SPEAR, +6, +6, GREEN,{SPWPN_RETURNING, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 1, 0, 0, 0, // noise0, 0, 0, 0, 0,0, 0},"Presumably this relic led to the invention of the famous spell.","",""},/* 61 */{"ratskin cloak", "motley cloak",OBJ_ARMOUR, ARM_CLOAK, +1, 0, LIGHTRED,{0, 0, 0, 0, -1, -1, // int, dex0, 0, 0, 1, 1, 0, // life prot, pois0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"An enchantress with a magic loom and way too much time on ""her hands stitched this cloak from the hides of hundreds ""of rats, most of them orange. It's a bit awkward to wear ""and looks rather foolish, but it provides excellent protection ""from rats of all kinds.","",""},""},/* 55 */{"Spriggan's Knife", "dainty little knife",{0, 0, 4, 0, 0, 4, // +EV, +Dex0, 0, 0, 0, 0, 20, // +MR0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 50 // +stealth},"This knife was made by Spriggans, or for Spriggans, or possibly from ""Spriggans. Anyway, it's in some way associated with those fey folk.","A dainty little knife.",""},/* 56 */{{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,},""},/* 57 */{OBJ_JEWELLERY, AMU_WARDING, 0, 0, LIGHTBLUE,{0, 4, 4, 0, 0, 0, // +AC, EV0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},"Back in the good old days, every adventurer had one of these handy ""devices. That, and a pony.","A shield-shaped amulet.",""},/* 58 */{"whip \"Serpent-Scourge\"", "forked whip",{SPWPN_VENOM, 0, 0, 0, 0, 0,0, 0, 0, 1, 0, 0, // rPois0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0},OBJ_WEAPONS, WPN_WHIP, +5, +10, DARKGREY,"brooch of Shielding", "shield-shaped amulet","A cloak woven of pure light beams.","A phosphorescent cloak.",0, -30 // Stealth0, 0, 4, 0, 0, 0, // EV0, 1, 1, 0, 0, 0, // Cold, resElec"cloak of Starlight", "phosphorescent cloak",OBJ_ARMOUR, ARM_CLOAK, 0, 0, WHITE,OBJ_WEAPONS, WPN_KNIFE, +4, +10, LIGHTCYAN,"",OBJ_WEAPONS, WPN_SPEAR, +9, +6, GREEN,0, 0, 0, 0, 0, 0,"A pair of gloves made of white silk.",OBJ_ARMOUR, ARM_WIZARD_HAT, +2, 0, MAGENTA,SPWPN_HOLY_WRATH, 0, 0, 0, 0, 0,"great mace \"Undeadhunter\"", "great steel mace",OBJ_WEAPONS, WPN_GREAT_MACE, +7, +7, LIGHTGREY,OBJ_WEAPONS, WPN_LONG_SWORD, +12, +16, LIGHTGREEN,"to one of her followers.","According to legend, this robe was the gift of Ratri the Goddess of the Night "OBJ_ARMOUR, ARM_ROBE, +4, 0, DARKGREY,"An exceptionally large metal longbow.",SPWPN_VORPAL, 0, -2, 0, 0, 0, // evOBJ_WEAPONS, WPN_LONGBOW, +2, +10, CYAN,"longbow \"Piercer\"", "very long metal bow",OBJ_WEAPONS, WPN_HAND_CROSSBOW, +10, +0, DARKGREY,"This powerful staff used to belong to the leader of ""the Guild of Five Elements.",0, 2, 0, 0, 0, // speed metabolism2, 2, 0, 0, 0, 60, // res fire, cold, magicOBJ_WEAPONS, WPN_QUARTERSTAFF, +3, +1, DARKGREY,OBJ_ARMOUR, ARM_CAP, +0, 0, BLUE,"This trident was stolen many years ago from the Octopus King's garden ""by a really unimportant and already dead man. But beware of the ""Octopus King's wrath!",0, 0, 1, 1, 0, 50, // res elec, res poison, res magic"trident of the Octopus King", "mangy trident","A really dark and malign artefact, which no wise man would even touch.",0, 1, 0, 0, 0, // noiseOBJ_WEAPONS, WPN_SPEAR, +2, +10, DARKGREY,// Was "spear of Voo-Doo". In the African origin, there is a distinction// between voodoo and bo, the latter dealing with curses, witchcraft and// spells designed to do harm. Priests (or rather sorcerors) of bo are// called botono."spear of the Botono", "ebony spear",-1, 0 // cursed"Maxwell's patent armour", "weird-looking armour",OBJ_JEWELLERY, RING_PROTECTION, +8, 0, LIGHTGREY,3, -20 // cursed, stealth"A dull grey robe.",2, 0 // cursedOBJ_ARMOUR, ARM_ROBE, -1, 0, LIGHTGREY,"sword of the Doom Knight", "adamantine great sword",OBJ_WEAPONS, WPN_GREAT_SWORD, +13, +13, BLUE,"A leather armour made of a salamander's skin.",0, 0, 0, 0, 0, 1, // go berserk"A flaming crossbow, forged in the fires of the Hells.",2, -1, 0, 0, 0, 40, // +2 fire, -1 cold, res magic"crossbow \"Hellfire\"", "flaming crossbow",OBJ_WEAPONS, WPN_CROSSBOW, +6, +9, LIGHTRED,"The skin of some strange animal.",-1, 0 // cursed"This sword was The Shining One's gift to a worshipper.",OBJ_WEAPONS, WPN_LONG_SWORD, +12, +10, WHITE,"This weapon once belonged to Gar Dogh, the guard of a king's treasures. "SPWPN_ELECTROCUTION, 5, 0, 0, 0, 0, // ACSPWPN_SPEED, 0, 0, 5, 0, 0, // strOBJ_ARMOUR, ARM_CLOAK, +3, 0, RED,"It once belonged to a foreign god. It works best with ""special arrows which are not generally available.",OBJ_WEAPONS, WPN_SLING, +9, +12, LIGHTBLUE,-1, 0 // cursedOBJ_WEAPONS, WPN_SCYTHE, +3, +5, DARKGREY,"Many years ago it was the property of a powerful mage called "0, 0, 0, 0, 1, 100, // life prot, magic resistanceOBJ_WEAPONS, WPN_DAGGER, +5, +7, LIGHTBLUE,4, 0 // cursedSPWPN_VAMPIRICISM, 0, -1, -1, -1, -1, // AC, EV, str, int, dex0, 0, 0, 0, 1, 0, // life protOBJ_ARMOUR, ARM_CAP, +3, 0, BROWN,0, 0, -5, 0, 0, 0, // EV"shield \"Bullseye\"", "round shield",OBJ_ARMOUR, ARM_SHIELD, +10, 0, RED,SPWPN_HOLY_WRATH, 5, 0, 0, 5, 0, // AC, int"A sky-blue amulet.",0, 50 // stealth0, 0, 3, 0, 0, 0, // EV0, 0, 1, 0, 0, 0, // resElec0, 0, 1, 0, 0, 0, // levitate"amulet of the Air", "sky-blue amulet",OBJ_JEWELLERY, AMU_CONTROLLED_FLIGHT, 0, 0, LIGHTCYAN,3, 0 // cursed"scimitar of Flaming Death", "smoking scimitar",OBJ_WEAPONS, WPN_SCIMITAR, +7, +5, RED,0, 40 // stealth{0, 0, 0, 0, 0, 1, // go berserk{/* sense surroundings, make noise, no spells, teleport, no teleport */OBJ_UNASSIGNED, 250, 250, 250, BLACK,Second string: replaces the thing at the start of a description.First string: is appended to the unrandart's description when id'd.cursed: -1, 0, any positive value.Setting this to any value other than 0 will set the item's initial cursestatus as cursed. If the value is greater than zero, the item will also haveone_chance_in(value) of recursing itself when re-equipped.Range: 0 or 1.res magic: This is cumulative, but no susceptibility. To be meaningful,for armr and totally for rings.#include "itemprop.h"** Modified for Crawl Reference by $Author$ on $Date$* Summary: Definitions for unrandom artefacts.* File: unrand.h
/** Written by: Linley Henzell*/#ifndef RANDART_H#define RANDART_H#include "externs.h"// used in files.cc, newgame.cc, randart.cc {dlb}// Reserving the upper bits for later expansion/versioning.#define RANDART_SEED_MASK 0x00ffffffbool is_random_artefact( const item_def &item );bool is_unrandom_artefact( const item_def &item );bool is_fixed_artefact( const item_def &item );/* ************************************************************************ called from: itemname* *********************************************************************** *//* ************************************************************************ called from: describe* *********************************************************************** *//* ************************************************************************ called from: dungeon* *********************************************************************** */int find_okay_unrandart(unsigned char aclass, unsigned char atype = OBJ_RANDOM);/* ************************************************************************ called from: describe - fight - it_use2 - item_use - player* *********************************************************************** */void artefact_wpn_learn_prop( item_def &item, artefact_prop_type prop );bool artefact_wpn_known_prop( const item_def &item, artefact_prop_type prop );/* ************************************************************************ called from: dungeon* *********************************************************************** */bool make_item_fixed_artefact( item_def &item, bool in_abyss, int which = 0 );bool make_item_unrandart( item_def &item, int unrand_index );/* ************************************************************************ called from: files - newgame* *********************************************************************** *//* ************************************************************************ called from: items* *********************************************************************** */#endif/* ************************************************************************ called from: debug* *********************************************************************** *//* ************************************************************************ called from: mapdef* *********************************************************************** */int get_fixedart_num( const char *name );void artefact_set_properties( item_def &item,artefact_properties_t &proprt );void artefact_set_property( item_def &item,artefact_prop_type prop,int val );int find_unrandart_index(const item_def& artefact);int find_unrandart_index(const item_def &item);void set_unrandart_exist(int whun, bool is_exist);/* ************************************************************************ called from: randart - debug* *********************************************************************** */bool randart_is_bad( const item_def &item );bool randart_is_bad( const item_def &item, artefact_properties_t &proprt );bool make_item_randart( item_def &item );bool make_item_blessed_blade( item_def &item );int artefact_wpn_num_props( const item_def &item );int artefact_wpn_num_props( const artefact_properties_t &proprt );int artefact_known_wpn_property( const item_def &item,artefact_prop_type prop );int artefact_wpn_property( const item_def &item, artefact_prop_type prop );int artefact_wpn_property( const item_def &item, artefact_prop_type prop,bool &known );void artefact_wpn_properties( const item_def &item,artefact_properties_t &proprt );void artefact_wpn_properties( const item_def &item,artefact_properties_t &proprt,artefact_known_props_t &known );void artefact_desc_properties( const item_def &item,artefact_properties_t &proprt,artefact_known_props_t &known,bool force_fake_props = false);typedef FixedVector< int, RA_PROPERTIES > artefact_properties_t;typedef FixedVector< bool, RA_PROPERTIES > artefact_known_props_t;bool does_unrandart_exist(int whun);const char *unrandart_descrip( int which_descrip, const item_def &item );* called from: effects* *********************************************************************** *//* ***********************************************************************std::string artefact_name( const item_def &item, bool appearance = false );std::string get_artefact_name( const item_def &item );/* ************************************************************************ called from: spl-book* *********************************************************************** */void set_artefact_name( item_def &item, const std::string &name );void set_artefact_appearance( item_def &item, const std::string &appear );unique_item_status_type status );unique_item_status_type get_unique_item_status( object_class_type base_type,int type );void set_unique_item_status( object_class_type base_type, int type,bool is_known_artefact( const item_def &item );bool is_artefact( const item_def &item );#define RA_PROPERTIES ARTP_NUM_PROPERTIES#define NO_UNRANDARTS 61** Modified for Crawl Reference by $Author$ on $Date$* Summary: Random and unrandom artefact functions.* File: randart.h
#!/usr/bin/perl -wuse strict;my $line_num = 0;my @errors = ();my @all_artefacts = ();my %used_names = ();my %used_appears = ();my %used_enums = ();my %field_type = (AC => "num",ACC => "num",ANGRY => "num",APPEAR => "str",BERSERK => "num",BLINK => "num",BRAND => "enum",CANTELEP => "num",COLD => "num",COLOUR => "enum",CURSED => "num",DAM => "num",DESC => "str",DESC_END => "str",DESC_ID => "str",DEX => "num",ELEC => "num",EV => "num",FIRE => "num",INT => "num",INV => "num",LEV => "num",LIFE => "num",MAGIC => "num",MAPPING => "num",METAB => "num",MP => "num",MUTATE => "num",NAME => "str",NOISES => "num",NOSPELL => "num",NOTELEP => "num",POISON => "num",RND_TELE => "num",SEEINV => "num",STEALTH => "num",STR => "num",plus => "num",plus2 => "num",base_type => "enum",sub_type => "enum");my @field_list = keys(%field_type);sub error{my ($artefact, $str) = @_;my $msg = "";my $name = $artefact->{NAME} || $artefact->{APPEAR} || "NAMELESS";if ($artefact->{_FINISHING}){$msg .= "Artefact $name starting at line ". $artefact->{_START_LINE} . ": ";}else{$msg = "Artefact $name at line $line_num: "}$msg .= $str;$artefact->{_ERRROR} = 1;push(@errors, $msg);}sub is_number{my ($num) = @_;return ($num =~ /^[+-]?\d+$/);}sub finish_art{my ($artefact) = @_;$artefact->{_FINISHING} = 1;my $must;foreach $must ("NAME", "APPEAR", "OBJ", "COLOUR"){if (!defined($artefact->{$must})){error($artefact, "Required field '$must' missing");$artefact->{$must} = "_MISSING_";}}# Prevent further errors caused by absence of OBJ$artefact->{base_type} ||= "";$artefact->{sub_type} ||= "";if (!exists($artefact->{BRAND})){my $type = $artefact->{base_type} || "";if ($type eq "OBJ_WEAPONS"){$artefact->{BRAND} = "SPWPN_NORMAL";}elsif($type eq "OBJ_ARMOUR"){$artefact->{BRAND} = "SPARM_NORMAL";}else{$artefact->{BRAND} = "0";}}my $field;foreach $field (@field_list){if (!exists($artefact->{$field})){# Give default values for fields not specified.my $type = $field_type{$field} || "";if ($type eq "str"){$artefact->{$field} = "";}elsif($type eq "num"){$artefact->{$field} = "0";}elsif($type eq "enum"){error($artefact, "No enumeration for field '$field'");}else{error($artefact, "Unknown type '$type' for field '$field'");}}elsif (!defined($artefact->{$field})){error($artefact, "Field '$field' not defined");}}delete($artefact->{_FINISHING});$artefact->{_FINISHED} = 1;}sub process_line{my ($artefact, $line) = @_;# A line can start with whitespace if it's a continuation of a field# with a string value.if ($line =~ /^\s/){my $prev_field = $artefact->{_PREV_FIELD} || "";if ($field_type{$prev_field} eq "str"){$line =~ s/^\s*//;$artefact->{$prev_field} .= " " . $line;}else{error($artefact, "line starts with whitespace");}return;}$artefact->{_START_LINE} ||= $line_num;my ($field, $value) = ($line =~ /([^:]+):\s*(.*)/);$field ||= "";$value ||= "";# Strip leading and trailing white space.$field =~ s/^\s*|\s*$//g;$value =~ s/^\s*|\s*$//g;if ($field eq ""){error($artefact, "No field");return;}if (defined($artefact->{$field})){error($artefact, "Field '$field' already set");return;}if ($value eq "true" && $field_type{$field} eq "num"){$value = "1";}$artefact->{_PREV_FIELD} = $field;$artefact->{$field} = $value;if ($value eq ""){error($artefact, "Field '$field' has no value");return;}if ($field eq "OBJ"){my @parts = split(m!/!, $value);if (@parts > 2){error($artefact, "Too many parts to OBJ");return;}elsif (@parts == 1){error($artefact, "Too few parts to OBJ");return;}if ($parts[0] !~ /^OBJ_/){error($artefact, "OBJ base type must start with 'OBJ_'");return;}$artefact->{base_type} = $parts[0];$artefact->{sub_type} = $parts[1];}elsif($field eq "PLUS"){my @parts = split(m!/!, $value);if (@parts > 2){error($artefact, "Too many parts to PLUS");return;}if (!is_number($parts[0])){error($artefact, "'$parts[0]' in PLUS is not a number");return;}if (@parts == 2 && !is_number($parts[1])){error($artefact, "'$parts[1]' in PLUS is not a number");return;}$artefact->{plus} = $parts[0];$artefact->{plus2} = $parts[1] if (@parts == 2);}elsif ($field eq "ENUM"){}else{if (!exists($field_type{$field}) || $field =~ /^[a-z]/){error($artefact, "No such field as '$field'");return;}my $num = is_number($value);my $type = $field_type{$field} || "";if (($type eq "num" && !$num) || ($type eq "str" && $num)){error($artefact, "'$value' invalid value type for field '$field'.");return;}}my $enum = "";if ($field eq "NAME"){if (exists($used_names{$value})){error($artefact, "Name \"$value\" already used at line " .$used_names{$value});return;}$used_names{$value} = $line_num;if (!exists($artefact->{_ENUM})){$enum = $value;$enum =~ s/'//g;# If possible, make the enum literal the part of the name between# double quotes, or the part of the name after " of " or# " of the ".if ($enum =~ /"(.*)"/){$enum = $1;}elsif ($enum =~ / of (?:the )?(.*)/){$enum = $1;}$enum = uc($enum);$enum =~ s/[ -]/_/g;}}elsif ($field eq "APPEAR"){if (exists($used_appears{$value})){error($artefact, "Name '$value' already used at line " .$used_appears{$value});return;}$used_appears{$value} = $line_num;}elsif ($field eq "ENUM"){if (exists($artefact->{NAME})){eror($artefact, "ENUM must be before NAME");return;}$enum = "$value";}if ($enum ne ""){if (exists($used_enums{$enum})){error($artefact, "Enum \"$enum\" already used by artefact " ."\"$used_enums{$enum}\"");return;}$used_enums{$enum} = $value;$artefact->{_ENUM} = $enum;}}my @art_order = ("NAME", "APPEAR", "\n","base_type", "sub_type", "plus", "plus2", "COLOUR","{", "BRAND", "AC", "EV", "STR", "INT", "DEX", "\n","FIRE", "COLD", "ELEC", "POISON", "LIFE", "MAGIC", "\n","SEEINV", "INV", "LEV", "BLINK", "CANTELEP", "BERSERK", "\n","MAPPING", "NOISES", "NOSPELL", "RND_TELE", "NOTELEP", "\n","ANGRY", "METAB", "MUTATE", "ACC", "DAM", "\n","CURSED", "STEALTH", "MP", "}","DESC", "\n","DESC_ID", "\n","DESC_END");sub art_to_str{my ($artefact) = @_;my $indent = 1;my $str = "{\n ";my $part;foreach $part (@art_order){if (length($part) == 1){if ($part eq "{"){$str .= "\n" . (" " x ($indent * 4)) . "{";$indent++;$str .= "\n" . (" " x ($indent * 4));}elsif($part eq "}"){$indent--;$str .= "\n" . (" " x ($indent * 4)) . "},";$str .= "\n" . (" " x ($indent * 4));}else{$str .= "\n" . (" " x ($indent * 4));}next;}if (!defined($field_type{$part})){print STDERR "No field type for part '$part'\n";next;}if ($field_type{$part} eq "str"){my $temp = $artefact->{$part};$temp =~ s/"/\\"/g;$str .= "\"$temp\"";}else{$str .= $artefact->{$part};}$str .= ", ";}$str .= "\n},\n\n";return ($str);}sub write_data{unless (open(HEADER, ">art-data.h")){die "Couldn't open 'art-data.h' for writing: $!\n";}print HEADER <<"ENDofTEXT";/** File: art-data.h* Summary: Definitions for unrandom artefacts.* Written by: ????** Modified for Crawl Reference by \$Author: dploog \$ on \$Date: 2009-06-17 22:29:07 -0700 (Wed, 17 Jun 2009) \$*//** This file is automatically generated from art-data.txt via* util/art-data.pl. Do not directly edit this file, but rather change* art-data.txt.** If the unrandart_entry struct is changed or a new artefact property is* added to artefact_prop_type, then change art-data.pl so that the* art-data.h file it produces matches up with the new structure.*/#ifdef ART_DATA_H#error "art-data.h included twice!"#endif#define ART_DATA_HENDofTEXTmy $artefact;my $art_num = 1;foreach $artefact (@all_artefacts){print HEADER "/* $art_num: UNRAND_$artefact->{_ENUM} */\n";print HEADER art_to_str($artefact);$art_num++;}close(HEADER);}sub write_enums{unless (open(ENUM_IN, "<artefact.h")){die "Couldn't open 'artefact.h' for reading: $!";}my $changed = 0;my $out = "";while(<ENUM_IN>){last if (/^#define NO_UNRANDARTS/);$out .= $_;}if (!/^#define NO_UNRANDARTS (\d+)/){die "Couldn't find NO_UNRANDARTS in artefact.h\n";}my $orig_num = $1;my $new_num = scalar(@all_artefacts);if ($orig_num == $new_num){print "Number of unrandarts unchanged.\n";$out .= $_;}else{print "Number of unrandarts changed from $orig_num to $new_num\n";$out .= "#define NO_UNRANDARTS $new_num\n";$changed = 1;}while(<ENUM_IN>){$out .= $_;last if (/^enum unrand_type/);}if (!/^enum unrand_type/){die "Couldn't find 'enum unrand_type' in artefact.h\n";}$out .= <ENUM_IN>; # {$out .= <ENUM_IN>; # UNRAND_START = 180,my @enum_list = ();while(<ENUM_IN>){last if (/\bUNRAND_LAST\b/);/^\s*(\w+)/;push(@enum_list, $1);}<ENUM_IN>; # discard "};"# Suck in rest of fileundef($/);my $remainder = <ENUM_IN>;close(ENUM_IN);if (@enum_list != @all_artefacts){print "Enumeartion list changed.\n";$changed = 1;}else{my $i;for ($i = 0; $i < @enum_list; $i++){if ($enum_list[$i] ne "UNRAND_$all_artefacts[$i]->{_ENUM}"){print "Enumeartion list changed.\n";$changed = 1;last;}}}if (!$changed){print "No changes made to artefact.h\n";return;}print "Updating artefact.h...\n";unless(open(ENUM_OUT, ">artefact.h")){die "Couldn't open 'artefact.h' for writing: $!\n";}print ENUM_OUT $out;my $i;my $longest_enum = 0;for ($i = 0; $i < @all_artefacts; $i++){my $enum = $all_artefacts[$i]->{_ENUM};my $len = length($enum);$longest_enum = $len if ($len > $longest_enum);}my $enum;for ($i = 0; $i < @all_artefacts; $i++){$enum = $all_artefacts[$i]->{_ENUM};print ENUM_OUT " UNRAND_$enum";if ($i == 0){print ENUM_OUT " = UNRAND_START,\n";}else{print ENUM_OUT ", ";print ENUM_OUT " " x ($longest_enum - length($enum));print ENUM_OUT "// $all_artefacts[$i]->{NAME}\n";}}print ENUM_OUT " UNRAND_LAST = UNRAND_$enum\n";print ENUM_OUT "};\n";print ENUM_OUT $remainder;close(ENUM_OUT);}###############################################################3###############################################################3###############################################################3chdir("..") if (-e "../art-data.txt");chdir("source") if (-e "source/art-data.txt");die "Couldn't find art-data.txt\n" unless (-e "art-data.txt");die "Couldn't find artefact.h\n" unless (-e "artefact.h");die "Can't read art-data.txt\n" unless (-r "art-data.txt");die "Can't read artefact.h\n" unless (-r "artefact.h");die "Can't write to artefact.h\n" unless (-w "artefact.h");die "Can't write to art-data.h\n" if (-e "art-data.h" && !-w "art-data.h");unless(open(INPUT, "<art-data.txt")){die "Couldn't open art-data.txt for reading: $!\n";}my $prev_line = "";my $curr_art = {};while (<INPUT>){chomp;$line_num++;# Skip comment-only linesnext if (/^#/);# Strip comments.s/#.*//;# Strip trailing whitspace; leading whitespace indicates the# continuation of a string field.s/\s*$//;if ($_ =~ /^\s*$/){if ($prev_line !~ /^\s*$/){finish_art($curr_art);push(@all_artefacts, $curr_art);$curr_art = {};}}else{process_line($curr_art, $_);}$prev_line = $_;}close(INPUT);if (keys(%$curr_art) > 0){finish_art($curr_art);push(@all_artefacts, $curr_art);}if (@errors > 0){print STDERR "Error(s) processing art-data.txt:\n\n";my $err;foreach $err (@errors){print STDERR "$err\n";}exit (1);}write_data();write_enums();exit (0);
return TILE_ERROR;}static int _tileidx_unrand_artefact(int idx){switch (idx){case 2: return TILE_URAND_BLOODBANE;case 3: return TILE_URAND_SHADOWS;case 4: return TILE_URAND_FLAMING_DEATH;case 5: return TILE_URAND_IGNORANCE;case 6: return TILE_URAND_AIR;case 7: return TILE_URAND_AUGMENTATION;case 8: return TILE_URAND_BRILLIANCE;case 9: return TILE_URAND_THIEF;case 10: return TILE_URAND_BULLSEYE;case 11: return TILE_URAND_DYROVEPREVA;case 12: return TILE_URAND_LEECH;case 13: return TILE_URAND_CEKUGOB;case 14: return TILE_URAND_MISFORTUNE;case 15: return TILE_URAND_CHILLY_DEATH;case 16: return TILE_URAND_FOUR_WINDS;case 17: return TILE_URAND_MORG;case 18: return TILE_URAND_FINISHER;case 19: return TILE_URAND_PUNK;case 20: return TILE_URAND_KRISHNA;case 21: return TILE_URAND_FLASH;case 22: return TILE_URAND_SKULLCRUSHER;case 23: return TILE_URAND_ASSASSIN;case 24: return TILE_URAND_GUARD;case 25: return TILE_URAND_JIHAD;case 26: return TILE_URAND_LEAR;case 27: return TILE_URAND_ZHOR;case 28: return TILE_URAND_FIERY_DEVIL;case 29: return TILE_URAND_SALAMANDER;case 30: return TILE_URAND_WAR;case 31: return TILE_URAND_DOOM_KNIGHT;case 32: return TILE_URAND_RESISTANCE;case 33: return TILE_URAND_FOLLY;case 34: return TILE_URAND_BLOODLUST;case 35: return TILE_URAND_EOS;case 36: return TILE_URAND_SHAOLIN;case 37: return TILE_URAND_ROBUSTNESS;case 38: return TILE_URAND_MAXWELL;case 39: return TILE_URAND_VOO_DOO;case 40: return TILE_URAND_OCTOPUS_KING;case 41: return TILE_URAND_DRAGONMASK;case 42: return TILE_URAND_ARGA;case 43: return TILE_URAND_ELEMENTAL;case 44: return TILE_URAND_SNIPER;case 45: return TILE_URAND_ERCHIDEL;case 46: return TILE_URAND_NIGHT;case 47: return TILE_URAND_PLUTONIUM;case 48: return TILE_URAND_UNDEADHUNTER;case 49: return TILE_URAND_DRAGON_KING;case 50: return TILE_URAND_ALCHEMIST;case 51: return TILE_URAND_FENCER;case 52: return TILE_URAND_MAGE;case 53: return TILE_URAND_BLOWGUN;case 54: return TILE_URAND_WYRMBANE;case 55: return TILE_URAND_SPRIGGANS_KNIFE;case 56: return TILE_URAND_STARLIGHT;case 57: return TILE_URAND_BROOCH_OF_SHIELDING;case 58: return TILE_URAND_SERPENT_SCOURGE;case 59: return TILE_URAND_KNIFE_OF_ACCURACY;default: return TILE_TODO;
case UNRAND_BLOODBANE: return TILE_URAND_BLOODBANE;case UNRAND_SHADOWS: return TILE_URAND_SHADOWS;case UNRAND_FLAMING_DEATH: return TILE_URAND_FLAMING_DEATH;case UNRAND_IGNORANCE: return TILE_URAND_IGNORANCE;case UNRAND_AIR: return TILE_URAND_AIR;case UNRAND_AUGMENTATION: return TILE_URAND_AUGMENTATION;case UNRAND_BRILLIANCE: return TILE_URAND_BRILLIANCE;case UNRAND_THIEF: return TILE_URAND_THIEF;case UNRAND_BULLSEYE: return TILE_URAND_BULLSEYE;case UNRAND_DYROVEPREVA: return TILE_URAND_DYROVEPREVA;case UNRAND_LEECH: return TILE_URAND_LEECH;case UNRAND_CEKUGOB: return TILE_URAND_CEKUGOB;case UNRAND_MISFORTUNE: return TILE_URAND_MISFORTUNE;case UNRAND_CHILLY_DEATH: return TILE_URAND_CHILLY_DEATH;case UNRAND_FOUR_WINDS: return TILE_URAND_FOUR_WINDS;case UNRAND_MORG: return TILE_URAND_MORG;case UNRAND_FINISHER: return TILE_URAND_FINISHER;case UNRAND_PUNK: return TILE_URAND_PUNK;case UNRAND_KRISHNA: return TILE_URAND_KRISHNA;case UNRAND_FLASH: return TILE_URAND_FLASH;case UNRAND_SKULLCRUSHER: return TILE_URAND_SKULLCRUSHER;case UNRAND_BLOWGUN_ASSASSIN: return TILE_URAND_ASSASSIN;case UNRAND_GUARD: return TILE_URAND_GUARD;case UNRAND_JIHAD: return TILE_URAND_JIHAD;case UNRAND_LEAR: return TILE_URAND_LEAR;case UNRAND_ZHOR: return TILE_URAND_ZHOR;case UNRAND_SALAMANDER: return TILE_URAND_SALAMANDER;case UNRAND_WAR: return TILE_URAND_WAR;case UNRAND_DOOM_KNIGHT: return TILE_URAND_DOOM_KNIGHT;case UNRAND_RESISTANCE: return TILE_URAND_RESISTANCE;case UNRAND_FOLLY: return TILE_URAND_FOLLY;case UNRAND_BLOODLUST: return TILE_URAND_BLOODLUST;case UNRAND_EOS: return TILE_URAND_EOS;case UNRAND_SHAOLIN: return TILE_URAND_SHAOLIN;case UNRAND_ROBUSTNESS: return TILE_URAND_ROBUSTNESS;case UNRAND_MAXWELL: return TILE_URAND_MAXWELL;case UNRAND_BOTONO: return TILE_URAND_VOO_DOO;case UNRAND_OCTOPUS_KING: return TILE_URAND_OCTOPUS_KING;case UNRAND_DRAGONMASK: return TILE_URAND_DRAGONMASK;case UNRAND_ARGA: return TILE_URAND_ARGA;case UNRAND_ELEMENTAL_STAFF: return TILE_URAND_ELEMENTAL;case UNRAND_SNIPER: return TILE_URAND_SNIPER;case UNRAND_NIGHT: return TILE_URAND_NIGHT;case UNRAND_PLUTONIUM: return TILE_URAND_PLUTONIUM;case UNRAND_UNDEADHUNTER: return TILE_URAND_UNDEADHUNTER;case UNRAND_DRAGON_KING: return TILE_URAND_DRAGON_KING;case UNRAND_ALCHEMIST: return TILE_URAND_ALCHEMIST;case UNRAND_FENCER: return TILE_URAND_FENCER;case UNRAND_MAGE: return TILE_URAND_MAGE;case UNRAND_BLOWGUN_ASSASSIN: return TILE_URAND_BLOWGUN;case UNRAND_WYRMBANE: return TILE_URAND_WYRMBANE;case UNRAND_SPRIGGANS_KNIFE: return TILE_URAND_SPRIGGANS_KNIFE;case UNRAND_STARLIGHT: return TILE_URAND_STARLIGHT;case UNRAND_SHIELDING: return TILE_URAND_BROOCH_OF_SHIELDING;case UNRAND_SERPENT_SCOURGE: return TILE_URAND_SERPENT_SCOURGE;case UNRAND_ACCURACY: return TILE_URAND_KNIFE_OF_ACCURACY;case UNRAND_HELLFIRE: return TILE_URAND_FIERY_DEVIL;//XXX: What happened to this unrand?//case UNRAND_ERCHIDEL: return TILE_URAND_ERCHIDEL;default: return TILE_TODO;
if (is_fixed_artefact(item))return _tileidx_fixed_artefact(special);else if (is_unrandom_artefact( item ))return _tileidx_unrand_artefact(find_unrandart_index(item) + 1);
if (is_unrandom_artefact( item ))return _tileidx_unrand_artefact(find_unrandart_index(item));
case 44: return TILEP_HAND1_SNIPER;// bow "Erchidel"case 45: return TILEP_HAND1_GREAT_BOW;
case UNRAND_SNIPER: return TILEP_HAND1_SNIPER;
// how many unrandarts?count_s = unmarshallShort(th);for (j = 0; j < count_s; ++j)set_unrandart_exist(j, unmarshallBoolean(th));// # of unrandarts could certainly change.// If it does, the new ones won't exist yet - zero them out.for (; j < NO_UNRANDARTS; j++)set_unrandart_exist(j, false);
}// Return's true if the indicated unrandart is equipped// [ds] There's no equivalent of calc_unid or req_id because as of now, weapons// and armour type-id on wield/wear.bool player_equip_unrand(int unrand_index){unrandart_entry* entry = get_unrand_entry(unrand_index);equipment_type slot = get_item_slot(entry->base_type,entry->sub_type);if (!you_tran_can_wear(slot))return (false);int it;switch (slot){case EQ_WEAPON:// Hands can have more than just weapons.it = you.equip[EQ_WEAPON];if (it != -1&& you.inv[it].base_type == OBJ_WEAPONS&& is_unrandom_artefact(you.inv[it])&& you.inv[it].special == unrand_index){return (true);}break;case EQ_RINGS:it = you.equip[EQ_LEFT_RING];if (it != -1&& is_unrandom_artefact(you.inv[it])&& you.inv[it].special == unrand_index){return (true);}it = you.equip[EQ_RIGHT_RING];if (it != -1&& is_unrandom_artefact(you.inv[it])&& you.inv[it].special == unrand_index){return (true);}break;case EQ_NONE:case EQ_STAFF:case EQ_LEFT_RING:case EQ_RIGHT_RING:case EQ_RINGS_PLUS:case EQ_RINGS_PLUS2:case EQ_ALL_ARMOUR:// no unrandarts for these slots.break;default:// Check a specific slot.it = you.equip[slot];if (it != -1&& is_unrandom_artefact(you.inv[it])&& you.inv[it].special == unrand_index){return (true);}break;}return (false);
hunger += 6 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRICISM );hunger += 9 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRES_TOOTH );
if (player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRICISM )){hunger += 6;hunger += 3 * player_equip_unrand( SPWPN_VAMPIRES_TOOTH );}
hunger += 1 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRICISM );hunger += 2 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRES_TOOTH );
if (player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRICISM )){hunger += 1;hunger += 1 * player_equip_unrand( SPWPN_VAMPIRES_TOOTH );}
// the staff of Olgreb:if (you.weapon()&& you.weapon()->base_type == OBJ_WEAPONS&& you.weapon()->special == SPWPN_STAFF_OF_OLGREB){rp++;}
// Monsters can't use fixed artefacts.if (is_fixed_artefact(item) && !crawl_state.arena)
// Monsters can't use unrandarts with special effects.if (is_special_unrandom_artefact(item) && !crawl_state.arena)
if (is_unrandom_artefact( item ) || is_fixed_artefact( item ))break; // unrandarts and fixed arts already coloured
if (is_unrandom_artefact(item))break; // unrandarts already coloured
static bool _try_make_item_special_unrand(item_def& item, int force_type,int item_level){#ifdef DEBUG_DIAGNOSTICSmprf(MSGCH_DIAGNOSTICS, "Making special unrand artefact.");#endifbool abyss = item_level == level_id(LEVEL_ABYSS).absdepth();int idx = find_okay_unrandart(item.base_type, force_type,UNRANDPSEC_SPECIAL, abyss);if (idx != -1){if (make_item_unrandart(item, idx))return (true);}return (false);}
#ifdef DEBUG_DIAGNOSTICSmprf(MSGCH_DIAGNOSTICS, "Making fixed artefact.");#endifif (make_item_fixed_artefact(item,(item_level == level_id(LEVEL_ABYSS).absdepth()) ))return (true);
return _try_make_item_special_unrand(item, force_type, item_level);
set_unique_item_status( OBJ_WEAPONS, si->special,UNIQ_LOST_IN_ABYSS );}else if (is_unrandom_artefact(*si)){// 9. Unmark unrandart.const int z = find_unrandart_index(*si);if (z != -1)set_unrandart_exist(z, false);
set_unique_item_status(*si, UNIQ_LOST_IN_ABYSS);
if (is_fixed_artefact(item)){set_unique_item_status(item.base_type, item.special,UNIQ_NOT_EXISTS);}else if (is_unrandom_artefact(item)){const int unrand = find_unrandart_index(item);if (unrand != -1)set_unrandart_exist( unrand, false );}
if (is_unrandom_artefact(item))set_unique_item_status(item, UNIQ_NOT_EXISTS);
if (item.base_type == OBJ_ORBS){set_unique_item_status(OBJ_ORBS, item.sub_type,UNIQ_LOST_IN_ABYSS);}else if (is_fixed_artefact(item)){set_unique_item_status(OBJ_WEAPONS, item.special,UNIQ_LOST_IN_ABYSS);}
if (is_unrandom_artefact(item))set_unique_item_status(item, UNIQ_LOST_IN_ABYSS);
SPWPN_DUMMY_CRUSHING, // ONLY TEMPORARY USAGE -- converts to VORPAL// everything above this point is a special artefact wield:SPWPN_START_FIXEDARTS = 181,SPWPN_SINGING_SWORD = SPWPN_START_FIXEDARTS,SPWPN_WRATH_OF_TROG,SPWPN_SCYTHE_OF_CURSES,SPWPN_MACE_OF_VARIABILITY,SPWPN_GLAIVE_OF_PRUNE,SPWPN_SCEPTRE_OF_TORMENT,SPWPN_SWORD_OF_ZONGULDROK,SPWPN_SWORD_OF_POWER,SPWPN_STAFF_OF_OLGREB,SPWPN_VAMPIRES_TOOTH,SPWPN_STAFF_OF_WUCAD_MU,// these three are not generated randomly {dlb}SPWPN_START_NOGEN_FIXEDARTS,SPWPN_SWORD_OF_CEREBOV = SPWPN_START_NOGEN_FIXEDARTS,SPWPN_STAFF_OF_DISPATER,SPWPN_SCEPTRE_OF_ASMODEUS,SPWPN_END_FIXEDARTS = SPWPN_SCEPTRE_OF_ASMODEUS
SPWPN_DUMMY_CRUSHING // ONLY TEMPORARY USAGE -- converts to VORPAL
}equipment_type get_item_slot(object_class_type type, int sub_type){switch(type){case OBJ_WEAPONS:case OBJ_STAVES:case OBJ_MISCELLANY:return (EQ_WEAPON);case OBJ_ARMOUR:return get_armour_slot(static_cast<armour_type>(sub_type));case OBJ_JEWELLERY:return (jewellery_is_amulet(sub_type) ? EQ_AMULET : EQ_RINGS);default:break;}return (EQ_NONE);
if (is_random_artefact(thing)){if (!is_unrandom_artefact(thing)&& thing.base_type != OBJ_BOOKS){// Give another name that takes god gift into account;// artefact books already do that.thing.props["artefact_name"].get_string() =artefact_name(thing, false);}}}
const char *desc = unrandart_descrip( 0, item );if (desc[0] != 0)
const char *desc = unrandart_descrip( 0, item );const char *desc_id = unrandart_descrip( 1, item );if (item_type_known(item) && desc_id[0] != '\0'){description += "$$";description += desc_id;}else if (desc[0] != '\0')
description += "$$";switch (item.special)
case SPWPN_FLAMING:description += "It emits flame when wielded, ""causing extra injury to most foes ""and up to double damage against ""particularly susceptible opponents.";break;case SPWPN_FREEZING:description += "It has been specially enchanted to ""freeze those struck by it, causing ""extra injury to most foes and ""up to double damage against ""particularly susceptible opponents.";break;case SPWPN_HOLY_WRATH:description += "It has been blessed by the Shining One ""to cause great damage to the undead and the unholy ""creatures of Hell or Pandemonium.";break;case SPWPN_ELECTROCUTION:description += "Occasionally upon striking a foe ""it will discharge some electrical energy ""and cause terrible harm.";break;case SPWPN_ORC_SLAYING:description += "It is especially effective against ""all of orcish descent.";break;case SPWPN_DRAGON_SLAYING:description += "This legendary weapon is deadly to all ""dragonkind. It also provides some protection from the ""breath attacks of dragons and other creatures.";break;case SPWPN_VENOM:if (is_range_weapon(item))description += "It poisons the unbranded ammo it fires.";elsedescription += "It poisons the flesh of those it strikes.";break;case SPWPN_PROTECTION:description += "It protects the one who wields it against ""injury (+5 to AC).";break;case SPWPN_DRAINING:description += "A truly terrible weapon, ""it drains the life of those it strikes.";break;case SPWPN_SPEED:description += "Attacks with this weapon take half as long ""as usual.";break;case SPWPN_VORPAL:if (is_range_weapon(item))
case SPWPN_SINGING_SWORD:description += "This blessed weapon loves nothing more ""than to sing to its owner, ""whether they want it to or not.";break;case SPWPN_WRATH_OF_TROG:description += "This was the favourite weapon of ""the old god Trog, before it was lost one day. ""It induces a bloodthirsty berserker rage in ""anyone who uses it to strike another.";break;case SPWPN_SCYTHE_OF_CURSES:description += "This weapon carries a ""terrible and highly irritating curse.";break;case SPWPN_MACE_OF_VARIABILITY:description += "It is rather unreliable.";break;case SPWPN_GLAIVE_OF_PRUNE:description += "It is the creation of a mad god, and ""carries a curse which transforms anyone ""possessing it into a prune. Fortunately, ""the curse works very slowly, and one can ""use it briefly with no consequences ""worse than slightly purple skin and a few wrinkles.";break;case SPWPN_SCEPTRE_OF_TORMENT:description += "This truly accursed weapon is ""an instrument of Hell.";break;case SPWPN_SWORD_OF_ZONGULDROK:description += "This dreadful weapon is used ""at the user's peril.";break;case SPWPN_SWORD_OF_CEREBOV:description += "Eerie flames cover its twisted blade.";break;case SPWPN_STAFF_OF_DISPATER:description += "This legendary item can unleash ""the fury of Hell.";break;case SPWPN_SCEPTRE_OF_ASMODEUS:description += "It carries some of the powers of ""the arch-fiend Asmodeus.";break;case SPWPN_SWORD_OF_POWER:description += "It rewards the powerful with power ""and the meek with weakness.";break;case SPWPN_STAFF_OF_OLGREB:description += "It was the magical weapon wielded by the ""mighty wizard Olgreb before he met his ""fate somewhere within these dungeons. It ""grants its wielder resistance to the ""effects of poison and increases their ""ability to use venomous magic, and ""carries magical powers which can be evoked.";break;case SPWPN_VAMPIRES_TOOTH:description += "It is lethally vampiric.";break;case SPWPN_STAFF_OF_WUCAD_MU:description += "Its power varies in proportion to ""its wielder's intelligence. ""Using it can be a bit risky.";break;
description += "Any ";description += ammo_name( item );description += " fired from it inflicts extra damage.";}else{description += "It inflicts extra damage upon ""your enemies.";}break;case SPWPN_FLAME:description += "It turns projectiles fired from it into ""bolts of flame.";break;case SPWPN_FROST:description += "It turns projectiles fired from it into ""bolts of frost.";break;case SPWPN_CHAOS:if (is_range_weapon(item)){description += "Each time it fires it turns the launched ""projectile into a different, random type of bolt.";}else{description += "Each time it hits an enemy it has a ""different, random effect.";
description += "$";}else if (item_type_known(item)){// We know it's an artefact type weapon, but not what it does.description += "$This weapon may have some hidden properties.";
break;case SPWPN_VAMPIRICISM:description += "It inflicts no extra harm, ""but heals its wielder somewhat when ""it strikes a living foe.";break;case SPWPN_PAIN:description += "In the hands of one skilled in ""necromantic magic it inflicts ""extra damage on living creatures.";break;case SPWPN_DISTORTION:description += "It warps and distorts space around it. ""Unwielding it can cause banishment or high damage.";break;case SPWPN_REACHING:description += "It can be evoked to extend its reach.";break;case SPWPN_RETURNING:description += "A skilled user can throw it in such a way ""that it will return to its owner.";break;case SPWPN_PENETRATION:description += "Ammo fired by it will pass through the ""targets it hits, potentially hitting all targets in ""its path until it reaches maximum range.";break;case SPWPN_SHADOW:description += "If ammo fired by it kills a monster, ""causing it to leave a corpse, the corpse will be ""animated as a zombie friendly to the one who fired it.";break;
if (verbose)append_weapon_stats(description, item);if (!is_fixed_artefact( item ))
if (is_artefact( item ))
int spec_ench = get_weapon_brand( item );if (!is_random_artefact( item ) && !verbose)spec_ench = SPWPN_NORMAL;// special weapon descripif (spec_ench != SPWPN_NORMAL && item_type_known(item))
std::string rand_desc = _randart_descrip( item );if (!rand_desc.empty())
switch (spec_ench){case SPWPN_FLAMING:description += "It emits flame when wielded, ""causing extra injury to most foes ""and up to double damage against ""particularly susceptible opponents.";break;case SPWPN_FREEZING:description += "It has been specially enchanted to ""freeze those struck by it, causing ""extra injury to most foes and ""up to double damage against ""particularly susceptible opponents.";break;case SPWPN_HOLY_WRATH:description += "It has been blessed by the Shining One ""to cause great damage to the undead and the unholy ""creatures of Hell or Pandemonium.";break;case SPWPN_ELECTROCUTION:description += "Occasionally upon striking a foe ""it will discharge some electrical energy ""and cause terrible harm.";break;case SPWPN_ORC_SLAYING:description += "It is especially effective against ""all of orcish descent.";break;case SPWPN_DRAGON_SLAYING:description += "This legendary weapon is deadly to all ""dragonkind. It also provides some protection from the ""breath attacks of dragons and other creatures.";break;case SPWPN_VENOM:if (is_range_weapon(item))description += "It poisons the unbranded ammo it fires.";elsedescription += "It poisons the flesh of those it strikes.";break;case SPWPN_PROTECTION:description += "It protects the one who wields it against ""injury (+5 to AC).";break;case SPWPN_DRAINING:description += "A truly terrible weapon, ""it drains the life of those it strikes.";break;case SPWPN_SPEED:description += "Attacks with this weapon take half as long ""as usual.";break;case SPWPN_VORPAL:if (is_range_weapon(item)){description += "Any ";description += ammo_name( item );description += " fired from it inflicts extra damage.";}else{description += "It inflicts extra damage upon ""your enemies.";}break;case SPWPN_FLAME:description += "It turns projectiles fired from it into ""bolts of flame.";break;case SPWPN_FROST:description += "It turns projectiles fired from it into ""bolts of frost.";break;case SPWPN_CHAOS:if (is_range_weapon(item)){description += "Each time it fires it turns the launched ""projectile into a different, random type of bolt.";}else{description += "Each time it hits an enemy it has a ""different, random effect.";}break;case SPWPN_VAMPIRICISM:description += "It inflicts no extra harm, ""but heals its wielder somewhat when ""it strikes a living foe.";break;case SPWPN_PAIN:description += "In the hands of one skilled in ""necromantic magic it inflicts ""extra damage on living creatures.";break;case SPWPN_DISTORTION:description += "It warps and distorts space around it. ""Unwielding it can cause banishment or high damage.";break;case SPWPN_REACHING:description += "It can be evoked to extend its reach.";break;case SPWPN_RETURNING:description += "A skilled user can throw it in such a way ""that it will return to its owner.";break;case SPWPN_PENETRATION:description += "Ammo fired by it will pass through the ""targets it hits, potentially hitting all targets in ""its path until it reaches maximum range.";break;case SPWPN_SHADOW:description += "If ammo fired by it kills a monster, ""causing it to leave a corpse, the corpse will be ""animated as a zombie friendly to the one who fired it.";break;}
description += rand_desc;
std::string rand_desc = _randart_descrip( item );if (!rand_desc.empty()){description += "$$";description += rand_desc;}// Can't happen, right? (XXX)if (!item_ident(item, ISFLAG_KNOW_PROPERTIES)&& item_type_known(item)){description += "$This weapon may have some hidden properties.";}
description += "$This weapon may have some hidden properties.";
if (is_fixed_artefact(item) && item_type_known(item)){// Known fixed artifacts are handled elsewhere.}else if (verbose && is_fixed_artefact(item)){description << "$$";description << article_a(item.name(DESC_CAP_A, true,false, false), false);description << ".$";}else if (verbose || (item.base_type != OBJ_WEAPONS&& item.base_type != OBJ_ARMOUR&& item.base_type != OBJ_BOOKS))
if (verbose || (item.base_type != OBJ_WEAPONS&& item.base_type != OBJ_ARMOUR&& item.base_type != OBJ_BOOKS))
{// Try for fixed artefacts matching the name.unique_item_status_type exists;for (unsigned which = SPWPN_START_FIXEDARTS;which <= SPWPN_END_FIXEDARTS; which++){exists = get_unique_item_status(OBJ_WEAPONS, which);make_item_fixed_artefact(*item, false, which);strcpy(obj_name, item->name(DESC_PLAIN).c_str());ptr = strstr( strlwr(obj_name), specs );if (ptr != NULL){if (create_for_real)mpr(obj_name);return(true);}else{set_unique_item_status(OBJ_WEAPONS, which, exists);do_uncurse_item(*item);item->props.clear();}}}// intentional fall-through for the unrandarts
item_def& item = mitm[islot];if (make_item_fixed_artefact(item, false, i)){item.quantity = 1;item_colour(item);set_ident_flags(item, ISFLAG_IDENT_MASK);move_item_to_grid( &islot, you.pos() );msg::streams(MSGCH_DIAGNOSTICS) << "Made "<< item.name(DESC_NOCAP_A)<< std::endl;}}
/** File: artefact.h* Summary: Random and unrandom artefact functions.* Written by: Linley Henzell** Modified for Crawl Reference by $Author$ on $Date$*/#ifndef RANDART_H#define RANDART_H#include "externs.h"// NOTE: NO_UNRANDARTS is automatically set by util/art-data.pl#define NO_UNRANDARTS 76#define ART_PROPERTIES ARTP_NUM_PROPERTIES// Reserving the upper bits for later expansion/versioning.#define RANDART_SEED_MASK 0x00ffffff#define SPWPN_SINGING_SWORD UNRAND_SINGING_SWORD#define SPWPN_WRATH_OF_TROG UNRAND_TROG#define SPWPN_SCYTHE_OF_CURSES UNRAND_CURSES#define SPWPN_MACE_OF_VARIABILITY UNRAND_VARIABILITY#define SPWPN_GLAIVE_OF_PRUNE UNRAND_PRUNE#define SPWPN_SCEPTRE_OF_TORMENT UNRAND_TORMENT#define SPWPN_SWORD_OF_ZONGULDROK UNRAND_ZONGULDROK#define SPWPN_SWORD_OF_POWER UNRAND_POWER#define SPWPN_STAFF_OF_OLGREB UNRAND_OLGREB#define SPWPN_VAMPIRES_TOOTH UNRAND_VAMPIRES_TOOTH#define SPWPN_STAFF_OF_WUCAD_MU UNRAND_WUCAD_MU#define SPWPN_SWORD_OF_CEREBOV UNRAND_CEREBOV#define SPWPN_STAFF_OF_DISPATER UNRAND_DISPATER#define SPWPN_SCEPTRE_OF_ASMODEUS UNRAND_ASMODEUS#define SPWPN_START_NOGEN_FIXEDARTS UNRAND_CEREBOV#define SPWPN_END_FIXEDARTS UNRAND_ASMODEUSenum unrand_special_type{UNRANDSPEC_EITHER,UNRANDSPEC_NORMAL,UNRANDPSEC_SPECIAL};// NOTE: This enumeration is automatically generated from art-data.txt// via util/art-data.plenum unrand_type{UNRAND_START = 180,UNRAND_DUMMY1 = UNRAND_START,UNRAND_SINGING_SWORD, // Singing SwordUNRAND_TROG, // Wrath of TrogUNRAND_VARIABILITY, // Mace of VariabilityUNRAND_PRUNE, // Glaive of PruneUNRAND_POWER, // Sword of PowerUNRAND_OLGREB, // Staff of OlgrebUNRAND_WUCAD_MU, // Staff of Wucad MuUNRAND_VAMPIRES_TOOTH, // Vampire's ToothUNRAND_CURSES, // Scythe of CursesUNRAND_TORMENT, // Sceptre of TormentUNRAND_ZONGULDROK, // Sword of ZonguldrokUNRAND_CEREBOV, // Sword of CerebovUNRAND_DISPATER, // Staff of DispaterUNRAND_ASMODEUS, // Sceptre of AsmodeusUNRAND_BLOODBANE, // long sword "Bloodbane"UNRAND_FLAMING_DEATH, // scimitar of Flaming DeathUNRAND_BRILLIANCE, // mace of BrillianceUNRAND_LEECH, // demon blade "Leech"UNRAND_CHILLY_DEATH, // dagger of Chilly DeathUNRAND_MORG, // dagger "Morg"UNRAND_FINISHER, // scythe "Finisher"UNRAND_PUNK, // sling "Punk"UNRAND_KRISHNA, // bow of Krishna "Sharnga"UNRAND_SKULLCRUSHER, // giant club "Skullcrusher"UNRAND_GUARD, // glaive of the GuardUNRAND_JIHAD, // sword of JihadUNRAND_HELLFIRE, // crossbow "Hellfire"UNRAND_DOOM_KNIGHT, // sword of the Doom KnightUNRAND_EOS, // "Eos"UNRAND_BOTONO, // spear of the BotonoUNRAND_OCTOPUS_KING, // trident of the Octopus KingUNRAND_ARGA, // mithril axe "Arga"UNRAND_ELEMENTAL_STAFF, // Elemental StaffUNRAND_SNIPER, // hand crossbow "Sniper"UNRAND_PIERCER, // longbow "Piercer"UNRAND_BLOWGUN_ASSASSIN, // blowgun of the AssassinUNRAND_WYRMBANE, // WyrmbaneUNRAND_SPRIGGANS_KNIFE, // Spriggan's KnifeUNRAND_PLUTONIUM_SWORD, // plutonium swordUNRAND_UNDEADHUNTER, // great mace "Undeadhunter"UNRAND_SERPENT_SCOURGE, // whip "Serpent-Scourge"UNRAND_ACCURACY, // knife of AccuracyUNRAND_CRYSTAL_SPEAR, // Lehudib's crystal spearUNRAND_IGNORANCE, // shield of IgnoranceUNRAND_AUGMENTATION, // robe of AugmentationUNRAND_THIEF, // cloak of the ThiefUNRAND_BULLSEYE, // shield "Bullseye"UNRAND_DYROVEPREVA, // crown of DyroveprevaUNRAND_MISFORTUNE, // robe of MisfortuneUNRAND_FLASH, // cloak of FlashUNRAND_BOOTS_ASSASSIN, // boots of the AssassinUNRAND_LEARS, // Lear's chain mailUNRAND_ZHOR, // skin of ZhorUNRAND_SALAMANDER, // salamander hide armourUNRAND_WAR, // gauntlets of WarUNRAND_RESISTANCE, // shield of ResistanceUNRAND_FOLLY, // robe of FollyUNRAND_MAXWELL, // Maxwell's patent armourUNRAND_DRAGON, // mask of the DragonUNRAND_NIGHT, // robe of NightUNRAND_DRAGON_KING, // armour of the Dragon KingUNRAND_ALCHEMIST, // hat of the AlchemistUNRAND_FENCERS_GLOVES, // Fencer's glovesUNRAND_STARLIGHT, // cloak of StarlightUNRAND_RATSKIN_CLOAK, // ratskin cloakUNRAND_AIR, // amulet of the AirUNRAND_SHADOWS, // ring of ShadowsUNRAND_CEKUGOB, // amulet of CekugobUNRAND_FOUR_WINDS, // amulet of the Four WindsUNRAND_BLOODLUST, // necklace of BloodlustUNRAND_SHAOLIN, // ring of ShaolinUNRAND_ROBUSTNESS, // ring of RobustnessUNRAND_MAGE, // ring of the MageUNRAND_SHIELDING, // brooch of ShieldingUNRAND_DUMMY2, // DUMMY UNRANDART 2UNRAND_LAST = UNRAND_DUMMY2};// The following unrandart bits were taken from $pellbinder's mon-util// code (see mon-util.h & mon-util.cc) and modified (LRH).struct unrandart_entry{const char *name; // true name of unrandart (max 31 chars)const char *unid_name; // un-id'd name of unrandart (max 31 chars)object_class_type base_type; // class of uraint sub_type; // type of uraint plus; // plus of uraint plus2; // plus2 of uraint colour; // colour of urashort prpty[ART_PROPERTIES];// special description added to 'v' command output (max 31 chars)const char *desc;// special description added to 'v' command output (max 31 chars)const char *desc_id;// special description added to 'v' command output (max 31 chars)const char *desc_end;};bool is_known_artefact( const item_def &item );bool is_artefact( const item_def &item );bool is_random_artefact( const item_def &item );bool is_unrandom_artefact( const item_def &item );bool is_special_unrandom_artefact( const item_def &item );unique_item_status_type get_unique_item_status(const item_def& item);unique_item_status_type get_unique_item_status(int unrand_index);void set_unique_item_status(const item_def& item,unique_item_status_type status );void set_unique_item_status(int unrand_index,unique_item_status_type status );/* ************************************************************************ called from: itemname* *********************************************************************** */std::string get_artefact_name( const item_def &item );/* ************************************************************************ called from: spl-book* *********************************************************************** */void set_artefact_name( item_def &item, const std::string &name );void set_artefact_appearance( item_def &item, const std::string &appear );/* ************************************************************************ called from: effects* *********************************************************************** */std::string artefact_name( const item_def &item, bool appearance = false );/* ************************************************************************ called from: describe* *********************************************************************** */const char *unrandart_descrip( int which_descrip, const item_def &item );/* ************************************************************************ called from: dungeon makeitem* *********************************************************************** */int find_okay_unrandart(unsigned char aclass, unsigned char atype = OBJ_RANDOM,unrand_special_type specialness = UNRANDSPEC_EITHER,bool in_abyss = false);typedef FixedVector< int, ART_PROPERTIES > artefact_properties_t;typedef FixedVector< bool, ART_PROPERTIES > artefact_known_props_t;/* ************************************************************************ called from: describe - fight - it_use2 - item_use - player* *********************************************************************** */void artefact_desc_properties( const item_def &item,artefact_properties_t &proprt,artefact_known_props_t &known,bool force_fake_props = false);void artefact_wpn_properties( const item_def &item,artefact_properties_t &proprt,artefact_known_props_t &known );void artefact_wpn_properties( const item_def &item,artefact_properties_t &proprt );int artefact_wpn_property( const item_def &item, artefact_prop_type prop,bool &known );int artefact_wpn_property( const item_def &item, artefact_prop_type prop );int artefact_known_wpn_property( const item_def &item,artefact_prop_type prop );int artefact_wpn_num_props( const item_def &item );int artefact_wpn_num_props( const artefact_properties_t &proprt );void artefact_wpn_learn_prop( item_def &item, artefact_prop_type prop );bool artefact_wpn_known_prop( const item_def &item, artefact_prop_type prop );/* ************************************************************************ called from: dungeon* *********************************************************************** */bool make_item_blessed_blade( item_def &item );bool make_item_randart( item_def &item );bool make_item_unrandart( item_def &item, int unrand_index );/* ************************************************************************ called from: randart - debug* *********************************************************************** */bool randart_is_bad( const item_def &item );bool randart_is_bad( const item_def &item, artefact_properties_t &proprt );/* ************************************************************************ called from: items* *********************************************************************** */int find_unrandart_index(const item_def& artefact);unrandart_entry* get_unrand_entry(int unrand_index);unrand_special_type get_unrand_specialness(int unrand_index);unrand_special_type get_unrand_specialness(const item_def &item);/* ************************************************************************ called from: debug* *********************************************************************** */void artefact_set_properties( item_def &item,artefact_properties_t &proprt );void artefact_set_property( item_def &item,artefact_prop_type prop,int val );/* ************************************************************************ called from: mapdef* *********************************************************************** */int get_unrandart_num( const char *name );#endif
// The following unrandart bits were taken from $pellbinder's mon-util// code (see mon-util.h & mon-util.cc) and modified (LRH). They're in// randart.cc and not randart.h because they're only used in this code// module.struct unrandart_entry{const char *name; // true name of unrandart (max 31 chars)const char *unid_name; // un-id'd name of unrandart (max 31 chars)object_class_type ura_cl; // class of uraint ura_ty; // type of uraint ura_pl; // plus of uraint ura_pl2; // plus2 of uraint ura_col; // colour of urashort prpty[RA_PROPERTIES];// special description added to 'v' command output (max 31 chars)const char *spec_descrip1;// special description added to 'v' command output (max 31 chars)const char *spec_descrip2;// special description added to 'v' command output (max 31 chars)const char *spec_descrip3;};
void set_unrandart_exist(int whun, bool is_exist){unrandart_exist[whun] = is_exist;}bool does_unrandart_exist(int whun){return (unrandart_exist[whun]);}
if (!is_random_artefact( item )&& item.base_type == OBJ_WEAPONS&& item.special >= SPWPN_START_FIXEDARTS){return (true);}
return (item.flags & ISFLAG_UNRANDART&& get_unrand_specialness(item.special) == UNRANDPSEC_SPECIAL);}
if (base_type == OBJ_WEAPONS&& art >= SPWPN_START_FIXEDARTS && art < SPWPN_START_NOGEN_FIXEDARTS){return (you.unique_items[art - SPWPN_START_FIXEDARTS]);}elsereturn (UNIQ_NOT_EXISTS);
ASSERT(art > UNRAND_START && art < UNRAND_LAST);return (you.unique_items[art - UNRAND_START]);}void set_unique_item_status(const item_def& item,unique_item_status_type status ){if (item.flags & ISFLAG_UNRANDART)set_unique_item_status(item.special, status);
if (base_type == OBJ_WEAPONS&& art >= SPWPN_START_FIXEDARTS && art < SPWPN_START_NOGEN_FIXEDARTS){you.unique_items[art - SPWPN_START_FIXEDARTS] = status;}
ASSERT(art > UNRAND_START && art < UNRAND_LAST);you.unique_items[art - UNRAND_START] = status;
for (int i = 0; i < NO_UNRANDARTS; i++){const unrandart_entry& candidate = unranddata[i];if (candidate.ura_cl == artefact.base_type&& candidate.ura_ty == artefact.sub_type&& candidate.ura_pl == artefact.plus&& candidate.ura_pl2 == artefact.plus2&& candidate.ura_col == artefact.colour){return i;}}return (-1);
return (artefact.special);
if (unranddata[i].ura_cl == aclass&& !does_unrandart_exist(i)&& (atype == OBJ_RANDOM || unranddata[i].ura_ty == atype)){count++;if (one_chance_in(count))ret = i;}}return (ret);}struct fixedart_setting{int which;const char* name;const char* appearance;object_class_type base;int subtype;int acc;int dam;int colour;bool curse;};
const int index = i + UNRAND_START;const unrandart_entry* entry = &unranddata[i];
const fixedart_setting fixedarts[] = {{SPWPN_SINGING_SWORD,"Singing Sword","golden long sword",OBJ_WEAPONS,WPN_LONG_SWORD,7,7,YELLOW,false},{SPWPN_WRATH_OF_TROG,"Wrath of Trog","bloodstained battleaxe",OBJ_WEAPONS,WPN_BATTLEAXE,3,11,RED,false},{SPWPN_SCYTHE_OF_CURSES,"Scythe of Curses","warped scythe",OBJ_WEAPONS,WPN_SCYTHE,13,13,DARKGREY,true},{SPWPN_MACE_OF_VARIABILITY,"Mace of Variability","shimmering mace",OBJ_WEAPONS,WPN_MACE,random2(16) - 4,random2(16) - 4,random_colour(),false},{SPWPN_GLAIVE_OF_PRUNE,"Glaive of Prune","purple glaive",OBJ_WEAPONS,WPN_GLAIVE,0,12,MAGENTA,false},{SPWPN_SCEPTRE_OF_TORMENT,"Sceptre of Torment","jewelled golden mace",OBJ_WEAPONS,WPN_MACE,7,6,YELLOW,false},{SPWPN_SWORD_OF_ZONGULDROK,"Sword of Zonguldrok","bone long sword",OBJ_WEAPONS,WPN_LONG_SWORD,9,9,LIGHTGREY,false},
// Skip dummy entries.if (entry->base_type == OBJ_UNASSIGNED)continue;
{SPWPN_STAFF_OF_OLGREB,"Staff of Olgreb","green glowing staff",OBJ_WEAPONS,WPN_QUARTERSTAFF,0, // set on wield0, // set on wieldGREEN,false},
if (in_abyss && status != UNIQ_LOST_IN_ABYSS|| !in_abyss && status != UNIQ_NOT_EXISTS){continue;}
{SPWPN_VAMPIRES_TOOTH,"Vampire's Tooth","ivory dagger",OBJ_WEAPONS,WPN_DAGGER,3,4,WHITE,false},
// Never randomly generated until lost in the abyss.if ((!in_abyss || status != UNIQ_LOST_IN_ABYSS)&& index >= SPWPN_START_NOGEN_FIXEDARTS&& index <= SPWPN_END_FIXEDARTS){continue;}
{SPWPN_STAFF_OF_WUCAD_MU,"Staff of Wucad Mu","ephemeral quarterstaff",OBJ_WEAPONS,WPN_QUARTERSTAFF,0, // set on wield0, // set on wieldBROWN,false},
if (entry->base_type != aclass|| (atype != OBJ_RANDOM && entry->sub_type != atype)){continue;}
which = SPWPN_START_FIXEDARTS+ random2(SPWPN_START_NOGEN_FIXEDARTS - SPWPN_START_FIXEDARTS);
std::string art = unranddata[i].name;art = replace_all(art, " ", "_");art = replace_all(art, "'", "");lowercase(art);if (art == name || art.find(quoted) != std::string::npos)return (UNRAND_START + i);
const unique_item_status_type status =get_unique_item_status( OBJ_WEAPONS, which );if (!force&& (status == UNIQ_EXISTS|| in_abyss && status == UNIQ_NOT_EXISTS|| !in_abyss && status == UNIQ_LOST_IN_ABYSS)){return (false);}// Find the appropriate fixed artefact.for (unsigned int i = 0; i < ARRAYSZ(fixedarts); ++i){if (fixedarts[i].which == which){fixedart = &fixedarts[i];break;}}// None found?if (fixedart == NULL){#ifdef DEBUG_DIAGNOSTICSmprf(MSGCH_ERROR, "Couldn't find fixed artefact %d", which);#endifreturn (false);}// If we get here, we've made the artefactitem.base_type = fixedart->base;item.sub_type = fixedart->subtype;item.plus = fixedart->acc;item.plus2 = fixedart->dam;item.colour = fixedart->colour;item.special = which;item.quantity = 1;// get true artefact nameASSERT(!item.props.exists( ARTEFACT_NAME_KEY ));item.props[ARTEFACT_NAME_KEY].get_string() = fixedart->name;// get artefact appearanceASSERT(!item.props.exists( ARTEFACT_APPEAR_KEY ));item.props[ARTEFACT_APPEAR_KEY].get_string() = fixedart->appearance;if (fixedart->curse)do_curse_item(item);// Items originally generated in the abyss and not found will be// shifted to "lost in abyss", and will only be found there. -- bwrset_unique_item_status( OBJ_WEAPONS, which, UNIQ_EXISTS );return (true);
return SPWPN_NORMAL;
const unrandart_entry *unrand = &unranddata[unrand_index];item.base_type = unrand->ura_cl;item.sub_type = unrand->ura_ty;item.plus = unrand->ura_pl;item.plus2 = unrand->ura_pl2;item.colour = unrand->ura_col;
const unrandart_entry *unrand = &unranddata[unrand_index - UNRAND_START];item.base_type = unrand->base_type;item.sub_type = unrand->sub_type;item.plus = unrand->plus;item.plus2 = unrand->plus2;item.colour = unrand->colour;
return ((which_descrip == 0) ? unrand->spec_descrip1 :(which_descrip == 1) ? unrand->spec_descrip2 :(which_descrip == 2) ? unrand->spec_descrip3
return ((which_descrip == 0) ? unrand->desc :(which_descrip == 1) ? unrand->desc_id :(which_descrip == 2) ? unrand->desc_end
# This file contains the definitions of undrandarts (and what used to be# fixed artefacts). util/art-data.pl translates this file into# art-data.h, and also updates the enumeration and NO_UNRANDARTS in# unrand.h## Each artefact definition is separated by one or more blanks lines.## Each artefact definition must have the NAME, APPEAR, OBJ and COLOUR# fields.## The name and appearance of each unrandart must be unique.## Changing the name of an unrand will change it's automatically# generated enumeration, unless its enumeration is forced with ENUM.## "ENUM: FOO" can be used to force the enumeration for an unrand to be# "UNRAND_FOO", for cases where the automatically generated enumarations# of different unrands conflict.## Add new artefact definitions at the end of the file; doing so should cause# no problems with save-file compatibilty, but for tile builds it will# cause a shift of remembered tiles (since each new unrandart needs its# own tiles). Changing the order of the definitions will likely cause# strange behaviour in games saved previous to the change, and deleting# definitions will break savefile compatibility.# This entry must always be first.ENUM: DUMMY1NAME: DUMMY UNRANDART 1APPEAR: DUMMY UNRANDART 1OBJ: OBJ_UNASSIGNED/250PLUS: 250/250COLOUR: BLACK####################### First come the old fixed arts.NAME: Singing SwordAPPEAR: golden long swordOBJ: OBJ_WEAPONS/WPN_LONG_SWORDPLUS: +7/+7COLOUR: YELLOWDESC_ID: This blessed weapon loves nothing more than to sing to its owner,whether they want it to or not.NAME: Wrath of TrogAPPEAR: bloodstained battleaxeOBJ: OBJ_WEAPONS/WPN_BATTLEAXEPLUS: +3/+11COLOUR: REDDESC_ID: This was the favourite weapon of the old god Trog, before it waslost one day. It induces a bloodthirsty berserker rage in anyonewho uses it to strike another.NAME: Mace of VariabilityAPPEAR: shimmering maceOBJ: OBJ_WEAPONS/WPN_MACEPLUS: 0/0 # Set on generationCOLOUR: BLACK # Set on generationDESC_ID: It is rather unreliable.NAME: Glaive of PruneAPPEAR: purple glaiveOBJ: OBJ_WEAPONS/WPN_GLAIVEPLUS: 0/+12COLOUR: MAGENTADESC_ID: It is the creation of a mad god, and carries a curse whichtransforms anyone possessing it into a prune. Fortunately, thecurse works very slowly, and one can use it briefly with noconsequences worse than slightly purple skin and a few wrinkles.NAME: Sword of PowerAPPEAR: chunky great swordOBJ: OBJ_WEAPONS/WPN_GREAT_SWORDPLUS: 0/0 # Set on wieldCOLOUR: REDDESC_ID: It rewards the powerful with power and the meek with weakness.NAME: Staff of OlgrebAPPEAR: green glowing staffOBJ: OBJ_WEAPONS/WPN_QUARTERSTAFFPLUS: 0/0 # Set on wieldCOLOUR: GREENBRAND: SPWPN_VENOMPOISON: trueDESC_ID: It was the magical weapon wielded by the mighty wizard Olgrebbefore he met his fate somewhere within these dungeons. Itincreases the ability of its wielder to use venomous magic, andcarries magical powers which can be evoked.NAME: Staff of Wucad MuAPPEAR: ephemeral quarterstaffOBJ: OBJ_WEAPONS/WPN_QUARTERSTAFFPLUS: 0/0 # Set on wieldCOLOUR: BROWNDESC_ID: Its power varies in proportion to its wielder's intelligence.Using it can be a bit risky.NAME: Vampire's ToothAPPEAR: ivory daggerOBJ: OBJ_WEAPONS/WPN_DAGGERPLUS: +3/+4COLOUR: WHITEBRAND: SPWPN_VAMPIRICISMDESC_ID: It is lethally vampiric.NAME: Scythe of CursesAPPEAR: warped scytheOBJ: OBJ_WEAPONS/WPN_SCYTHEPLUS: +13/+13COLOUR: DARKGREYCURSED: -1DESC_ID: This weapon carries a terrible and highly irritating curse.NAME: Sceptre of TormentAPPEAR: jewelled golden maceOBJ: OBJ_WEAPONS/WPN_MACEPLUS: +7/+6COLOUR: YELLOWDESC_ID: This truly accursed weapon is an instrument of Hell.NAME: Sword of ZonguldrokAPPEAR: bone long swordOBJ: OBJ_WEAPONS/WPN_LONG_SWORDPLUS: +9/+9COLOUR: LIGHTGREYDESC_ID: This dreadful weapon is used at the user's peril.NAME: Sword of CerebovAPPEAR: great serpentine swordOBJ: OBJ_WEAPONS/WPN_GREAT_SWORDPLUS: +6/+6COLOUR: YELLOWBRAND: SPWPN_FLAMINGCURSED: -1DESC: Eerie flames cover its twisted blade.NAME: Staff of DispaterAPPEAR: golden staffOBJ: OBJ_WEAPONS/WPN_QUARTERSTAFFPLUS: +4/+4COLOUR: YELLOWDESC_ID: This legendary item can unleash the fury of Hell.NAME: Sceptre of AsmodeusAPPEAR: ruby sceptreOBJ: OBJ_WEAPONS/WPN_QUARTERSTAFFPLUS: +7/+7COLOUR: REDDESC_ID: It carries some of the powers of the arch-fiend Asmodeus.##################### End of old fixed arts.NAME: long sword "Bloodbane"APPEAR: blackened long swordOBJ: OBJ_WEAPONS/WPN_LONG_SWORDPLUS: +7/+8COLOUR: DARKGREYBRAND: SPWPN_VORPALBERSERK: trueANGRY: trueSTEALTH: -20NAME: scimitar of Flaming DeathAPPEAR: smoking scimitarOBJ: OBJ_WEAPONS/WPN_SCIMITARPLUS: +7/+5COLOUR: REDBRAND: SPWPN_FLAMINGFIRE: 2COLD: -1POISON: trueMAGIC: 20NAME: mace of BrillianceAPPEAR: brightly glowing maceOBJ: OBJ_WEAPONS/WPN_MACEPLUS: +5/+5COLOUR: WHITEBRAND: SPWPN_HOLY_WRATHAC: 5INT: 5LIFE: trueSEEINV: trueSTEALTH: -20NAME: demon blade "Leech"APPEAR: runed demon bladeOBJ: OBJ_WEAPONS/WPN_DEMON_BLADEPLUS: +13/+4COLOUR: MAGENTABRAND: SPWPN_VAMPIRICISMEV: -1STR: -1INT: -1DEX: -1LIFE: trueCURSED: 4NAME: dagger of Chilly DeathAPPEAR: sapphire daggerOBJ: OBJ_WEAPONS/WPN_DAGGERPLUS: +5/+7COLOUR: LIGHTBLUEBRAND: SPWPN_FREEZINGFIRE: -1COLD: 2POISON: trueMAGIC: 20DESC: A dagger made of one huge piece of sapphire.NAME: dagger "Morg"APPEAR: rusty daggerOBJ: OBJ_WEAPONS/WPN_DAGGERPLUS: -1/+4COLOUR: LIGHTREDBRAND: SPWPN_PAININT: 5MAGIC: 30DESC: An ugly rusty dagger.DESC_END: Many years ago it was the property of a powerful mage called Boris.He got lost in the Dungeon while seeking the Orb.NAME: scythe "Finisher"APPEAR: blackened scytheOBJ: OBJ_WEAPONS/WPN_SCYTHEPLUS: +3/+5COLOUR: DARKGREYBRAND: SPWPN_SPEEDSTR: 3CURSED: -1DESC: A long and sharp scythe, specially modified for combat purposes.NAME: sling "Punk"APPEAR: blue slingOBJ: OBJ_WEAPONS/WPN_SLINGPLUS: +9/+12COLOUR: LIGHTBLUEBRAND: SPWPN_FROSTCOLD: 1DESC: A sling made of weird blue leather.ENUM: KRISHNANAME: bow of Krishna "Sharnga"APPEAR: golden bowOBJ: OBJ_WEAPONS/WPN_BOWPLUS: +8/+8COLOUR: YELLOWBRAND: SPWPN_SPEEDDEX: 3SEEINV: trueDESC: A wonderful golden bow.DESC_END: It once belonged to a foreign god. It works best with specialarrows which are not generally available.NAME: giant club "Skullcrusher"APPEAR: brutal giant clubOBJ: OBJ_WEAPONS/WPN_GIANT_CLUBPLUS: +0/+5COLOUR: BROWNBRAND: SPWPN_SPEEDSTR: 5NAME: glaive of the GuardAPPEAR: polished glaiveOBJ: OBJ_WEAPONS/WPN_GLAIVEPLUS: +5/+8COLOUR: LIGHTCYANBRAND: SPWPN_ELECTROCUTIONAC: 5SEEINV: trueBERSERK: trueDESC_END: This weapon once belonged to Gar Dogh, the guard of a king'streasures. According to legend he was lost somewhere in the Dungeon.NAME: sword of JihadAPPEAR: crystal swordOBJ: OBJ_WEAPONS/WPN_LONG_SWORDPLUS: +12/+10COLOUR: WHITEBRAND: SPWPN_HOLY_WRATHEV: 3LIFE: trueMAGIC: 20ANGRY: trueSTEALTH: -50DESC_END: This sword was The Shining One's gift to a worshipper.DESC: A long sword made of one huge piece of crystal.NAME: crossbow "Hellfire"APPEAR: flaming crossbowOBJ: OBJ_WEAPONS/WPN_CROSSBOWPLUS: +6/+9COLOUR: LIGHTREDBRAND: SPWPN_FLAMEFIRE: 2COLD: -1MAGIC: 40DESC: A flaming crossbow, forged in the fires of the Hells.NAME: sword of the Doom KnightAPPEAR: adamantine great swordOBJ: OBJ_WEAPONS/WPN_GREAT_SWORDPLUS: +13/+13COLOUR: BLUEBRAND: SPWPN_PAINMAGIC: 50NOSPELL: trueDESC: An adamantine great sword.NAME: "Eos"APPEAR: encrusted morningstarOBJ: OBJ_WEAPONS/WPN_MORNINGSTARPLUS: +5/+5COLOUR: LIGHTCYANBRAND: SPWPN_ELECTROCUTIONELEC: trueSEEINV: trueNOTELEP: true# Was "spear of Voo-Doo". In the African origin, there is a distinction# between voodoo and bo, the latter dealing with curses, witchcraft and# spells designed to do harm. Priests (or rather sorcerors) of bo are# called botono.NAME: spear of the BotonoAPPEAR: ebony spearOBJ: OBJ_WEAPONS/WPN_SPEARPLUS: +2/+10COLOUR: DARKGREYBRAND: SPWPN_VAMPIRICISMPOISON: trueLIFE: trueNOISES: trueSTEALTH: -30DESC_END: A really dark and malign artefact, which no wise man would even touch.NAME: trident of the Octopus KingAPPEAR: mangy tridentOBJ: OBJ_WEAPONS/WPN_TRIDENTPLUS: +10/+4COLOUR: CYANBRAND: SPWPN_VENOMELEC: truePOISON: trueMAGIC: 50DESC_END: This trident was stolen many years ago from the Octopus King'sgarden by a really unimportant and already dead man. But bewareof the Octopus King's wrath!NAME: mithril axe "Arga"APPEAR: mithril axeOBJ: OBJ_WEAPONS/WPN_WAR_AXEPLUS: +10/+6COLOUR: WHITEBRAND: SPWPN_SPEEDSTR: 2MAGIC: 30DESC: A beautiful mithril axe, probably lost by some dwarven hero.NAME: Elemental StaffAPPEAR: black staffOBJ: OBJ_WEAPONS/WPN_QUARTERSTAFFPLUS: +3/+1COLOUR: DARKGREYBRAND: SPWPN_PROTECTIONFIRE: 2COLD: 2MAGIC: 60NOISES: trueMETAB: 2DESC_END: This powerful staff used to belong to the leader of the Guild ofFive Elements.NAME: hand crossbow "Sniper"APPEAR: black crossbowOBJ: OBJ_WEAPONS/WPN_HAND_CROSSBOWPLUS: +10/+0COLOUR: DARKGREYBRAND: SPWPN_VENOMSEEINV: trueDESC: A hand crossbow made of some black material.NAME: longbow "Piercer"APPEAR: very long metal bowOBJ: OBJ_WEAPONS/WPN_LONGBOWPLUS: +2/+10COLOUR: CYANBRAND: SPWPN_VORPALEV: -2DESC: An exceptionally large metal longbow.ENUM: BLOWGUN_ASSASSINNAME: blowgun of the AssassinAPPEAR: tiny blowgunOBJ: OBJ_WEAPONS/WPN_BLOWGUNPLUS: +6/+6COLOUR: WHITEINV: trueSTEALTH: 60DESC: It is designed for easy concealment, but still packs a nasty punch.NAME: WyrmbaneAPPEAR: scale-covered lanceOBJ: OBJ_WEAPONS/WPN_SPEARPLUS: +9/+6COLOUR: GREENBRAND: SPWPN_DRAGON_SLAYINGAC: 5FIRE: 1POISON: trueBERSERK: trueNAME: Spriggan's KnifeAPPEAR: dainty little knifeOBJ: OBJ_WEAPONS/WPN_KNIFEPLUS: +4/+10COLOUR: LIGHTCYANEV: 4DEX: 4MAGIC: 20STEALTH: 50DESC: A dainty little knife.DESC_END: This knife was made by Spriggans, or for Spriggans, or possiblyfrom Spriggans. Anyway, it's in some way associated with thosefey folk.NAME: plutonium swordAPPEAR: glowing long swordOBJ: OBJ_WEAPONS/WPN_LONG_SWORDPLUS: +12/+16COLOUR: LIGHTGREENMUTATE: 6CURSED: 1STEALTH: -20DESC: A long sword made of weird glowing metal.NAME: great mace "Undeadhunter"APPEAR: great steel maceOBJ: OBJ_WEAPONS/WPN_GREAT_MACEPLUS: +7/+7COLOUR: LIGHTGREYBRAND: SPWPN_HOLY_WRATHLIFE: trueNAME: whip "Serpent-Scourge"APPEAR: forked whipOBJ: OBJ_WEAPONS/WPN_WHIPPLUS: +5/+10COLOUR: DARKGREYBRAND: SPWPN_VENOMPOISON: trueDESC_ID: A double-ended whip made from the cured hides of the Lair of Beasts'deadly grey snakes.NAME: knife of AccuracyAPPEAR: thin daggerOBJ: OBJ_WEAPONS/WPN_DAGGERPLUS: +27/-1COLOUR: LIGHTCYANDESC_END: It is almost unerringly accurate.# A play on the spell of the same name. Colour taken from crystal walls.ENUM: CRYSTAL_SPEARNAME: Lehudib's crystal spearAPPEAR: crystal spearOBJ: OBJ_WEAPONS/WPN_SPEARPLUS: +6/+6COLOUR: GREENDESC_END: Presumably this relic led to the invention of the famous spell.NAME: shield of IgnoranceAPPEAR: dull large shieldOBJ: OBJ_ARMOUR/ARM_LARGE_SHIELDPLUS: +5COLOUR: BROWNAC: 2EV: 2INT: -6LIFE: trueCURSED: 3NAME: robe of AugmentationAPPEAR: silk robeOBJ: OBJ_ARMOUR/ARM_ROBEPLUS: +4COLOUR: LIGHTREDSTR: 2INT: 2DEX: 2DESC: A robe made of the finest silk.NAME: cloak of the ThiefAPPEAR: tattered cloakOBJ: OBJ_ARMOUR/ARM_CLOAKPLUS: +1COLOUR: DARKGREYEV: 2DEX: 2SEEINV: trueINV: trueLEV: trueDAM: -3STEALTH: 60DESC_END: It allows its wearer to excel in the arts of thievery.NAME: shield "Bullseye"APPEAR: round shieldOBJ: OBJ_ARMOUR/ARM_SHIELDPLUS: +10COLOUR: REDEV: -5NAME: crown of DyroveprevaAPPEAR: jewelled bronze crownOBJ: OBJ_ARMOUR/ARM_CAPPLUS: +3COLOUR: BROWNINT: 2ELEC: trueSEEINV: trueMETAB: 1DESC: A large crown of dull bronze, set with a dazzling array of gemstones.NAME: robe of MisfortuneAPPEAR: fabulously ornate robeOBJ: OBJ_ARMOUR/ARM_ROBEPLUS: -5COLOUR: MAGENTAEV: -4STR: -2INT: -2DEX: -2NOSPELL: trueRND_TELE: trueMUTATE: 5CURSED: 1STEALTH: -80DESC: A splendid flowing robe of fur and silk.NAME: cloak of FlashAPPEAR: vibrating cloakOBJ: OBJ_ARMOUR/ARM_CLOAKPLUS: +3COLOUR: REDEV: 4LEV: trueCANTELEP: trueDESC: A vibrating cloak.ENUM: BOOTS_ASSASSINNAME: boots of the AssassinAPPEAR: soft bootsOBJ: OBJ_ARMOUR/ARM_BOOTSPLUS: +2COLOUR: BROWNDEX: 3INV: trueSTEALTH: 80DESC: Some soft boots.DESC_END: These boots were specially designed by the Assassin's Guild.ENUM: LEARSNAME: Lear's chain mailAPPEAR: golden chain mailOBJ: OBJ_ARMOUR/ARM_CHAIN_MAILPLUS: -1COLOUR: YELLOWDEX: -3NOSPELL: trueCURSED: -1DESC: A chain mail made of pure gold.NAME: skin of ZhorAPPEAR: smelly skinOBJ: OBJ_ARMOUR/ARM_ANIMAL_SKINPLUS: +4COLOUR: BROWNCOLD: 2DESC: The skin of some strange animal.ENUM: SALAMANDERNAME: salamander hide armourAPPEAR: red leather armourOBJ: OBJ_ARMOUR/ARM_LEATHER_ARMOURPLUS: +3COLOUR: REDFIRE: 2BERSERK: trueDESC: A leather armour made of a salamander's skin.NAME: gauntlets of WarAPPEAR: thick gauntletsOBJ: OBJ_ARMOUR/ARM_GLOVESPLUS: +3COLOUR: BROWNACC: 3DAM: 3NAME: shield of ResistanceAPPEAR: bronze shieldOBJ: OBJ_ARMOUR/ARM_SHIELDPLUS: +3COLOUR: LIGHTREDFIRE: 1COLD: 1MAGIC: 40DESC: A bronze shield.NAME: robe of FollyAPPEAR: dull robeOBJ: OBJ_ARMOUR/ARM_ROBEPLUS: -1COLOUR: LIGHTGREYINT: -5NOSPELL: trueCURSED: 2DESC: A dull grey robe.ENUM: MAXWELLNAME: Maxwell's patent armourAPPEAR: weird-looking armourOBJ: OBJ_ARMOUR/ARM_PLATE_MAILPLUS: +10COLOUR: LIGHTGREENNOSPELL: trueNOTELEP: trueCURSED: -1DESC: A weird-looking armour.NAME: mask of the DragonAPPEAR: blue maskOBJ: OBJ_ARMOUR/ARM_CAPCOLOUR: BLUEMAGIC: 40SEEINV: trueACC: 2DAM: 2DESC: A blue mask.NAME: robe of NightAPPEAR: black robeOBJ: OBJ_ARMOUR/ARM_ROBEPLUS: +4COLOUR: DARKGREYMAGIC: 30SEEINV: trueINV: trueSTEALTH: 50DESC: A long black robe made of strange glossy material.DESC_END: According to legend, this robe was the gift of Ratri the Goddessof the Night to one of her followers.NAME: armour of the Dragon KingAPPEAR: shiny dragon armourOBJ: OBJ_ARMOUR/ARM_GOLD_DRAGON_ARMOURPLUS: +5COLOUR: YELLOWMAGIC: 50NAME: hat of the AlchemistAPPEAR: dirty hatOBJ: OBJ_ARMOUR/ARM_WIZARD_HATPLUS: +2COLOUR: MAGENTAFIRE: 1COLD: 1ELEC: trueMAGIC: 30DESC: A dirty hat.NAME: Fencer's glovesAPPEAR: silk glovesOBJ: OBJ_ARMOUR/ARM_GLOVESPLUS: +2COLOUR: WHITEEV: 3DEX: 3ACC: 5DESC: A pair of gloves made of white silk.NAME: cloak of StarlightAPPEAR: phosphorescent cloakOBJ: OBJ_ARMOUR/ARM_CLOAKCOLOUR: WHITEEV: 4COLD: 1ELEC: trueSTEALTH: -30DESC_END: A cloak woven of pure light beams.DESC: A phosphorescent cloak.NAME: ratskin cloakAPPEAR: motley cloakOBJ: OBJ_ARMOUR/ARM_CLOAKPLUS: +1COLOUR: LIGHTREDINT: -1DEX: -1LIFE: truePOISON: trueDESC_END: An enchantress with a magic loom and way too much time onher hands stitched this cloak from the hides of hundredsof rats, most of them orange. It's a bit awkward to wearand looks rather foolish, but it provides excellent protectionfrom rats of all kinds.NAME: amulet of the AirAPPEAR: sky-blue amuletOBJ: OBJ_JEWELLERY/AMU_CONTROLLED_FLIGHTCOLOUR: LIGHTCYANEV: 3ELEC: trueLEV: trueSTEALTH: 50DESC: A sky-blue amulet.NAME: ring of ShadowsAPPEAR: black ringOBJ: OBJ_JEWELLERY/RING_INVISIBILITYCOLOUR: DARKGREYEV: 4LIFE: trueSEEINV: trueACC: -3STEALTH: 40NAME: amulet of CekugobAPPEAR: crystal amuletOBJ: OBJ_JEWELLERY/AMU_WARDINGCOLOUR: LIGHTGREYAC: 1EV: 1ELEC: truePOISON: trueLIFE: trueNOTELEP: trueMETAB: 2NAME: amulet of the Four WindsAPPEAR: jade amuletOBJ: OBJ_JEWELLERY/AMU_CLARITYCOLOUR: LIGHTGREENLIFE: trueMAGIC: 100NAME: necklace of BloodlustAPPEAR: blood-stained necklaceOBJ: OBJ_JEWELLERY/AMU_RAGECOLOUR: REDSTR: 2INT: -2MAGIC: 30ANGRY: trueDAM: 3CURSED: 3STEALTH: -20NAME: ring of ShaolinAPPEAR: jade ringOBJ: OBJ_JEWELLERY/RING_EVASIONPLUS: +8COLOUR: LIGHTGREENNAME: ring of RobustnessAPPEAR: steel ringOBJ: OBJ_JEWELLERY/RING_PROTECTIONPLUS: +8COLOUR: LIGHTGREYNAME: ring of the MageAPPEAR: sapphire ringOBJ: OBJ_JEWELLERY/RING_WIZARDRYCOLOUR: LIGHTBLUEINT: 3MAGIC: 50NAME: brooch of ShieldingAPPEAR: shield-shaped amuletOBJ: OBJ_JEWELLERY/AMU_WARDINGCOLOUR: LIGHTBLUEAC: 4EV: 4DESC: A shield-shaped amulet.DESC_END: Back in the good old days, every adventurer had one of thesehandy devices. That, and a pony.# This entry must alway be last.ENUM: DUMMY2NAME: DUMMY UNRANDART 2APPEAR: DUMMY UNRANDART 2OBJ: OBJ_UNASSIGNED/250PLUS: 250/250COLOUR: BLACK
/** File: art-data.h* Summary: Definitions for unrandom artefacts.* Written by: ????** Modified for Crawl Reference by $Author$ on $Date$*//** This file is automatically generated from art-data.txt via* util/art-data.pl. Do not directly edit this file, but rather change* art-data.txt.** If the unrandart_entry struct is changed or a new artefact property is* added to artefact_prop_type, then change art-data.pl so that the* art-data.h file it produces matches up with the new structure.*/#ifdef ART_DATA_H#error "art-data.h included twice!"#endif#define ART_DATA_H/* 1: UNRAND_DUMMY1 */{"DUMMY UNRANDART 1", "DUMMY UNRANDART 1",OBJ_UNASSIGNED, 250, 250, 250, BLACK,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 2: UNRAND_SINGING_SWORD */{"Singing Sword", "golden long sword",OBJ_WEAPONS, WPN_LONG_SWORD, +7, +7, YELLOW,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","This blessed weapon loves nothing more than to sing to its owner, whether they want it to or not.","",},/* 3: UNRAND_TROG */{"Wrath of Trog", "bloodstained battleaxe",OBJ_WEAPONS, WPN_BATTLEAXE, +3, +11, RED,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","This was the favourite weapon of the old god Trog, before it was lost one day. It induces a bloodthirsty berserker rage in anyone who uses it to strike another.","",},/* 4: UNRAND_VARIABILITY */{"Mace of Variability", "shimmering mace",OBJ_WEAPONS, WPN_MACE, 0, 0, BLACK,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","It is rather unreliable.","",},/* 5: UNRAND_PRUNE */{"Glaive of Prune", "purple glaive",OBJ_WEAPONS, WPN_GLAIVE, 0, +12, MAGENTA,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","It is the creation of a mad god, and carries a curse which transforms anyone possessing it into a prune. Fortunately, the curse works very slowly, and one can use it briefly with no consequences worse than slightly purple skin and a few wrinkles.","",},/* 6: UNRAND_POWER */{"Sword of Power", "chunky great sword",OBJ_WEAPONS, WPN_GREAT_SWORD, 0, 0, RED,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","It rewards the powerful with power and the meek with weakness.","",},/* 7: UNRAND_OLGREB */{"Staff of Olgreb", "green glowing staff",OBJ_WEAPONS, WPN_QUARTERSTAFF, 0, 0, GREEN,{SPWPN_VENOM, 0, 0, 0, 0, 0,0, 0, 0, 1, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","It was the magical weapon wielded by the mighty wizard Olgreb before he met his fate somewhere within these dungeons. It increases the ability of its wielder to use venomous magic, and carries magical powers which can be evoked.","",},/* 8: UNRAND_WUCAD_MU */{"Staff of Wucad Mu", "ephemeral quarterstaff",OBJ_WEAPONS, WPN_QUARTERSTAFF, 0, 0, BROWN,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","Its power varies in proportion to its wielder's intelligence. Using it can be a bit risky.","",},/* 9: UNRAND_VAMPIRES_TOOTH */{"Vampire's Tooth", "ivory dagger",OBJ_WEAPONS, WPN_DAGGER, +3, +4, WHITE,{SPWPN_VAMPIRICISM, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","It is lethally vampiric.","",},/* 10: UNRAND_CURSES */{"Scythe of Curses", "warped scythe",OBJ_WEAPONS, WPN_SCYTHE, +13, +13, DARKGREY,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,-1, 0, 0,},"","This weapon carries a terrible and highly irritating curse.","",},/* 11: UNRAND_TORMENT */{"Sceptre of Torment", "jewelled golden mace",OBJ_WEAPONS, WPN_MACE, +7, +6, YELLOW,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","This truly accursed weapon is an instrument of Hell.","",},/* 12: UNRAND_ZONGULDROK */{"Sword of Zonguldrok", "bone long sword",OBJ_WEAPONS, WPN_LONG_SWORD, +9, +9, LIGHTGREY,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","This dreadful weapon is used at the user's peril.","",},/* 13: UNRAND_CEREBOV */{"Sword of Cerebov", "great serpentine sword",OBJ_WEAPONS, WPN_GREAT_SWORD, +6, +6, YELLOW,{SPWPN_FLAMING, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,-1, 0, 0,},"Eerie flames cover its twisted blade.","","",},/* 14: UNRAND_DISPATER */{"Staff of Dispater", "golden staff",OBJ_WEAPONS, WPN_QUARTERSTAFF, +4, +4, YELLOW,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","This legendary item can unleash the fury of Hell.","",},/* 15: UNRAND_ASMODEUS */{"Sceptre of Asmodeus", "ruby sceptre",OBJ_WEAPONS, WPN_QUARTERSTAFF, +7, +7, RED,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","It carries some of the powers of the arch-fiend Asmodeus.","",},/* 16: UNRAND_BLOODBANE */{"long sword \"Bloodbane\"", "blackened long sword",OBJ_WEAPONS, WPN_LONG_SWORD, +7, +8, DARKGREY,{SPWPN_VORPAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0,1, 0, 0, 0, 0,0, -20, 0,},"","","",},/* 17: UNRAND_FLAMING_DEATH */{"scimitar of Flaming Death", "smoking scimitar",OBJ_WEAPONS, WPN_SCIMITAR, +7, +5, RED,{SPWPN_FLAMING, 0, 0, 0, 0, 0,2, -1, 0, 1, 0, 20,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 18: UNRAND_BRILLIANCE */{"mace of Brilliance", "brightly glowing mace",OBJ_WEAPONS, WPN_MACE, +5, +5, WHITE,{SPWPN_HOLY_WRATH, 5, 0, 0, 5, 0,0, 0, 0, 0, 1, 0,1, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, -20, 0,},"","","",},/* 19: UNRAND_LEECH */{"demon blade \"Leech\"", "runed demon blade",OBJ_WEAPONS, WPN_DEMON_BLADE, +13, +4, MAGENTA,{SPWPN_VAMPIRICISM, 0, -1, -1, -1, -1,0, 0, 0, 0, 1, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,4, 0, 0,},"","","",},/* 20: UNRAND_CHILLY_DEATH */{"dagger of Chilly Death", "sapphire dagger",OBJ_WEAPONS, WPN_DAGGER, +5, +7, LIGHTBLUE,{SPWPN_FREEZING, 0, 0, 0, 0, 0,-1, 2, 0, 1, 0, 20,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A dagger made of one huge piece of sapphire.","","",},/* 21: UNRAND_MORG */{"dagger \"Morg\"", "rusty dagger",OBJ_WEAPONS, WPN_DAGGER, -1, +4, LIGHTRED,{SPWPN_PAIN, 0, 0, 0, 5, 0,0, 0, 0, 0, 0, 30,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"An ugly rusty dagger.","","Many years ago it was the property of a powerful mage called Boris. He got lost in the Dungeon while seeking the Orb.",},/* 22: UNRAND_FINISHER */{"scythe \"Finisher\"", "blackened scythe",OBJ_WEAPONS, WPN_SCYTHE, +3, +5, DARKGREY,{SPWPN_SPEED, 0, 0, 3, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,-1, 0, 0,},"A long and sharp scythe, specially modified for combat purposes.","","",},/* 23: UNRAND_PUNK */{"sling \"Punk\"", "blue sling",OBJ_WEAPONS, WPN_SLING, +9, +12, LIGHTBLUE,{SPWPN_FROST, 0, 0, 0, 0, 0,0, 1, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A sling made of weird blue leather.","","",},/* 24: UNRAND_KRISHNA */{"bow of Krishna \"Sharnga\"", "golden bow",OBJ_WEAPONS, WPN_BOW, +8, +8, YELLOW,{SPWPN_SPEED, 0, 0, 0, 0, 3,0, 0, 0, 0, 0, 0,1, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A wonderful golden bow.","","It once belonged to a foreign god. It works best with special arrows which are not generally available.",},/* 25: UNRAND_SKULLCRUSHER */{"giant club \"Skullcrusher\"", "brutal giant club",OBJ_WEAPONS, WPN_GIANT_CLUB, +0, +5, BROWN,{SPWPN_SPEED, 0, 0, 5, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 26: UNRAND_GUARD */{"glaive of the Guard", "polished glaive",OBJ_WEAPONS, WPN_GLAIVE, +5, +8, LIGHTCYAN,{SPWPN_ELECTROCUTION, 5, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,1, 0, 0, 0, 0, 1,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","This weapon once belonged to Gar Dogh, the guard of a king's treasures. According to legend he was lost somewhere in the Dungeon.",},/* 27: UNRAND_JIHAD */{"sword of Jihad", "crystal sword",OBJ_WEAPONS, WPN_LONG_SWORD, +12, +10, WHITE,{SPWPN_HOLY_WRATH, 0, 3, 0, 0, 0,0, 0, 0, 0, 1, 20,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,1, 0, 0, 0, 0,0, -50, 0,},"A long sword made of one huge piece of crystal.","","This sword was The Shining One's gift to a worshipper.",},/* 28: UNRAND_HELLFIRE */{"crossbow \"Hellfire\"", "flaming crossbow",OBJ_WEAPONS, WPN_CROSSBOW, +6, +9, LIGHTRED,{SPWPN_FLAME, 0, 0, 0, 0, 0,2, -1, 0, 0, 0, 40,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A flaming crossbow, forged in the fires of the Hells.","","",},/* 29: UNRAND_DOOM_KNIGHT */{"sword of the Doom Knight", "adamantine great sword",OBJ_WEAPONS, WPN_GREAT_SWORD, +13, +13, BLUE,{SPWPN_PAIN, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 50,0, 0, 0, 0, 0, 0,0, 0, 1, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"An adamantine great sword.","","",},/* 30: UNRAND_EOS */{"\"Eos\"", "encrusted morningstar",OBJ_WEAPONS, WPN_MORNINGSTAR, +5, +5, LIGHTCYAN,{SPWPN_ELECTROCUTION, 0, 0, 0, 0, 0,0, 0, 1, 0, 0, 0,1, 0, 0, 0, 0, 0,0, 0, 0, 0, 1,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 31: UNRAND_BOTONO */{"spear of the Botono", "ebony spear",OBJ_WEAPONS, WPN_SPEAR, +2, +10, DARKGREY,{SPWPN_VAMPIRICISM, 0, 0, 0, 0, 0,0, 0, 0, 1, 1, 0,0, 0, 0, 0, 0, 0,0, 1, 0, 0, 0,0, 0, 0, 0, 0,0, -30, 0,},"","","A really dark and malign artefact, which no wise man would even touch.",},/* 32: UNRAND_OCTOPUS_KING */{"trident of the Octopus King", "mangy trident",OBJ_WEAPONS, WPN_TRIDENT, +10, +4, CYAN,{SPWPN_VENOM, 0, 0, 0, 0, 0,0, 0, 1, 1, 0, 50,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","This trident was stolen many years ago from the Octopus King's garden by a really unimportant and already dead man. But beware of the Octopus King's wrath!",},/* 33: UNRAND_ARGA */{"mithril axe \"Arga\"", "mithril axe",OBJ_WEAPONS, WPN_WAR_AXE, +10, +6, WHITE,{SPWPN_SPEED, 0, 0, 2, 0, 0,0, 0, 0, 0, 0, 30,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A beautiful mithril axe, probably lost by some dwarven hero.","","",},/* 34: UNRAND_ELEMENTAL_STAFF */{"Elemental Staff", "black staff",OBJ_WEAPONS, WPN_QUARTERSTAFF, +3, +1, DARKGREY,{SPWPN_PROTECTION, 0, 0, 0, 0, 0,2, 2, 0, 0, 0, 60,0, 0, 0, 0, 0, 0,0, 1, 0, 0, 0,0, 2, 0, 0, 0,0, 0, 0,},"","","This powerful staff used to belong to the leader of the Guild of Five Elements.",},/* 35: UNRAND_SNIPER */{"hand crossbow \"Sniper\"", "black crossbow",OBJ_WEAPONS, WPN_HAND_CROSSBOW, +10, +0, DARKGREY,{SPWPN_VENOM, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,1, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A hand crossbow made of some black material.","","",},/* 36: UNRAND_PIERCER */{"longbow \"Piercer\"", "very long metal bow",OBJ_WEAPONS, WPN_LONGBOW, +2, +10, CYAN,{SPWPN_VORPAL, 0, -2, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"An exceptionally large metal longbow.","","",},/* 37: UNRAND_BLOWGUN_ASSASSIN */{"blowgun of the Assassin", "tiny blowgun",OBJ_WEAPONS, WPN_BLOWGUN, +6, +6, WHITE,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 1, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 60, 0,},"It is designed for easy concealment, but still packs a nasty punch.","","",},/* 38: UNRAND_WYRMBANE */{"Wyrmbane", "scale-covered lance",OBJ_WEAPONS, WPN_SPEAR, +9, +6, GREEN,{SPWPN_DRAGON_SLAYING, 5, 0, 0, 0, 0,1, 0, 0, 1, 0, 0,0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 39: UNRAND_SPRIGGANS_KNIFE */{"Spriggan's Knife", "dainty little knife",OBJ_WEAPONS, WPN_KNIFE, +4, +10, LIGHTCYAN,{SPWPN_NORMAL, 0, 4, 0, 0, 4,0, 0, 0, 0, 0, 20,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 50, 0,},"A dainty little knife.","","This knife was made by Spriggans, or for Spriggans, or possibly from Spriggans. Anyway, it's in some way associated with those fey folk.",},/* 40: UNRAND_PLUTONIUM_SWORD */{"plutonium sword", "glowing long sword",OBJ_WEAPONS, WPN_LONG_SWORD, +12, +16, LIGHTGREEN,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 6, 0, 0,1, -20, 0,},"A long sword made of weird glowing metal.","","",},/* 41: UNRAND_UNDEADHUNTER */{"great mace \"Undeadhunter\"", "great steel mace",OBJ_WEAPONS, WPN_GREAT_MACE, +7, +7, LIGHTGREY,{SPWPN_HOLY_WRATH, 0, 0, 0, 0, 0,0, 0, 0, 0, 1, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 42: UNRAND_SERPENT_SCOURGE */{"whip \"Serpent-Scourge\"", "forked whip",OBJ_WEAPONS, WPN_WHIP, +5, +10, DARKGREY,{SPWPN_VENOM, 0, 0, 0, 0, 0,0, 0, 0, 1, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","A double-ended whip made from the cured hides of the Lair of Beasts' deadly grey snakes.","",},/* 43: UNRAND_ACCURACY */{"knife of Accuracy", "thin dagger",OBJ_WEAPONS, WPN_DAGGER, +27, -1, LIGHTCYAN,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","It is almost unerringly accurate.",},/* 44: UNRAND_CRYSTAL_SPEAR */{"Lehudib's crystal spear", "crystal spear",OBJ_WEAPONS, WPN_SPEAR, +6, +6, GREEN,{SPWPN_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","Presumably this relic led to the invention of the famous spell.",},/* 45: UNRAND_IGNORANCE */{"shield of Ignorance", "dull large shield",OBJ_ARMOUR, ARM_LARGE_SHIELD, +5, 0, BROWN,{SPARM_NORMAL, 2, 2, 0, -6, 0,0, 0, 0, 0, 1, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,3, 0, 0,},"","","",},/* 46: UNRAND_AUGMENTATION */{"robe of Augmentation", "silk robe",OBJ_ARMOUR, ARM_ROBE, +4, 0, LIGHTRED,{SPARM_NORMAL, 0, 0, 2, 2, 2,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A robe made of the finest silk.","","",},/* 47: UNRAND_THIEF */{"cloak of the Thief", "tattered cloak",OBJ_ARMOUR, ARM_CLOAK, +1, 0, DARKGREY,{SPARM_NORMAL, 0, 2, 0, 0, 2,0, 0, 0, 0, 0, 0,1, 1, 1, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, -3,0, 60, 0,},"","","It allows its wearer to excel in the arts of thievery.",},/* 48: UNRAND_BULLSEYE */{"shield \"Bullseye\"", "round shield",OBJ_ARMOUR, ARM_SHIELD, +10, 0, RED,{SPARM_NORMAL, 0, -5, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 49: UNRAND_DYROVEPREVA */{"crown of Dyrovepreva", "jewelled bronze crown",OBJ_ARMOUR, ARM_CAP, +3, 0, BROWN,{SPARM_NORMAL, 0, 0, 0, 2, 0,0, 0, 1, 0, 0, 0,1, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 1, 0, 0, 0,0, 0, 0,},"A large crown of dull bronze, set with a dazzling array of gemstones.","","",},/* 50: UNRAND_MISFORTUNE */{"robe of Misfortune", "fabulously ornate robe",OBJ_ARMOUR, ARM_ROBE, -5, 0, MAGENTA,{SPARM_NORMAL, 0, -4, -2, -2, -2,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 1, 0,0, 0, 5, 0, 0,1, -80, 0,},"A splendid flowing robe of fur and silk.","","",},/* 51: UNRAND_FLASH */{"cloak of Flash", "vibrating cloak",OBJ_ARMOUR, ARM_CLOAK, +3, 0, RED,{SPARM_NORMAL, 0, 4, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A vibrating cloak.","","",},/* 52: UNRAND_BOOTS_ASSASSIN */{"boots of the Assassin", "soft boots",OBJ_ARMOUR, ARM_BOOTS, +2, 0, BROWN,{SPARM_NORMAL, 0, 0, 0, 0, 3,0, 0, 0, 0, 0, 0,0, 1, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 80, 0,},"Some soft boots.","","These boots were specially designed by the Assassin's Guild.",},/* 53: UNRAND_LEARS */{"Lear's chain mail", "golden chain mail",OBJ_ARMOUR, ARM_CHAIN_MAIL, -1, 0, YELLOW,{SPARM_NORMAL, 0, 0, 0, 0, -3,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 0, 0,0, 0, 0, 0, 0,-1, 0, 0,},"A chain mail made of pure gold.","","",},/* 54: UNRAND_ZHOR */{"skin of Zhor", "smelly skin",OBJ_ARMOUR, ARM_ANIMAL_SKIN, +4, 0, BROWN,{SPARM_NORMAL, 0, 0, 0, 0, 0,0, 2, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"The skin of some strange animal.","","",},/* 55: UNRAND_SALAMANDER */{"salamander hide armour", "red leather armour",OBJ_ARMOUR, ARM_LEATHER_ARMOUR, +3, 0, RED,{SPARM_NORMAL, 0, 0, 0, 0, 0,2, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A leather armour made of a salamander's skin.","","",},/* 56: UNRAND_WAR */{"gauntlets of War", "thick gauntlets",OBJ_ARMOUR, ARM_GLOVES, +3, 0, BROWN,{SPARM_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 3, 3,0, 0, 0,},"","","",},/* 57: UNRAND_RESISTANCE */{"shield of Resistance", "bronze shield",OBJ_ARMOUR, ARM_SHIELD, +3, 0, LIGHTRED,{SPARM_NORMAL, 0, 0, 0, 0, 0,1, 1, 0, 0, 0, 40,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A bronze shield.","","",},/* 58: UNRAND_FOLLY */{"robe of Folly", "dull robe",OBJ_ARMOUR, ARM_ROBE, -1, 0, LIGHTGREY,{SPARM_NORMAL, 0, 0, 0, -5, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 0, 0,0, 0, 0, 0, 0,2, 0, 0,},"A dull grey robe.","","",},/* 59: UNRAND_MAXWELL */{"Maxwell's patent armour", "weird-looking armour",OBJ_ARMOUR, ARM_PLATE_MAIL, +10, 0, LIGHTGREEN,{SPARM_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 1, 0, 1,0, 0, 0, 0, 0,-1, 0, 0,},"A weird-looking armour.","","",},/* 60: UNRAND_DRAGON */{"mask of the Dragon", "blue mask",OBJ_ARMOUR, ARM_CAP, 0, 0, BLUE,{SPARM_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 40,1, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 2, 2,0, 0, 0,},"A blue mask.","","",},/* 61: UNRAND_NIGHT */{"robe of Night", "black robe",OBJ_ARMOUR, ARM_ROBE, +4, 0, DARKGREY,{SPARM_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 30,1, 1, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 50, 0,},"A long black robe made of strange glossy material.","","According to legend, this robe was the gift of Ratri the Goddess of the Night to one of her followers.",},/* 62: UNRAND_DRAGON_KING */{"armour of the Dragon King", "shiny dragon armour",OBJ_ARMOUR, ARM_GOLD_DRAGON_ARMOUR, +5, 0, YELLOW,{SPARM_NORMAL, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 50,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 63: UNRAND_ALCHEMIST */{"hat of the Alchemist", "dirty hat",OBJ_ARMOUR, ARM_WIZARD_HAT, +2, 0, MAGENTA,{SPARM_NORMAL, 0, 0, 0, 0, 0,1, 1, 1, 0, 0, 30,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A dirty hat.","","",},/* 64: UNRAND_FENCERS_GLOVES */{"Fencer's gloves", "silk gloves",OBJ_ARMOUR, ARM_GLOVES, +2, 0, WHITE,{SPARM_NORMAL, 0, 3, 0, 0, 3,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 5, 0,0, 0, 0,},"A pair of gloves made of white silk.","","",},/* 65: UNRAND_STARLIGHT */{"cloak of Starlight", "phosphorescent cloak",OBJ_ARMOUR, ARM_CLOAK, 0, 0, WHITE,{SPARM_NORMAL, 0, 4, 0, 0, 0,0, 1, 1, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, -30, 0,},"A phosphorescent cloak.","","A cloak woven of pure light beams.",},/* 66: UNRAND_RATSKIN_CLOAK */{"ratskin cloak", "motley cloak",OBJ_ARMOUR, ARM_CLOAK, +1, 0, LIGHTRED,{SPARM_NORMAL, 0, 0, 0, -1, -1,0, 0, 0, 1, 1, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","An enchantress with a magic loom and way too much time on her hands stitched this cloak from the hides of hundreds of rats, most of them orange. It's a bit awkward to wear and looks rather foolish, but it provides excellent protection from rats of all kinds.",},/* 67: UNRAND_AIR */{"amulet of the Air", "sky-blue amulet",OBJ_JEWELLERY, AMU_CONTROLLED_FLIGHT, 0, 0, LIGHTCYAN,{0, 0, 3, 0, 0, 0,0, 0, 1, 0, 0, 0,0, 0, 1, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 50, 0,},"A sky-blue amulet.","","",},/* 68: UNRAND_SHADOWS */{"ring of Shadows", "black ring",OBJ_JEWELLERY, RING_INVISIBILITY, 0, 0, DARKGREY,{0, 0, 4, 0, 0, 0,0, 0, 0, 0, 1, 0,1, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, -3, 0,0, 40, 0,},"","","",},/* 69: UNRAND_CEKUGOB */{"amulet of Cekugob", "crystal amulet",OBJ_JEWELLERY, AMU_WARDING, 0, 0, LIGHTGREY,{0, 1, 1, 0, 0, 0,0, 0, 1, 1, 1, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 1,0, 2, 0, 0, 0,0, 0, 0,},"","","",},/* 70: UNRAND_FOUR_WINDS */{"amulet of the Four Winds", "jade amulet",OBJ_JEWELLERY, AMU_CLARITY, 0, 0, LIGHTGREEN,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 1, 100,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 71: UNRAND_BLOODLUST */{"necklace of Bloodlust", "blood-stained necklace",OBJ_JEWELLERY, AMU_RAGE, 0, 0, RED,{0, 0, 0, 2, -2, 0,0, 0, 0, 0, 0, 30,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,1, 0, 0, 0, 3,3, -20, 0,},"","","",},/* 72: UNRAND_SHAOLIN */{"ring of Shaolin", "jade ring",OBJ_JEWELLERY, RING_EVASION, +8, 0, LIGHTGREEN,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 73: UNRAND_ROBUSTNESS */{"ring of Robustness", "steel ring",OBJ_JEWELLERY, RING_PROTECTION, +8, 0, LIGHTGREY,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 74: UNRAND_MAGE */{"ring of the Mage", "sapphire ring",OBJ_JEWELLERY, RING_WIZARDRY, 0, 0, LIGHTBLUE,{0, 0, 0, 0, 3, 0,0, 0, 0, 0, 0, 50,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},/* 75: UNRAND_SHIELDING */{"brooch of Shielding", "shield-shaped amulet",OBJ_JEWELLERY, AMU_WARDING, 0, 0, LIGHTBLUE,{0, 4, 4, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"A shield-shaped amulet.","","Back in the good old days, every adventurer had one of these handy devices. That, and a pony.",},/* 76: UNRAND_DUMMY2 */{"DUMMY UNRANDART 2", "DUMMY UNRANDART 2",OBJ_UNASSIGNED, 250, 250, 250, BLACK,{0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0,},"","","",},
// Make sure there's enough room in you.unique_items to hold all// the unrandarts.COMPILE_CHECK(NO_UNRANDARTS < MAX_UNRANDARTS, c8);// Non-artefact brands and unrandart indexes both go into// item.special, so make sure they don't overlap.COMPILE_CHECK((int) NUM_SPECIAL_WEAPONS < (int) UNRAND_START, c9);
* "fixed:item_name" will make a given fixedart by a given name,like "long sword fixed:singing_sword". If the unique alreadyexists, the base item will be given instead.
* "unrand:item_name" will make a given unrandom by a given name,like "long sword fixed:singing_sword". Omit any apostrophesin the name (e.g, fixed:vampires_tooth). If the name hassomething between double quotes then use that string (e.g,fixed:bloodbane). If the unique already exists, the base itemwill be given instead.