Decompiled source of RandomlyGeneratedItemsRewrite v2.0.0

RandomlyGeneratedItems.dll

Decompiled 4 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 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 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+bb09281b193b8acc7be55e3890264d07f4769e84")]
[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;

				internal void <Register>b__1_0(CharacterBody body, StatHookEventArgs _)
				{
					if (NetworkServer.active && body.HasBuff(BuffDef))
					{
						body.maxBarrier = 2.1267647E+37f;
						body.barrierDecayRate = (body.maxHealth + body.maxShield) / 30f;
					}
				}
			}

			public static BuffDef BuffDef;

			public static void Register()
			{
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_005d: Expected O, but got Unknown
				BuffDef = ScriptableObject.CreateInstance<BuffDef>();
				((Object)BuffDef).name = "BUFF_NO_DECAY";
				BuffDef.isHidden = true;
				BuffDef.isDebuff = false;
				RegisteredBuffs.Add(BuffDef);
				object obj = <>c.<>9__1_0;
				if (obj == null)
				{
					StatHookEventHandler val = delegate(CharacterBody body, StatHookEventArgs _)
					{
						if (NetworkServer.active && body.HasBuff(BuffDef))
						{
							body.maxBarrier = 2.1267647E+37f;
							body.barrierDecayRate = (body.maxHealth + body.maxShield) / 30f;
						}
					};
					<>c.<>9__1_0 = val;
					obj = (object)val;
				}
				RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
			}
		}

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

		public static IEnumerator RegisterBuffs(ContentPack contentPack)
		{
			NoMaxBarrier.Register();
			contentPack.buffDefs.Add(RegisteredBuffs.ToArray());
			yield break;
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("SuperKael.RandomlyGeneratedItems", "RandomlyGeneratedItems", "2.0.0")]
	[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.0.0";

		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 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", "Noop'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> 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", "(fucking)", "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", "(fucking)", "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(" ".ToCharArray()[0]);
				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__16_1;

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

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

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

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

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

			public static hook_HasViewedViewable <>9__18_1;

			public static hook_ServerDamageDealt <>9__18_4;

			public static hook_OnSkillActivated <>9__18_5;

			public static hook_OnCharacterDeath <>9__18_6;

			public static hook_Heal <>9__18_7;

			public static hook_OnInteractionBegin <>9__18_8;

			internal bool <LoadStaticContentAsync>b__16_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__16_4(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 == 6;
			}

			internal bool <LoadStaticContentAsync>b__16_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__16_5(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 == 7;
			}

			internal bool <LoadStaticContentAsync>b__16_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__16_6(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 == 8;
			}

			internal bool <FinalizeAsync>b__18_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__18_4(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__18_5(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__18_6(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__18_7(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__18_8(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 bool <.cctor>b__29_0(int x, int y)
			{
				if (x > 128 && x < 384)
				{
					if (y > 128)
					{
						return y < 384;
					}
					return false;
				}
				return false;
			}

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

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

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

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

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

		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 List<Tuple<Func<int, int, bool>, Func<int, int, bool>>> ShapeDelegates = new List<Tuple<Func<int, int, bool>, Func<int, int, bool>>>
		{
			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),
			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),
			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)
		};

		public static Shader HgStandard;

		public ContentPack ContentPack = new ContentPack();

		public ExpansionDef RgiExpansion;

		public ArtifactDef ArtifactFrivolity;

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

		public int EquipmentCount;

		public bool VoidsConvertNormals;

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

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

		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_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			HgStandard = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion();
		}

		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.green, (Color[])(object)new Color[1] { Color.green }, 1);
			RgiExpansion.disabledIconSprite = GenerateIcon(Color.gray, (Color[])(object)new Color[1] { Color.gray }, 1);
			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(new Color(0.9f, 0.75f, 0.9f), (Color[])(object)new Color[1]
			{
				new Color(0.9f, 0.75f, 0.9f)
			});
			ArtifactFrivolity.smallIconDeselectedSprite = GenerateIcon(Color.gray, (Color[])(object)new Color[1] { Color.gray });
			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)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;
			EquipmentCount = Main.RgiConfig.Bind<int>("Configuration", "Equipment Items", 10, "The number of 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_007f: Unknown result type (might be due to invalid IL or missing references)
					//IL_009b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0138: Unknown result type (might be due to invalid IL or missing references)
					//IL_0154: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
					//IL_020d: Unknown result type (might be due to invalid IL or missing references)
					List<Pair> list = new List<Pair>();
					IEnumerator<ItemDef> enumerator = GeneratedItemDefs.Where((ItemDef itemDef) => (int)itemDef.tier == 0).GetEnumerator();
					foreach (ItemDef item in GeneratedItemDefs.Where((ItemDef itemDef) => (int)itemDef.tier == 6))
					{
						if (!enumerator.MoveNext())
						{
							break;
						}
						list.Add(new Pair
						{
							itemDef1 = enumerator.Current,
							itemDef2 = item
						});
					}
					enumerator.Dispose();
					IEnumerator<ItemDef> enumerator3 = GeneratedItemDefs.Where((ItemDef itemDef) => (int)itemDef.tier == 1).GetEnumerator();
					foreach (ItemDef item2 in GeneratedItemDefs.Where((ItemDef itemDef) => (int)itemDef.tier == 7))
					{
						if (!enumerator3.MoveNext())
						{
							break;
						}
						list.Add(new Pair
						{
							itemDef1 = enumerator3.Current,
							itemDef2 = item2
						});
					}
					enumerator3.Dispose();
					IEnumerator<ItemDef> enumerator4 = GeneratedItemDefs.Where((ItemDef itemDef) => (int)itemDef.tier == 2).GetEnumerator();
					foreach (ItemDef item3 in GeneratedItemDefs.Where((ItemDef itemDef) => (int)itemDef.tier == 8))
					{
						if (!enumerator4.MoveNext())
						{
							break;
						}
						list.Add(new Pair
						{
							itemDef1 = enumerator4.Current,
							itemDef2 = item3
						});
					}
					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 pickupDef = PickupCatalog.GetPickupDef(pickupIndex);
				if (pickupDef == null)
				{
					return false;
				}
				if ((int)pickupDef.itemIndex != -1)
				{
					return (Object)(object)ItemCatalog.GetItemDef(pickupDef.itemIndex)?.requiredExpansion == (Object)(object)RgiExpansion;
				}
				return (int)pickupDef.equipmentIndex != -1 && (Object)(object)EquipmentCatalog.GetEquipmentDef(pickupDef.equipmentIndex)?.requiredExpansion == (Object)(object)RgiExpansion;
			};
			object obj = <>c.<>9__18_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__18_1 = val;
				obj = (object)val;
			}
			UserProfile.HasViewedViewable += (hook_HasViewedViewable)obj;
			Run.BuildDropTable += (hook_BuildDropTable)delegate(orig_BuildDropTable orig, Run self)
			{
				//IL_0047: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				if (RunArtifactManager.instance.IsArtifactEnabled(ArtifactFrivolity))
				{
					self.availableItems.Clear();
					foreach (ItemDef generatedItemDef in GeneratedItemDefs)
					{
						self.availableItems.Add(generatedItemDef.itemIndex);
					}
					self.availableEquipment.Clear();
					foreach (EquipmentDef generatedEquipmentDef in GeneratedEquipmentDefs)
					{
						self.availableEquipment.Add(generatedEquipmentDef.equipmentIndex);
					}
				}
				orig.Invoke(self);
			};
			bool wasNotMoving = true;
			CharacterBody.Update += (hook_Update)delegate(orig_Update orig, CharacterBody self)
			{
				orig.Invoke(self);
				if (Object.op_Implicit((Object)(object)self) && NetworkServer.active && self.isPlayerControlled && self.GetNotMoving() != wasNotMoving)
				{
					wasNotMoving = !wasNotMoving;
					self.RecalculateStats();
				}
			};
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AbstractEffects.ApplyPassiveEffects);
			object obj2 = <>c.<>9__18_4;
			if (obj2 == null)
			{
				hook_ServerDamageDealt val2 = 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__18_4 = val2;
				obj2 = (object)val2;
			}
			GlobalEventManager.ServerDamageDealt += (hook_ServerDamageDealt)obj2;
			object obj3 = <>c.<>9__18_5;
			if (obj3 == null)
			{
				hook_OnSkillActivated val3 = delegate(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill)
				{
					AbstractEffects.TriggerEffects("Skill", self, new Dictionary<string, object> { ["skill"] = skill });
					orig.Invoke(self, skill);
				};
				<>c.<>9__18_5 = val3;
				obj3 = (object)val3;
			}
			CharacterBody.OnSkillActivated += (hook_OnSkillActivated)obj3;
			object obj4 = <>c.<>9__18_6;
			if (obj4 == null)
			{
				hook_OnCharacterDeath val4 = 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__18_6 = val4;
				obj4 = (object)val4;
			}
			GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)obj4;
			object obj5 = <>c.<>9__18_7;
			if (obj5 == null)
			{
				hook_Heal val5 = 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__18_7 = val5;
				obj5 = (object)val5;
			}
			HealthComponent.Heal += (hook_Heal)obj5;
			object obj6 = <>c.<>9__18_8;
			if (obj6 == null)
			{
				hook_OnInteractionBegin val6 = 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__18_8 = val6;
				obj6 = (object)val6;
			}
			GlobalEventManager.OnInteractionBegin += (hook_OnInteractionBegin)obj6;
			EquipmentSlot.PerformEquipmentAction += (hook_PerformEquipmentAction)delegate(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
			{
				if (!GeneratedEquipmentDefs.Contains(equipmentDef) && !orig.Invoke(self, equipmentDef))
				{
					return false;
				}
				AbstractEffects.TriggerEffects("Equipment", self.characterBody, new Dictionary<string, object> { ["equipmentDef"] = equipmentDef });
				return true;
			};
			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++)
				{
					yield return GenerateItem(itemTypeCount.Key);
				}
				itemNum++;
			}
			ContentPack.itemDefs.Add(GeneratedItemDefs.ToArray());
		}

		public IEnumerator GenerateItem(ItemTier tier)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			ItemDef val = ScriptableObject.CreateInstance<ItemDef>();
			var (text, text2) = GenerateRandomItemName();
			if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(text2))
			{
				throw new InvalidOperationException("Failed to generate a new item name!");
			}
			Color valueOrDefault = TierColors.GetValueOrDefault(tier, Color.black);
			((Object)val).name = "RGI_" + text2;
			val.AutoPopulateTokens();
			val.requiredExpansion = RgiExpansion;
			val.hidden = false;
			val.tier = tier;
			val.deprecatedTier = tier;
			val.AutoPopulateTokens();
			ItemEffects itemEffects = new ItemEffects(val, Main.Rng);
			int shape = itemEffects.Generate();
			val.pickupModelPrefab = GenerateRandomItemPrefab(itemEffects.SpriteColors ?? Array.Empty<Color>(), text2, shape);
			val.pickupIconSprite = GenerateRandomItemIcon(valueOrDefault, itemEffects.SpriteColors ?? Array.Empty<Color>(), shape);
			itemEffects.Register();
			LanguageAPI.Add(val.nameToken, text);
			LanguageAPI.Add(val.pickupToken, itemEffects.Description);
			LanguageAPI.Add(val.descriptionToken, itemEffects.Description);
			LanguageAPI.Add(val.loreToken, GenerateRandomItemLogEntry());
			Main.RgiLogger.LogDebug((object)("Generated a " + ((object)(ItemTier)(ref tier)).ToString() + " item named " + text));
			GeneratedItemDefs.Add(val);
			yield break;
		}

		private IEnumerator GenerateEquipments(LoadStaticContentAsyncArgs contentPackArgs)
		{
			for (int i = 0; i < EquipmentCount; i++)
			{
				contentPackArgs.ReportProgress(0.7f + 0.2f * ((float)i / (float)EquipmentCount));
				yield return GenerateEquipment(isLunar: false, isBoss: false);
			}
			ContentPack.equipmentDefs.Add(GeneratedEquipmentDefs.ToArray());
		}

		public IEnumerator GenerateEquipment(bool isLunar, bool isBoss)
		{
			EquipmentDef val = ScriptableObject.CreateInstance<EquipmentDef>();
			var (text, text2) = GenerateRandomItemName();
			if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(text2))
			{
				throw new InvalidOperationException("Failed to generate a new equipment name!");
			}
			Color borderColor = (isLunar ? TierColors[(ItemTier)3] : EquipmentColor);
			((Object)val).name = "RGI_" + text2;
			val.AutoPopulateTokens();
			val.requiredExpansion = RgiExpansion;
			val.isLunar = isLunar;
			val.isBoss = isBoss;
			val.canDrop = true;
			EquipmentEffects equipmentEffects = new EquipmentEffects(val, Main.Rng);
			int shape = equipmentEffects.Generate();
			val.pickupModelPrefab = GenerateRandomItemPrefab(equipmentEffects.SpriteColors ?? Array.Empty<Color>(), text2, shape);
			val.pickupIconSprite = GenerateRandomItemIcon(borderColor, equipmentEffects.SpriteColors ?? Array.Empty<Color>(), shape);
			equipmentEffects.Register();
			LanguageAPI.Add(val.nameToken, text);
			LanguageAPI.Add(val.pickupToken, equipmentEffects.Description);
			LanguageAPI.Add(val.descriptionToken, equipmentEffects.Description);
			LanguageAPI.Add(val.loreToken, GenerateRandomItemLogEntry());
			Main.RgiLogger.LogDebug((object)("Generated a " + (isLunar ? "lunar " : "") + (isBoss ? "boss " : "") + "equipment named " + text));
			GeneratedEquipmentDefs.Add(val);
			yield break;
		}

		private (string itemName, string xmlSafeItemName) 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 = "";
				text = text + NameSystem.ItemNamePrefix[index] + " ";
				text += NameSystem.ItemName[index2];
				string text2 = text.ToUpper().Replace(" ", "_").Replace("'", "")
					.Replace("&", "AND");
				if (GeneratedNames.Add(text2))
				{
					return (text, text2);
				}
			}
			return (null, null);
		}

		private 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;
		}

		private GameObject GenerateRandomItemPrefab(Color[] coreColors, string xmlSafeItemName, int shape = 0, 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Expected O, but got Unknown
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject();
			GameObject val2;
			switch (shape)
			{
			default:
				val2 = GameObject.CreatePrimitive((PrimitiveType)3);
				break;
			case 1:
				val2 = GameObject.CreatePrimitive((PrimitiveType)3);
				val2.transform.Rotate(45f, 45f, 45f);
				break;
			case 2:
				val2 = GameObject.CreatePrimitive((PrimitiveType)0);
				break;
			}
			val2.transform.SetParent(val.transform);
			Material val3 = new Material(HgStandard);
			Texture2D val4 = new Texture2D(512, 512);
			Color[] array = (Color[])(object)new Color[262144];
			Vector2[] array2 = (Vector2[])(((object)randomShadeOffsets) ?? ((object)new Vector2[coreColors.Length]));
			float[] array3 = new float[coreColors.Length];
			if (!randomShade)
			{
				for (int i = 0; i < array3.Length; i++)
				{
					array3[i] = 1f;
				}
			}
			for (int j = 0; j < ((Texture)val4).height; j++)
			{
				for (int k = 0; k < ((Texture)val4).width; k++)
				{
					int num = j * ((Texture)val4).width + k;
					float num2;
					if (randomShade)
					{
						num2 = 0f;
						float num3 = (float)k / (float)((Texture)val4).width * 4f;
						float num4 = (float)j / (float)((Texture)val4).height * 4f;
						for (int l = 0; l < array3.Length; l++)
						{
							array3[l] = Mathf.PerlinNoise(array2[l].x + num3, array2[l].y + num4);
							num2 += array3[l];
						}
					}
					else
					{
						num2 = array3.Length;
					}
					array[num] = Color.black;
					for (int m = 0; m < array3.Length; m++)
					{
						Color val5 = coreColors[m] * array3[m];
						if (num2 > 1f)
						{
							val5 /= num2;
						}
						ref Color reference = ref array[num];
						reference += val5;
					}
				}
			}
			val4.SetPixels(array);
			val4.Apply();
			val3.color = Color.white;
			val3.mainTexture = (Texture)(object)val4;
			MeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<MeshRenderer>();
			for (int n = 0; n < componentsInChildren.Length; n++)
			{
				((Renderer)componentsInChildren[n]).sharedMaterial = val3;
			}
			return PrefabAPI.InstantiateClone(val, xmlSafeItemName + "-model", false);
		}

		private static Sprite GenerateRandomItemIcon(Color borderColor, Color[] coreColors, int shape = 0, ulong? seed = null)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			Xoroshiro128Plus val = (seed.HasValue ? new Xoroshiro128Plus(seed.Value) : new Xoroshiro128Plus(Main.Rng));
			Vector2[] array = (Vector2[])(object)new Vector2[coreColors.Length];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = new Vector2(val.RangeFloat(-10000f, 10000f), val.RangeFloat(-10000f, 10000f));
			}
			Sprite obj = GenerateIcon(borderColor, coreColors, shape, randomShade: true, array);
			Object.DontDestroyOnLoad((Object)(object)obj.texture);
			Object.DontDestroyOnLoad((Object)(object)obj);
			return obj;
		}

		private static Sprite GenerateIcon(Color borderColor, Color[] coreColors, int shape = 0, bool randomShade = true, Vector2[] randomShadeOffsets = null)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return GenerateIcon(borderColor, coreColors, ShapeDelegates[shape].Item1, ShapeDelegates[shape].Item2, randomShade, randomShadeOffsets);
		}

		private static Sprite GenerateIcon(Color borderColor, Color[] coreColors, Func<int, int, bool> shapeDelegate, Func<int, int, bool> borderDelegate, bool randomShade = true, Vector2[] randomShadeOffsets = null)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: 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)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(512, 512);
			Color[] array = (Color[])(object)new Color[262144];
			Vector2[] array2 = (Vector2[])(((object)randomShadeOffsets) ?? ((object)new Vector2[coreColors.Length]));
			float[] array3 = new float[coreColors.Length];
			if (!randomShade)
			{
				for (int i = 0; i < array3.Length; i++)
				{
					array3[i] = 1f;
				}
			}
			for (int j = 0; j < ((Texture)val).height; j++)
			{
				for (int k = 0; k < ((Texture)val).width; k++)
				{
					int num = j * ((Texture)val).width + k;
					float num2;
					if (randomShade)
					{
						num2 = 0f;
						float num3 = (float)k / (float)((Texture)val).width * 4f;
						float num4 = (float)j / (float)((Texture)val).height * 4f;
						for (int l = 0; l < array3.Length; l++)
						{
							array3[l] = Mathf.PerlinNoise(array2[l].x + num3, array2[l].y + num4);
							num2 += array3[l];
						}
					}
					else
					{
						num2 = array3.Length;
					}
					if (shapeDelegate(k, j))
					{
						array[num] = Color.black;
						for (int m = 0; m < array3.Length; m++)
						{
							Color val2 = coreColors[m] * array3[m];
							if (num2 > 1f)
							{
								val2 /= num2;
							}
							ref Color reference = ref array[num];
							reference += val2;
						}
					}
					else if (borderDelegate(k, j))
					{
						array[num] = borderColor;
					}
					else
					{
						array[num] = new Color(0f, 0f, 0f, 0f);
					}
				}
			}
			val.SetPixels(array);
			val.Apply();
			return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
		}
	}
}
namespace RandomlyGeneratedItems.RandomEffects
{
	public abstract class AbstractEffects
	{
		public delegate string DescriptionDelegate(AbstractEffects effects);

