Advertisement
Krythic

Rare Name Generator

Jul 31st, 2020
1,610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 15.30 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using VoidwalkerEngine.Framework.Logic;
  3.  
  4. namespace VoidwalkerEngine.Framework.Algorithms
  5. {
  6.     public partial class LootGenerator
  7.     {
  8.         private static readonly string[] _allRareNamePrefixes =
  9.         {
  10.             "Agony",        "Apocalypse",   "Armageddon",   "Ash",          "Basalisk",
  11.             "Beast",        "Behemoth",     "Black",        "Blight",       "Blood",
  12.             "Bone",         "Bramble",      "Brimstone",    "Brood",        "Carrion",
  13.             "Cataclysm",    "Chaos",        "Chimeric",     "Corpse",       "Corruption",  
  14.             "Crimson",      "Creep",        "Dark",         "Dawn",         "Death",
  15.             "Demon",        "Cruel",        "Dire",         "Discord",      "Doom",
  16.             "Crypt",        "Horror",       "Hypnotic",     "Kraken",       "Last",
  17.             "Loath",        "Maelstrom",    "Malignant",    "Mind",         "Miracle",
  18.             "Mire",         "Moon",         "Morbid",       "Murk",         "Night",
  19.             "Oblivion",     "Obscure",      "Onslaught",    "Order",        "Pain",
  20.             "Pandemonium",  "Phantom",      "Phoenix",      "Plague",       "Primal",
  21.             "Profane",      "Rage",         "Rapture",      "Raven",        "Rift",
  22.             "Dragon",       "Dread",        "Dusk",         "Eagle",        "Empyrean",
  23.             "Entropic",     "Epoch",        "Ever",         "Fate",         "Fear",
  24.             "Final",        "Flame",        "Foe",          "Forsaken",     "Frost",
  25.             "Gale",         "Ghast",        "Ghost",        "Ghoul",        "Gloom",
  26.             "Glyph",        "Golem",        "Gore",         "Gray",         "Grief",
  27.             "Grim",         "Hate",         "Havoc",        "Haze",         "Hero",
  28.             "Rune",         "Seethe",       "Serpent",      "Shade",        "Shadow",
  29.             "Shamble",      "Skeleton",     "Skull",        "Sorrow",       "Soul",
  30.             "Spell",        "Spirit",       "Star",         "Stone",        "Storm",
  31.             "Tempest",      "Terror",       "Torment",      "Twilight",     "Vengeance",
  32.             "Victory",      "Vile",         "Viper",        "Vivid",        "Vortex",
  33.             "White",        "Wild",         "Woe",          "Wraith",       "Wrath",
  34.             "Gloam",        "Monster",      "Elusive",      "First",        "Ichor"
  35.         };
  36.  
  37.         private static readonly Dictionary<ItemType, string[]> _rareNameSuffixes = new Dictionary<ItemType, string[]>();
  38.  
  39.         private static void InitializeRareNameSuffixes()
  40.         {
  41.             _rareNameSuffixes.Add(ItemType.LightHeadwear, _rareHeadwearNameSuffixes);
  42.             _rareNameSuffixes.Add(ItemType.MediumHeadwear, _rareHeadwearNameSuffixes);
  43.             _rareNameSuffixes.Add(ItemType.HeavyHeadwear, _rareHeadwearNameSuffixes);
  44.  
  45.             _rareNameSuffixes.Add(ItemType.LightChestwear, _rareChestwearNameSuffixes);
  46.             _rareNameSuffixes.Add(ItemType.MediumChestwear, _rareChestwearNameSuffixes);
  47.             _rareNameSuffixes.Add(ItemType.HeavyChestwear, _rareChestwearNameSuffixes);
  48.  
  49.             _rareNameSuffixes.Add(ItemType.LightHandwear, _rareHandwearNameSuffixes);
  50.             _rareNameSuffixes.Add(ItemType.MediumHandwear, _rareHandwearNameSuffixes);
  51.             _rareNameSuffixes.Add(ItemType.HeavyHandwear, _rareHandwearNameSuffixes);
  52.  
  53.             _rareNameSuffixes.Add(ItemType.LightFootwear, _rareFootwearNameSuffixes);
  54.             _rareNameSuffixes.Add(ItemType.MediumFootwear, _rareFootwearNameSuffixes);
  55.             _rareNameSuffixes.Add(ItemType.HeavyFootwear, _rareFootwearNameSuffixes);
  56.  
  57.             _rareNameSuffixes.Add(ItemType.Necklace, _rareNecklaceNameSuffixes);
  58.             _rareNameSuffixes.Add(ItemType.Ring, _rareRingNameSuffixes);
  59.             _rareNameSuffixes.Add(ItemType.Shield, _rareShieldNameSuffixes);
  60.             _rareNameSuffixes.Add(ItemType.Phylactery, _rarePhylacteryNameSuffixes);
  61.             _rareNameSuffixes.Add(ItemType.Focus, _rareFocusNameSuffixes);
  62.             _rareNameSuffixes.Add(ItemType.Tome, _rareTomeNameSuffixes);
  63.             _rareNameSuffixes.Add(ItemType.Instrument, _rareInstrumentNameSuffixes);
  64.  
  65.             /**
  66.              * Weapons
  67.              */
  68.             _rareNameSuffixes.Add(ItemType.OneHandedSword, _rareSwordNameSuffixes);
  69.             _rareNameSuffixes.Add(ItemType.TwoHandedSword, _rareSwordNameSuffixes);
  70.  
  71.             _rareNameSuffixes.Add(ItemType.OneHandedAxe, _rareAxeNameSuffixes);
  72.             _rareNameSuffixes.Add(ItemType.TwoHandedAxe, _rareAxeNameSuffixes);
  73.  
  74.             _rareNameSuffixes.Add(ItemType.OneHandedMace, _rareMaceNameSuffixes);
  75.             _rareNameSuffixes.Add(ItemType.TwoHandedMace, _rareMaceNameSuffixes);
  76.  
  77.             _rareNameSuffixes.Add(ItemType.Bow, _rareBowNameSuffixes);
  78.             _rareNameSuffixes.Add(ItemType.Dagger, _rareDaggerNameSuffixes);
  79.             _rareNameSuffixes.Add(ItemType.Sickle, _rareSickleNameSuffixes);
  80.             _rareNameSuffixes.Add(ItemType.Fist, _rareFistNameSuffixes);
  81.  
  82.             _rareNameSuffixes.Add(ItemType.Scythe, _rareScytheNameSuffixes);
  83.             _rareNameSuffixes.Add(ItemType.Staff, _rareStaffNameSuffixes);
  84.             _rareNameSuffixes.Add(ItemType.Wand, _rareWandNameSuffixes);
  85.         }
  86.  
  87.         #region Rare Weapon Name Suffixes
  88.  
  89.         private static readonly string[] _rareAxeNameSuffixes =
  90.         {
  91.             "Bane","Butcher","Gnash","Rend","Slayer",
  92.             "Beak","Edge","Hunger","Roar","Song",
  93.             "Bite","Etcher","Mangler","Sever","Spawn",
  94.             "Splitter","Reaver","Ender","Splitter","Shatter",
  95.             "Sunder","Cleaver", "Force","Sever","Break",
  96.             "Thirst","Breaker", "Chopper","Scream","Scourge"
  97.         };
  98.  
  99.         private static readonly string[] _rareMaceNameSuffixes =
  100.         {
  101.             "Star",    "Bane",    "Force",   "Pillar",  "Annihilator",
  102.             "Thresher",    "Mangler", "Smash",   "Column",  "Break",
  103.             "Wreck",   "Roar",    "Mallet",  "Spire",   "Ender",
  104.             "Batter",  "Bringer", "Burst",   "Grinder", "Ruin",
  105.             "Blast",   "Brand",   "Crack",   "Knell",   "Shatter",
  106.             "Blow",    "Breaker", "Crusher", "Ram", "Smasher"
  107.         };
  108.  
  109.         private static readonly string[] _rareSwordNameSuffixes =
  110.         {
  111.             "Bane",     "Fang",     "Needle",   "Scalpel",  "Slicer",
  112.             "Song",     "Gutter",   "Razor",    "Scratch",  "Spike",
  113.             "Barb",     "Bringer",  "Blade",    "Skewer",   "Spiker",
  114.             "Stinger",  "Edge",     "Thirst",   "Cutter",   "Slasher",
  115.             "Beak",     "Hunger",   "Brand",    "Flayer",   "Slayer",
  116.             "Bite",     "Sever",    "Slash",    "Breaker",  "Killer",
  117.         };
  118.  
  119.         private static readonly string[] _rareStaffNameSuffixes =
  120.         {
  121.             "Bane",    "Chant",     "Spell",        "Beam",     "Mast",
  122.             "Roar",    "Cry",       "Weaver",       "Branch",   "Pile",
  123.             "Call",    "Gnarl",     "Song",         "Goad",     "Pillar",
  124.             "Pole",    "Bark",      "Composer",     "Command",  "Keeper",
  125.             "Post",    "Force",     "Summoner",     "Walk",     "Banisher",
  126.             "Spire",   "Channel",   "Tree",         "Guide",    "Sealer"
  127.         };
  128.  
  129.         private static readonly string[] _rareDaggerNameSuffixes =
  130.         {
  131.             "Edge",    "Thirst",  "Seeker",  "Point",   "Thrust",
  132.             "Hunger",  "Etcher",  "Blade",   "Spine",   "Fragment",
  133.             "Sever",   "Piercer", "Slasher", "Impaler", "Splinter",
  134.             "Bane",    "Fang",    "Needle",  "Scratch", "Spike",
  135.             "Song",    "Gutter",  "Razor",   "Skewer",  "Stinger",
  136.             "Barb",    "Impaler", "Scalpel", "Slicer",  "Bite"
  137.         };
  138.  
  139.         private static readonly string[] _rareFistNameSuffixes =
  140.         {
  141.             "Bane",    "Gutter",  "Razor",   "Slicer",  "Bite",
  142.             "Song",    "Impaler", "Scratch", "Spike",   "Edge",
  143.             "Fang",   "Needle",  "Skewer",  "Stinger", "Hunger",
  144.             "Thirst",  "Talon",   "Fight",   "Slayer",  "Cutter",
  145.             "Roar",    "Seeker",  "Blade",   "Slasher", "Flayer",
  146.             "Fist",    "Puncher", "Killer",  "Hand",    "Point",
  147.         };
  148.  
  149.         private static readonly string[] _rareBowNameSuffixes =
  150.         {
  151.             "Reach",   "Thunder", "Wind",    "Reacher", "Sight",
  152.             "Seige",   "Twine",  "Wing",    "Call", "Vision",
  153.             "Strike",  "Volley",  "Caster",  "Wave",    "Eye",
  154.             "Bane",    "Thirst",  "Arch",    "Fetch",  "Mark",
  155.             "Song",    "Branch",  "Barrage", "Guide",   "Nock",
  156.             "Stinger", "Blast",   "Breeze",  "Horn",    "Rain",
  157.         };
  158.  
  159.         private static readonly string[] _rareWandNameSuffixes =
  160.         {
  161.             "Bane",    "Branch",    "Bite",       "Call",   "Gnarl",
  162.             "Song",    "Needle",    "Edge",       "Chant",  "Spell",
  163.             "Thirst",  "Scratch",   "Barb",       "Cry",    "Weaver",
  164.             "Goad",    "Bark",      "Summoner",   "Guide",  "Banisher",
  165.             "Spire",   "Strand",    "Command",    "Keeper", "Splinter",
  166.             "Charm",   "Composer",  "Sealer",     "Force",  "Drink",
  167.         };
  168.  
  169.         private static readonly string[] _rareInstrumentNameSuffixes =
  170.         {
  171.             "Song",    "Chant",   "Blast",   "Spell",   "Call",
  172.             "Branch",  "Call",    "Breeze",  "Gasp",    "Bane",
  173.             "Cry", "Weaver",  "Horn",    "Roar",    "Melody",
  174.             "Breath",  "Voice",   "Wail",    "Speaker", "Bark",
  175.             "Whisper", "Scream",  "Speak",   "Wave",    "Command",
  176.             "Whimper", "Shriek",  "Choke",   "Pulse",   "Growl",
  177.         };
  178.  
  179.         private static readonly string[] _rareScytheNameSuffixes =
  180.         {
  181.             "Song",       "Chant",   "Reap",    "Spell",   "Call",
  182.             "Branch",      "Call",    "Reaper",  "Gnarl",   "Bane",
  183.             "Cry",            "Weaver",  "Harvest", "Roar",    "Harvester",
  184.             "Collector",   "Killer",  "Lash",    "Bringer", "Strangle",
  185.             "Gatherer",    "Command", "Keeper",  "Aspect",  "Choke",
  186.             "Arch",        "Charm",   "Force",   "Spawn",   "Banisher",
  187.         };
  188.  
  189.         private static readonly string[] _rareSickleNameSuffixes =
  190.         {
  191.             "Song",       "Chant",   "Reap",    "Spell",   "Call",
  192.             "Branch",      "Call",    "Reaper",  "Gnarl",   "Bane",
  193.             "Cry",            "Weaver",  "Harvest", "Roar",    "Harvester",
  194.             "Collector",   "Killer",  "Lash",    "Bringer", "Strangle",
  195.             "Gatherer",    "Command", "Keeper",  "Aspect",  "Choke",
  196.             "Arch",        "Charm",   "Force",   "Spawn",   "Banisher",
  197.         };
  198.  
  199.         #endregion Rare Weapon Name Suffixes
  200.  
  201.         #region Rare Apparel Name Suffixes
  202.  
  203.         private static readonly string[] _rareHeadwearNameSuffixes =
  204.         {
  205.             "Brow",    "Crest",   "Glance",  "Horn",    "Salvation",   "Veil",    "Sight",
  206.             "Corona",  "Crown",   "Guardian",    "Keep",    "Shelter", "Visage",  "Gaze",
  207.             "Cowl",    "Dome",    "Halo",    "Peak",    "Star",    "Visor",   "Vision",
  208.         };
  209.  
  210.         private static readonly string[] _rareChestwearNameSuffixes =
  211.         {
  212.             "Carapace",    "Curtain", "Form",    "Pelt",    "Shell",   "Skin",    "Ward",
  213.             "Cloak",   "Guard",    "Keep",    "Cage",    "Shelter", "Suit",    "Wrap",
  214.             "Coat",    "Hide",    "Mantle",  "Sanctuary",   "Shroud",  "Veil",    "Flesh",
  215.             "Chasis"
  216.         };
  217.  
  218.         private static readonly string[] _rareHandwearNameSuffixes =
  219.         {
  220.             "Caress",      "Fingers", "Grip",    "Knuckle", "Palm",   "Touch",   "Force",
  221.             "Claw",        "Fist",    "Hand",    "Mitts",   "Paw",    "Vise",    "Maker",
  222.             "Clutches",    "Grasp",   "Hold",    "Nails",   "Talons", "Keep",    "Taker",
  223.         };
  224.  
  225.         private static readonly string[] _rareFootwearNameSuffixes =
  226.         {
  227.             "Dash",    "League",  "Road",    "Span",    "Stride",  "Tread",   "Voyage",
  228.             "Goad",    "March",   "Slippers",    "Spark",   "Tracks",   "Urge",    "Pilgrimage",
  229.             "Hoof",    "Pace",    "Sole",    "Spur",    "Trail",   "Journey", "Travel",
  230.         };
  231.  
  232.         private static readonly string[] _rareShieldNameSuffixes =
  233.         {
  234.             "Aegis",   "Bastion", "Emblem",  "Mark",    "Rook",    "Tower",   "Wing",
  235.             "Badge",   "Bulwark", "Fend",    "Refuge",  "Sanctum", "Watch",   "Defend",
  236.             "Barrier", "Duty",    "Guard",   "Rock",    "Span",    "Wall",    "Ward",
  237.         };
  238.  
  239.         private static readonly string[] _rareNecklaceNameSuffixes =
  240.         {
  241.             "Beads",   "Choker",  "Idol",    "Locket",  "Pendant", "Talisman",    "Fragment",
  242.             "Braid",   "Clasp",   "Tether",  "Medallion",   "Rosary",  "Piece",   "Hang",
  243.             "Charm",   "Collar",  "Heart",   "Noose",   "Scarab",  "Soul",    "Strangle",
  244.             "Charm",   "Core",    "Secret",  "Reliquary",   "Remains", "Abyss",   "Reward",
  245.             "Trinket", "Cradle",  "Mystery", "Vessel",  "Ornament",  "Trophy",  "Tether",
  246.             "Coffer",  "Crest",   "Vault",   "Sanctuary",   "Momento", "Antique", "Bond",
  247.         };
  248.  
  249.         private static readonly string[] _rareRingNameSuffixes =
  250.         {
  251.             "Band",    "Eye", "Grip",    "Knot",    "Nail",    "Twirl",   "Bound",
  252.             "Circle",  "Finger",  "Gyre",    "Crest",   "Spiral",  "Whorl",   "Bind",
  253.             "Coil",    "Grasp",   "Hold",    "Loop",    "Turn",    "Whirl",   "Shackle",
  254.             "Charm",   "Core",    "Secret",  "Reliquary",   "Remains", "Abyss",   "Reward",
  255.             "Trinket", "Cradle",  "Mystery", "Vessel",  "Ornament",  "Trophy",  "Tether",
  256.             "Coffer",  "Crest",   "Vault",   "Sanctuary",   "Momento", "Antique", "Bond",
  257.         };
  258.  
  259.         private static readonly string[] _rarePhylacteryNameSuffixes =
  260.         {
  261.             "Corpse",   "Body",    "Fear",  "Reliquary",   "Remains", "Abyss",   "Reward",
  262.             "Soul", "Momento",  "Misery", "Vessel",  "Sin",  "Trophy",  "Tether",
  263.             "Coffer",  "Hatred",   "Despair",   "Anger",   "Effigy", "Organ", "Dissection",
  264.         };
  265.  
  266.         private static readonly string[] _rareTomeNameSuffixes =
  267.         {
  268.             "Book",   "Words",    "Reconcile",  "Declare",   "Order", "Rule",   "Laws",
  269.             "Hope", "Bravery",  "Revelation", "Admission",  "Directive",  "Instruction",  "Mandate",
  270.             "Conviction",  "Benediction",   "Command",   "Request",   "Demand", "Decree", "Edict",
  271.         };
  272.  
  273.         private static readonly string[] _rareFocusNameSuffixes =
  274.         {
  275.             "Sight",   "Ebb",    "Simplicity",  "Tether",   "Icon", "Mark",   "Sigil",
  276.             "Clarity", "Channel",  "Lucidity", "Vessel",  "Chain",  "Release",  "Void",
  277.             "Breeze",  "Flow",   "Purity",   "Reliquary",   "Seal", "Shackle", "Call",
  278.         };
  279.  
  280.         #endregion
  281.  
  282.         /// <summary>
  283.         ///
  284.         /// </summary>
  285.         /// <param name="constraint"></param>
  286.         /// <returns></returns>
  287.         public string GenerateRareName(ItemType constraint)
  288.         {
  289.             string prefix = _random.Choose(_allRareNamePrefixes);
  290.             string suffix = _random.Choose(_rareNameSuffixes[constraint]);
  291.             return prefix + " " + suffix;
  292.         }
  293.     }
  294. }
  295.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement