Decompiled source of RandomlyGeneratedItemsRewrite v2.1.2

RandomlyGeneratedItems.dll

Decompiled 3 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Threading.Tasks;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using On.RoR2;
using On.RoR2.Items;
using R2API;
using RandomlyGeneratedItems.Components;
using RandomlyGeneratedItems.RandomEffects;
using RandomlyGeneratedItems.Utilities;
using RoR2;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Orbs;
using RoR2.Projectile;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("RandomlyGeneratedItems")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+cee9b778919e467b44b53131556d2331d6da67bd")]
[assembly: AssemblyProduct("RandomlyGeneratedItems")]
[assembly: AssemblyTitle("RandomlyGeneratedItems")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace RandomlyGeneratedItems
{
	public class Buffs
	{
		public class NoMaxBarrier
		{
			[Serializable]
			[CompilerGenerated]
			private sealed class <>c
			{
				public static readonly <>c <>9 = new <>c();

				public static StatHookEventHandler <>9__1_0;

				public static hook_RecalculateStats <>9__1_1;

				internal void <Register>b__1_0(CharacterBody body, StatHookEventArgs _)
				{
					if (body.HasBuff(BuffDef))
					{
						body.maxBarrier = 2.1267647E+37f;
					}
				}

				internal void <Register>b__1_1(orig_RecalculateStats orig, CharacterBody self)
				{
					orig.Invoke(self);
					if (!(self.healthComponent.barrier <= self.maxHealth + self.maxShield))
					{
						self.barrierDecayRate = self.healthComponent.barrier / 10f;
					}
				}
			}

			public static BuffDef BuffDef;

			public static void Register()
			{
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0063: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_009d: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a8: Expected O, but got Unknown
				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cc: Expected O, but got Unknown
				if (!Main.RgiConfig.Bind<bool>("Status Effect Toggles", "NoMaxBarrier", true, "Controls whether the status effect 'NoMaxBarrier' can be applied by the 'Barrier' triggered effect.").Value)
				{
					return;
				}
				BuffDef = ScriptableObject.CreateInstance<BuffDef>();
				((Object)BuffDef).name = "BUFF_NO_DECAY";
				BuffDef.isHidden = false;
				BuffDef.isDebuff = false;
				BuffDef.iconSprite = RandomContentPackProvider.GenerateIcon((Color[])(object)new Color[1] { Color.yellow }, Color.black, SpriteShape.Circle);
				RegisteredBuffs.Add(BuffDef);
				object obj = <>c.<>9__1_0;
				if (obj == null)
				{
					StatHookEventHandler val = delegate(CharacterBody body, StatHookEventArgs _)
					{
						if (body.HasBuff(BuffDef))
						{
							body.maxBarrier = 2.1267647E+37f;
						}
					};
					<>c.<>9__1_0 = val;
					obj = (object)val;
				}
				RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
				object obj2 = <>c.<>9__1_1;
				if (obj2 == null)
				{
					hook_RecalculateStats val2 = delegate(orig_RecalculateStats orig, CharacterBody self)
					{
						orig.Invoke(self);
						if (!(self.healthComponent.barrier <= self.maxHealth + self.maxShield))
						{
							self.barrierDecayRate = self.healthComponent.barrier / 10f;
						}
					};
					<>c.<>9__1_1 = val2;
					obj2 = (object)val2;
				}
				CharacterBody.RecalculateStats += (hook_RecalculateStats)obj2;
			}
		}

		public class BypassEffectConditions
		{
			public static BuffDef BuffDef;

			public static void Register()
			{
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_0078: Unknown result type (might be due to invalid IL or missing references)
				ConfigEntryBase obj = Main.RgiConfig["Equipment Effect Toggles", "BypassConditions"];
				object obj2 = ((obj != null) ? obj.BoxedValue : null);
				if (obj2 is bool && (bool)obj2)
				{
					BuffDef = ScriptableObject.CreateInstance<BuffDef>();
					((Object)BuffDef).name = "BUFF_BYPASS_CONDITIONS";
					BuffDef.isHidden = false;
					BuffDef.isDebuff = false;
					BuffDef.iconSprite = RandomContentPackProvider.GenerateIcon((Color[])(object)new Color[1] { Color.cyan }, Color.black, SpriteShape.Diamond);
					RegisteredBuffs.Add(BuffDef);
				}
			}
		}

		public static List<BuffDef> RegisteredBuffs = new List<BuffDef>();

		public static IEnumerator RegisterBuffs(ContentPack contentPack)
		{
			NoMaxBarrier.Register();
			BypassEffectConditions.Register();
			contentPack.buffDefs.Add(RegisteredBuffs.ToArray());
			yield break;
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("SuperKael.RandomlyGeneratedItems", "RandomlyGeneratedItems", "2.1.2")]
	[BepInIncompatibility("com.xoxfaby.BetterUI")]
	public class Main : BaseUnityPlugin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static CollectContentPackProvidersDelegate <>9__13_0;

			internal void <Awake>b__13_0(AddContentPackProviderDelegate addContentPackProvider)
			{
				addContentPackProvider.Invoke((IContentPackProvider)(object)(ContentPackProvider = new RandomContentPackProvider()));
			}
		}

		public const string PluginGuid = "SuperKael.RandomlyGeneratedItems";

		public const string PluginAuthor = "SuperKael";

		public const string PluginName = "RandomlyGeneratedItems";

		public const string PluginVersion = "2.1.2";

		public static ConfigFile RgiConfig;

		public static ManualLogSource RgiLogger;

		public static RandomContentPackProvider ContentPackProvider;

		private static ulong seed;

		public static Xoroshiro128Plus Rng;

		public static ConfigEntry<ulong> SeedConfig { get; set; }

		public void Awake()
		{
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Expected O, but got Unknown
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Expected O, but got Unknown
			RgiLogger = ((BaseUnityPlugin)this).Logger;
			RgiConfig = ((BaseUnityPlugin)this).Config;
			SeedConfig = ((BaseUnityPlugin)this).Config.Bind<ulong>("Configuration", "Seed", 0uL, "The seed that will be used for random generation. A seed of 0 will generate a random seed instead. If playing multiplayer, ensure that not only does everyone use the same non-zero seed, but that all of the item counts perfectly match between every player!");
			if (SeedConfig.Value != 0L)
			{
				seed = SeedConfig.Value;
			}
			else
			{
				seed = (ulong)(Random.RandomRangeInt(0, 10000) ^ ((long)Random.RandomRangeInt(1, 10) << 16));
			}
			Rng = new Xoroshiro128Plus(seed);
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Seed is " + seed));
			NameSystem.Populate();
			object obj = <>c.<>9__13_0;
			if (obj == null)
			{
				CollectContentPackProvidersDelegate val = delegate(AddContentPackProviderDelegate addContentPackProvider)
				{
					addContentPackProvider.Invoke((IContentPackProvider)(object)(ContentPackProvider = new RandomContentPackProvider()));
				};
				<>c.<>9__13_0 = val;
				obj = (object)val;
			}
			ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj;
		}

		public void Update()
		{
			if (RandomContentPackProvider.AsyncTaskFinalizers.TryDequeue(out var result))
			{
				result();
			}
		}
	}
	public static class NameSystem
	{
		public static List<string> ItemNamePrefix = new List<string>
		{
			"Armor-Piercing", "Backup", "Bison", "Bundle of", "Bustling", "Cautious", "Delicate", "Energy", "Focus", "Lens-Maker's",
			"Monster", "Oddly-shaped", "Paul's Goat", "Personal", "Power", "Repulsion", "Roll of", "Rusted", "Soldier's", "Sticky",
			"Stun", "Topaz", "Tougher", "Tri-Tip", "AtG", "Berzerker's", "Death", "Fuel", "Ghor's", "Harvester's",
			"Hopoo", "Hunter's", "Ignition", "Kjaro's", "Leeching", "Lepton", "Old", "Old War", "Predatory", "Red",
			"Regenerating", "Rose", "Runald's", "Shipping Request", "Squid", "War", "Wax", "Will of the", "57 Leaf", "Alien",
			"Ben's", "Bottled", "Brilliant", "Ceremonial", "Defensive", "Frost", "Happiest", "Hardlight", "Interstellar", "Laser",
			"N'kuhana's", "Pocket", "Rejuvenation", "Resonance", "Sentient", "Shattering", "Soulbound", "Spare", "Symbiotic", "Unstable",
			"Wake of", "Charged", "Defense", "Empathy", "Genesis", "Halcyon", "Irradiant", "Little", "Mired", "Molten",
			"Queen's", "Titanic", "Beads of", "Brittle", "Defiant", "Essence of", "Eulogy", "Focused", "Gesture of the", "Hooks of",
			"Light Flux", "Mercurial", "Shaped", "Stone Flux", "Strides of", "Visions of", "Benthic", "Encrusted", "Lost Seer's", "Lysate",
			"Newly Hatched", "Plasma", "Pluripotent", "Safer", "Singularity", "Tenta", "Voidsent", "Weeping", "Blast", "Disposable",
			"Eccentric", "Executive", "Foreign", "Fuel", "Gnarled", "Gorag's", "Jade", "Milky", "Primordial", "Remote",
			"Royal", "Super Massive", "Crowdfunding", "Trophy Hunter's", "Volcanic", "Glowing", "Helfire", "Spinel", "Her", "His",
			"Ifrit's", "Suspicious", "The", "The", "The", "The", "The", "The", "The", "The",
			"The", "The", "Artificial", "Liquated", "Crystallized", "Wild", "Poison", "Primitive", "Stealthy", "Blazing",
			"Nacreous", "Invisible", "HIFU's", "RandomlyAwesome's", "Harb's", "iDeath's", "Twiner's", "Jace's", "Groove's", "Dotflare's",
			"Atlantean", "Gav's", "Mystic's", "Nebby's", "MonsterSkinMan's", "Pseudopulse's", "SuperKael's", "Scarlet", "Crazy", "Erised",
			"Froggin'", "Pale", "Black", "Heavy", "Rainbow", "Stranger", "Blood", "Malleable", "Abandoned", "Antler's",
			"Another", "Orange", "Mint", "Snake", "Closer", "Velvet", "Scorpio", "Gold", "Concealing", "Impossible",
			"Luminary", "Dead", "Ordinary", "Little", "Deep", "Divisionary", "Autonomous", "Glass", "Electric", "Hollow",
			"Cardinal", "Arch", "False", "Makeshift", "Non Human", "Outer", "Serial", "Ultrabeat", "Disconnected", "Ephemeral",
			"Lost", "Burning", "Toxic", "Dying", "Neo", "Doom", "Argent", "Translucent", "Soul", "Opaque",
			"Broken", "Peripheral", "Unprocessed", "Within", "Blue", "Motionless", "White", "Veil of", "Snecko", "Ironclad",
			"Silent", "Defective", "Perfected", "Reckless", "First", "Second", "Ghostly", "Infernal", "Flying", "Poisoned",
			"Quick", "Sneaky", "All-Out", "Endless", "Masterful", "Grand", "Piercing", "Bouncing", "Calculated", "Crippling",
			"Phantasmal", "Infinite", "Noxious", "Well-Laid", "Sweeping", "Genetic", "Reinforced", "Amplified", "Defragmented", "Biased",
			"Based", "Empty", "Flurry of", "Barrage of", "Volley of", "Salvo of", "Gate of", "Book of", "Aura of", "Barrier of",
			"Agony of", "Revival of", "Retrospect of", "Puzzle of", "Mask of", "Wand of", "Blade of", "Song of", "Eye of", "Belt of",
			"Helmet of", "Annoying", "Awful", "Bloody", "Clean", "Combative", "Courageous", "Cute", "Adorable", "Distinct",
			"Green", "Yellow", "Pink", "Monochromatic", "Charming", "Dangerous", "Drab", "Alive", "Bright", "Dark",
			"Evil", "Enchanting", "Fragile", "Jittery", "Mysterious", "Modern", "Perfect", "Plain", "Real", "Fake",
			"Tender", "Unusual", "Imaginary", "Enemy", "Glue", "Good", "Great", "Weak", "Strong", "New",
			"High", "Modern", "Major", "Minor", "Single", "Dual", "Abstract", "Chocolate", "King's", "Moon",
			"Legendary", "Mythical", "Epic", "Rare", "Ratio", "Wireless", "Platinum", "Contraband", "Crystallized", "Burnt",
			"Devil's", "God's", "Nuclear", "Bulwark's", "Umbral", "Random", "Randomized", "Meta", "Hard", "Guarding",
			"Armored", "Warding", "Precise", "Lucky", "Jagged", "Spiked", "Angry", "Menacing", "Brisk", "Fleeting",
			"Hasty", "Quick", "Wild", "Rash", "Intrepid", "Violent", "Arcane", "Keen", "Superior", "Forceful",
			"Broken", "Damaged", "Shoddy", "Hurtful", "Strong", "Unpleasant", "Weak", "Ruthless", "Godly", "Demonic",
			"Zealous", "Quick", "Deadly", "Agile", "Nimble", "Murderous", "Slow", "Sluggish", "Lazy", "Annoying",
			"Nasty", "Large", "Massive", "Dangerous", "Savage", "Sharp", "Pointy", "Tiny", "Terrible", "Small",
			"Dull", "Unhappy", "Bulky", "Shameful", "Heavy", "Light", "Legendary", "Sighted", "Rapid", "Hasty",
			"Intimidating", "Deadly", "Staunch", "Awful", "Lethargic", "Awkward", "Powerful", "Frenzying", "Unreal", "Mystic",
			"Adept", "Masterful", "Inept", "Ignorant", "Deranged", "Intense", "Taboo", "Celestial", "Furious", "Manic",
			"Mythical"
		};

		public static List<string> ItemName = new List<string>
		{
			"Insomnia", "Letter", "Experiment", "Jetpack", "Light", "Materials", "Buttersnips", "Feelings", "Zyglrox", "Racecar",
			"Passenger", "Groove", "Captain", "Eureka", "Muramasa", "Blast", "Facepalm", "Mute", "Ji", "Luck",
			"Ragnarok", "Diamond", "Bullfish", "Masamune", "Overture", "Ground", "Zero", "Parade", "Aura", "Minute",
			"Ultra", "Heart", "Scourge", "Alpha", "Gravity", "Hell", "Omega", "Price", "Motormouth", "Marigold",
			"Priestess", "Flatline", "Fire", "Prayer", "Lune", "Reptile", "Eagle", "Burner", "Ghost", "Glow",
			"Covenant", "Haven", "Ghilan", "Millenium", "Division", "Meridian", "Prototype", "Void", "Ruins", "Fear",
			"Waters", "Avatar", "Decay", "Spine", "Sky", "Movements", "Echoes", "Deadrose", "Rain", "Longing",
			"Grove", "Oil", "Scorpio", "Ocean", "Portrait", "Gold", "Fate", "Proxy", "Retrospect", "Nocturne",
			"Eclipse", "Singularity", "Embers", "Dystopia", "Hexes", "Utopia", "Messenger", "Cages", "King", "Orbital",
			"Mirror Image", "Arrow", "Matter", "Energy", "Blood", "Blood", "Extinction", "Impermanence", "Wonder", "Libertine",
			"Goliath", "Demi God", "Meteor", "Fake", "Skyline", "Snowblood", "Gungrave", "Shadow", "House", "Twilight",
			"Hymn", "Canvas", "Eidolon", "Remnant", "Fiction", "I", "Animus", "Deadnest", "Lavos", "Opiate",
			"Essence", "Somnus", "Providence", "Harmony", "Cimmerian", "Vein", "Club", "Molecule", "Space", "Follower",
			"Madness", "Face", "Imago", "Brahmastra", "Killer", "Hole", "Wave", "Lotus", "Nightmare", "Scars",
			"Revenge", "World", "Illusions", "Radiance", "Sequence", "Tragedy", "Convulsions", "Gasoline", "Body Bag", "Love",
			"Parasite", "Slayer", "Rip", "Gate", "Harbinger", "Headache", "Flight", "Mikasa", "Sandalphon", "Venom",
			"Horizon", "Tendinitis", "Blood & Water", "Surrender", "Everything", "Elevation", "Periphery", "Tesseract", "Augment", "Stasis",
			"Variations", "Afterglow", "Destruction", "Termina", "Ruin", "Glasses", "Clock", "Fork", "Bracelet", "Socks",
			"Lamp", "Remote", "Bread", "Credit Card", "Book", "Necronomicon", "Shawl", "Candle", "Knife", "Cannon",
			"Mortar", "Machine Gun", "Bola", "Boomerang", "Bow", "Crossbow", "Longbow", "Sling", "Spear", "Flamethrower",
			"Bayonet", "Halberd", "Lance", "Pike", "Quarterstaff", "Sabre", "Sword", "Tomahawk", "Grenade", "Mine",
			"Shrapnel", "Depth Charge", "C4", "Torpedo", "Trident Missile", "Peacekeeper Missile", "Bazooka", "Blowgun", "Blunderbuss", "Carbine",
			"Gatling Gun", "Handgun", "Pistol", "Revolver", "Derringer", "Arquebus", "Musket", "Rifle", "Shotgun", "Luger",
			"Repeater", "Submachine Gun", "Shrapnel", "Hammer", "Screwdriver", "Mallet", "Axe", "Saw", "Scissors", "Chisel",
			"Pliers", "Drill", "Iron", "Chainsaw", "Scraper", "Wire", "Nail", "Shovel", "Callipers", "Scalpel",
			"Gloves", "Needle", "Brain", "Lungs", "Liver", "Bladder", "Kidney", "Heart", "Stomach", "Eye",
			"Animal", "Balloon", "Battery", "Camera", "Disease", "Drug", "Guitar", "Ice", "Iron", "Quill",
			"Spoon", "Pen", "Box", "Brush", "Stockings", "Card", "Strike", "Bash", "Anger", "Clash",
			"Cleave", "Wave", "Bludgeon", "Carnage", "Rampage", "Armament", "Grit", "Warcry", "Battle Trance", "Pact",
			"Barrier", "Armor", "Blade", "Rage", "Wind", "Sentinel", "Weakness", "Offering", "Embrace", "Rupture",
			"Barricade", "Berserk", "Brutality", "Corruption", "Bane", "Flechettes", "Skewer", "Grand Finale", "Cloak", "Poison",
			"Wail", "Flask", "Gamble", "Catalyst", "Cloud", "Distraction", "Plan", "Terror", "Reflex", "Caltrops",
			"Footwork", "Fumes", "Lightning", "Barrage", "Claw", "Snap", "Driver", "Rebound", "Streamline", "Beam",
			"Blizzard", "Bullseye", "Melter", "Sunder", "Surge", "Hyperbeam", "Hologram", "Recursion", "Metronome", "Void",
			"Puzzle", "Piece", "Magnet", "Emblem", "Cuffs", "Flower", "Boneflower", "Booster", "Cake", "Plum",
			"Apple", "Cane", "Keeper", "Umbrella", "Edge", "Yoyo", "Fork", "Spoon", "Boomerang", "Chakram",
			"Machete", "Wrench", "Mace", "Meatball", "Hand", "Sickle", "Bat", "Tongue", "Inferno", "Key",
			"Dragon", "Waver", "Wrath", "Naginata", "Glaive", "Swordfish", "Pole", "Disc", "Hatchet", "Anchor",
			"Fist", "Pow", "Armor", "Stone", "Skull", "Emblem", "Glove", "Shell", "Blaster", "Cocktail",
			"Grenade", "Harpoon", "Launcher", "Atomosphere", "Zapper", "Staff", "Scythe", "Bolt", "Rod", "Fracture",
			"Serpent", "Burst", "Ray", "Blower", "Typhoon", "Syzygy", "Armageddon", "Flare", "Head", "Flask",
			"Harp", "Thorn", "Tune", "Arcanum", "Blaze", "Load"
		};

		public static List<string> ItemNamePlural = new List<string>
		{
			"Insomnias", "Letters", "Experiments", "Jetpacks", "Lights", "Materials", "Buttersnips", "Feelings", "Zyglroxes", "Racecars",
			"Passengers", "Grooves", "Captains", "Eurekas", "Muramasas", "Blasts", "Facepalms", "Mutes", "Jis", "Luck",
			"Ragnaroks", "Diamonds", "Bullfish", "Masamunes", "Overtures", "Grounds", "Zeros", "Parades", "Auras", "Minutes",
			"Ultras", "Hearts", "Scourges", "Alphas", "Gravities", "Hells", "Omegas", "Prices", "Motormouths", "Marigolds",
			"Priestesses", "Flatlines", "Fires", "Prayers", "Lunes", "Reptiles", "Eagles", "Burners", "Ghosts", "Glows",
			"Covenants", "Havens", "Ghilans", "Millenniums", "Divisions", "Meridians", "Prototypes", "Voids", "Ruins", "Fears",
			"Waters", "Avatars", "Decays", "Spines", "Skies", "Movements", "Echoes", "Deadroses", "Rains", "Longings",
			"Groves", "Oils", "Scorpios", "Oceans", "Portraits", "Golds", "Fates", "Proxies", "Retrospects", "Nocturnes",
			"Eclipses", "Singularities", "Embers", "Dystopias", "Hexes", "Utopias", "Messengers", "Cages", "Kings", "Orbitals",
			"Mirror Images", "Arrows", "Matters", "Energies", "Bloods", "Bloods", "Extinctions", "Impermanences", "Wonders", "Libertines",
			"Goliaths", "Demi Gods", "Meteors", "Fakes", "Skylines", "Snowbloods", "Gungraves", "Shadows", "Houses", "Twilights",
			"Hymns", "Canvases", "Eidolons", "Remnants", "Fictions", "I", "Animuses", "Deadnests", "Lavoses", "Opiates",
			"Essences", "Somnuses", "Providences", "Harmonies", "Cimmerians", "Veins", "Clubs", "Molecules", "Spaces", "Followers",
			"Madnesses", "Faces", "Imagos", "Brahmastras", "Killers", "Holes", "Waves", "Lotuses", "Nightmares", "Scars",
			"Revenges", "Worlds", "Illusions", "Radiances", "Sequences", "Tragedies", "Convulsions", "Gasolines", "Body Bags", "Loves",
			"Parasites", "Slayers", "Rips", "Gates", "Harbingers", "Headaches", "Flights", "Mikasas", "Sandalphons", "Venoms",
			"Horizons", "Tendinitises", "Blood & Waters", "Surrenders", "Everythings", "Elevations", "Peripheries", "Tesseracts", "Augments", "Stases",
			"Variations", "Afterglows", "Destructions", "Terminas", "Ruins", "Glasses", "Clocks", "Forks", "Bracelets", "Socks",
			"Lamps", "Remotes", "Breads", "Credit Cards", "Books", "Necronomicons", "Shawls", "Candles", "Knives", "Cannons",
			"Mortars", "Machine Guns", "Bolas", "Boomerangs", "Bows", "Crossbows", "Longbows", "Slings", "Spears", "Flamethrowers",
			"Bayonets", "Halberds", "Lances", "Pikes", "Quarterstaffs", "Sabres", "Swords", "Tomahawks", "Grenades", "Mines",
			"Shrapnels", "Depth Charges", "C4s", "Torpedoes", "Trident Missiles", "Peacekeeper Missiles", "Bazookas", "Blowguns", "Blunderbusses", "Carbines",
			"Gatling Guns", "Handguns", "Pistols", "Revolvers", "Derringers", "Arquebuses", "Muskets", "Rifles", "Shotguns", "Lugers",
			"Repeaters", "Submachine Guns", "Shrapnels", "Hammers", "Screwdrivers", "Mallets", "Axes", "Saws", "Scissors", "Chisels",
			"Pliers", "Drills", "Irons", "Chainsaws", "Scrapers", "Wires", "Nails", "Shovels", "Callipers", "Scalpels",
			"Gloves", "Needles", "Brains", "Lungs", "Livers", "Bladders", "Kidneys", "Hearts", "Stomachs", "Eyes",
			"Animals", "Balloons", "Batteries", "Cameras", "Diseases", "Drugs", "Guitars", "Ices", "Irons", "Quills",
			"Spoons", "Pens", "Boxes", "Brushes", "Stockings", "Cards", "Strikes", "Bashes", "Angers", "Clashes",
			"Cleaves", "Waves", "Bludgeons", "Carnages", "Rampages", "Armaments", "Grits", "Warcries", "Battle Trances", "Pacts",
			"Barriers", "Armors", "Blades", "Rages", "Winds", "Sentinels", "Weaknesses", "Offerings", "Embraces", "Ruptures",
			"Barricades", "Berserks", "Brutalities", "Corruptions", "Banes", "Flechettes", "Skewers", "Grand Finales", "Cloaks", "Poisons",
			"Wails", "Flasks", "Gambles", "Catalysts", "Clouds", "Distractions", "Plans", "Terrors", "Reflexes", "Caltrops",
			"Footworks", "Fumes", "Lightnings", "Barrages", "Claws", "Snaps", "Drivers", "Rebounds", "Streamlines", "Beams",
			"Blizzards", "Bullseyes", "Melters", "Sunders", "Surges", "Hyperbeams", "Holograms", "Recursions", "Metronomes", "Voids",
			"Puzzles", "Pieces", "Magnets", "Emblems", "Cuffs", "Flowers", "Boneflowers", "Boosters", "Cakes", "Plums",
			"Apples", "Canes", "Keepers", "Umbrellas", "Edges", "Yoyos", "Forks", "Spoons", "Boomerangs", "Chakrams",
			"Machetes", "Wrenches", "Maces", "Meatballs", "Hands", "Sickles", "Bats", "Tongues", "Infernos", "Keys",
			"Dragons", "Wavers", "Wraths", "Naginatas", "Glaives", "Swordfish", "Poles", "Discs", "Hatchets", "Anchors",
			"Fists", "Pows", "Armors", "Stones", "Skulls", "Emblems", "Gloves", "Shells", "Blasters", "Cocktails",
			"Grenades", "Harpoons", "Launchers", "Atmospheres", "Zappers", "Staffs", "Scythes", "Bolts", "Rods", "Fractures",
			"Serpents", "Bursts", "Rays", "Blowers", "Typhoons", "Syzygies", "Armageddons", "Flares", "Heads", "Flasks",
			"Harps", "Thorns", "Tunes", "Arcanums", "Blazes", "Loads"
		};

		public static List<string> LogDesc = new List<string>
		{
			"though", "you", "can", "give", "no", "more", "inspiring", "false", "courage", "i've",
			"got", "the", "reason", "to", "alter", "belief", "selfish", "paintings", "diamonds", "mutilate",
			"you", "can't", "erase", "the", "way", "i'm", "unappreciated", "but", "i", "can't",
			"sleep", "tonight", "embrace", "of", "the", "drink", "be", "hollow,", "swallow", "the",
			"pain", "splitting", "the", "fields", "all", "the", "noise", "agitates", "the", "stars",
			"have", "not", "aligned", "in", "your", "favor", "cross", "the", "line", "of",
			"obscenity", "ignoring", "the", "signs", "the", "smoke", "in", "your", "eyes", "carelessly",
			"of", "the", "edge", "with", "me", "it", "will", "paint", "your", "child",
			"white", "look", "to", "find", "a", "way,", "to", "love", "all", "the",
			"past", "promises,", "to", "keep", "you", "washed", "away", "sever", "the", "ties",
			"broken", "by", "the", "black", "and", "white", "now", "fade", "away", "the",
			"stars", "have", "not", "aligned", "in", "your", "favor", "cross", "the", "line",
			"of", "obscenity", "ignoring", "the", "signs", "the", "smoke", "in", "your", "eyes",
			"carelessly", "of", "the", "edge", "with", "me", "it", "will", "paint", "your",
			"child", "white", "look", "to", "find", "a", "way,", "to", "love", "all",
			"the", "past", "promises,", "to", "keep", "you", "washed", "away", "beyond", "my",
			"laid", "in", "the", "ground", "were", "lost", "far", "beyond", "the", "clouds",
			"stay", "in", "the", "darks", "of", "hell,", "it's", "me", "along", "the",
			"edge", "of", "belief", "a", "heart", "always", "in", "the", "stars", "will",
			"never", "fade", "decay", "in", "the", "ground", "were", "lost", "far", "beyond",
			"the", "clouds", "pray", "in", "the", "dark", "for", "now", "prey", "on",
			"the", "sounds", "with", "silence", "the", "darks", "around", "reach", "for", "a",
			"spark", "of", "doubt", "alive", "reach", "into", "the", "void", "touch", "the",
			"heart", "of", "darkness", "reach", "for", "the", "light", "feel", "the", "hand",
			"of", "god", "the", "uncertainty", "of", "my", "existence", "can", "be", "decided",
			"by", "choice", "of", "a", "path", "i", "must", "walk", "so,", "sick",
			"monotone", "culprit", "come", "on", "down", "and", "we'll", "talk", "about", "it",
			"bow", "down", "to", "the", "gods", "or", "keep", "on", "walking", "further",
			"on", "the", "cusp", "of", "our", "enlightenment", "we", "march", "with", "the",
			"sun", "at", "my", "back", "i", "take", "my", "first", "step", "outside",
			"shading", "my", "thoughts", "and", "perceptions", "done", "from", "the", "truth", "i'll",
			"never", "run", "be", "it", "the", "light", "or", "the", "shadow", "i",
			"walk", "in", "hand", "with", "all", "born", "of", "nothing", "my", "thoughts",
			"are", "unconditional", "and", "i", "despise", "the", "façade", "of", "the", "original",
			"martyr", "deep", "with", "the", "void", "higher", "searching", "for", "the", "light",
			"we", "leave", "this", "world", "behind", "the", "violent", "twisting", "of", "the",
			"fates", "the", "eminent", "collapse", "of", "our", "current", "state", "born", "of",
			"nothing", "my", "thoughts", "are", "unconditional", "and", "i", "despise", "the", "façade",
			"of", "the", "original", "martyr", "deep", "with", "the", "void", "higher", "searching",
			"for", "the", "light", "we", "leave", "this", "world", "behind", "bow", "down",
			"to", "the", "gods", "or", "keep", "on", "walking", "further", "on", "the",
			"cusp", "of", "our", "enlightenment", "we", "marchreach", "into", "the", "void", "touch",
			"the", "heart", "of", "darkness", "reach", "for", "the", "light", "feel", "the",
			"hand", "of", "god", "the", "uncertainty", "of", "my", "existence", "can", "be",
			"decided", "by", "choice", "of", "a", "path", "i", "must", "walk", "so,",
			"sick", "monotone", "culprit", "come", "on", "down", "and", "we'll", "talk", "about",
			"it", "bow", "down", "to", "the", "gods", "or", "keep", "on", "walking",
			"further", "on", "the", "cusp", "of", "our", "enlightenment", "we", "march", "with",
			"the", "sun", "at", "my", "back", "i", "take", "my", "first", "step",
			"outside", "shading", "my", "thoughts", "and", "perceptions", "done", "from", "the", "truth",
			"i'll", "never", "run", "be", "it", "the", "light", "or", "the", "shadow",
			"i", "walk", "in", "hand", "with", "all", "born", "of", "nothing", "my",
			"thoughts", "are", "unconditional", "and", "i", "despise", "the", "façade", "of", "the",
			"original", "martyr", "deep", "with", "the", "void", "higher", "searching", "for", "the",
			"light", "we", "leave", "this", "world", "behind", "the", "violent", "twisting", "of",
			"the", "fates", "the", "eminent", "collapse", "of", "our", "current", "state", "born",
			"of", "nothing", "my", "thoughts", "are", "unconditional", "and", "i", "despise", "the",
			"façade", "of", "the", "original", "martyr", "deep", "with", "the", "void", "higher",
			"searching", "for", "the", "light", "we", "leave", "this", "world", "behind", "bow",
			"down", "to", "the", "gods", "or", "keep", "on", "walking", "further", "on",
			"the", "cusp", "of", "our", "enlightenment", "we", "march", "flashing", "eyes", "of",
			"heat", "vessel", "through", "the", "deep", "by", "the", "son", "of", "night,",
			"unclean", "charon", "fear", "becomes", "belief", "for", "those", "who", "cannot", "pay",
			"the", "fee", "a", "coin", "to", "board", "the", "fleet", "or", "one",
			"hundred", "years", "disease", "row", "but", "the", "line", "it", "never", "fades",
			"the", "story", "is", "bound", "to", "unfold", "in", "the", "end", "love",
			"of", "mine,", "gone", "forever", "say", "goodbye", "to", "the", "sky", "bound",
			"by", "time,", "enter", "the", "ride", "absently,", "i", "will", "be", "motivate",
			"fortune", "can't", "escape", "from", "the", "arms", "of", "death", "along", "the",
			"shore", "many", "faces", "accumulate", "in", "preparation", "for", "the", "underworld", "single",
			"file", "ghost", "by", "ghost", "the", "deck", "fills", "up", "to", "embark",
			"on", "the", "final", "sail", "but", "the", "line", "it", "never", "fades",
			"the", "story", "is", "bound", "to", "unfold", "in", "the", "end", "alone",
			"we", "rise", "and", "fall", "awaiting", "the", "day,", "a", "life", "coalesced",
			"deep", "in", "the", "silence", "our", "fate", "is", "won", "create", "and",
			"consciously", "free", "the", "mind", "so", "far", "from", "where", "i", "lost",
			"my", "soul", "depart,", "implore,", "divine", "in", "our", "minds", "adventure", "is",
			"always", "listening", "just", "stay", "here", "the", "world", "isn't", "always", "listening",
			"disappear", "suffer", "in", "endless", "doubt", "holding", "onto", "the", "memories", "as",
			"they", "fade", "away", "these", "thoughts", "and", "sorrows", "will", "not", "remainflashing",
			"eyes", "of", "heat", "vessel", "through", "the", "deep", "by", "the", "son",
			"of", "night,", "unclean", "charon", "fear", "becomes", "belief", "for", "those", "who",
			"cannot", "pay", "the", "fee", "a", "coin", "to", "board", "the", "fleet",
			"or", "one", "hundred", "years", "disease", "row", "but", "the", "line", "it",
			"never", "fades", "the", "story", "is", "bound", "to", "unfold", "in", "the",
			"end", "love", "of", "mine,", "gone", "forever", "say", "goodbye", "to", "the",
			"sky", "bound", "by", "time,", "enter", "the", "ride", "absently,", "i", "will",
			"be", "motivate", "fortune", "can't", "escape", "from", "the", "arms", "of", "death",
			"along", "the", "shore", "many", "faces", "accumulate", "in", "preparation", "for", "the",
			"underworld", "single", "file", "ghost", "by", "ghost", "the", "deck", "fills", "up",
			"to", "embark", "on", "the", "final", "sail", "but", "the", "line", "it",
			"never", "fades", "the", "story", "is", "bound", "to", "unfold", "in", "the",
			"end", "alone", "we", "rise", "and", "fall", "awaiting", "the", "day,", "a",
			"life", "coalesced", "deep", "in", "the", "silence", "our", "fate", "is", "won",
			"create", "and", "consciously", "free", "the", "mind", "so", "far", "from", "where",
			"i", "lost", "my", "soul", "depart,", "implore,", "divine", "in", "our", "minds",
			"adventure", "is", "always", "listening", "just", "stay", "here", "the", "world", "isn't",
			"always", "listening", "disappear", "suffer", "in", "endless", "doubt", "holding", "onto", "the",
			"memories", "as", "they", "fade", "away", "these", "thoughts", "and", "sorrows", "will",
			"not", "remain", "these", "walls", "of", "time", "release", "my", "eyes", "move",
			"like", "the", "drift", "the", "cries,", "they", "resonate", "within", "the", "fabric",
			"tears", "before", "me", "break", "ties", "between", "the", "kin", "reaching", "for",
			"a", "way", "out", "of", "this", "dream", "i", "waste", "my", "breath",
			"ascending", "fears", "lead", "me", "astray", "the", "past", "brings", "them", "to",
			"be", "whats", "left", "to", "carry", "me", "but", "a", "memory", "the",
			"dream", "endures", "these", "lies", "forever", "at", "the", "edge,", "left", "surviving",
			"alone", "whats", "left", "as", "i", "wonder", "i've", "found", "a", "world",
			"where", "i", "am", "free", "inside", "that", "which", "is", "truth", "the",
			"ground", "upon", "which", "i", "have", "grown", "is", "not", "the", "same",
			"the", "fears,", "they've", "fallen", "away", "presently", "i've", "found", "i", "am",
			"not", "alone", "in", "a", "world", "of", "infinity", "sewn", "perceive", "beyond",
			"the", "seam", "a", "soul", "evolves", "as", "one", "in", "sunshine's", "view",
			"the", "absence", "of", "love", "behold", "what's", "blinding", "you", "serpent", "or",
			"dove", "between", "uncertainties", "tethered", "wings", "and", "captive", "dreams", "aren't", "worth",
			"the", "suffering", "open", "your", "eyes", "devotion", "deprived", "deny", "the", "very",
			"thing", "that", "you've", "accepted", "this", "life", "is", "about", "listen", "to",
			"my", "words", "defy", "devotion", "sick", "from", "the", "fall", "behind", "the",
			"wall", "so", "i", "demand", "of", "you,", "stand", "up", "and", "see",
			"before", "they", "saw", "what", "i", "was", "becoming", "before", "it", "kept",
			"me", "form", "reaching", "the", "light", "can't", "seem", "to", "understand", "it",
			"can't", "seem", "to", "know", "listen", "to", "the", "vacant", "soul", "the",
			"child", "has", "lost", "his", "way", "tension", "suffering", "the", "hole", "something",
			"against", "me", "i", "won't", "try", "never", "again", "i", "will", "not",
			"remember", "between", "the", "lines", "i", "sing", "with", "doubt", "behind", "this",
			"will", "fall", "lost", "in", "night", "and", "day", "breathing", "for", "me",
			"listen", "to", "the", "way", "i", "enter", "the", "world", "in", "time",
			"this", "lie", "will", "become", "me", "the", "things", "i've", "done", "to",
			"forget", "my", "dying", "senses", "weary", "from", "this", "act", "alone", "in",
			"vein", "six", "days", "away", "return", "from", "the", "fall", "just", "find",
			"a", "ray", "of", "light", "to", "help", "me", "ascend", "that", "is",
			"the", "only", "way", "moments", "lost", "searching", "for", "a", "dream", "that's",
			"real", "from", "my", "heart", "i'd", "give", "it", "all", "away", "just",
			"to", "know", "drifting", "away", "in", "truth", "revealed", "with", "perfect", "order",
			"life", "repeating", "endlessly", "light", "streaming", "from", "below", "this", "life", "is",
			"reborn", "from", "the", "shadow", "to", "the", "light", "moving", "through", "the",
			"time", "it's", "a", "cycle", "that", "repeats", "now", "forever", "don't", "touch",
			"the", "spinning", "wheel", "risking", "the", "progression", "just", "for", "a", "little",
			"taste", "but", "it's", "so", "natural", "call", "it", "human", "if", "you",
			"wish", "to", "save", "face", "losing", "control", "go", "with", "the", "flow",
			"get", "swept", "in", "the", "undertow", "where", "do", "we", "go", "you",
			"ask", "in", "simple", "question", "let", "me", "show", "you", "give", "me",
			"your", "hand", "and", "we", "shall", "fly", "moments", "lost", "searching", "for",
			"a", "dream", "that's", "real", "from", "my", "heart", "i'd", "give", "it",
			"all", "away", "just", "to", "know", "holding", "with", "every", "answer", "sealed.",
			"the", "path", "is", "hollowed,", "immortality", "we", "seek.", "light", "streaming", "from",
			"below,", "this", "life", "is", "reborn.", "from", "the", "shadow", "to", "the",
			"light", "moving", "through", "the", "time", "it's", "a", "cycle", "that", "repeats",
			"seeing", "all", "from", "infant", "eyes", "moving", "all", "through", "me", "it's",
			"a", "cycle", "that", "repeats", "where", "do", "we", "go", "you", "ask",
			"in", "simple", "question", "let", "me", "show", "you", "give", "me", "your",
			"hand", "and", "we", "shall", "fly", "into", "better", "days", "from", "dreams",
			"repose", "flesh", "of", "the", "ground", "deny", "kneel", "and", "grieve", "beseeching",
			"to", "no", "avail", "myth", "strikes", "our", "being", "human", "existence", "jaded",
			"by", "it's", "progress", "feeding,", "a", "manifest", "of", "the", "shadow", "below",
			"redefine", "the", "absolute", "crashing", "down", "through", "their", "eyes", "one", "can",
			"see", "fear", "sustained", "weakened", "by", "their", "minds", "caught", "in", "disbelief",
			"don't", "deny", "all", "shall", "see", "vacant", "souls", "shaping", "commonality", "in",
			"this", "moment", "we", "cannot", "deny", "what", "we", "are", "form", "a",
			"memory", "on", "turning", "wings", "and", "carve", "a", "way", "to", "ascension",
			"pray,", "withdrawn", "you", "just", "weep", "alone", "wait", "for", "a", "chance",
			"to", "grow", "culture", "folds", "the", "falling", "of", "love", "the", "darkness",
			"above", "repose", "within", "our", "numbers", "walking", "with", "a", "taste", "transposed",
			"image", "of", "being", "lost", "beyond", "the", "frame,", "end", "of", "days",
			"this", "time", "all", "memories", "surpass", "embrace", "in", "time", "all", "sense",
			"of", "life", "decays", "descend", "again", "all", "shall", "return", "to", "the",
			"sand", "through", "forever", "we", "cycle", "again", "re-ignite", "savior", "ablaze", "never",
			"ending", "return", "to", "me", "believe", "in", "memories", "to", "resurrect", "me",
			"besieged", "by", "falling", "dreams", "hold", "them", "tightly", "adorn", "my", "wings",
			"to", "thee,", "and", "use", "them", "nightly", "i'm", "neither", "angel", "nor",
			"a", "demon", "spawn", "though", "some", "will", "call", "me", "god", "gravity",
			"is", "just", "a", "law", "i've", "wrought", "hear", "temptation", "take", "the",
			"sky", "for", "all", "to", "see", "sheer", "elation", "to", "write", "in",
			"history", "i'm", "neither", "angel", "nor", "a", "demon", "spawn", "though", "some",
			"will", "call", "me", "god", "gravity", "is", "just", "a", "feeble", "plot",
			"when", "i", "said", "i'd", "never", "kneel", "again", "what", "i", "really",
			"meant", "was", "pull", "the", "pin", "because", "time", "is", "spent", "unite",
			"with", "ravens", "on", "their", "shadow", "flights", "as", "my", "nocturnal", "right",
			"gravity", "is", "just", "a", "mortal's", "vice", "when", "i", "said", "i'd",
			"never", "feel", "or", "see", "love", "and", "sight", "are", "last", "resorts",
			"for", "me", "strip", "away", "all", "the", "access", "components", "unveil", "a",
			"picture", "one", "sought", "to", "hide", "personalities", "are", "like", "fiction", "the",
			"derivative", "truth", "but", "with", "no", "substance", "violence", "and", "hate", "nourishment,",
			"territory", "and", "mate", "we", "are", "the", "product", "of", "some", "experiment",
			"while", "most", "live", "in", "ignorance", "some", "cant", "except", "the", "last",
			"thing", "we", "see", "is", "obsession,", "depth", "of", "insanity", "follow", "the",
			"source", "into", "the", "ground", "feeling", "all", "vibration", "flow", "inside", "of",
			"you", "we", "create", "the", "sound", "like", "our", "fathers", "long", "before",
			"us", "we've", "forgotten", "how", "sun", "down", "swiftly", "a", "less", "passive",
			"creature", "emerges", "mark", "the", "august", "steps", "we'll", "shine", "the", "way",
			"still", "the", "path", "remains", "the", "same", "some", "may", "find", "their",
			"own", "way", "forever", "like", "me", "thirst", "for", "a", "pool", "of",
			"consistency", "catch", "a", "bug", "for", "knowledge", "and", "the", "structure", "comes",
			"down", "a", "counter", "intuitive", "attack", "speak", "no", "evil", "and", "watch",
			"it", "flourish", "in", "a", "current", "state", "of", "madness", "lost", "the",
			"way", "feel", "the", "world", "below", "me", "painlessly", "ascend", "torn", "away",
			"dissolving", "the", "life", "i", "know", "grasp", "the", "light", "feel", "the",
			"glow", "enfolding", "exaltation", "isolate", "the", "answers", "are", "truths", "from", "lies",
			"loss", "of", "faith", "the", "path", "unravels", "before", "me", "unholy", "day",
			"i'm", "letting", "go", "through", "time", "these", "cries", "distort", "the", "view",
			"hopeless", "misdirection", "we", "all", "defy", "the", "chance", "to", "know", "this",
			"world", "is", "not", "the", "one", "i", "knew", "holding", "tight", "to",
			"our", "beliefs", "awake", "to", "what", "we", "have", "become", "void", "the",
			"past,", "create", "the", "new", "separate", "the", "few", "because", "i", "hold",
			"ability", "to", "lead", "astray", "now", "living", "through", "every", "day", "on",
			"the", "path", "between", "the", "frozen", "lines", "now", "no", "one", "ever",
			"will", "know", "about", "this", "experience", "will", "someone", "for", "once", "step",
			"back", "and", "gaze", "upon", "the", "world", "through", "my", "eyes", "drawn",
			"behind", "the", "point", "of", "view", "seal", "us", "from", "the", "truth",
			"on", "our", "own", "the", "fear", "of", "life", "decays", "time", "alone",
			"reveals", "our", "fatal", "aspect", "of", "arrogance", "in", "life", "we're", "not",
			"the", "only", "ones", "free", "from", "the", "walls", "i'm", "alive", "lost",
			"the", "way", "the", "path", "unravels", "before", "me", "unholy", "day", "i'm",
			"letting", "go", "contest", "to", "modern", "theory", "incapable", "of", "any", "progress",
			"analyzed,", "developed", "imitating", "consciousness", "at", "least", "what", "it", "seems", "to",
			"be", "uniform", "and", "unrevealing", "the", "machine", "cut", "off", "the", "silent",
			"space", "cut", "off", "the", "silence", "i'm", "aware", "of", "ancient", "myths",
			"that", "signal", "to", "our", "coming", "time", "waits", "for", "none", "the",
			"dying", "age", "of", "these", "feeble", "beings", "is", "closing", "what", "should",
			"we", "do", "with", "their", "lives", "forgive", "them", "for", "trespass", "spare",
			"them", "termination", "or", "let", "them", "die", "touched", "by", "the", "hand",
			"of", "the", "creator", "tantalizing", "the", "will", "of", "the", "maker", "subject",
			"to", "a", "wide", "array", "of", "thoughts", "emotions", "held", "by", "this",
			"rationality", "worlds", "collide", "no", "peace", "of", "mind", "analyzed,", "developed", "imitating",
			"consciousness", "at", "least", "what", "it", "seems", "to", "be", "consciously", "evolving",
			"conceived", "in", "machines", "separated", "by", "perceptions", "of", "these", "dreams", "elevate",
			"this", "warped", "sense", "of", "reality", "i", "can't", "understand", "myself", "touched",
			"by", "the", "hand", "of", "the", "creator", "tantalizing", "the", "will", "of",
			"the", "maker", "subject", "to", "a", "wide", "variety", "of", "thoughts", "emotions",
			"held", "by", "this", "reality", "the", "edge", "of", "existence", "holds", "what",
			"we", "all", "have", "feared", "we", "curse", "your", "creation", "die", "by",
			"our", "hands", "in", "vain", "no", "peace", "of", "mind", "uniform", "and",
			"unrevealing", "the", "machine", "freedom", "beyond", "our", "control", "partition,", "they", "break",
			"out", "in", "endless", "stride", "i'm", "on", "the", "floor", "in", "travail",
			"faithful", "days", "fall", "memories", "hold", "free", "my", "soul", "seeking", "within",
			"the", "curtain", "call", "fleeing", "our", "fate", "every", "step", "now", "recalled",
			"down", "the", "drive", "staying", "so", "close", "retraction", "weighs", "my", "soul",
			"we", "are", "thunder", "we", "are", "all", "the", "space", "in", "tow",
			"now", "again", "this", "happening", "my", "handle", "is", "honest", "calculation", "free",
			"of", "the", "pain", "seeking", "the", "glow", "we", "both", "need", "it",
			"so", "time", "will", "give", "way", "time", "will", "formulate", "seeking", "within",
			"the", "curtain", "call", "fleeing", "our", "fate", "every", "step", "evolved", "don't",
			"deny", "staying", "so", "close", "creation", "is", "our", "goal", "discretion,", "the",
			"only", "thing", "that", "made", "me", "incomplete", "cast", "the", "sail,", "just",
			"to", "spin", "this", "fate", "cross", "the", "empty", "sect", "in", "flight",
			"pleasant", "memories", "redefine", "all", "that's", "left", "the", "sound", "it", "makes",
			"me", "scream", "i", "can", "hear", "your", "voice", "at", "night", "your",
			"light", "lost", "in", "a", "waking", "dream", "within", "freedom", "is", "not",
			"of", "control", "endless", "the", "chase,", "pushing", "through", "i'm", "so", "engulfed",
			"falling", "to", "strain,", "but", "i", "still", "persist", "i'd", "like", "to",
			"paint", "this", "tapestry", "with", "our", "blood", "to", "represent", "the", "symmetry",
			"finding", "a", "sickened", "result", "of", "possibility", "refuse", "the", "violent", "source",
			"and", "pain", "that", "made", "you", "left", "to", "deny", "that", "it",
			"will", "change", "with", "no", "solitude", "let", "us", "take", "this", "train",
			"leaving", "the", "form,", "stretching", "far", "beyond", "what", "i", "can", "see",
			"chasing", "the", "race", "left", "to", "complete", "my", "revelation", "reaction", "creates",
			"the", "fall", "realize", "these", "are", "broken", "words", "shattered", "thoughts", "amend",
			"see", "beyond", "the", "only", "present", "road", "just", "let", "go", "counsel",
			"to", "ascend", "see", "beyond", "the", "only", "present", "hold", "he", "only",
			"present", "hold", "let", "go", "cannot", "comprehend", "leave", "it", "all", "to",
			"find", "a", "moment's", "love", "i", "am", "working", "to", "be", "complete",
			"no", "more", "adversity", "growing", "consciously", "my", "revelation", "reaction", "is", "not",
			"the", "call", "rely", "on", "my", "new", "self", "rising", "on", "my",
			"own", "sage", "advice,", "embrace", "wisdom", "hang", "the", "past", "take", "the",
			"helm", "fashion", "a", "new", "future", "to", "live", "in", "your", "flame",
			"i", "see", "regret", "i've", "awakened", "to", "feel", "a", "piece", "of",
			"distant", "harmony", "how", "could", "i", "not", "see", "possibilities", "and", "unlimited",
			"passion", "hello", "luminescent", "being", "walking", "outside", "of", "my", "last", "identity",
			"celebrate", "for", "in", "the", "end", "we'll", "meet", "inequality", "i", "see",
			"light", "i", "see", "light", "in", "your", "eyes", "as", "we", "grow",
			"with", "rusty", "nails", "in", "the", "coffin", "among", "potential", "of", "diamonds",
			"and", "pearls.", "this", "sea", "of", "blood", "fills", "the", "crevice", "between",
			"our", "lifeless", "body", "and", "the", "whispers", "for", "which", "we", "reach.",
			"behold", "as", "the", "water", "floods", "the", "red.", "time", "commands", "of",
			"us", "to", "meet", "again", "in", "silence.", "awakening", "to", "a", "higher",
			"light.", "if", "we", "sever", "the", "distance", "between", "one", "another,", "and",
			"cross", "out", "the", "fear", "we", "learn,", "all", "are", "one", "and",
			"nothing", "is", "keeping", "the", "love", "in", "our", "souls", "from", "bursting",
			"infinitely.", "now", "what", "have", "we", "become?", "an", "entity", "of", "survival.",
			"rotting", "flesh", "of", "the", "fallen", "stains", "our", "ego.", "now", "the",
			"moment", "is", "at", "hand", "to", "rise", "above", "what", "was", "once",
			"so", "prevalent.", "folding", "time", "within", "the", "mortal", "boundaries", "lived", "upon.",
			"moving", "onward.", "we", "will", "never", "fade.", "fall", "into", "another", "dead",
			"end.", "will", "it", "end", "the", "same?", "lines", "are", "drawn", "for",
			"the", "rest", "of", "the", "story.", "if", "we", "sever", "the", "distance",
			"between", "one", "another,", "and", "cross", "out", "the", "fear", "we", "learn,",
			"all", "are", "one", "and", "nothing", "is", "keeping", "the", "love", "in",
			"our", "souls", "from", "bursting", "infinitely.", "this", "life", "is", "one", "that",
			"we", "must", "live.", "the", "peace", "once", "embraced", "from", "so", "long",
			"ago", "sleeps", "deep", "within", "our", "mind.", "stay", "forever", "or", "be",
			"erased", "from", "the", "harmonic", "physical", "state", "of", "being", "existing", "in",
			"this", "dimension.", "lies", "are", "covered,", "but", "only", "for", "the", "moment.",
			"the", "blood", "of", "the", "weak", "will", "carve", "the", "way", "for",
			"the", "innocent.", "the", "blood", "of", "the", "weak", "will", "carve", "the",
			"way", "for", "the", "innocent.", "lives", "erased", "their", "memories", "will", "never",
			"surface", "again", "now", "our", "plan", "for", "domination", "is", "at", "hand",
			"harvest", "the", "flesh,", "enslave", "the", "planet", "they", "call", "home", "for",
			"one", "thousand", "years", "this", "is", "the", "age", "of", "a", "new",
			"direction", "no", "one", "stands", "in", "the", "way", "of", "our", "reign",
			"over", "this", "sector", "that", "has", "been", "newly", "claimed", "i'll", "evade",
			"the", "sun", "if", "life", "is", "given", "to", "those", "i", "the",
			"shadows", "now", "i", "must", "erase", "the", "sight", "of", "the", "living",
			"and", "seperate", "from", "the", "eyes", "swallow", "the", "ink", "down,", "might",
			"as", "well", "we're", "all", "destined", "to", "fall", "off", "the", "pages",
			"we've", "written", "call", "it", "fate", "or", "whatever", "the", "brain", "will",
			"label", "it", "as", "we", "we", "return", "to", "the", "planet", "reason",
			"with", "the", "body", "the", "death", "isn't", "what", "it", "seems", "we",
			"are", "the", "ones", "to", "be", "extinct", "only", "forgiveness", "can", "end",
			"this", "death", "it", "seems", "so", "imminent", "there", "is", "nothing", "that",
			"can", "be", "done", "here", "suppressing", "the", "impending", "destruction", "of", "our",
			"race", "as", "we", "know", "eyes", "from", "around,", "they", "gather", "in",
			"disbelief", "of", "the", "air", "we", "breathe", "and", "the", "little", "we",
			"know", "of", "it", "this", "is", "a", "time", "of", "evaluation", "collecting",
			"the", "minds", "of", "a", "conscious", "infinity", "accepting", "the", "concequence", "of",
			"the", "ignorance", "changes", "how", "you", "perceive", "within", "this", "a", "truth",
			"and", "a", "reason", "met", "with", "distaste", "falling", "from", "the", "heavens",
			"above", "we've", "been", "dethroned", "our", "lives", "must", "replay", "in", "hope",
			"of", "ascending", "peacefuly", "let", "the", "violence", "bring", "us", "home", "and",
			"take", "us", "away", "from", "what", "we", "know", "somewhere", "beyond", "this",
			"sight", "nothing", "so", "clear", "reaching", "in", "endless", "night", "colors", "disappear",
			"separate", "the", "air", "we", "breathe", "sell", "the", "lies", "we", "all",
			"will", "speak", "don't", "ever", "ask", "the", "questions", "challenging", "the", "prophecies",
			"silent", "storm", "following", "the", "stars", "shifting", "form", "dwell", "in", "reverie",
			"resurrection", "in", "time", "we", "suppress", "every", "reason", "through", "these", "eyes",
			"perception", "bleeds", "mortality", "from", "my", "soul", "nothing", "can", "change", "the",
			"reality", "of", "it", "all", "will", "never", "be", "left", "for", "us",
			"to", "find", "somewhere", "withing", "the", "glow,", "enter", "we", "fall", "holding",
			"the", "shadow", "close", "we", "hear", "the", "call", "solace", "finding", "even",
			"flow", "in", "life", "don't", "ever", "ask", "the", "questions", "challenging", "the",
			"prophecies", "pleasant", "this", "solitude", "in", "violent", "forms", "and", "waves", "the",
			"final", "blow", "is", "struck", "silent", "storm", "following", "the", "stars", "shifting",
			"form", "dwell", "in", "reverie", "moving", "forward", "on", "the", "path", "deliver",
			"us", "from", "the", "daggers", "in", "our", "hearts", "the", "final", "blow",
			"is", "struck", "pleasant", "this", "solitude", "in", "violent", "forms", "and", "waves",
			"the", "final", "blow", "is", "struck", "with", "or", "without", "a", "choice",
			"to", "confront", "every", "vice", "without", "a", "voice", "dont", "deny", "your",
			"will", "to", "live", "is", "shattered", "and", "your", "hope", "is", "a",
			"jaded", "lie", "the", "quality", "within", "will", "shape", "the", "path", "we",
			"choose", "all", "this", "time", "to", "call", "the", "things", "they", "did",
			"a", "lie", "keep", "it", "to", "yourself", "so", "i", "can", "shove",
			"the", "dark", "aside", "and", "i", "wont", "have", "to", "tear", "the",
			"honesty", "from", "everything", "we", "used", "to", "be", "again", "the", "quality",
			"within", "will", "shape", "the", "path", "we", "choose", "the", "quality", "we",
			"loose", "will", "form", "the", "grave", "we", "use", "legions", "are", "sent",
			"from", "the", "negative", "elite", "sucking", "life", "from", "the", "world", "we",
			"live", "shading", "the", "knowledge", "of", "oneness", "and", "feeding", "the", "shadow",
			"within", "the", "abyss", "found", "internally", "strength", "to", "change", "our", "misery",
			"shining", "light", "carves", "the", "way", "for", "their", "demise", "dissecting", "the",
			"patterns", "in", "our", "own", "lives", "to", "sift", "love", "from", "experience",
			"remember", "why", "we", "have", "come", "silently", "ascending", "heeding", "the", "universal",
			"call", "as", "we", "grow", "the", "shadow", "cast", "is", "nearing", "its",
			"retreat", "we", "are", "now", "in", "the", "time", "of", "the", "fall"
		};

		public static void Populate()
		{
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			if (!string.IsNullOrEmpty(directoryName) && File.Exists(Path.Combine(directoryName, "lore.txt")))
			{
				string[] collection = File.OpenText(Assembly.GetExecutingAssembly().Location.Replace("RandomlyGeneratedItems.dll", "lore.txt")).ReadToEnd().Replace("\n", "")
					.Split(' ');
				LogDesc.AddRange(collection);
			}
			else
			{
				Main.RgiLogger.LogWarning((object)("Could not find lore text file at path: " + Assembly.GetExecutingAssembly().Location.Replace("RandomlyGeneratedItems.dll", "lore.txt")));
			}
		}
	}
	public class RandomContentPackProvider : IContentPackProvider
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<ItemDef, bool> <>9__25_1;

			public static Func<KeyValuePair<ItemDef, ItemEffects>, bool> <>9__25_4;

			public static Func<ItemDef, bool> <>9__25_2;

			public static Func<KeyValuePair<ItemDef, ItemEffects>, bool> <>9__25_5;

			public static Func<ItemDef, bool> <>9__25_3;

			public static Func<KeyValuePair<ItemDef, ItemEffects>, bool> <>9__25_6;

			public static hook_HasViewedViewable <>9__27_1;

			public static hook_RecalculateStats <>9__27_7;

			public static hook_ServerDamageDealt <>9__27_8;

			public static hook_OnSkillActivated <>9__27_9;

			public static hook_OnCharacterDeath <>9__27_10;

			public static hook_Heal <>9__27_11;

			public static hook_OnInteractionBegin <>9__27_12;

			public static hook_CalculateEquipmentCooldownScale <>9__27_14;

			public static Func<int, int, bool> <>9__41_0;

			public static Func<int, int, bool> <>9__41_1;

			public static Func<Color32, Color32> <>9__43_2;

			public static Func<EquipmentDef, bool> <>9__50_3;

			internal bool <LoadStaticContentAsync>b__25_1(ItemDef itemDef)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Invalid comparison between Unknown and I4
				return (int)itemDef.tier == 0;
			}

			internal bool <LoadStaticContentAsync>b__25_4(KeyValuePair<ItemDef, ItemEffects> itemDef)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Invalid comparison between Unknown and I4
				return (int)itemDef.Key.tier == 6;
			}

			internal bool <LoadStaticContentAsync>b__25_2(ItemDef itemDef)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Invalid comparison between Unknown and I4
				return (int)itemDef.tier == 1;
			}

			internal bool <LoadStaticContentAsync>b__25_5(KeyValuePair<ItemDef, ItemEffects> itemDef)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Invalid comparison between Unknown and I4
				return (int)itemDef.Key.tier == 7;
			}

			internal bool <LoadStaticContentAsync>b__25_3(ItemDef itemDef)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Invalid comparison between Unknown and I4
				return (int)itemDef.tier == 2;
			}

			internal bool <LoadStaticContentAsync>b__25_6(KeyValuePair<ItemDef, ItemEffects> itemDef)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Invalid comparison between Unknown and I4
				return (int)itemDef.Key.tier == 8;
			}

			internal bool <FinalizeAsync>b__27_1(orig_HasViewedViewable orig, UserProfile self, string viewableName)
			{
				if (orig.Invoke(self, viewableName))
				{
					return true;
				}
				if (viewableName != null)
				{
					if (!viewableName.Contains("ITEM_RGI"))
					{
						return viewableName.Contains("EQUIPMENT_RGI");
					}
					return true;
				}
				return false;
			}

			internal void <FinalizeAsync>b__27_7(orig_RecalculateStats orig, CharacterBody self)
			{
				orig.Invoke(self);
				float value = self.maxJumpCount;
				AbstractEffects.ApplyPassiveSpecialStat(self, "MaxJumpCount", ref value);
				self.maxJumpCount = (int)Math.Round(value);
			}

			internal void <FinalizeAsync>b__27_8(orig_ServerDamageDealt orig, DamageReport report)
			{
				AbstractEffects.TriggerEffects("Hit", report.attackerBody, report, null);
				if (report.damageInfo.crit)
				{
					AbstractEffects.TriggerEffects("Crit", report.attackerBody, report, null);
				}
				AbstractEffects.TriggerEffects("Hurt", report.victimBody, report, null);
				orig.Invoke(report);
			}

			internal void <FinalizeAsync>b__27_9(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill)
			{
				AbstractEffects.TriggerEffects("Skill", self, new Dictionary<string, object> { ["skill"] = skill });
				orig.Invoke(self, skill);
			}

			internal void <FinalizeAsync>b__27_10(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
			{
				GameObject attacker = damageReport.damageInfo.attacker;
				AbstractEffects.TriggerEffects("Kill", (attacker != null) ? attacker.GetComponent<CharacterBody>() : null, damageReport, null);
				if (damageReport.victimIsElite)
				{
					GameObject attacker2 = damageReport.damageInfo.attacker;
					AbstractEffects.TriggerEffects("EliteKill", (attacker2 != null) ? attacker2.GetComponent<CharacterBody>() : null, damageReport, null);
				}
				orig.Invoke(self, damageReport);
			}

			internal float <FinalizeAsync>b__27_11(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen)
			{
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				if (nonRegen)
				{
					Dictionary<string, object> dictionary = new Dictionary<string, object> { ["amount"] = amount };
					AbstractEffects.TriggerEffects("Heal", self.body, (ProcChainMask?)procChainMask, dictionary);
					amount = (float)dictionary["amount"];
				}
				return orig.Invoke(self, amount, procChainMask, nonRegen);
			}

			internal void <FinalizeAsync>b__27_12(orig_OnInteractionBegin orig, GlobalEventManager self, Interactor interactor, IInteractable interactable, GameObject interactableObject)
			{
				AbstractEffects.TriggerEffects("Interact", ((Component)interactor).GetComponent<CharacterBody>(), new Dictionary<string, object>
				{
					["interactor"] = interactor,
					["interactable"] = interactable,
					["interactableObject"] = interactableObject
				});
				orig.Invoke(self, interactor, interactable, interactableObject);
			}

			internal float <FinalizeAsync>b__27_14(orig_CalculateEquipmentCooldownScale orig, Inventory self)
			{
				float value = orig.Invoke(self);
				CharacterMaster component = ((Component)self).GetComponent<CharacterMaster>();
				AbstractEffects.ApplyPassiveSpecialStat((component != null) ? component.GetBody() : null, "EquipmentCooldownScale", ref value);
				return value;
			}

			internal bool <GenerateNoiseTex>b__41_0(int x, int y)
			{
				return true;
			}

			internal bool <GenerateNoiseTex>b__41_1(int x, int y)
			{
				return false;
			}

			internal Color32 <GenerateInactiveIcon>b__43_2(Color32 c)
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_007f: Unknown result type (might be due to invalid IL or missing references)
				float num = (float)(int)c.r / 255f * 0.2126f + (float)(int)c.g / 255f * 0.7152f + (float)(int)c.b / 255f * 0.0722f;
				num = (((double)num <= 0.0031308) ? (num * 12.92f) : (Mathf.Pow(num, 5f / 12f) * 1.055f - 0.055f));
				byte num2 = (byte)Mathf.RoundToInt(num * 255f);
				return new Color32(num2, num2, num2, c.a);
			}

			internal bool <RandomizeEquipmentPickup>b__50_3(EquipmentDef equipmentDef)
			{
				return !equipmentDef.isLunar;
			}

			internal bool <.cctor>b__51_0(int x, int y)
			{
				if (x > 128 && x < 384)
				{
					if (y > 128)
					{
						return y < 384;
					}
					return false;
				}
				return false;
			}

			internal bool <.cctor>b__51_1(int x, int y)
			{
				if (x > 112 && x < 400)
				{
					if (y > 112)
					{
						return y < 400;
					}
					return false;
				}
				return false;
			}

			internal bool <.cctor>b__51_2(int x, int y)
			{
				return Mathf.Abs(x - 256) + Mathf.Abs(y - 256) < 192;
			}

			internal bool <.cctor>b__51_3(int x, int y)
			{
				return Mathf.Abs(x - 256) + Mathf.Abs(y - 256) < 208;
			}

			internal bool <.cctor>b__51_4(int x, int y)
			{
				return Mathf.Pow((float)(x - 256), 2f) + Mathf.Pow((float)(y - 256), 2f) < 36864f;
			}

			internal bool <.cctor>b__51_5(int x, int y)
			{
				return Mathf.Pow((float)(x - 256), 2f) + Mathf.Pow((float)(y - 256), 2f) < 43264f;
			}

			internal bool <.cctor>b__51_6(int x, int y)
			{
				return Mathf.Abs(x - 256) * 2 + Mathf.Abs(y - 256) < 192;
			}

			internal bool <.cctor>b__51_7(int x, int y)
			{
				return Mathf.Abs(x - 256) * 2 + Mathf.Abs(y - 256) < 208;
			}

			internal bool <.cctor>b__51_8(int x, int y)
			{
				if (Mathf.Abs(y - 256) >= 96)
				{
					return Mathf.Pow((float)(x - 256), 2f) + Mathf.Pow((float)(Mathf.Abs(y - 256) - 96), 2f) < 9216f;
				}
				return Mathf.Abs(x - 256) < 96;
			}

			internal bool <.cctor>b__51_9(int x, int y)
			{
				if (Mathf.Abs(y - 256) >= 96)
				{
					return Mathf.Pow((float)(x - 256), 2f) + Mathf.Pow((float)(Mathf.Abs(y - 256) - 96), 2f) < 12544f;
				}
				return Mathf.Abs(x - 256) < 112;
			}
		}

		public const int RandomSpriteResolution = 512;

		public const int RandomSpriteNoiseGranularity = 4;

		public const int RandomSpriteNoiseResolution = 128;

		public const float RandomSpriteNoiseScale = 4f;

		public static readonly Dictionary<ItemTier, Color> TierColors = new Dictionary<ItemTier, Color>
		{
			[(ItemTier)0] = new Color(0.88f, 0.89f, 0.89f),
			[(ItemTier)1] = new Color(0.47f, 0.77f, 0.26f),
			[(ItemTier)2] = new Color(0.89f, 0.31f, 0.19f),
			[(ItemTier)4] = new Color(0.78f, 0.85f, 0.16f),
			[(ItemTier)6] = new Color(0.85f, 0.28f, 0.59f),
			[(ItemTier)7] = new Color(0.85f, 0.28f, 0.59f),
			[(ItemTier)8] = new Color(0.85f, 0.28f, 0.59f),
			[(ItemTier)9] = new Color(0.85f, 0.28f, 0.59f),
			[(ItemTier)3] = new Color(0.28f, 0.88f, 0.95f)
		};

		public static readonly Color EquipmentColor = new Color(0.89f, 0.57f, 0.19f);

		public static readonly Dictionary<SpriteShape, Tuple<Func<int, int, bool>, Func<int, int, bool>>> ShapeDelegates = new Dictionary<SpriteShape, Tuple<Func<int, int, bool>, Func<int, int, bool>>>
		{
			[SpriteShape.Square] = Tuple.Create<Func<int, int, bool>, Func<int, int, bool>>((int x, int y) => x > 128 && x < 384 && y > 128 && y < 384, (int x, int y) => x > 112 && x < 400 && y > 112 && y < 400),
			[SpriteShape.Rhombus] = Tuple.Create<Func<int, int, bool>, Func<int, int, bool>>((int x, int y) => Mathf.Abs(x - 256) + Mathf.Abs(y - 256) < 192, (int x, int y) => Mathf.Abs(x - 256) + Mathf.Abs(y - 256) < 208),
			[SpriteShape.Circle] = Tuple.Create<Func<int, int, bool>, Func<int, int, bool>>((int x, int y) => Mathf.Pow((float)(x - 256), 2f) + Mathf.Pow((float)(y - 256), 2f) < 36864f, (int x, int y) => Mathf.Pow((float)(x - 256), 2f) + Mathf.Pow((float)(y - 256), 2f) < 43264f),
			[SpriteShape.Diamond] = Tuple.Create<Func<int, int, bool>, Func<int, int, bool>>((int x, int y) => Mathf.Abs(x - 256) * 2 + Mathf.Abs(y - 256) < 192, (int x, int y) => Mathf.Abs(x - 256) * 2 + Mathf.Abs(y - 256) < 208),
			[SpriteShape.Cylinder] = Tuple.Create<Func<int, int, bool>, Func<int, int, bool>>((int x, int y) => (Mathf.Abs(y - 256) >= 96) ? (Mathf.Pow((float)(x - 256), 2f) + Mathf.Pow((float)(Mathf.Abs(y - 256) - 96), 2f) < 9216f) : (Mathf.Abs(x - 256) < 96), (int x, int y) => (Mathf.Abs(y - 256) >= 96) ? (Mathf.Pow((float)(x - 256), 2f) + Mathf.Pow((float)(Mathf.Abs(y - 256) - 96), 2f) < 12544f) : (Mathf.Abs(x - 256) < 112))
		};

		private static Shader HgStandard;

		private static FastNoiseLite Noise;

		public static readonly Queue<Action> AsyncTaskFinalizers = new Queue<Action>();

		public ContentPack ContentPack = new ContentPack();

		public ExpansionDef RgiExpansion;

		public ArtifactDef ArtifactFrivolity;

		public SortedDictionary<ItemTier, int> ItemTypeCounts = new SortedDictionary<ItemTier, int>();

		public int EquipmentCount;

		public int LunarEquipmentCount;

		public bool VoidsConvertNormals;

		public readonly List<ItemDef> GeneratedItemDefs = new List<ItemDef>();

		public readonly Dictionary<ItemDef, ItemEffects> GeneratedItemEffects = new Dictionary<ItemDef, ItemEffects>();

		public readonly List<EquipmentDef> GeneratedEquipmentDefs = new List<EquipmentDef>();

		public readonly Dictionary<EquipmentDef, EquipmentEffects> GeneratedEquipmentEffects = new Dictionary<EquipmentDef, EquipmentEffects>();

		public readonly HashSet<string> GeneratedNames = new HashSet<string>();

		public string identifier => "RandomlyGeneratedItems";

		public RandomContentPackProvider()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			HgStandard = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion();
			Noise = new FastNoiseLite(Main.Rng.nextInt);
			Noise.SetNoiseType(FastNoiseLite.NoiseType.OpenSimplex2);
			Noise.SetFrequency(1f / 32f);
		}

		public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs contentPackArgs)
		{
			ContentPack.identifier = identifier;
			RgiExpansion = ScriptableObject.CreateInstance<ExpansionDef>();
			((Object)RgiExpansion).name = "EXPANSION_RGI";
			RgiExpansion.nameToken = ((Object)RgiExpansion).name + "_NAME";
			RgiExpansion.descriptionToken = ((Object)RgiExpansion).name + "_DESC";
			RgiExpansion.iconSprite = GenerateIcon((Color[])(object)new Color[1] { Color.green }, Color.green, SpriteShape.Rhombus);
			RgiExpansion.disabledIconSprite = GenerateIcon((Color[])(object)new Color[1] { Color.gray }, Color.gray, SpriteShape.Rhombus);
			LanguageAPI.Add(RgiExpansion.nameToken, "Randomly Generated Items");
			LanguageAPI.Add(RgiExpansion.descriptionToken, "Enables randomly-generated items. Note that you must fully restart the game in order to generate a new batch of items.");
			ContentPack.expansionDefs.Add((ExpansionDef[])(object)new ExpansionDef[1] { RgiExpansion });
			ArtifactFrivolity = ScriptableObject.CreateInstance<ArtifactDef>();
			ArtifactFrivolity.cachedName = "ARTIFACT_RGI_FRIVOLITY";
			ArtifactFrivolity.nameToken = ArtifactFrivolity.cachedName + "_NAME";
			ArtifactFrivolity.descriptionToken = ArtifactFrivolity.cachedName + "_DESC";
			ArtifactFrivolity.requiredExpansion = RgiExpansion;
			ArtifactFrivolity.smallIconSelectedSprite = GenerateIcon((Color[])(object)new Color[1]
			{
				new Color(0.9f, 0.75f, 0.9f)
			}, new Color(0.9f, 0.75f, 0.9f), SpriteShape.Square);
			ArtifactFrivolity.smallIconDeselectedSprite = GenerateIcon((Color[])(object)new Color[1] { Color.gray }, Color.gray, SpriteShape.Square);
			LanguageAPI.Add(ArtifactFrivolity.nameToken, "Artifact of Frivolity");
			LanguageAPI.Add(ArtifactFrivolity.descriptionToken, "Disables all items except for randomly-generated ones.");
			ContentPack.artifactDefs.Add((ArtifactDef[])(object)new ArtifactDef[1] { ArtifactFrivolity });
			contentPackArgs.ReportProgress(0.05f);
			ItemTypeCounts[(ItemTier)0] = Main.RgiConfig.Bind<int>("Configuration", "Common Items", 20, "The number of common items to generate.").Value;
			ItemTypeCounts[(ItemTier)1] = Main.RgiConfig.Bind<int>("Configuration", "Uncommon Items", 20, "The number of uncommon items to generate.").Value;
			ItemTypeCounts[(ItemTier)2] = Main.RgiConfig.Bind<int>("Configuration", "Legendary Items", 20, "The number of legendary items to generate.").Value;
			ItemTypeCounts[(ItemTier)4] = Main.RgiConfig.Bind<int>("Configuration", "Boss Items", 5, "The number of boss items to generate.").Value;
			ItemTypeCounts[(ItemTier)6] = Main.RgiConfig.Bind<int>("Configuration", "Void Common Items", 3, "The number of void common items to generate.").Value;
			ItemTypeCounts[(ItemTier)7] = Main.RgiConfig.Bind<int>("Configuration", "Void Uncommon Items", 3, "The number of void uncommon items to generate.").Value;
			ItemTypeCounts[(ItemTier)8] = Main.RgiConfig.Bind<int>("Configuration", "Void Legendary Items", 3, "The number of void legendary items to generate.").Value;
			ItemTypeCounts[(ItemTier)3] = Main.RgiConfig.Bind<int>("Configuration", "Lunar Items", 20, "The number of lunar items to generate.").Value;
			EquipmentCount = Main.RgiConfig.Bind<int>("Configuration", "Equipment Items", 20, "The number of equipment items to generate.").Value;
			LunarEquipmentCount = Main.RgiConfig.Bind<int>("Configuration", "Lunar Equipment Items", 10, "The number of lumar equipment items to generate.").Value;
			VoidsConvertNormals = Main.RgiConfig.Bind<bool>("Configuration", "Void Items Convert Normal Items", true, "Whether generated void items should convert certain generated normal items. If true, at least as many normal items as void items of each tier will always be generated.").Value;
			if (VoidsConvertNormals)
			{
				if (ItemTypeCounts[(ItemTier)0] < ItemTypeCounts[(ItemTier)6])
				{
					ItemTypeCounts[(ItemTier)0] = ItemTypeCounts[(ItemTier)6];
				}
				if (ItemTypeCounts[(ItemTier)1] < ItemTypeCounts[(ItemTier)7])
				{
					ItemTypeCounts[(ItemTier)1] = ItemTypeCounts[(ItemTier)7];
				}
				if (ItemTypeCounts[(ItemTier)2] < ItemTypeCounts[(ItemTier)8])
				{
					ItemTypeCounts[(ItemTier)2] = ItemTypeCounts[(ItemTier)8];
				}
			}
			if (VoidsConvertNormals)
			{
				ContagiousItemManager.Init += (hook_Init)delegate(orig_Init orig)
				{
					//IL_0084: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
					//IL_0174: Unknown result type (might be due to invalid IL or missing references)
					//IL_0195: Unknown result type (might be due to invalid IL or missing references)
					//IL_0264: Unknown result type (might be due to invalid IL or missing references)
					//IL_0285: Unknown result type (might be due to invalid IL or missing references)
					List<Pair> list = new List<Pair>();
					IEnumerator<ItemDef> enumerator = GeneratedItemEffects.Keys.Where((ItemDef itemDef) => (int)itemDef.tier == 0).GetEnumerator();
					foreach (KeyValuePair<ItemDef, ItemEffects> item in GeneratedItemEffects.Where((KeyValuePair<ItemDef, ItemEffects> itemDef) => (int)itemDef.Key.tier == 6))
					{
						if (!enumerator.MoveNext())
						{
							break;
						}
						list.Add(new Pair
						{
							itemDef1 = enumerator.Current,
							itemDef2 = item.Key
						});
						item.Value.VoidCorruptsItemNameToken = enumerator.Current.nameToken + "_PLURAL";
						item.Value.RegenerateDescription();
					}
					enumerator.Dispose();
					IEnumerator<ItemDef> enumerator3 = GeneratedItemEffects.Keys.Where((ItemDef itemDef) => (int)itemDef.tier == 1).GetEnumerator();
					foreach (KeyValuePair<ItemDef, ItemEffects> item2 in GeneratedItemEffects.Where((KeyValuePair<ItemDef, ItemEffects> itemDef) => (int)itemDef.Key.tier == 7))
					{
						if (!enumerator3.MoveNext())
						{
							break;
						}
						list.Add(new Pair
						{
							itemDef1 = enumerator3.Current,
							itemDef2 = item2.Key
						});
						item2.Value.VoidCorruptsItemNameToken = enumerator3.Current.nameToken + "_PLURAL";
						item2.Value.RegenerateDescription();
					}
					enumerator3.Dispose();
					IEnumerator<ItemDef> enumerator4 = GeneratedItemEffects.Keys.Where((ItemDef itemDef) => (int)itemDef.tier == 2).GetEnumerator();
					foreach (KeyValuePair<ItemDef, ItemEffects> item3 in GeneratedItemEffects.Where((KeyValuePair<ItemDef, ItemEffects> itemDef) => (int)itemDef.Key.tier == 8))
					{
						if (!enumerator4.MoveNext())
						{
							break;
						}
						list.Add(new Pair
						{
							itemDef1 = enumerator4.Current,
							itemDef2 = item3.Key
						});
						item3.Value.VoidCorruptsItemNameToken = enumerator4.Current.nameToken + "_PLURAL";
						item3.Value.RegenerateDescription();
					}
					enumerator4.Dispose();
					ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem] = CollectionExtensions.AddRangeToArray<Pair>(ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem], list.ToArray());
					orig.Invoke();
				};
			}
			contentPackArgs.ReportProgress(0.1f);
			yield return AbstractEffects.Initialize(ContentPack);
			yield return GenerateItems(contentPackArgs);
			yield return GenerateEquipments(contentPackArgs);
			contentPackArgs.ReportProgress(0.95f);
			yield return Buffs.RegisterBuffs(ContentPack);
			contentPackArgs.ReportProgress(1f);
		}

		public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs contentPackArgs)
		{
			ContentPack.Copy(ContentPack, contentPackArgs.output);
			contentPackArgs.ReportProgress(1f);
			yield break;
		}

		public IEnumerator FinalizeAsync(FinalizeAsyncArgs contentPackArgs)
		{
			UserProfile.HasDiscoveredPickup += (hook_HasDiscoveredPickup)delegate(orig_HasDiscoveredPickup orig, UserProfile self, PickupIndex pickupIndex)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Invalid comparison between Unknown and I4
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Invalid comparison between Unknown and I4
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				if (orig.Invoke(self, pickupIndex))
				{
					return true;
				}
				if (!((PickupIndex)(ref pickupIndex)).isValid)
				{
					return false;
				}
				PickupDef pickupDef3 = PickupCatalog.GetPickupDef(pickupIndex);
				if (pickupDef3 == null)
				{
					return false;
				}
				if ((int)pickupDef3.itemIndex != -1)
				{
					return (Object)(object)ItemCatalog.GetItemDef(pickupDef3.itemIndex)?.requiredExpansion == (Object)(object)RgiExpansion;
				}
				return (int)pickupDef3.equipmentIndex != -1 && (Object)(object)EquipmentCatalog.GetEquipmentDef(pickupDef3.equipmentIndex)?.requiredExpansion == (Object)(object)RgiExpansion;
			};
			object obj = <>c.<>9__27_1;
			if (obj == null)
			{
				hook_HasViewedViewable val = delegate(orig_HasViewedViewable orig, UserProfile self, string viewableName)
				{
					if (orig.Invoke(self, viewableName))
					{
						return true;
					}
					return viewableName != null && (viewableName.Contains("ITEM_RGI") || viewableName.Contains("EQUIPMENT_RGI"));
				};
				<>c.<>9__27_1 = val;
				obj = (object)val;
			}
			UserProfile.HasViewedViewable += (hook_HasViewedViewable)obj;
			Run.BuildDropTable += (hook_BuildDropTable)delegate(orig_BuildDropTable orig, Run self)
			{
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
				if (!RunArtifactManager.instance.IsArtifactEnabled(ArtifactFrivolity))
				{
					orig.Invoke(self);
				}
				else
				{
					self.availableItems.Clear();
					foreach (ItemDef key in GeneratedItemEffects.Keys)
					{
						self.availableItems.Add(key.itemIndex);
					}
					self.availableEquipment.Clear();
					foreach (EquipmentDef key2 in GeneratedEquipmentEffects.Keys)
					{
						self.availableEquipment.Add(key2.equipmentIndex);
					}
					orig.Invoke(self);
				}
			};
			ExplicitPickupDropTable.GenerateWeightedSelection += (hook_GenerateWeightedSelection)delegate(orig_GenerateWeightedSelection orig, ExplicitPickupDropTable self)
			{
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
				if (!RunArtifactManager.instance.IsArtifactEnabled(ArtifactFrivolity))
				{
					orig.Invoke(self);
				}
				else
				{
					for (int j = 0; j < self.entries.Length; j++)
					{
						PickupIndex? val9 = FrivolizePickup(PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(self.entries[j].pickupName)));
						if (val9.HasValue)
						{
							self.entries[j].pickupName = PickupCatalog.GetPickupDef(val9.Value)?.internalName;
						}
					}
					for (int k = 0; k < self.pickupEntries.Length; k++)
					{
						Object pickupDef = self.pickupEntries[k].pickupDef;
						ItemDef val10 = (ItemDef)(object)((pickupDef is ItemDef) ? pickupDef : null);
						if (val10 != null)
						{
							if (!((Object)(object)val10.requiredExpansion == (Object)(object)RgiExpansion))
							{
								ItemDef val11 = RandomizeItemPickup(val10.tier);
								if ((Object)(object)val11 != (Object)null)
								{
									self.pickupEntries[k].pickupDef = (Object)(object)val11;
								}
							}
						}
						else
						{
							Object pickupDef2 = self.pickupEntries[k].pickupDef;
							EquipmentDef val12 = (EquipmentDef)(object)((pickupDef2 is EquipmentDef) ? pickupDef2 : null);
							if (val12 != null && !((Object)(object)val12.requiredExpansion == (Object)(object)RgiExpansion))
							{
								EquipmentDef val13 = RandomizeEquipmentPickup(val12.isLunar, val12.isBoss);
								if ((Object)(object)val13 != (Object)null)
								{
									self.pickupEntries[k].pickupDef = (Object)(object)val13;
								}
							}
						}
					}
					orig.Invoke(self);
				}
			};
			BasicPickupDropTable.IsFilterRequired += (hook_IsFilterRequired)((orig_IsFilterRequired orig, BasicPickupDropTable self) => orig.Invoke(self) && (!self.requiredItemTags.Contains((ItemTag)21) || !RunArtifactManager.instance.IsArtifactEnabled(ArtifactFrivolity)));
			PickupDropletController.CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 += (hook_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3)delegate(orig_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 orig, CreatePickupInfo pickupInfo, Vector3 position, Vector3 velocity)
			{
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_007a: Unknown result type (might be due to invalid IL or missing references)
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_004e: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Unknown result type (might be due to invalid IL or missing references)
				if (RunArtifactManager.instance.IsArtifactEnabled(ArtifactFrivolity))
				{
					((CreatePickupInfo)(ref pickupInfo)).pickupIndex = FrivolizePickupIndex(((CreatePickupInfo)(ref pickupInfo)).pickupIndex);
					if (pickupInfo.pickerOptions != null)
					{
						for (int i = 0; i < pickupInfo.pickerOptions.Length; i++)
						{
							pickupInfo.pickerOptions[i].pickupIndex = FrivolizePickupIndex(pickupInfo.pickerOptions[i].pickupIndex);
						}
					}
				}
				orig.Invoke(pickupInfo, position, velocity);
			};
			bool wasNotMoving = true;
			bool wasOnGround = true;
			float lastRecalculateTime = 0f;
			CharacterBody.Update += (hook_Update)delegate(orig_Update orig, CharacterBody self)
			{
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_004e: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self);
				if (Object.op_Implicit((Object)(object)self) && self.isPlayerControlled)
				{
					bool flag = false;
					if (self.GetNotMoving() != wasNotMoving)
					{
						wasNotMoving = !wasNotMoving;
						flag = true;
					}
					if (self.characterMotor.lastGroundedTime < FixedTimeStamp.now - 0.2f != wasOnGround)
					{
						wasOnGround = !wasOnGround;
						flag = true;
					}
					if (flag || Time.time - lastRecalculateTime > 0.1f)
					{
						self.RecalculateStats();
						lastRecalculateTime = Time.time;
					}
				}
			};
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AbstractEffects.ApplyPassiveEffects);
			object obj2 = <>c.<>9__27_7;
			if (obj2 == null)
			{
				hook_RecalculateStats val2 = delegate(orig_RecalculateStats orig, CharacterBody self)
				{
					orig.Invoke(self);
					float value2 = self.maxJumpCount;
					AbstractEffects.ApplyPassiveSpecialStat(self, "MaxJumpCount", ref value2);
					self.maxJumpCount = (int)Math.Round(value2);
				};
				<>c.<>9__27_7 = val2;
				obj2 = (object)val2;
			}
			CharacterBody.RecalculateStats += (hook_RecalculateStats)obj2;
			object obj3 = <>c.<>9__27_8;
			if (obj3 == null)
			{
				hook_ServerDamageDealt val3 = delegate(orig_ServerDamageDealt orig, DamageReport report)
				{
					AbstractEffects.TriggerEffects("Hit", report.attackerBody, report, null);
					if (report.damageInfo.crit)
					{
						AbstractEffects.TriggerEffects("Crit", report.attackerBody, report, null);
					}
					AbstractEffects.TriggerEffects("Hurt", report.victimBody, report, null);
					orig.Invoke(report);
				};
				<>c.<>9__27_8 = val3;
				obj3 = (object)val3;
			}
			GlobalEventManager.ServerDamageDealt += (hook_ServerDamageDealt)obj3;
			object obj4 = <>c.<>9__27_9;
			if (obj4 == null)
			{
				hook_OnSkillActivated val4 = delegate(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill)
				{
					AbstractEffects.TriggerEffects("Skill", self, new Dictionary<string, object> { ["skill"] = skill });
					orig.Invoke(self, skill);
				};
				<>c.<>9__27_9 = val4;
				obj4 = (object)val4;
			}
			CharacterBody.OnSkillActivated += (hook_OnSkillActivated)obj4;
			object obj5 = <>c.<>9__27_10;
			if (obj5 == null)
			{
				hook_OnCharacterDeath val5 = delegate(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
				{
					GameObject attacker = damageReport.damageInfo.attacker;
					AbstractEffects.TriggerEffects("Kill", (attacker != null) ? attacker.GetComponent<CharacterBody>() : null, damageReport, null);
					if (damageReport.victimIsElite)
					{
						GameObject attacker2 = damageReport.damageInfo.attacker;
						AbstractEffects.TriggerEffects("EliteKill", (attacker2 != null) ? attacker2.GetComponent<CharacterBody>() : null, damageReport, null);
					}
					orig.Invoke(self, damageReport);
				};
				<>c.<>9__27_10 = val5;
				obj5 = (object)val5;
			}
			GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)obj5;
			object obj6 = <>c.<>9__27_11;
			if (obj6 == null)
			{
				hook_Heal val6 = delegate(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen)
				{
					//IL_0048: Unknown result type (might be due to invalid IL or missing references)
					//IL_0026: Unknown result type (might be due to invalid IL or missing references)
					if (nonRegen)
					{
						Dictionary<string, object> dictionary = new Dictionary<string, object> { ["amount"] = amount };
						AbstractEffects.TriggerEffects("Heal", self.body, (ProcChainMask?)procChainMask, dictionary);
						amount = (float)dictionary["amount"];
					}
					return orig.Invoke(self, amount, procChainMask, nonRegen);
				};
				<>c.<>9__27_11 = val6;
				obj6 = (object)val6;
			}
			HealthComponent.Heal += (hook_Heal)obj6;
			object obj7 = <>c.<>9__27_12;
			if (obj7 == null)
			{
				hook_OnInteractionBegin val7 = delegate(orig_OnInteractionBegin orig, GlobalEventManager self, Interactor interactor, IInteractable interactable, GameObject interactableObject)
				{
					AbstractEffects.TriggerEffects("Interact", ((Component)interactor).GetComponent<CharacterBody>(), new Dictionary<string, object>
					{
						["interactor"] = interactor,
						["interactable"] = interactable,
						["interactableObject"] = interactableObject
					});
					orig.Invoke(self, interactor, interactable, interactableObject);
				};
				<>c.<>9__27_12 = val7;
				obj7 = (object)val7;
			}
			GlobalEventManager.OnInteractionBegin += (hook_OnInteractionBegin)obj7;
			EquipmentSlot.PerformEquipmentAction += (hook_PerformEquipmentAction)delegate(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
			{
				if ((!GeneratedEquipmentEffects.ContainsKey(equipmentDef) && !orig.Invoke(self, equipmentDef)) || !NetworkServer.active)
				{
					return false;
				}
				AbstractEffects.TriggerEffects("Equipment", self.characterBody, new Dictionary<string, object> { ["equipmentDef"] = equipmentDef });
				return true;
			};
			object obj8 = <>c.<>9__27_14;
			if (obj8 == null)
			{
				hook_CalculateEquipmentCooldownScale val8 = delegate(orig_CalculateEquipmentCooldownScale orig, Inventory self)
				{
					float value = orig.Invoke(self);
					CharacterMaster component = ((Component)self).GetComponent<CharacterMaster>();
					AbstractEffects.ApplyPassiveSpecialStat((component != null) ? component.GetBody() : null, "EquipmentCooldownScale", ref value);
					return value;
				};
				<>c.<>9__27_14 = val8;
				obj8 = (object)val8;
			}
			Inventory.CalculateEquipmentCooldownScale += (hook_CalculateEquipmentCooldownScale)obj8;
			contentPackArgs.ReportProgress(1f);
			yield break;
		}

		private IEnumerator GenerateItems(LoadStaticContentAsyncArgs contentPackArgs)
		{
			int itemNum = 0;
			int totalItems = ItemTypeCounts.Values.Sum();
			foreach (KeyValuePair<ItemTier, int> itemTypeCount in ItemTypeCounts)
			{
				contentPackArgs.ReportProgress(0.5f + 0.2f * ((float)itemNum / (float)totalItems));
				for (int i = 0; i < itemTypeCount.Value; i++)
				{
					GenerateItem(itemTypeCount.Key);
					yield return null;
				}
				itemNum++;
			}
			ContentPack.itemDefs.Add(GeneratedItemEffects.Keys.ToArray());
		}

		private ItemDef CreateItemDef(ItemTier tier)
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			ItemDef val = ScriptableObject.CreateInstance<ItemDef>();
			((Object)val).name = "RGI_" + ((object)(ItemTier)(ref tier)).ToString().ToUpperInvariant() + "_" + GeneratedItemDefs.Count.ToString("00000000");
			val.AutoPopulateTokens();
			val.requiredExpansion = RgiExpansion;
			val.hidden = false;
			val.tier = tier;
			val.deprecatedTier = tier;
			LanguageAPI.Add(val.nameToken, "Tabula Rasa");
			LanguageAPI.Add(val.nameToken + "_PLURAL", "Tabula Rasa");
			LanguageAPI.Add(val.loreToken, "This is an uninitialized Randomly Generated Item - if you can read this, something went wrong!");
			GeneratedItemDefs.Add(val);
			return val;
		}

		public void GenerateItem(ItemTier tier)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			GenerateItemEffects(CreateItemDef(tier));
		}

		public void GenerateItemEffects(ItemDef itemDef)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			Color valueOrDefault = TierColors.GetValueOrDefault(itemDef.tier, Color.black);
			ItemEffects itemEffects = new ItemEffects(itemDef, Main.Rng);
			SpriteShape shape = itemEffects.Generate();
			itemDef.pickupModelPrefab = GenerateRandomItemPrefab(itemEffects.SpriteColors ?? Array.Empty<Color>(), ((Object)itemDef).name, shape);
			itemDef.pickupIconSprite = GenerateRandomItemIconAsync(itemEffects.SpriteColors ?? Array.Empty<Color>(), valueOrDefault, shape);
			(string itemName, string itemNamePlural) tuple = GenerateRandomItemName();
			string item = tuple.itemName;
			string item2 = tuple.itemNamePlural;
			string lore = GenerateRandomItemLogEntry();
			itemEffects.SetNameAndLore(item, item2, lore);
			LanguageAPI.Add(itemDef.pickupToken, itemEffects.Description);
			LanguageAPI.Add(itemDef.descriptionToken, itemEffects.Description);
			ItemDef val = null;
			if (itemEffects.HasInactiveForm)
			{
				val = ScriptableObject.CreateInstance<ItemDef>();
				((Object)val).name = ((Object)itemDef).name + "_INACTIVE";
				val.AutoPopulateTokens();
				val.requiredExpansion = RgiExpansion;
				val.hidden = true;
				val.tier = itemDef.tier;
				val.deprecatedTier = itemDef.deprecatedTier;
				val.pickupModelPrefab = itemDef.pickupModelPrefab;
				val.pickupIconSprite = GenerateInactiveIcon(itemDef.pickupIconSprite);
				LanguageAPI.Add(val.nameToken, Language.GetString(itemDef.nameToken));
				LanguageAPI.Add(val.loreToken, Language.GetString(itemDef.loreToken));
				LanguageAPI.Add(val.pickupToken, itemEffects.Description + "\nThis item is currently inactive.");
				LanguageAPI.Add(val.descriptionToken, itemEffects.Description + "\nThis item is currently inactive.");
				itemEffects.InactiveItem = val;
			}
			itemEffects.Register();
			ManualLogSource rgiLogger = Main.RgiLogger;
			ItemTier tier = itemDef.tier;
			rgiLogger.LogDebug((object)("Generated a " + ((object)(ItemTier)(ref tier)).ToString() + " item named " + Language.GetString(itemDef.nameToken)));
			GeneratedItemEffects[itemDef] = itemEffects;
		}

		private IEnumerator GenerateEquipments(LoadStaticContentAsyncArgs contentPackArgs)
		{
			for (int j = 0; j < EquipmentCount; j++)
			{
				contentPackArgs.ReportProgress(0.7f + 0.1f * ((float)j / (float)EquipmentCount));
				GenerateEquipment(isLunar: false, isBoss: false);
				yield return null;
			}
			for (int j = 0; j < LunarEquipmentCount; j++)
			{
				contentPackArgs.ReportProgress(0.8f + 0.1f * ((float)j / (float)LunarEquipmentCount));
				GenerateEquipment(isLunar: true, isBoss: false);
				yield return null;
			}
			ContentPack.equipmentDefs.Add(GeneratedEquipmentEffects.Keys.ToArray());
		}

		private EquipmentDef CreateEquipmentDef(bool isLunar, bool isBoss)
		{
			EquipmentDef val = ScriptableObject.CreateInstance<EquipmentDef>();
			if (isLunar)
			{
				if (isBoss)
				{
					((Object)val).name = "RGI_LUNAR_BOSS_EQUIP_" + GeneratedEquipmentDefs.Count.ToString("00000000");
				}
				else
				{
					((Object)val).name = "RGI_LUNAR_EQUIP_" + GeneratedEquipmentDefs.Count.ToString("00000000");
				}
			}
			else if (isBoss)
			{
				((Object)val).name = "RGI_BOSS_EQUIP_" + GeneratedEquipmentDefs.Count.ToString("00000000");
			}
			else
			{
				((Object)val).name = "RGI_EQUIP_" + GeneratedEquipmentDefs.Count.ToString("00000000");
			}
			val.AutoPopulateTokens();
			val.requiredExpansion = RgiExpansion;
			val.isLunar = isLunar;
			val.isBoss = isBoss;
			val.canDrop = true;
			LanguageAPI.Add(val.nameToken, "Tabula Rasa");
			LanguageAPI.Add(val.nameToken + "_PLURAL", "Tabula Rasa");
			LanguageAPI.Add(val.loreToken, "This is an uninitialized Randomly Generated Item - if you can read this, something went wrong!");
			GeneratedEquipmentDefs.Add(val);
			return val;
		}

		public void GenerateEquipment(bool isLunar, bool isBoss)
		{
			GenerateEquipmentEffects(CreateEquipmentDef(isLunar, isBoss));
		}

		public EquipmentEffects GenerateEquipmentEffects(EquipmentDef equipmentDef)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			Color borderColor = (equipmentDef.isLunar ? TierColors[(ItemTier)3] : EquipmentColor);
			EquipmentEffects equipmentEffects = new EquipmentEffects(equipmentDef, Main.Rng);
			SpriteShape shape = equipmentEffects.Generate();
			equipmentDef.pickupModelPrefab = GenerateRandomItemPrefab(equipmentEffects.SpriteColors ?? Array.Empty<Color>(), ((Object)equipmentDef).name, shape);
			equipmentDef.pickupIconSprite = GenerateRandomItemIconAsync(equipmentEffects.SpriteColors ?? Array.Empty<Color>(), borderColor, shape);
			(string itemName, string itemNamePlural) tuple = GenerateRandomItemName();
			string item = tuple.itemName;
			string item2 = tuple.itemNamePlural;
			string lore = GenerateRandomItemLogEntry();
			equipmentEffects.SetNameAndLore(item, item2, lore);
			LanguageAPI.Add(equipmentDef.pickupToken, equipmentEffects.Description);
			LanguageAPI.Add(equipmentDef.descriptionToken, equipmentEffects.Description);
			EquipmentDef val = null;
			if (equipmentEffects.HasInactiveForm)
			{
				val = ScriptableObject.CreateInstance<EquipmentDef>();
				((Object)val).name = ((Object)equipmentDef).name + "_INACTIVE";
				val.AutoPopulateTokens();
				val.requiredExpansion = RgiExpansion;
				val.isLunar = equipmentDef.isLunar;
				val.isBoss = equipmentDef.isBoss;
				val.canDrop = false;
				val.pickupModelPrefab = equipmentDef.pickupModelPrefab;
				val.pickupIconSprite = GenerateInactiveIcon(equipmentDef.pickupIconSprite);
				LanguageAPI.Add(val.nameToken, Language.GetString(equipmentDef.nameToken));
				LanguageAPI.Add(val.loreToken, Language.GetString(equipmentDef.loreToken));
				LanguageAPI.Add(val.pickupToken, equipmentEffects.Description + "\nThis equipment is currently inactive.");
				LanguageAPI.Add(val.descriptionToken, equipmentEffects.Description + "\nThis equipment is currently inactive.");
				equipmentEffects.InactiveEquipment = val;
			}
			equipmentEffects.Register();
			Main.RgiLogger.LogDebug((object)("Generated a " + (equipmentDef.isLunar ? "lunar " : "") + (equipmentDef.isBoss ? "boss " : "") + "equipment named " + Language.GetString(equipmentDef.nameToken)));
			GeneratedEquipmentEffects[equipmentDef] = equipmentEffects;
			return equipmentEffects;
		}

		private (string itemName, string itemNamePlural) GenerateRandomItemName()
		{
			for (int i = 0; i < 25; i++)
			{
				int index = Main.Rng.RangeInt(0, NameSystem.ItemNamePrefix.Count);
				int index2 = Main.Rng.RangeInt(0, NameSystem.ItemName.Count);
				string text = NameSystem.ItemNamePrefix[index] + " ";
				string text2 = text + NameSystem.ItemName[index2];
				string item = text + NameSystem.ItemNamePlural[index2];
				if (GeneratedNames.Add(text2))
				{
					return (text2, item);
				}
			}
			return (null, null);
		}

		public static string GenerateRandomItemLogEntry()
		{
			string text = "";
			int num = Main.Rng.RangeInt(0, 120);
			for (int i = 0; i < num; i++)
			{
				int index = Main.Rng.RangeInt(0, NameSystem.LogDesc.Count);
				text += NameSystem.LogDesc[index];
				text = ((i % Main.Rng.RangeInt(8, 14) != 0) ? (text + " ") : (text + ". "));
			}
			return text;
		}

		public static GameObject GenerateRandomItemPrefab(Color[] coreColors, string xmlSafeItemName, SpriteShape shape, bool randomShade = true, Vector2[] randomShadeOffsets = null)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Expected O, but got Unknown
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Expected O, but got Unknown
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Expected O, but got Unknown
			GameObject val = new GameObject();
			GameObject val3;
			switch (shape)
			{
			case SpriteShape.Square:
				val3 = GameObject.CreatePrimitive((PrimitiveType)3);
				break;
			case SpriteShape.Rhombus:
				val3 = GameObject.CreatePrimitive((PrimitiveType)3);
				val3.transform.Rotate(35.25f, 0f, 45f);
				break;
			case SpriteShape.Circle:
				val3 = GameObject.CreatePrimitive((PrimitiveType)0);
				break;
			case SpriteShape.Diamond:
			{
				GameObject val4 = new GameObject();
				val4.transform.localScale = new Vector3(0.5f, 1f, 0.5f);
				val3 = val4;
				GameObject obj = GameObject.CreatePrimitive((PrimitiveType)3);
				obj.transform.Rotate(35.25f, 0f, 45f);
				obj.transform.SetParent(val3.transform);
				break;
			}
			case SpriteShape.Cylinder:
			{
				GameObject val2 = new GameObject();
				val2.transform.localScale = new Vector3(0.5f, 1f, 0.5f);
				val3 = val2;
				GameObject.CreatePrimitive((PrimitiveType)2).transform.SetParent(val3.transform);
				break;
			}
			default:
				throw new ArgumentOutOfRangeException("shape");
			}
			val3.transform.SetParent(val.transform);
			Collider componentInChildren = val.GetComponentInChildren<Collider>();
			((Component)componentInChildren).gameObject.layer = LayerIndex.pickups.intVal;
			componentInChildren.isTrigger = true;
			Material sharedMaterial = new Material(HgStandard)
			{
				color = Color.white,
				mainTexture = (Texture)(object)GenerateNoiseTex(coreColors)
			};
			MeshRenderer[] componentsInChildren = val3.GetComponentsInChildren<MeshRenderer>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				((Renderer)componentsInChildren[i]).sharedMaterial