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YLKHRJRB2A3STQ42ALSRGQICEWKD2QTEQC BMHUBADDGIOZRVN4P3O5QKIDUYD4RFWBS7MP5X6LZWAYHUBRVD2QC AVCMVFA3MKCXHO6H44UK5KJNIHTGQV7UA7GYXM26VI6TXXU5ZN6QC 5BJPWUPLJFS34FUTFJVKA4A52YMIGV6EWDXLNSDCWBJWBGVSQFGQC ED62QWGKBPORWVKDFOQRKJXEIWZVNGR3O4KWQBDSRNPT36AYOQYAC 3XZOL3FFQZITUJIGDD6B6V6ZYMBN524JKNN6ZPJAXEC7RY433I3QC KKROXTUPBNEXXEUUDJNADATK3BCQPSQWFZ6L4VTKBPTYXJLYUHDQC TFZ4TER7O2Z4FOGF2RCPEPYIHBTUA4LG3ECXLR7XGLCC6GO6OOTAC 6HG6JFO47Y3BZLU7Y6G3R2CX6JFGN4X5PKK6S5IGUXUYQ5GVZYFQC (you.piety > 145) ? "A favourite toy of Xom." :(you.piety > 130) ? "A very special toy of Xom." :(you.piety > 115) ? "A special toy of Xom." :(you.piety > 100) ? "A toy of Xom." :(you.piety > 85) ? "A plaything of Xom." :(you.piety > 70) ? "A special plaything of Xom." :(you.piety > 55) ? "A very special plaything of Xom." :(you.piety > 40) ? "A favourite plaything of Xom." :"A beloved plaything of Xom.";
(you.piety > 145) ? "A favourite toy of Xom." :(you.piety > 130) ? "A very special toy of Xom." :(you.piety > 115) ? "A special toy of Xom." :(you.piety > 100) ? "A toy of Xom." :(you.piety > 85) ? "A plaything of Xom." :(you.piety > 70) ? "A special plaything of Xom." :(you.piety > 55) ? "A very special plaything of Xom." :(you.piety > 40) ? "A favourite plaything of Xom." :"A beloved plaything of Xom.";
/* ************************************************************************ called from: itemname* *********************************************************************** */std::string randart_armour_name( const item_def &item );
* called from: itemname* *********************************************************************** */std::string randart_jewellery_name( const item_def &item );/* ***********************************************************************
static const char *rand_wpn_names[] = {" of Blood"," of Death"," of Bloody Death"," of Pain"," of Painful Death"," of Pain & Death"," of Infinite Pain"," of Eternal Torment"," of Power"," of Wrath",/* 10: */" of Doom"," of Tender Mercy"," of the Apocalypse"," of the Jester"," of the Ring"," of the Fool"," of the Gods"," of the Imperium"," of Destruction"," of Armageddon",/* 20: */" of Cruel Justice"," of Righteous Anger"," of Might"," of the Orb"," of Makhleb"," of Trog"," of Xom"," of the Ancients"," of Mana"," of Nemelex Xobeh",/* 30: */" of the Magi"," of the Archmagi"," of the King"," of the Queen"," of the Spheres"," of Circularity"," of Linearity"," of Conflict"," of Battle"," of Honour",/* 40: */" of the Butterfly"," of the Wasp"," of the Frog"," of the Weasel"," of the Troglodytes"," of the Pill-Bug"," of Sin"," of Vengeance"," of Execution"," of Arbitration",/* 50: */" of the Seeker"," of Truth"," of Lies"," of the Eggplant"," of the Turnip"," of Chance"," of Curses"," of Hell's Wrath"," of the Undead"," of Chaos",/* 60: */" of Law"," of Life"," of the Old World"," of the New World"," of the Middle World"," of Crawl"," of Unpleasantness"," of Discomfort"," of Brutal Revenge"," of Triumph",/* 70: */" of Evisceration"," of Dismemberment"," of Terror"," of Fear"," of Pride"," of the Volcano"," of Blood-Lust"," of Division"," of Eternal Harmony"," of Peace",/* 80: */" of Quick Death"," of Instant Death"," of Misery"," of the Whale"," of the Lobster"," of the Whelk"," of the Penguin"," of the Puffin"," of the Mushroom"," of the Toadstool",/* 90: */" of the Little People"," of the Puffball"," of Spores"," of Optimality"," of Pareto-Optimality"," of Greatest Utility"," of Anarcho-Capitalism"," of Ancient Evil"," of the Revolution"," of the People",/* 100: */" of the Elves"," of the Dwarves"," of the Orcs"," of the Humans"," of Sludge"," of the Naga"," of the Trolls"," of the Ogres"," of Equitable Redistribution"," of Wealth",/* 110: */" of Poverty"," of Reapportionment"," of Fragile Peace"," of Reinforcement"," of Beauty"," of the Slug"," of the Snail"," of the Gastropod"," of Corporal Punishment"," of Capital Punishment",/* 120: */" of the Beast"," of Light"," of Darkness"," of Day"," of the Day"," of Night"," of the Night"," of Twilight"," of the Twilight"," of Dawn",/* 130: */" of the Dawn"," of the Sun"," of the Moon"," of Distant Worlds"," of the Unseen Realm"," of Pandemonium"," of the Abyss"," of the Nexus"," of the Gulag"," of the Crusades",/* 140: */" of Proximity"," of Wounding"," of Peril"," of the Eternal Warrior"," of the Eternal War"," of Evil"," of Pounding"," of Oozing Pus"," of Pestilence"," of Plague",/* 150: */" of Negation"," of the Saviour"," of Infection"," of Defence"," of Protection"," of Defence by Offence"," of Expedience"," of Reason"," of Unreason"," of the Heart",/* 160: */" of Offence"," of the Leaf"," of Leaves"," of Winter"," of Summer"," of Autumn"," of Spring"," of Midsummer"," of Midwinter"," of Eternal Night",/* 170: */" of Shrieking Terror"," of the Lurker"," of the Crawling Thing"," of the Thing"," \"Thing\""," of the Sea"," of the Forest"," of the Trees"," of Earth"," of the World",/* 180: */" of Bread"," of Yeast"," of the Amoeba"," of Deformation"," of Guilt"," of Innocence"," of Ascent"," of Descent"," of Music"," of Brilliance",/* 190: */" of Disgust"," of Feasting"," of Sunlight"," of Starshine"," of the Stars"," of Dust"," of the Clouds"," of the Sky"," of Ash"," of Slime",/* 200: */" of Clarity"," of Eternal Vigilance"," of Purpose"," of the Moth"," of the Goat"," of Fortitude"," of Equivalence"," of Balance"," of Unbalance"," of Harmony",/* 210: */" of Disharmony"," of the Inferno"," of the Omega Point"," of Inflation"," of Deflation"," of Supply"," of Demand"," of Gross Domestic Product"," of Unjust Enrichment"," of Detinue",/* 220: */" of Conversion"," of Anton Piller"," of Mandamus"," of Frustration"," of Breach"," of Fundamental Breach"," of Termination"," of Extermination"," of Satisfaction"," of Res Nullius",/* 230: */" of Fee Simple"," of Terra Nullius"," of Context"," of Prescription"," of Freehold"," of Tortfeasance"," of Omission"," of Negligence"," of Pains"," of Attainder",/* 240: */" of Action"," of Inaction"," of Truncation"," of Defenestration"," of Desertification"," of the Wilderness"," of Psychosis"," of Neurosis"," of Fixation"," of the Open Hand",/* 250: */" of the Tooth"," of Honesty"," of Dishonesty"," of Divine Compulsion"," of the Invisible Hand"," of Freedom"," of Liberty"," of Servitude"," of Domination"," of Tension",/* 260: */" of Monotheism"," of Atheism"," of Agnosticism"," of Existentialism"," of the Good"," of Relativism"," of Absolutism"," of Absolution"," of Abstinence"," of Abomination",/* 270: */" of Mutilation"," of Stasis"," of Wonder"," of Dullness"," of Dim Light"," of the Shining Light"," of Immorality"," of Amorality"," of Precise Incision"," of Orthodoxy",/* 280: */" of Faith"," of Untruth"," of the Augurer"," of the Water Diviner"," of the Soothsayer"," of Punishment"," of Amelioration"," of Sulphur"," of the Egg"," of the Globe",/* 290: */" of the Candle"," of the Candelabrum"," of the Vampires"," of the Orcs"," of the Halflings"," of World's End"," of Blue Skies"," of Red Skies"," of Orange Skies"," of Purple Skies",/* 300: */" of Articulation"," of the Mind"," of the Spider"," of the Lamprey"," of the Beginning"," of the End"," of Severance"," of Sequestration"," of Mourning"," of Death's Door",/* 310: */" of the Key"," of Earthquakes"," of Failure"," of Success"," of Intimidation"," of the Mosquito"," of the Gnat"," of the Blowfly"," of the Turtle"," of the Tortoise",/* 320: */" of the Pit"," of the Grave"," of Submission"," of Dominance"," of the Messenger"," of Crystal"," of Gravity"," of Levity"," of the Slorg"," of Surprise",/* 330: */" of the Maze"," of the Labyrinth"," of Divine Intervention"," of Rotation"," of the Spinneret"," of the Scorpion"," of Demonkind"," of the Genius"," of Bloodstone"," of Grontol",/* 340: */" \"Grim Tooth\""," \"Widowmaker\""," \"Widowermaker\""," \"Lifebane\""," \"Conservator\""," \"Banisher\""," \"Tormentor\""," \"Secret Weapon\""," \"String\""," \"Stringbean\"",/* 350: */" \"Blob\""," \"Globulus\""," \"Hulk\""," \"Raisin\""," \"Starlight\""," \"Giant's Toothpick\""," \"Pendulum\""," \"Backscratcher\""," \"Brush\""," \"Murmur\"",/* 360: */" \"Sarcophage\""," \"Concordance\""," \"Dragon's Tongue\""," \"Arbiter\""," \"Gram\""," \"Grom\""," \"Grim\""," \"Grum\""," \"Rummage\""," \"Omelette\"",/* 370: */" \"Egg\""," \"Aubergine\""," \"Z\""," \"X\""," \"Q\""," \"Ox\""," \"Death Rattle\""," \"Tattletale\""," \"Fish\""," \"Bung\"",/* 380: */" \"Arcanum\""," \"Mud Pie of Death\""," \"Transmigrator\""," \"Ultimatum\""," \"Earthworm\""," \"Worm\""," \"Worm's Wrath\""," \"Xom's Favour\""," \"Bingo\""," \"Leviticus\"",/* 390: */" of Joyful Slaughter"
static bool god_fits_artefact(const god_type which_god, const item_def &item){if (which_god == GOD_NO_GOD)return (false);const int brand = get_weapon_brand(item);if (is_evil_god(which_god) && brand == SPWPN_HOLY_WRATH)return (false);else if (is_good_god(which_god) && (brand == SPWPN_DRAINING|| brand == SPWPN_PAIN || brand == SPWPN_VAMPIRICISM)){return (false);}switch (which_god){case GOD_BEOGH:if (brand == SPWPN_ORC_SLAYING)return (false);break;case GOD_ELYVILON: // peaceful healer god, no weapons, no berserkingif (item.base_type == OBJ_WEAPONS)return (false);if (item.base_type == OBJ_JEWELLERY && item.sub_type == AMU_RAGE)return (false);if (randart_wpn_property( item, RAP_ANGRY )|| randart_wpn_property( item, RAP_BERSERK )){return (false);}break;case GOD_OKAWARU: // precision fighterif (item.base_type == OBJ_JEWELLERY && item.sub_type == AMU_INACCURACY)return (false);break;case GOD_ZIN:if (item.base_type == OBJ_JEWELLERY && item.sub_type == RING_HUNGER)return (false); // goes against food themeif (randart_wpn_property( item, RAP_MUTAGENIC ))return (false); // goes against anti-mutagenic themebreak;
// Lemuel's new names" \"Eviscerator\""," \"Undertaker\""," \"Embalmer\""," of Sudden Death"," of Slow Death"," of Certain Death"," of Uncertain Death"," \"Trog's Wrath\""," \"Ogre's Foe\""," \"Dragon's Doom\""," \"Hellblazer\""," \"Hell-Harrower\""," of Hacking and Slashing"," of Anger"," of Fury"," of Righteous Fury"," of the Warrior"," of the Doomed Warrior"," of the Warrior-Mage",
case GOD_SIF_MUNA:case GOD_KIKUBAAQUDGHA:case GOD_VEHUMET:if (randart_wpn_property( item, RAP_PREVENT_SPELLCASTING))return (false);break;
// from the crawl.akrasiac.org patch" of the Alphagorgon"," \"Cookie Cutter\"",
case GOD_TROG: // hates anything enhancing magicif (item.base_type == OBJ_JEWELLERY && (item.sub_type == RING_WIZARDRY|| item.sub_type == RING_FIRE || item.sub_type == RING_ICE|| item.sub_type == RING_MAGICAL_POWER)){return (false);}if (brand == SPWPN_PAIN) // involves magicreturn (false);if (randart_wpn_property( item, RAP_MAGICAL_POWER))return (false);
" of the Nine Deaths"," of Megalomania"," of Egomania"," of Pyrrhic Victory"," of Irrepressible Laughter"," of Impeachment",};
default:break;}return (true);}
static const char *rand_armour_names[] = {/* 0: */" of Shielding"," of Grace"," of Impermeability"," of the Onion"," of Life"," of Defence"," of Nonsense"," of Eternal Vigilance"," of Fun"," of Joy"," of Death's Door"," of the Gate"," of Watchfulness"," of Integrity"," of Bodily Harmony"," of Harmony"," of the Untouchables"," of Grot"," of Grottiness"," of Filth"," of Wonder"," of Wondrous Power"," of Power"," of Vlad"," of the Eternal Fruit"," of Invincibility"," of Hide-and-Seek"," of the Mouse"," of the Saviour"," of Plasticity"," of Baldness"," of Terror"," of the Arcane"," of Resist Death"," of Anaesthesia"," of the Guardian"," of Inviolability"," of the Tortoise"," of the Turtle"," of the Armadillo"," of the Echidna"," of the Armoured One"," of Weirdness"," of Pathos"," of Serendipity"," of Loss"," of Hedging"," of Indemnity"," of Limitation"," of Exclusion"," of Repulsion"," of Untold Secrets"," of the Earth"," of the Turtledove"," of Limited Liability"," of Responsibility"," of Hadjma"," of Glory"," of Preservation"," of Conservation"," of Protective Custody"," of the Clam"," of the Barnacle"," of the Lobster"," of Hairiness"," of Supple Strength"," of Space"," of the Vacuum"," of Compression"," of Decompression"," of the Loofah",
static std::string replace_name_parts(const std::string name_in,const item_def item){std::string name = name_in;// maybe god gift?god_type god_gift = GOD_NO_GOD;if (item.orig_monnum < 0){int help = -item.orig_monnum - 2;if (help > GOD_NO_GOD && help < NUM_GODS)god_gift = static_cast<god_type>(help);}
// Lemuel's new names" of the Sun"," of the Moon"," of the Stars"," of the Planets"," of the Pleiades"," of the Morning Star"," of the Evening Star"," of the Seven Stars"," of the Seventy-Seven Stars"," of Departure"," of Arrival"," of Change"," of Stasis"," of Doubt"," of Uncertainty"," of the Elephant"," of the Donkey"," of the Zebra"," of the Hippo"," of the Giraffe"," of the Monkey"," of the Monkey's Uncle"," of Shadows and Fog"," of Love and Death"," of Crimes and Misdemeanours"," of Courage"," of Cowardice"," of Valour"," of the Extremes"," of the Middle"," of the Median"," of Optimism"," of Pessimism"," of the Man with No Name"," of Crawling"," of Zot"," of the Orb"," of the Orb Guardian"," of the Dragon"," of the Komodo Dragon"," of the Swamp"," of the Islands"," of the Lair"," of the Beasts"," of the Vault"," of the Hive"," of the Beekeeper"," of the Garden"," of the Gardener"," of the Assistant Gardener"," of War"," of Peace"," of Xom"," of Xom's Laughter"," of Xom's Questionable Humour"," of Zin's Displeasure"," of the Gods"," of Atheism"," of Agnosticism"," of Heresy"," of the Nightingale"," of the Meadowlark"," of Analysis"," of the Ego"," of the Id"," of the Empty Set"," with No Name"," with an Unpronounceable Name"," with a Strange-Sounding Name"," of Trumpets"," of the Kettle-Drum"," of the Accordion"," of the Hangman"," of the Hanged Man"," of Insatiable Hunger"," of the Devil"," of Demons"," of Lesser Demons"," of Greater Demons"," of the Iron Devil"," of Terror"," of Annoyance"," of Minor Irritation"," of Boredom"," of Ennui"," of the Springtime"," of Midsummer"," of the Harvest"," of First Snow"," of Boiling Hail"," of Perpetual Drought"," of the Poles"," of the Tropics"," of the Equator"," of the Flat Earth"," of Premature Burial"," of False Imprisonment"," of Moderation"," of Extremism"," of Fun and Games"," of the Great Game"," of the Game of Life"," of the King"," of the Queen"," of Royalty"," of Nobility"," of the Republic"," of the Empire"," of Commoners"," of Peasants"," of Townfolk"," of the City"," of the Country"," of the Suburbs"," \"Hero's Friend\""," of Calculation"," of Instinct"," of Intuition"," of Magic"," of Sorcery"," of Hedge Wizardry"," of Doom"," of Pride"," of Honour"," of Dishonour"," of Shame"," of Embarrassment"," of Abstract Expressionism"," of Free Expression"," of the Guilds"," of the Guild-Master"," of the Apprentice"," of the Blacksmith"," of the Carpenter"," of the Wheelwright"," of the Cooper"," of the Fisher"," of the Hunter"," of the Ditch-Digger"," of Patience"," of Impatience"," of Anxiety"," of Urgency"," \"Forget-Me-Not\""," of Lilacs"," of Daffodils"," of the Rose",
// Don't allow "player's Doom" type names for god gifts (except Xom!)if (name.find("@player_name@'s", 0) != std::string::npos&& god_gift != GOD_NO_GOD && god_gift != GOD_XOM){// simply overwrite the name with one of type "god's Favour"name = "of ";name += god_name(god_gift, false);name += "'s ";name + getRandNameString("divine_esteem");}name = replace_all(name, "@player_name@", you.your_name);
static const char *randart_weapon_appearance[] = {"brightly glowing ", "iridescent ", "smoking ", "bloodstained ", "twisted ","shimmering ", "warped ", "crystal ", "jewelled ", "transparent ","encrusted ", "pitted ", "slimy ", "polished ", "fine ", "crude ","ancient ", "ichor-stained ", "faintly glowing ", "steaming ", "shiny "};
if (name.find("@branch_name@", 0) != std::string::npos){std::string place;if (one_chance_in(5)){switch(random2(6)){case 0:case 1:default:place = "the Abyss";break;case 2:case 3:place = "Pandemonium";break;case 4:place = "the Labyrinth";break;case 5:place = "the Portal Chambers";break;}}else{const branch_type branch =static_cast<branch_type>(random2(BRANCH_INFERNO));place = place_name( get_packed_place(branch, 1, LEVEL_DUNGEON),true, false );}if (!place.empty())name = replace_all(name, "@branch_name@", place);}// occasionally use long name for Xom (see religion.cc)name = replace_all(name, "@xom_name@", god_name(GOD_XOM, coinflip()));if (name.find("@god_name@", 0) != std::string::npos){god_type which_god;// God gifts will always get the gifting god's nameif (god_gift != GOD_NO_GOD)which_god = god_gift;else{do {which_god = static_cast<god_type>(random2(NUM_GODS));} while (!god_fits_artefact(which_god, item));}
static const char *randart_armour_appearance[] = {"brightly glowing ", "faintly humming ", "smoking ", "bloodstained ","twisted ", "shimmering ", "warped ", "heavily runed ", "jewelled ","transparent ", "encrusted ", "pitted ", "slimy ", "polished ", "fine ","crude ", "ancient ", "ichor-stained ", "faintly glowing ","steaming ", "shiny ", "distressingly furry "};
name = replace_all(name, "@god_name@", god_name(which_god, false));}
static const char *randart_jewellery_appearance[] = {"brightly glowing", "runed", "smoking", "ruby", "twisted","shimmering", "warped", "crystal", "diamond", "transparent","encrusted", "pitted", "slimy", "polished", "fine", "crude","ancient", "emerald", "faintly glowing", "steaming", "shiny","scintillating", "sparkling", "flickering", "glittering"};
return name;}
const unrandart_entry *unrand = seekunrandart( item );return (item_type_known(item) ? unrand->name : unrand->unid_name);}const long seed = calc_seed( item );rng_save_excursion rng_state;seed_rng( seed );std::string result;if (!item_type_known(item)){result += RANDOM_ELEMENT(randart_weapon_appearance);result += item_base_name(item);return result;
case OBJ_WEAPONS:return "weapon";case OBJ_ARMOUR:return "armour";case OBJ_JEWELLERY:return "jewellery";default:return "artefact";
if (coinflip()){result += item_base_name(item);result += RANDOM_ELEMENT(rand_wpn_names);}else
static bool pick_db_name(const int type){switch (type)
const std::string st_p = make_name(random_int(), false);result += item_base_name(item);if (one_chance_in(3)){result += " of ";result += st_p;}else{result += " \"";result += st_p;result += "\"";}
case OBJ_WEAPONS:case OBJ_ARMOUR:return coinflip();case OBJ_JEWELLERY:return one_chance_in(5);default:return 0;
if (!item_type_known(item)){result += RANDOM_ELEMENT(randart_armour_appearance);result += item_base_name(item);return result;}if (coinflip()){result += item_base_name(item);result += RANDOM_ELEMENT(rand_armour_names);}else
// use prefix of gifting god, if applicablebool god_gift = false;int item_orig = 0;if (item_type_known(item)) // god prefix not necessary for appearance
const std::string st_p = make_name(random_int(), false);result += item_base_name(item);if (one_chance_in(3)){result += " of ";result += st_p;}
item_orig = item.orig_monnum;if (item_orig < 0)item_orig = -item_orig - 2;
return result;}std::string randart_jewellery_name( const item_def &item ){ASSERT( item.base_type == OBJ_JEWELLERY );if (is_unrandom_artefact( item )){const unrandart_entry *unrand = seekunrandart( item );return (item_type_known(item) ? unrand->name : unrand->unid_name);}const long seed = calc_seed( item );rng_save_excursion exc;
// get base typelookup += get_artefact_type(item.base_type);rng_save_excursion rng_state;
result += RANDOM_ELEMENT(randart_jewellery_appearance);
std::string appear = getRandNameString(lookup, " appearance");if (appear.empty()) // nothing found for lookup{appear = getRandNameString("general appearance");if (appear.empty()) // still nothing found?appear = "non-descript";}result += appear;
result += (jewellery_is_amulet(item) ? "amulet" : "ring");result += RANDOM_ELEMENT(rand_armour_names);
result += item_base_name(item) + " ";std::string name = getRandNameString(lookup);if (name.empty() && god_gift) // if nothing found, try god name alone{name = getRandNameString(god_name(static_cast<god_type>(item_orig), false));if (name.empty()) // if still nothing found, try base type alonename = getRandNameString(get_artefact_type(item.base_type).c_str());}if (name.empty()) // still nothing found?result += "of Bugginess";elseresult += replace_name_parts(name, item);
// not using {tried} here because there are some confusing// issues to work out with how we want to handle jewellery// artefacts and base type id. -- bwr
const bool is_randart = is_random_artefact( *this );
}if (!randartDB){std::string randartPath = get_savedir_path(RANDART_DB);std::vector<std::string> textPaths = randart_txt_paths();// If any of the randart text files are newer then// aggregated randart db, then regenerate the whole dbfor (int i = 0, size = textPaths.size(); i < size; i++)if (is_newer(textPaths[i], randartPath)){generate_randart_db();break;}randartPath.erase(randartPath.length() - 3);if (!(randartDB = openDB(randartPath.c_str())))end(1, true, "Failed to open DB: %s", randartPath.c_str());
unlink( full_db_path.c_str() );for (int i = 0, size = txt_paths.size(); i < size; i++)store_text_db(txt_paths[i], db_path);DO_CHMOD_PRIVATE(full_db_path.c_str());}static std::vector<std::string> randart_txt_paths(){std::vector<std::string> txt_file_names;std::vector<std::string> paths;txt_file_names.push_back("randname");txt_file_names.push_back("rand_wpn"); // mostly weaponstxt_file_names.push_back("rand_arm"); // mostly armourtxt_file_names.push_back("rand_all"); // jewellery and generalfor (int i = 0, size = txt_file_names.size(); i < size; i++){std::string name = DATABASE_TXT_DIR;name += FILE_SEPARATOR;name += txt_file_names[i];name += ".txt";std::string txt_path = datafile_path(name);if (!txt_path.empty())paths.push_back(txt_path);}return (paths);}static void generate_randart_db(){std::string db_path = get_savedir_path(RANDART_BASE_NAME);std::string full_db_path = get_savedir_path(RANDART_DB);std::vector<std::string> txt_paths = randart_txt_paths();file_lock lock(get_savedir_path(RANDART_BASE_NAME ".lk"), "wb");
}/////////////////////////////////////////////////////////////////////////////// Randname DB specific functions.std::string getRandNameString(const std::string &itemtype,const std::string &suffix){if (!randartDB)return ("");int num_replacements = 0;return getRandomizedStr(randartDB, itemtype, suffix,num_replacements);
####################################################### Randart Names# -------------# rand_wpn.txt: keywords for randart WEAPONS## This file contains the lists of keywords (and their# weights) for most of the keywords used for randart# weapons. You will find other ones in rand_all.txt.# See the explanation in the main file, randname.txt,# for more details.######################################################%%%%power_or_anger@power_name@w:7@conflict_name@w:7@anger_name@%%%%power_namePowerMightWondrous PowerInvincibilityGlorySuccessTriumphDominationDominanceVictoryIntimidation%%%%conflict_nameConflictTensionDischordDivisionDoubtInternal Strife%%%%anger_nameAngerFuryRighteous AngerRighteous FuryWrathBrutal RevengeVengeance%%%%battle_or_warBattleCrusadesWarEternal WarEternal Warrior# Lemuel's SuggestionsWarriorDoomed Warrior# akrasiac patchthe Pyrrhic Victory#killingBlood-LustJoyful SlaughterWoundingBloodFearPainAgony# Lemuel's suggestionHacking and Slashing# related to cuttingTruncationSeveranceDullnessPrecise Incision#collateral effectsMourningDeath's Doorthe Grave%%%%death_or_doom# deathDeathBloody DeathPainful DeathQuick DeathInstant DeathImminent DeathSudden DeathSlow DeathCertain DeathUncertain DeathPain and Death# doomDoomPremature BurialPerilExecutionDestructionEviscerationExtermination# pain and miseryInfinite PainEternal TormentDismembermentTerrorMisery%%%%strategy_or_justicew:2@strategy_name@w:4@valour_name@w:3@justice_name@%%%%strategy_name#strategyDefenceDefence by OffenceOffenceProtectionReinforcementExpedienceOptimality%%%%valour_nameHonourIntegrityResponsibilityWatchfulnessDutyPrudenceCourageValourRessourcefulnessActionPurposeFortitudeDefianceValianceCourageEternal Vigilance%%%%justice_nameTender MercyCruel JusticePunishmentInnocenceGuiltTortfeasanceExtenuating CircumstancesAbsolutionFalse AccusationsWrongful ImprisonmentCorporal PunishmentCapital Punishment%%%%diviner_nameAugurerWater DivinerSoothsayerSeeker%%%%people_nameKingQueenJesterFoolAncientsSaviourMessengerGeniusCoward@diviner_name@%%%%weapon_animal# insectsPill-BugButterflyWaspMothMosquitoGnatBlowfly# arachnidesSpiderScorpion# amphibes and reptilesRattle-Snake# birdsPenguinPuffinLamprey# mammalsWeaselGoatWhale%%%%# plants and fungiplant_nameEggplantTurnipWhelk#fungiMushroomToadstool# ???Puffball%%%%# undead and evil beingsevil_stuffCursesHell's Wraththe UndeadAncient EvilEvilthe BeastShrieking Terrorthe Lurkerthe Crawling Thingthe ThingAbominationMutilationDeformationInfectionDemonkind%%%%# catastrophes etc.catastrophe_namethe InfernoEarthquakes# the Apocalypsethe ApocalypseArmageddonWorld's EndRagnarok# the Apocalyptic Riders (except Death)PestilencePlagueFamine%%%%chaos_nameChaosChanceMayhemHavocTurmoilCalamityArbitrationthe ExtremesDisorderDisasterUnbalanceDisharmonyAmbiguityChangeExtremism%%%%balance_or_orderthe Middlethe MedianDepartureArrivalAscentDescentStasisBodily HarmonyModerationEternal HarmonyPeaceEquivalenceBalanceHarmonyFragile PeaceCircularityLinearityLawOrder%%%%%economics_or_politics# economicsInflationDeflationSupplyDemand# politicsthe ImperiumGreatest Utilitythe RevolutionDefenestrationthe Peoplethe Little PeopleWealthPovertyReapportionment# akrasiac patchImpeachment# umm, quoi?FreeholdAttainderFee SimpleMandamusBreachFundamental BreachTerminationSequestration%%%%place_nameEarththe Worldthe Seathe Forestthe Treesthe Volcanothe Equatorthe Old Worldthe New WorldDistant Worldsthe Unseen Realmthe SpheresProximitythe Wildernessthe Mazethe Pitthe Eternal Void%%%%discomfort_weaponUnpleasantnessDiscomfortDisgustFrustrationChagrinDismayDesperationShameEmbarrassmentAnnoyanceAnxietyUrgency%%%%mental_illness_weaponPsychosisNeurosisFixationMegalomaniaEgomaniaCompulsionFatigue%%%%philosophy_or_science@philosophy_name@@science_name@%%%%philosophy_nameMonotheismAtheismAgnosticismExistentialismRelativismAbsolutismAbstinenceOrthodoxyHeresyFree Expressionthe EgoOptimismPessimismSerendipityLimitationLevity%%%%science_nameReasonUnreasonCalculationInstinctIntuitionCircular LogicContextArticulationthe Mindthe Nexusthe Beginningthe EndAnalysisInfinityQuantum LeapGravityRotation%%%%item_name# itemsOrbEggGlobeCandleCandelabrumKeyRing# body partsHeartBrainTooth%%%%magic_namethe Magithe Archmagithe Warrior-Mage%%%%# substancessubstance_nameBreadSulphurCrystalBloodstoneOozing PusAshSlimeBile# these don't really fitManaYeastSporesDust%%%%# non-groupablesother_weapon_namethe Omega PointCrawlingConversionPrescriptionthe Open HandSpontaneous CombustionRes NulliusTerra NulliusDesertificationthe SpinneretGrontol# akrasiac patchIrrepressible Laughter%%%%# single word monster names, to allow for combinations like <Monster>slayershort_monster_nameDragonHydraOgreSpiderNewtGiantBeetleJelly%%%%monster_name@short_monster_name@@player_name@@player_species@Killer BeeKiller KlownOrb Guardian%%%%short_killer_namebaneslayer%%%%killer_name's Bane's Death's Death Toll's Doom's Foe's Funeral's Harbinger of Death's Nightmare's Regret%%%%real_weapon_nameGrim Toothw:5Widowmakerw:5WidowermakerLifebaneConservatorBanisherTormentorPendulumMurmurSarcophageConcordanceDragon's TongueArbiterDeath RattleArcanumTransmigratorUltimatumEarthwormWormWorm's WrathLeviticusGrim# Lemuel's suggestionsEvisceratorUndertakerEmbalmerTrog's @anger_name@HellblazerHell-Harrower%%%%joke_weapon_nameSecret WeaponThingMud Pie of DeathXom's @xom_esteem@StringStringbeanBlobGlobulusHulkRaisinStarlightGiant's ToothpickBackscratcherBrushGramGromGrumRummageOmeletteEggAubergineZXQOxTattletaleFishBungBingo# from the crawl.akrasiac.org patchCookie Cutter%%%%plain_weapon_namew:15@short_monster_name@@short_killer_name@@monster_name@@killer_name@w:15@real_weapon_name@w:5@joke_weapon_name@%%%%
####################################################### Randart Names# -------------# rand_arm.txt: keywords for randart ARMOUR## This file contains the lists of keywords (and their# weights) for most of the keywords used for randart# armour. You will find others in rand_wpn.txt and# rand_all.txt, respectively.## See the explanation in the main file, randname.txt,# for more details.######################################################%%%%armour_animal# bacteriaAmoeba# insectsButterflyCricketEchidnaLadybird# invertebratesSlugSnailGastropod# arachnides and clamsTarantulaClamBarnacleLobster# amphibia and reptilesTortoiseTurtleFrogKomodo DragonDragon# birdsTurtledoveNightingaleMeadowlark# mammalsHareKangarooElephantZebraHippoMonkey# not strictly an animal... :)Monkey's Uncle%%%%flower_nameLilacsDaffodilsthe Rosethe Garden%%%%# non-Crawl critterscritter_namethe Slorgthe Alphagorgon# from the crawl.akrasiac.org patch.the Hot OcelotEight Boll Weevils%%%%discomfort_and_inaction# discomfortMinor IrritationBitternessNegationFailureServitudeSubmission# inactionLifelessnessBoredomEnnuiRestlessnessOmissionNegligenceInaction%%%%mental_illness_armourParanoiaClaustrophobiaAgoraphobiaDyspraxiaMental Paralysis%%%%good_or_divine# good thingsthe Goodthe LeafLeavesMusicBirdsongBrillianceSatisfactionFunJoyHappinessWonderSurpriseCuriosityCreativityBeautyLifeLibertyFreedomAmelioration# divine eventsDivine Compulsionthe Invisible HandDivine Intervention%%%%# in contrast to "wacky_armour_name" these do have some connection to armour and protectionarmour_name_shieldingShieldingImpermeabilityDefenceDeath's Doorthe Gatethe Saviourthe Untouchablesthe Armoured OneExclusionRepulsionPreservationConservationInviolability%%%%# other armour properties (beside protection)armour_property_nameSupple StrengthResist DeathGraceWeightlessnessShadows and FogDisguiseLeast ResistanceProtective Custody%%%%wacky_armour_namethe OnionVladthe Eternal FruitPlasticityBaldnessTerrorGood Intentionsthe ArcaneAnaesthesiathe ArmadilloWeirdnessPathosLossHedgingIndemnityUntold Secretsthe EarthLimited LiabilityHadjmaHairinessSpacethe VacuumCompressionDecompressionthe LoofahLove and Death%%%%# Lemuel's suggestionscelestial_bodiesSunMoonStarsPlanetsPleiadesMorning StarEvening Star%%%%instrument_nameTrumpetsthe Kettle-Drumthe Accordionthe Bagpipethe Lute%%%%evil_beingthe DevilDemonsLesser DemonsGreater Demonsthe Iron Devilthe Devil's Advocate%%%%# um, reeeeally bad weather...weather_namethe First SnowBoiling HailPerpetual Droughtthe Thunderstorm%%%%profession_nameGuildsGuild-MasterApprenticeBlacksmithCarpenterWheelwrightCooperFisherHunterDitch-DiggerGuardianBeekeeperGardener%%%%# something for Xomgame_name# general gamesFun and Gamesthe Great Game# children's gamesPeek-a-BooHide-and-SeekLeapfrog# board games etc.the Game of LifeCard TricksHangmanthe DiceJigsawWhack-A-MoleLadders and Snakes%%%%politics_name_armourthe Kingthe QueenRoyaltyNobilitythe Republicthe EmpireCoronationCommonersPeasantsTownfolkthe Citythe Countrythe Suburbsthe Mutiny%%%%other_armour_namew:5Grotw:5GrottinessFilth# magicMagicSorcery# otherCrawlingthe Orbthe Orb Guardianthe Storm Kingthe Hanged ManHedge WizardryFeastingInsatiable HungerImperfectionTrial and ErrorMisfortuneWrong DecisionsUnambiguitythe Lost PathMisanthrophy%%%%plain_armour_nameForget-Me-NotHero's Friend%%%%
####################################################### Randart Names# -------------# rand_all.txt: keywords for randart JEWELLERY and# those used for ALL randart types## This file contains the lists of keywords (and their# weights) for keywords specific to randart jewellery# as well as those used for all three types of# randarts (weapons, armour, jewellery). You will find# other ones in rand_wpn.txt and rand_arm.txt.# See the explanation in the main file, randname.txt,# for more details.######################################################%%%%####################################################### Library of keywords used (mostly) for randart jewellery.######################################################jewellery_animalMagpieFireflyScarab%%%%jewellery_special_nameMisfortuneEphemeral LuckWishful ThinkingMoodinessReimbursementthe TempestFinalityAttitudeLady LuckTemptationFalse Pretenses%%%%suspicion_nameSecretsSuspicionMistrustJealousyIncredulityDoubtsSuspected Treacheryw:20@conflict_name@%%%%####################################################### Library of keywords used for all randart types.######################################################divine_esteem# goodEsteemFavourHopeRegardApprovalDelightPrideGenerositySupremacyBenevolenceWhimFavour# badDispleasureEnvyw:70@anger_name@%%%%xom_esteem# chosen 20% of the timew:40@divine_esteem@EntertainmentBest WishesAmusementDangerous BoredomQuestionable HumourRinging LaughterBemusementPassing InterestFull AttentionEverchanging RulesWhimsicalityCapriciousnessSleight of HandsFlight of FancyPremature CondolencesAbsentmindednessMalicious JoyPsychedelic VisionsFair GameExperimental Loan%%%%time_nameDayNightMidnightTwilightDawnw:5Springw:5Springtimew:5Summerw:5SummertimeAutumnWinterMidsummerMidwinterthe Solsticethe HarvestEternal NightEternity%%%%colour_nameBlueRedOrangePurple%%%%sky_or_lightthe Sunthe MoonLightDarknessDim Lightthe Shining LightSunlightStarshinethe Cloudsthe Skythe @colour_name@ Skies%%%%virtue_or_vicew:5@virtue_name@@valour_name@@vice_name@%%%%virtue_nameVirtueTruthHonestyFaithHospitalityCharityPatienceModesty%%%%vice_name# some of the deadly sinsSlothVanityGluttonyPrideGreed# general immoralitySinthe Original SinLiesDishonestyCowardiceDishonourImpatienceImmoralityAmoralityUntruth%%%%number_or_qualifier# exact numbersthe Threethe Fourthe Fivethe Sixthe Seventhe Eightthe Ninethe Tenthe Eleventhe Twelvethe Thirteenthe Fiftya Hundreda Thousand# vague numbersthethe Manythe Countless# other qualifiersthe Lostthe Forgottenthe Forsakenthe Hiddenthe Lastthe Lonelythe Jollythe Ancient%%%%thing_namesSunsMoonsStarsPlanetsHellsLivesDeathsCursesBlessingsGodsSpiritsDemonsWarsMiceEyesNightsOrbsRunesSeasPlacesWishesWonders%%%%
{ BRANCH_HALL_OF_ZOT, BRANCH_MAIN_DUNGEON, 5, 27, BFLAG_HAS_ORB, 0,DNGN_ENTER_ZOT, DNGN_RETURN_FROM_ZOT,"Zot", "the Realm of Zot", "Zot",NULL,false, true, BLACK, BLACK,mons_hallzot_rare, mons_hallzot_level,NULL, NULL, NULL, NULL,1, 'Z', false, true },