#include #include #include /* TYPDEFS */ typedef signed char sbyte; typedef signed short int sword; typedef signed long int slong; typedef unsigned char ubyte; typedef unsigned short int uword; typedef unsigned long int ulong; typedef unsigned char bool; typedef signed long int lbool; typedef struct artefact_T { struct artefact_T *artefact_next; struct artefact_T *artefact_prev; ulong artefact_gold; uword artefact_number; uword artefact_class; uword artefact_type; slong artefact_stat_mod; uword artefact_level; uword artefact_rarity; uword artefact_weight; uword artefact_base_ac; uword artefact_base_damage; slong artefact_to_hit; slong artefact_to_damage; slong artefact_to_ac; uword artefact_idx; uword artefact_num_powers; uword artefact_extra_damage; slong artefact_flags1; slong artefact_flags2; char artefact_name[64]; } artefact; typedef struct { uword a_number; uword a_class; uword a_type; uword a_level; uword a_rarity; uword a_weight; uword a_base_ac; slong a_to_hit; slong a_to_damage; slong a_to_ac; slong a_flags; } artefact_init; #define STR 0 #define INT 1 #define WIS 2 #define DEX 3 #define CON 4 #define CHR 5 #define STEALTH 6 #define SEARCH 7 #define INFRA 8 #define SPEED 9 #define CURSED 10 #define HEAVY_CURSE 11 #define LITE 12 #define SEE_INVIS 13 #define TELEPATHY 14 #define SLOW_DIGEST 15 #define REGEN 16 #define AGGRAVATE 17 #define SUST_STR 18 #define SUST_INT 19 #define SUST_WIS 20 #define SUST_DEX 21 #define SUST_CON 22 #define SUST_CHR 23 #define FREE_ACT 24 #define BLESSED 25 #define TUNNEL 26 #define BRAND_ACID 27 #define BRAND_ELEC 28 #define BRAND_FIRE 29 #define BRAND_COLD 30 #define BLOWS 31 #define IM_ACID 0 #define IM_ELEC 1 #define IM_FIRE 2 #define IM_COLD 3 #define HOLD_LIFE 4 #define RES_ACID 5 #define RES_ELEC 6 #define RES_FIRE 7 #define RES_COLD 8 #define RES_POIS 9 #define RES_LITE 10 #define RES_DARK 11 #define RES_BLIND 12 #define RES_CONF 13 #define RES_SOUND 14 #define RES_SHARDS 15 #define RES_NETHER 16 #define RES_NEXUS 17 #define RES_CHAOS 18 #define RES_DISEN 19 #define HIDE_TYPE 20 #define SHOW_MODS 21 #define FEATHER 22 #define SLAY_ANIMAL 23 #define SLAY_EVIL 24 #define SLAY_UNDEAD 25 #define SLAY_DEMON 26 #define SLAY_ORC 27 #define SLAY_TROLL 28 #define SLAY_GIANT 29 #define SLAY_DRAGON 30 #define KILL_DRAGON 31 /* Lites */ #define ART_GALADRIEL 1 #define ART_ELENDIL 2 #define ART_THRAIN 3 /* Amulets */ #define ART_CARLAMMAS 4 #define ART_INGWE 5 #define ART_DWARVES 6 /* Rings */ #define ART_BARAHIR 8 #define ART_TULKAS 9 #define ART_NARYA 10 #define ART_NENYA 11 #define ART_VILYA 12 #define ART_POWER 13 /* Dragon Scale */ #define ART_RAZORBACK 16 #define ART_BLADETURNER 17 /* Hard Armour */ #define ART_SOULKEEPER 19 #define ART_ISILDUR 20 #define ART_ROHIRRIM 21 #define ART_BELEGENNON 22 #define ART_CELEBORN 23 #define ART_ARVEDUI 24 #define ART_CASPANION 25 /* Soft Armour */ #define ART_HITHLOMIR 27 #define ART_THALKETTOTH 28 /* Shields */ #define ART_THORIN 30 #define ART_CELEGORM 31 #define ART_ANARION 32 /* Helms and Crowns */ #define ART_MORGOTH 34 #define ART_BERUTHIEL 35 #define ART_THRANDUIL 36 #define ART_THENGEL 37 #define ART_HAMMERHAND 38 #define ART_DOR 39 #define ART_HOLHENNETH 40 #define ART_GORLIM 41 #define ART_GONDOR 42 /* Cloaks */ #define ART_COLLUIN 44 #define ART_HOLCOLLETH 45 #define ART_THINGOL 46 #define ART_THORONGIL 47 #define ART_COLANNON 48 #define ART_LUTHIEN 49 #define ART_TUOR 50 /* Gloves */ #define ART_CAMBELEG 52 #define ART_CAMMITHRIM 53 #define ART_PAURHACH 54 #define ART_PAURNIMMEN 55 #define ART_PAURAEGEN 56 #define ART_PAURNEN 57 #define ART_CAMLOST 58 #define ART_FINGOLFIN 59 /* Boots */ #define ART_FEANOR 60 #define ART_DAL 61 #define ART_THROR 62 /* Swords */ #define ART_MAEDHROS 64 #define ART_ANGRIST 65 #define ART_NARTHANC 66 #define ART_NIMTHANC 67 #define ART_DETHANC 68 #define ART_RILIA 69 #define ART_BELANGIL 70 #define ART_CALRIS 71 #define ART_ARUNRUTH 72 #define ART_GLAMDRING 73 #define ART_AEGLIN 74 #define ART_ORCRIST 75 #define ART_GURTHANG 76 #define ART_ZARCUTHRA 77 #define ART_MORMEGIL 78 #define ART_GONDRICAM 79 #define ART_CRISDURIAN 80 #define ART_AGLARANG 81 #define ART_RINGIL 82 #define ART_ANDURIL 83 #define ART_ANGUIREL 84 #define ART_ELVAGIL 85 #define ART_FORASGIL 86 #define ART_CARETH 87 #define ART_STING 88 #define ART_HARADEKKET 89 #define ART_GILETTAR 90 #define ART_DOOMCALLER 91 /* Polearms */ #define ART_THEODEN 93 #define ART_PAIN 94 #define ART_OSONDIR 95 #define ART_TIL 96 #define ART_AEGLOS 97 #define ART_OROME 98 #define ART_NIMLOTH 99 #define ART_EORLINGAS 100 #define ART_DURIN 101 #define ART_EONWE 102 #define ART_BALLI 103 #define ART_LOTHARANG 104 #define ART_MUNDWINE 105 #define ART_BARUKKHELED 106 #define ART_WRATH 107 #define ART_ULMO 108 #define ART_AVAVIR 109 /* Hafted */ #define ART_GROND 111 #define ART_TOTILA 112 #define ART_THUNDERFIST 113 #define ART_BLOODSPIKE 114 #define ART_FIRESTAR 115 #define ART_TARATOL 116 #define ART_AULE 117 #define ART_NAR 118 #define ART_ERIRIL 119 #define ART_OLORIN 120 #define ART_DEATHWREAKER 121 #define ART_TURMIL 122 /* Bows */ #define ART_BELTHRONDING 124 #define ART_BARD 125 #define ART_CUBRAGOL 126 #define ART_MAX 113 extern char *valar_names[]; extern artefact_init *artefact_ptrs[]; extern char *artefact_damages[]; extern char *artefact_names[]; extern char *flags2_name[]; extern char *flags1_name[]; extern artefact *alloc_artefact(); extern void save_artefact(void); extern void init_file(void); extern void init_random(uword seed); extern uword ranged_random_num(uword min_number,uword max_number); extern void insert_mods(uword level,ulong power,uword number,uword stat_mod1,uword stat_mod2,uword low_power); extern uword random_range(uword start, uword end); extern void init_artefacts(void); extern void print_artefacts(void); extern void activate_artefacts(void); extern void insert_curse(uword level,uword stat1,uword stat2,uword stat3,uword stat4,char *name); extern void insert_powers(uword level,ulong power,uword min_number,uword max_number,uword flags); extern void insert_resists(uword level,ulong power,uword min_number,uword max_number,uword flags);