		public static readonly Dictionary<string, AbstractEffects> RegisteredEffects = new Dictionary<string, AbstractEffects>();

		public static readonly Dictionary<string, List<string>> TriggerTypeMap = new Dictionary<string, List<string>>();

		public int Grade;

		public string TriggerType;

		public string Description;

		public float PassiveStrength;

		public float PassiveStackScaling;

		public float TriggeredStrength;

		public float TriggeredStackScaling;

		public float Chance;

		public float ChanceStackScaling;

		public ProcType? ProcType;

		public Color[] SpriteColors;

		public Dictionary<string, string> ExtraText = new Dictionary<string, string>();

		public readonly string Name;

		public readonly Sprite Sprite;

		public List<EffectCondition.ConditionCallback> Conditions = new List<EffectCondition.ConditionCallback>();

		public Xoroshiro128Plus Rng;

		public event PassiveEffect.PassiveEffectCallback OnPassiveEffect;

		public event TriggeredEffect.TriggeredEffectCallback OnTriggeredEffect;

		public static IEnumerator Initialize(ContentPack contentPack)
		{
			yield return SpawnableEffectPayload.Initialize();
			yield return EffectStatus.Initialize();
			yield return EffectCondition.Initialize();
			yield return PassiveEffect.Initialize();
			yield return EffectTriggerType.Initialize();
			yield return TriggeredEffect.Initialize();
		}

		public static AbstractEffects GetEffects(string name)
		{
			return RegisteredEffects[name];
		}

		public static void ApplyPassiveEffects(CharacterBody character, StatHookEventArgs args)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)character) || !Object.op_Implicit((Object)(object)character.inventory) || !NetworkServer.active)
			{
				return;
			}
			foreach (ItemIndex item in character.inventory.itemAcquisitionOrder)
			{
				if (!RegisteredEffects.TryGetValue(((Object)ItemCatalog.GetItemDef(item)).name, out var value))
				{
					continue;
				}
				int stackCount = value.GetStackCount(character);
				if (stackCount > 0 && value.ConditionsMet(character))
				{
					try
					{
						value.OnPassiveEffect?.Invoke(args, stackCount, character);
					}
					catch (Exception ex)
					{
						Main.RgiLogger.LogError((object)("Error invoking passive effect for item " + value.Name + ":"));
						Main.RgiLogger.LogError((object)ex);
					}
				}
			}
			if ((Object)(object)character.equipmentSlot == (Object)null || (int)character.equipmentSlot.equipmentIndex == -1 || !RegisteredEffects.TryGetValue(((Object)EquipmentCatalog.GetEquipmentDef(character.equipmentSlot.equipmentIndex)).name, out var value2))
			{
				return;
			}
			try
			{
				value2.OnPassiveEffect?.Invoke(args, 1, character);
			}
			catch (Exception ex2)
			{
				Main.RgiLogger.LogError((object)("Error invoking passive effect for equipment " + value2.Name + ":"));
				Main.RgiLogger.LogError((object)ex2);
			}
		}

		public static void TriggerEffects(string name, CharacterBody character, Dictionary<string, object> args)
		{
			TriggerEffects(name, character, 1f, null, args);
		}

		public static void TriggerEffects(string name, CharacterBody character, ProcChainMask? procChainMask, Dictionary<string, object> args)
		{
			TriggerEffects(name, character, 1f, procChainMask, args);
		}

		public static void TriggerEffects(string name, CharacterBody character, DamageReport damageReport, Dictionary<string, object> args)
		{
			if (args == null)
			{
				args = new Dictionary<string, object>();
			}
			args["damageReport"] = damageReport;
			TriggerEffects(name, character, damageReport.damageInfo, args);
		}

		public static void TriggerEffects(string name, CharacterBody character, DamageInfo damageInfo, Dictionary<string, object> args)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (args == null)
			{
				args = new Dictionary<string, object>();
			}
			args["damageInfo"] = damageInfo;
			TriggerEffects(name, character, damageInfo.procCoefficient, damageInfo.procChainMask, args);
		}

		public static void TriggerEffects(string name, CharacterBody character, float procCoefficient, ProcChainMask? procChainMask, Dictionary<string, object> args)
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Invalid comparison between Unknown and I4
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)character) || !Object.op_Implicit((Object)(object)character.inventory) || !NetworkServer.active)
			{
				return;
			}
			if (args == null)
			{
				args = new Dictionary<string, object>();
			}
			ProcChainMask procChainMask2 = default(ProcChainMask);
			if (procChainMask.HasValue)
			{
				procChainMask2.mask = procChainMask.Value.mask;
			}
			ProcChainMask value2;
			foreach (ItemIndex item in character.inventory.itemAcquisitionOrder)
			{
				if (!RegisteredEffects.TryGetValue(((Object)ItemCatalog.GetItemDef(item)).name, out var value) || value.TriggerType != name)
				{
					continue;
				}
				int stackCount = value.GetStackCount(character);
				float chance = value.GetChance(stackCount, procCoefficient);
				if (stackCount <= 0 || !value.ConditionsMet(character) || (chance < 100f && !Util.CheckRoll(chance, character.master)))
				{
					continue;
				}
				if (procChainMask.HasValue && value.ProcType.HasValue)
				{
					value2 = procChainMask.Value;
					if (((ProcChainMask)(ref value2)).HasProc(value.ProcType.Value))
					{
						continue;
					}
					((ProcChainMask)(ref procChainMask2)).AddProc(value.ProcType.Value);
				}
				try
				{
					value.OnTriggeredEffect?.Invoke(character, stackCount, procCoefficient, procChainMask2, args);
				}
				catch (Exception ex)
				{
					Main.RgiLogger.LogError((object)("Error invoking triggered effect for item " + value.Name + ":"));
					Main.RgiLogger.LogError((object)ex);
				}
			}
			if ((Object)(object)character.equipmentSlot == (Object)null || (int)character.equipmentSlot.equipmentIndex == -1)
			{
				return;
			}
			EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(character.equipmentSlot.equipmentIndex);
			if ((Object)(object)equipmentDef == (Object)null || !RegisteredEffects.TryGetValue(((Object)equipmentDef).name, out var value3) || value3.TriggerType != name)
			{
				return;
			}
			if (procChainMask.HasValue && value3.ProcType.HasValue)
			{
				value2 = procChainMask.Value;
				if (((ProcChainMask)(ref value2)).HasProc(value3.ProcType.Value))
				{
					return;
				}
				((ProcChainMask)(ref procChainMask2)).AddProc(value3.ProcType.Value);
			}
			try
			{
				value3.OnTriggeredEffect?.Invoke(character, 1, procCoefficient, procChainMask2, args);
			}
			catch (Exception ex2)
			{
				Main.RgiLogger.LogError((object)("Error invoking triggered effect for equipment " + value3.Name + ":"));
				Main.RgiLogger.LogError((object)ex2);
			}
		}

		protected AbstractEffects(string name, Sprite sprite, Xoroshiro128Plus rng)
		{
			Name = name;
			Sprite = sprite;
			Rng = rng;
		}

		public void Register()
		{
			RegisteredEffects[Name] = this;
		}

		public bool ConditionsMet(CharacterBody body)
		{
			return Conditions.All((EffectCondition.ConditionCallback condition) => condition(body));
		}

		public abstract int GetStackCount(CharacterBody body);

		public float GetChance(int stackCount, float procCoefficient)
		{
			if (!(Chance >= 100f))
			{
				return Chance * (1f + ChanceStackScaling * (float)(stackCount - 1)) * procCoefficient;
			}
			return Chance;
		}

		public float GetPassiveStrength(int stackCount)
		{
			return PassiveStrength * (1f + PassiveStackScaling * (float)(stackCount - 1)) * 0.01f;
		}

		public float GetTriggeredStrength(int stackCount, float procCoefficient)
		{
			return TriggeredStrength * (1f + TriggeredStackScaling * (float)(stackCount - 1)) * procCoefficient * 0.01f;
		}

		public string FormatChancePercentage()
		{
			return $"<style=cIsDamage>{Chance:0.##}%</style>" + ((ChanceStackScaling > 0f) ? $" <style=cStack>(+{Chance * ChanceStackScaling:0.##}% per stack)</style>" : "");
		}

		public string FormatPassiveStrengthPercentage(string textStyle)
		{
			return $"<style=c{textStyle}>{PassiveStrength:0.##}%</style>" + ((PassiveStackScaling > 0f) ? $" <style=cStack>(+{PassiveStrength * PassiveStackScaling:0.##}% per stack)</style>" : "");
		}

		public string FormatTriggeredStrengthPercentage(string textStyle)
		{
			return $"<style=c{textStyle}>{TriggeredStrength:0.##}%</style>" + ((TriggeredStackScaling > 0f) ? $" <style=cStack>(+{TriggeredStrength * TriggeredStackScaling:0.##}% per stack)</style>" : "");
		}

		public abstract int Generate();
	}
	public readonly struct EffectCondition
	{
		public delegate bool ConditionCallback(CharacterBody body);

		public static readonly Dictionary<string, EffectCondition> RegisteredConditions = new Dictionary<string, EffectCondition>();

		public readonly string Name;

		public readonly float StrengthModifier;

		public readonly Func<AbstractEffects, ConditionCallback> ConditionCallbackProvider;

		public readonly AbstractEffects.DescriptionDelegate DescriptionDelegate;

		public readonly int MinimumGrade;

		public readonly string[] ExclusiveConditions;

		public static IEnumerator Initialize()
		{
			RegisterCondition("HasShield", 1.5f, (AbstractEffects _) => "While you have a <style=cIsHealing>shield</style>, ", (AbstractEffects _) => (CharacterBody body) => body.healthComponent.shield > 0f, "UnderHalfHP");
			RegisterCondition("HasBarrier", 1.5f, (AbstractEffects _) => "While you have a <style=cIsHealing>barrier</style>, ", (AbstractEffects _) => (CharacterBody body) => body.healthComponent.barrier > 0f, "UnderHalfHP");
			RegisterCondition("OutOfDanger", 2f, (AbstractEffects _) => "While <style=cIsUtility>out of danger</style>, ", (AbstractEffects _) => (CharacterBody body) => body.outOfDanger);
			RegisterCondition("OutOfCombat", 4f, (AbstractEffects _) => "While <style=cIsUtility>out of combat</style>, ", (AbstractEffects _) => (CharacterBody body) => body.outOfCombat);
			RegisterCondition("Moving", 1.5f, (AbstractEffects _) => "While <style=cIsUtility>moving</style>, ", (AbstractEffects _) => (CharacterBody body) => !body.GetNotMoving(), "NotMoving");
			RegisterCondition("NotMoving", 4f, (AbstractEffects _) => "After standing still for <style=cIsHealing>1</style> second, ", (AbstractEffects _) => (CharacterBody body) => body.GetNotMoving(), "Moving", "Midair");
			RegisterCondition("UnderHalfHP", 4f, (AbstractEffects _) => "While below <style=cIsHealth>50% health</style>, ", (AbstractEffects _) => (CharacterBody body) => body.healthComponent.combinedHealthFraction <= 0.5f, "HasShield", "HasBarrier", "AtFullHP");
			RegisterCondition("AtFullHP", 1.5f, (AbstractEffects _) => "While at <style=cIsHealth>full health</style>, ", (AbstractEffects _) => (CharacterBody body) => body.healthComponent.combinedHealthFraction >= 1f, "UnderHalfHP");
			RegisterCondition("Midair", 2f, (AbstractEffects _) => "While <style=cIsUtility>midair</style>, ", (AbstractEffects _) => (CharacterBody body) => body.characterMotor.lastGroundedTime >= FixedTimeStamp.now + 0.2f, "NotMoving");
			RegisterCondition("Debuffed", 2f, (AbstractEffects _) => "While <style=cIsHealth>debuffed</style>, ", (AbstractEffects _) => (CharacterBody body) => body.activeBuffsList.Any((BuffIndex index) => BuffCatalog.GetBuffDef(index).isDebuff));
			RegisterCondition("First3Minutes", 2f, (AbstractEffects _) => "For the first <style=cIsUtility>3 minutes</style> every stage, ", (AbstractEffects _) => (CharacterBody _) => Object.op_Implicit((Object)(object)Stage.instance) && Run.instance.fixedTime - Stage.instance.entryTime.t <= 180f);
			RegisterCondition("TeleporterEvent", 2f, (AbstractEffects _) => "During the <style=cIsUtility>Teleporter Event</style>, ", (AbstractEffects _) => (CharacterBody _) => Object.op_Implicit((Object)(object)TeleporterInteraction.instance) && TeleporterInteraction.instance.isCharging);
			yield break;
		}

		public static EffectCondition RegisterCondition(string name, float strengthModifier, AbstractEffects.DescriptionDelegate descriptionDelegate, Func<AbstractEffects, ConditionCallback> conditionCallbackProvider, params string[] exclusiveConditions)
		{
			return RegisterCondition(name, strengthModifier, descriptionDelegate, conditionCallbackProvider, 0, exclusiveConditions);
		}

		public static EffectCondition RegisterCondition(string name, float strengthModifier, AbstractEffects.DescriptionDelegate descriptionDelegate, Func<AbstractEffects, ConditionCallback> conditionCallbackProvider, int minimumGrade, params string[] exclusiveConditions)
		{
			EffectCondition effectCondition = new EffectCondition(name, strengthModifier, descriptionDelegate, conditionCallbackProvider, minimumGrade, exclusiveConditions);
			RegisteredConditions[name] = effectCondition;
			return effectCondition;
		}

		public EffectCondition(string name, float strengthModifier, AbstractEffects.DescriptionDelegate descriptionDelegate, Func<AbstractEffects, ConditionCallback> conditionCallbackProvider, int minimumGrade, params string[] exclusiveConditions)
		{
			Name = name;
			StrengthModifier = strengthModifier;
			DescriptionDelegate = descriptionDelegate;
			ConditionCallbackProvider = conditionCallbackProvider;
			MinimumGrade = minimumGrade;
			ExclusiveConditions = exclusiveConditions;
		}

		public ConditionCallback GetConditionCallback(AbstractEffects effects)
		{
			return ConditionCallbackProvider(effects);
		}
	}
	public readonly struct EffectStatus
	{
		public delegate void StatusApplyDelegate(CharacterBody character, AbstractEffects effects, CharacterBody target, int stackCount, float procCoefficient, ProcChainMask procChainMask, Dictionary<string, object> args);

		public static readonly Dictionary<string, EffectStatus> RegisteredEffectStatuses = new Dictionary<string, EffectStatus>();

		public readonly string Name;

		public readonly float StrengthModifier;

		public readonly bool IsPositive;

		public readonly ProcType ProcType;

		public readonly StatusApplyDelegate ApplyDelegate;

		public readonly AbstractEffects.DescriptionDelegate DescriptionDelegate;

		public readonly int MinimumGrade;

		public static IEnumerator Initialize()
		{
			RegisterEffectStatus("Bleed", 1f, isPositive: false, (ProcType)5, delegate(CharacterBody character, AbstractEffects effects, CharacterBody target, int stackCount, float procCoefficient, ProcChainMask procChainMask, Dictionary<string, object> args)
			{
				//IL_005a: 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_00a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
				object obj = args["damageInfo"];
				DamageInfo val = (DamageInfo)((obj is DamageInfo) ? obj : null);
				effects.ExtraText["DOTIsTotalDamage"] = ((val != null) ? "TOTAL" : "base");
				float duration = Mathf.Pow(effects.TriggeredStrength, 2f / 3f) * (1f + effects.TriggeredStackScaling * (float)(stackCount - 1)) * procCoefficient;
				InflictDotInfo val2 = default(InflictDotInfo);
				val2.victimObject = ((Component)target).gameObject;
				val2.attackerObject = ((Component)character).gameObject;
				val2.dotIndex = (DotIndex)0;
				val2.duration = duration;
				val2.totalDamage = val?.damage ?? character.damage;
				InflictDotInfo val3 = val2;
				DotController.InflictDot(ref val3);
			}, (AbstractEffects effects) => "<style=cDeath>Bleed</style> for " + effects.FormatTriggeredStrengthPercentage("IsDamage") + " " + effects.ExtraText["DOTIsTotalDamage"] + " damage");
			yield break;
		}

		public static EffectStatus RegisterEffectStatus(string name, float strengthModifier, bool isPositive, ProcType procType, StatusApplyDelegate applyDelegate, AbstractEffects.DescriptionDelegate descriptionDelegate, int minimumGrade = 0)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			EffectStatus effectStatus = new EffectStatus(name, strengthModifier, isPositive, procType, applyDelegate, descriptionDelegate, minimumGrade);
			RegisteredEffectStatuses[name] = effectStatus;
			return effectStatus;
		}

		public EffectStatus(string name, float strengthModifier, bool isPositive, ProcType procType, StatusApplyDelegate applyDelegate, AbstractEffects.DescriptionDelegate descriptionDelegate, int minimumGrade)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			N