Decompiled source of ZetAspects v2.11.3

plugins/ZetAspects/ZetAspects.dll

Decompiled 2 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.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using IL.RoR2;
using IL.RoR2.Stats;
using LookingGlass.ItemStatsNameSpace;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour.HookGen;
using On.RoR2;
using On.RoR2.Items;
using On.RoR2.Projectile;
using On.RoR2.UI;
using On.RoR2.UI.LogBook;
using On.RoR2.UI.MainMenu;
using RoR2;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Stats;
using RoR2.UI;
using RoR2.UI.MainMenu;
using SimpleJSON;
using TMPro;
using TPDespair.ZetAspects.Compat;
using TPDespair.ZetAspects.Items;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.EventSystems;
using UnityEngine.Networking;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.ResourceManagement.AsyncOperations;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ZetAspects")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ZetAspects")]
[assembly: AssemblyTitle("ZetAspects")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace TPDespair.ZetAspects
{
	public static class AspectPacks
	{
		public static void Init()
		{
			AspectPack aspectPack = new AspectPack();
			aspectPack.identifier = "RiskOfRain";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectWhite",
					FindEquipmentDef = () => Equipment.AffixWhite,
					itemName = "ZetAspectWhite",
					displayPriority = 2500,
					BaseIcon = () => Catalog.Sprites.AffixWhite,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectWhite.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixWhite = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixWhite = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectBlue",
					FindEquipmentDef = () => Equipment.AffixBlue,
					itemName = "ZetAspectBlue",
					displayPriority = 2501,
					BaseIcon = () => Catalog.Sprites.AffixBlue,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectBlue.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixBlue = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixBlue = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectRed",
					FindEquipmentDef = () => Equipment.AffixRed,
					itemName = "ZetAspectRed",
					displayPriority = 2502,
					BaseIcon = () => Catalog.Sprites.AffixRed,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectRed.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixRed = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixRed = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectHaunted",
					FindEquipmentDef = () => Equipment.AffixHaunted,
					itemName = "ZetAspectHaunted",
					displayPriority = 7500,
					BaseIcon = () => Catalog.Sprites.AffixHaunted,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectHaunted.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixHaunted = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixHaunted = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectPoison",
					FindEquipmentDef = () => Equipment.AffixPoison,
					itemName = "ZetAspectPoison",
					displayPriority = 7501,
					BaseIcon = () => Catalog.Sprites.AffixPoison,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectPoison.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixPoison = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixPoison = buffDef;
					},
					bodyBlacklist = new List<string> { "UrchinTurretBody", "AspectAbilitiesMalachiteUrchinOrbitalBody" }
				},
				new AspectDef
				{
					identifier = "ZetAspectLunar",
					FindEquipmentDef = () => Equipment.AffixLunar,
					itemName = "ZetAspectLunar",
					displayPriority = 7550,
					BaseIcon = () => Catalog.Sprites.AffixLunar,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectLunar.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixLunar = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixLunar = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectEarth",
					equipmentName = "EliteEarthEquipment",
					itemName = "ZetAspectEarth",
					displayPriority = 2525,
					BaseIcon = () => Catalog.Sprites.AffixEarth,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectEarth.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixEarth = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixEarth = buffDef;
					},
					bodyBlacklist = new List<string> { "AffixEarthHealerBody" }
				},
				new AspectDef
				{
					identifier = "ZetAspectVoid",
					equipmentName = "EliteVoidEquipment",
					itemName = "ZetAspectVoid",
					displayPriority = 12500,
					disableDisplayOnDeath = true,
					copyEquipmentPrefab = false,
					BaseIcon = () => Catalog.Sprites.AffixVoid,
					OutlineIcon = () => Configuration.AspectVoidContagiousItem.Value ? Catalog.Sprites.OutlineVoid : Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectVoid.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixVoid = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixVoid = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectAurelionite",
					FindEquipmentDef = () => Equipment.EliteAurelioniteEquipment,
					itemName = "ZetAspectAurelionite",
					displayPriority = 3750,
					BaseIcon = () => Catalog.Sprites.AffixAurelionite,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectAurelionite.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixAurelionite = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixAurelionite = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectBead",
					FindEquipmentDef = () => Equipment.EliteBeadEquipment,
					itemName = "ZetAspectBead",
					displayPriority = 7560,
					BaseIcon = () => Catalog.Sprites.AffixBead,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectBead.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixBead = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixBead = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectCollective",
					FindEquipmentDef = () => Equipment.EliteCollectiveEquipment,
					itemName = "ZetAspectCollective",
					displayPriority = 3600,
					BaseIcon = delegate
					{
						Sprite baseSprite = Catalog.TryUseOwnSprite();
						return Catalog.TrimSpriteEdge(baseSprite, 8, 24);
					},
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectCollective.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixCollective = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixCollective = buffDef;
					}
				}
			};
			aspectPack.PostInit = delegate
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0015: Unknown result type (might be due to invalid IL or missing references)
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				Catalog.mithrixBodyIndex = BodyCatalog.FindBodyIndex("BrotherBody");
				Catalog.voidlingBodyIndex = BodyCatalog.FindBodyIndex("VoidRaidCrabBody");
				Catalog.artifactShellBodyIndex = BodyCatalog.FindBodyIndex("ArtifactShellBody");
				Catalog.goldenTitanBodyIndex = BodyCatalog.FindBodyIndex("TitanGoldBody");
				BuffDef affixHauntedRecipient = Buffs.AffixHauntedRecipient;
				affixHauntedRecipient.buffColor = Color.white;
				affixHauntedRecipient.iconSprite = Catalog.Sprites.HauntCloak;
			};
			AspectPackDefOf.RiskOfRain = aspectPack.With(new SimpleAspect
			{
				identifier = "ZetAspectStygian",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Armor, 20f, 10f)
				},
				affix = "STYGIAN",
				FindEquipmentDef = () => Equipment.EliteDeathEquipment,
				displayPriority = 7600,
				icon = () => Catalog.AdjustSprite(Catalog.Sprites.AffixPoison, null, 1.3f),
				aspectOf = "<style=cDeath>Aspect of Death</style> :",
				passive = "\nCharacters that die near you <style=cIsUtility>rise again as ghosts</style> that fight for you for a short time."
			}).Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "SpikeStrip";
			aspectPack.dependency = "com.groovesalad.GrooveSaladSpikestripContent";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectPlated",
					equipmentName = "EQUIPMENT_AFFIXPLATED",
					itemName = "ZetAspectPlated",
					displayPriority = 3000,
					BaseIcon = () => Catalog.Sprites.AffixPlated,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectPlated.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixPlated = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixPlated = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectWarped",
					equipmentName = "EQUIPMENT_AFFIXWARPED",
					itemName = "ZetAspectWarped",
					displayPriority = 3001,
					BaseIcon = () => Catalog.Sprites.AffixWarped,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectWarped.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixWarped = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixWarped = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectVeiled",
					equipmentName = "EQUIPMENT_AFFIXVEILED",
					itemName = "ZetAspectVeiled",
					displayPriority = 3002,
					BaseIcon = () => Catalog.Sprites.AffixVeiled,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectVeiled.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixVeiled = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixVeiled = buffDef;
					},
					Promoter = (CharacterBody body) => (IEnumerable<BuffIndex>)(object)(body.HasBuff(Catalog.veiledBuffer) ? new BuffIndex[1] { (BuffIndex)(int)Buffs.Cloak.buffIndex } : null),
					OnRefresh = delegate(CharacterBody body)
					{
						//IL_0002: Unknown result type (might be due to invalid IL or missing references)
						if (body.HasBuff(Catalog.veiledBuffer))
						{
							body.AddTimedBuff(Buffs.Cloak, 5f);
						}
					},
					OnExpire = delegate(CharacterBody body)
					{
						//IL_0007: 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_0065: Unknown result type (might be due to invalid IL or missing references)
						for (int i = 0; i < 2; i++)
						{
							if (body.HasBuff(Catalog.veiledBuffer))
							{
								body.RemoveBuff(Catalog.veiledBuffer);
							}
						}
						if (body.HasBuff(Buffs.Cloak))
						{
							body.ClearTimedBuffs(Buffs.Cloak);
						}
						if (body.HasBuff(BuffDefOf.ZetElusive))
						{
							body.SetBuffCount(BuffDefOf.ZetElusive.buffIndex, 0);
						}
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectAragonite",
					equipmentName = "EQUIPMENT_AFFIXARAGONITE",
					itemName = "ZetAspectAragonite",
					displayPriority = 9000,
					BaseIcon = () => Catalog.Sprites.AffixAragonite,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectAragonite.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixAragonite = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixAragonite = buffDef;
					}
				}
			};
			aspectPack.PostInit = delegate
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)EquipDefOf.AffixVeiled != (Object)null)
				{
					EliteBuffManager.MonitorBuff(Buffs.Cloak.buffIndex);
					EliteBuffManager.MonitorTriggered += delegate(EliteBuffManager manager, BuffIndex buffIndex)
					{
						//IL_0001: Unknown result type (might be due to invalid IL or missing references)
						//IL_0007: Unknown result type (might be due to invalid IL or missing references)
						//IL_002c: Unknown result type (might be due to invalid IL or missing references)
						if (buffIndex == Buffs.Cloak.buffIndex && ((ItemBehavior)manager).body.HasBuff(BuffDefOf.AffixVeiled))
						{
							manager.AddBuffToRefresh(BuffDefOf.AffixVeiled.buffIndex);
						}
					};
				}
			};
			AspectPackDefOf.SpikeStrip = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "GoldenCoastPlus";
			aspectPack.CustomDependency = () => Catalog.AnyPluginLoaded("com.Skell.GoldenCoastPlus", "com.Phreel.GoldenCoastPlusRevived", "com.TechDebtCollector.GoldenCoastPlus");
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectGold",
					equipmentName = "EliteGoldEquipment",
					itemName = "ZetAspectGold",
					displayPriority = 500,
					copyEquipmentPrefab = false,
					BaseIcon = () => Catalog.Sprites.AffixGold,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectGold.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixGold = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixGold = buffDef;
					}
				}
			};
			AspectPackDefOf.GoldenCoastPlus = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "Aetherium";
			aspectPack.dependency = "com.KomradeSpectre.Aetherium";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectSanguine",
					equipmentName = "AETHERIUM_ELITE_EQUIPMENT_AFFIX_SANGUINE",
					itemName = "ZetAspectSanguine",
					displayPriority = 7000,
					BaseIcon = () => Catalog.Sprites.AffixSanguine,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectSanguine.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixSanguine = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixSanguine = buffDef;
					}
				}
			};
			AspectPackDefOf.Aetherium = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "Bubbet";
			aspectPack.dependency = "bubbet.bubbetsitems";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectSepia",
					equipmentName = "EquipmentDefSepiaElite",
					itemName = "ZetAspectSepia",
					buffName = "BuffDefSepia",
					displayPriority = 750,
					copyEquipmentPrefab = false,
					BaseIcon = () => Catalog.Sprites.AffixSepia,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectSepia.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixSepia = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixSepia = buffDef;
					}
				}
			};
			aspectPack.PostInit = delegate
			{
				//IL_0013: 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)
				BuffDef affixSepia = BuffDefOf.AffixSepia;
				if (Object.op_Implicit((Object)(object)affixSepia))
				{
					affixSepia.buffColor = Color.white;
					affixSepia.iconSprite = Catalog.Sprites.SepiaElite;
				}
			};
			AspectPackDefOf.Bubbet = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "WarWisp";
			aspectPack.dependency = "com.PopcornFactory.WispMod";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectNullifier",
					equipmentName = "WARFRAMEWISP_ELITE_EQUIPMENT_AFFIX_NULLIFIER",
					itemName = "ZetAspectNullifier",
					displayPriority = 6500,
					BaseIcon = () => Catalog.Sprites.AffixNullifier,
					OutlineIcon = () => Catalog.Sprites.OutlineNull,
					SetupTokens = ZetAspectNullifier.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixNullifier = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixNullifier = buffDef;
					}
				}
			};
			AspectPackDefOf.WarWisp = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "Blighted";
			aspectPack.dependency = "com.Moffein.BlightedElites";
			aspectPack.alwaysValidate = true;
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectBlighted",
					equipmentName = "AffixBlightedMoffein",
					itemName = "ZetAspectBlighted",
					displayPriority = 15000,
					BaseIcon = () => Catalog.Sprites.AffixBlighted,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectBlighted.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixBlighted = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixBlighted = buffDef;
					}
				}
			};
			aspectPack.PostInit = delegate
			{
				if (Configuration.BlightedHooks.Value)
				{
					Blighted.LateSetup();
				}
			};
			AspectPackDefOf.Blighted = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "GOTCE";
			aspectPack.dependency = "com.TheBestAssociatedLargelyLudicrousSillyheadGroup.GOTCE";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectBackup",
					equipmentName = "ELITE_EQUIPMENT_BACKUP",
					itemName = "ZetAspectBackup",
					displayPriority = 1000,
					BaseIcon = () => Catalog.Sprites.AffixBackup,
					OutlineIcon = () => Catalog.Sprites.OutlineCracked,
					SetupTokens = ZetAspectBackup.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixBackup = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixBackup = buffDef;
					}
				}
			};
			aspectPack.PostInit = delegate
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Invalid comparison between Unknown and I4
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				BuffIndex val = BuffCatalog.FindBuffIndex("Backuped");
				if ((int)val != -1)
				{
					BuffDefOf.BackupDebuff = BuffCatalog.GetBuffDef(val);
				}
				BuffDef backupDebuff = BuffDefOf.BackupDebuff;
				if (Object.op_Implicit((Object)(object)backupDebuff))
				{
					backupDebuff.buffColor = Color.white;
					backupDebuff.iconSprite = Catalog.Sprites.BackupDebuff;
				}
			};
			AspectPackDefOf.GOTCE = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "Thalasso";
			aspectPack.CustomDependency = () => Catalog.AnyPluginLoaded("Phreel.NullifyingElite", "com.jt_hehe.Thalassophobia");
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectPurity",
					FindEquipmentDef = delegate
					{
						//IL_0006: Unknown result type (might be due to invalid IL or missing references)
						//IL_000b: Unknown result type (might be due to invalid IL or missing references)
						//IL_000c: Unknown result type (might be due to invalid IL or missing references)
						//IL_000e: Invalid comparison between Unknown and I4
						//IL_001f: Unknown result type (might be due to invalid IL or missing references)
						//IL_0019: Unknown result type (might be due to invalid IL or missing references)
						//IL_001e: Unknown result type (might be due to invalid IL or missing references)
						EquipmentIndex val = EquipmentCatalog.FindEquipmentIndex("EliteNullifyingEquipment");
						if ((int)val == -1)
						{
							val = EquipmentCatalog.FindEquipmentIndex("THALASSOPHOBIA_ELITE_EQUIPMENT_AFFIX_PURE");
						}
						return EquipmentCatalog.GetEquipmentDef(val);
					},
					itemName = "ZetAspectPurity",
					displayPriority = 3500,
					copyEquipmentPrefab = false,
					BaseIcon = () => Catalog.Sprites.AffixPurity,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectPurity.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixPurity = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixPurity = buffDef;
					}
				}
			};
			AspectPackDefOf.Thalasso = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "RisingTides";
			aspectPack.dependency = "com.themysticsword.risingtides";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectBarrier",
					equipmentName = "RisingTides_AffixBarrier",
					itemName = "ZetAspectBarrier",
					displayPriority = 10250,
					BaseIcon = () => Catalog.Sprites.AffixBarrier,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectBarrier.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixBarrier = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixBarrier = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectBlackHole",
					equipmentName = "RisingTides_AffixBlackHole",
					itemName = "ZetAspectBlackHole",
					displayPriority = 10000,
					BaseIcon = () => Catalog.Sprites.AffixBlackHole,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectBlackHole.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixBlackHole = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixBlackHole = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectMoney",
					equipmentName = "RisingTides_AffixMoney",
					itemName = "ZetAspectMoney",
					displayPriority = 4501,
					BaseIcon = () => Catalog.Sprites.AffixMoney,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectMoney.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixMoney = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixMoney = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectNight",
					equipmentName = "RisingTides_AffixNight",
					itemName = "ZetAspectNight",
					displayPriority = 4500,
					BaseIcon = () => Catalog.Sprites.AffixNight,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectNight.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixNight = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixNight = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectWater",
					equipmentName = "RisingTides_AffixWater",
					itemName = "ZetAspectWater",
					displayPriority = 10001,
					BaseIcon = () => Catalog.Sprites.AffixWater,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectWater.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixWater = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixWater = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectRealgar",
					equipmentName = "RisingTides_AffixImpPlane",
					itemName = "ZetAspectRealgar",
					displayPriority = 10002,
					BaseIcon = () => Catalog.Sprites.AffixRealgar,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectRealgar.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixRealgar = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixRealgar = buffDef;
					}
				}
			};
			aspectPack.PostInit = delegate
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Invalid comparison between Unknown and I4
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Invalid comparison between Unknown and I4
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				BuffIndex val = BuffCatalog.FindBuffIndex("RisingTides_NightSpeedBoost");
				if ((int)val != -1)
				{
					BuffDefOf.NightSpeed = BuffCatalog.GetBuffDef(val);
				}
				val = BuffCatalog.FindBuffIndex("RisingTides_NightReducedVision");
				if ((int)val != -1)
				{
					BuffDefOf.NightBlind = BuffCatalog.GetBuffDef(val);
				}
			};
			AspectPackDefOf.RisingTides = aspectPack.With(new SimpleAspect
			{
				identifier = "ZetAspectPhenakite",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.MoveSpeed, 0.15f, 0.1f)
				},
				affix = "PHENAKITE",
				equipmentName = "RisingTides_AffixMirror",
				displayPriority = 10003,
				fallbackIcon = () => Catalog.Sprites.AffixHaunted,
				name = "Hall of Mirrors",
				pickup = "Become an aspect of illusion.",
				aspectOf = "<style=cDeath>Aspect of Illusion</style> :",
				passive = "\nSpawn with <style=cIsUtility>{0} illusory clones</style> of yourself.\nAttacks have a <style=cIsUtility>{1}%</style> chance to <style=cIsUtility>steal an item</style> from enemies you hit.",
				passiveArgs = () => new object[2]
				{
					Catalog.ModConfig("com.themysticsword.risingtides", "Elites: Phenakite", "Clone Count", 3),
					Catalog.ModConfig("com.themysticsword.risingtides", "Elites: Phenakite", "Item Steal Chance", 100f)
				}
			}).Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "NemRisingTides";
			aspectPack.dependency = "prodzpod.NemesisRisingTides";
			aspectPack.alwaysValidate = true;
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectBuffered",
					FindEquipmentDef = delegate
					{
						//IL_000c: Unknown result type (might be due to invalid IL or missing references)
						//IL_0011: Unknown result type (might be due to invalid IL or missing references)
						//IL_0012: Unknown result type (might be due to invalid IL or missing references)
						//IL_0014: Invalid comparison between Unknown and I4
						//IL_0028: Unknown result type (might be due to invalid IL or missing references)
						NemRisingTides.PrepareEquipmentCheck();
						EquipmentIndex val = EquipmentCatalog.FindEquipmentIndex("NemesisRisingTides_AffixBuffered");
						return ((int)val != -1 && NemRisingTides.GetBufferedEnabled()) ? EquipmentCatalog.GetEquipmentDef(val) : null;
					},
					itemName = "ZetAspectBuffered",
					displayPriority = 4000,
					BaseIcon = () => Catalog.Sprites.AffixBuffered,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectBuffered.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixBuffered = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixBuffered = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectOppressive",
					FindEquipmentDef = delegate
					{
						//IL_000c: Unknown result type (might be due to invalid IL or missing references)
						//IL_0011: Unknown result type (might be due to invalid IL or missing references)
						//IL_0012: Unknown result type (might be due to invalid IL or missing references)
						//IL_0014: Invalid comparison between Unknown and I4
						//IL_0028: Unknown result type (might be due to invalid IL or missing references)
						NemRisingTides.PrepareEquipmentCheck();
						EquipmentIndex val = EquipmentCatalog.FindEquipmentIndex("NemesisRisingTides_AffixOppressive");
						return ((int)val != -1 && NemRisingTides.GetOppressiveEnabled()) ? EquipmentCatalog.GetEquipmentDef(val) : null;
					},
					itemName = "ZetAspectOppressive",
					displayPriority = 11000,
					BaseIcon = () => Catalog.Sprites.AffixOppressive,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectOppressive.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixOppressive = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixOppressive = buffDef;
					}
				}
			};
			AspectPackDefOf.NemRisingTides = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "MoreElites";
			aspectPack.CustomDependency = () => Catalog.PluginLoaded("com.Nuxlar.MoreElites") || Catalog.PluginLoaded("com.score.MoreElites");
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectEmpowering",
					equipmentName = "AffixEmpowering",
					itemName = "ZetAspectEmpowering",
					displayPriority = 1501,
					BaseIcon = () => Catalog.Sprites.AffixBuffing,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectEmpowering.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixEmpowering = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixEmpowering = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectFrenzied",
					equipmentName = "AffixFrenziedNuxlar",
					itemName = "ZetAspectFrenzied",
					displayPriority = 1500,
					BaseIcon = () => Catalog.Sprites.AffixFrenzied,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectFrenzied.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixFrenzied = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixFrenzied = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectVolatile",
					equipmentName = "AffixVolatile",
					itemName = "ZetAspectVolatile",
					displayPriority = 1502,
					BaseIcon = () => Catalog.Sprites.AffixVolatile,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectVolatile.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixVolatile = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixVolatile = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectEcho",
					equipmentName = "AffixEcho",
					itemName = "ZetAspectEcho",
					displayPriority = 8000,
					BaseIcon = () => Catalog.Sprites.AffixEcho,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectEcho.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixEcho = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixEcho = buffDef;
					},
					AllowAffix = (CharacterBody body, Inventory inventory) => (Object)(object)inventory != (Object)null && inventory.GetItemCountEffective(Catalog.summonedEcho) == 0,
					PreBuffGrant = delegate(CharacterBody body, Inventory inventory)
					{
						body.AddTimedBuff(BuffDefOf.ZetEchoPrimer, 0.1f);
						return false;
					}
				}
			};
			AspectPackDefOf.MoreElites = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "EliteVariety";
			aspectPack.dependency = "com.themysticsword.elitevariety";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectArmor",
					equipmentName = "EliteVariety_AffixArmored",
					itemName = "ZetAspectArmor",
					displayPriority = 5001,
					BaseIcon = () => Catalog.Sprites.AffixArmored,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectArmor.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixArmored = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixArmored = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectBanner",
					equipmentName = "EliteVariety_AffixBuffing",
					itemName = "ZetAspectBanner",
					displayPriority = 5100,
					BaseIcon = () => Catalog.Sprites.AffixBuffing_EV,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectBanner.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixBuffing = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixBuffing = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectImpale",
					equipmentName = "EliteVariety_AffixImpPlane",
					itemName = "ZetAspectImpale",
					displayPriority = 9500,
					BaseIcon = () => Catalog.Sprites.AffixImpPlane,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectImpale.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixImpPlane = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixImpPlane = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectGolden",
					equipmentName = "EliteVariety_AffixPillaging",
					itemName = "ZetAspectGolden",
					displayPriority = 5000,
					BaseIcon = () => Catalog.Sprites.AffixPillaging,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectGolden.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixPillaging = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixPillaging = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectCyclone",
					equipmentName = "EliteVariety_AffixSandstorm",
					itemName = "ZetAspectCyclone",
					displayPriority = 5200,
					BaseIcon = () => Catalog.Sprites.AffixSandstorm,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectCyclone.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixSandstorm = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixSandstorm = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectTinker",
					equipmentName = "EliteVariety_AffixTinkerer",
					itemName = "ZetAspectTinker",
					displayPriority = 5250,
					BaseIcon = () => Catalog.Sprites.AffixTinkerer,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectTinker.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixTinkerer = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixTinkerer = buffDef;
					},
					bodyBlacklist = new List<string> { "EliteVariety_TinkererDroneBody" }
				}
			};
			aspectPack.PostInit = delegate
			{
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Invalid comparison between Unknown and I4
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				if (Configuration.EliteVarietyHooks.Value)
				{
					EliteVariety.LateSetup();
				}
				Catalog.tinkerDroneBodyIndex = BodyCatalog.FindBodyIndex("EliteVariety_TinkererDroneBody");
				BuffIndex val = BuffCatalog.FindBuffIndex("EliteVariety_SandstormBlind");
				if ((int)val != -1)
				{
					BuffDefOf.SandBlind = BuffCatalog.GetBuffDef(val);
				}
			};
			AspectPackDefOf.EliteVariety = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "Augmentum";
			aspectPack.dependency = "com.BrandonRosa.Augmentum";
			aspectPack.alwaysValidate = true;
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectAdaptive",
					equipmentName = "BRANS_ELITE_EQUIPMENT_AFFIX_ADAPTIVE",
					itemName = "ZetAspectAdaptive",
					displayPriority = 6000,
					BaseIcon = () => Catalog.Sprites.AffixAdaptive,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectAdaptive.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixAdaptive = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixAdaptive = buffDef;
					}
				}
			};
			aspectPack.PostInit = delegate
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_007a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0091: Unknown result type (might be due to invalid IL or missing references)
				if (Configuration.AugmentumHooks.Value)
				{
					Augmentum.LateSetup();
				}
				if (Augmentum.DeactivateAdaptiveDrop)
				{
					ItemIndex val = ItemCatalog.FindItemIndex("ITEM_ZETAFFIX_ADAPTIVE");
					ItemDef itemDef = ItemCatalog.GetItemDef(val);
					if ((Object)(object)itemDef != (Object)null)
					{
						Logger.Warn("Augmentum AspectPack PostInit - Deactivating : " + ((Object)itemDef).name);
						if ((Object)(object)itemDef._itemTierDef == (Object)(object)Catalog.BossItemTier && ItemCatalog.tier3ItemList.Contains(itemDef.itemIndex))
						{
							ItemCatalog.tier3ItemList.Remove(itemDef.itemIndex);
						}
						itemDef.tier = (ItemTier)5;
						Catalog.AssignDepricatedTier(itemDef, (ItemTier)5);
						itemDef.hidden = true;
						if (itemDef.DoesNotContainTag((ItemTag)9))
						{
							ItemTag[] array = itemDef.tags;
							int num = array.Length;
							Array.Resize(ref array, num + 1);
							array[num] = (ItemTag)9;
							itemDef.tags = array;
						}
					}
				}
			};
			AspectPackDefOf.Augmentum = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "Sandswept";
			aspectPack.dependency = "com.TeamSandswept.Sandswept";
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectMotivator",
					equipmentName = "ELITE_EQUIPMENT_MOTIVATING",
					itemName = "ZetAspectMotivator",
					displayPriority = 5750,
					BaseIcon = () => Catalog.Sprites.AffixMotivator,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectMotivator.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixMotivator = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixMotivator = buffDef;
					}
				},
				new AspectDef
				{
					identifier = "ZetAspectOsmium",
					equipmentName = "ELITE_EQUIPMENT_OSMIUM",
					itemName = "ZetAspectOsmium",
					displayPriority = 13000,
					BaseIcon = () => Catalog.Sprites.AffixOsmium,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectOsmium.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixOsmium = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixOsmium = buffDef;
					}
				}
			};
			AspectPackDefOf.Sandswept = aspectPack.Register();
			aspectPack = new AspectPack();
			aspectPack.identifier = "Starstorm";
			aspectPack.CustomDependency = () => Catalog.AnyPluginLoaded(Starstorm.GUIDs);
			aspectPack.alwaysValidate = true;
			aspectPack.aspectDefs = new List<AspectDef>
			{
				new AspectDef
				{
					identifier = "ZetAspectEmpyrean",
					equipmentName = "AffixEmpyrean",
					itemName = "ZetAspectEmpyrean",
					displayPriority = 18000,
					BaseIcon = () => Catalog.Sprites.AffixEmpyrean,
					OutlineIcon = () => Catalog.Sprites.OutlineStandard,
					SetupTokens = ZetAspectEmpyrean.SetupTokens,
					RefEquipmentDef = delegate(EquipmentDef equipmentDef)
					{
						EquipDefOf.AffixEmpyrean = equipmentDef;
					},
					RefBuffDef = delegate(BuffDef buffDef)
					{
						BuffDefOf.AffixEmpyrean = buffDef;
					}
				}
			};
			aspectPack.PostInit = delegate
			{
				if (Configuration.StarstormHooks.Value)
				{
					Starstorm.LateSetup();
				}
			};
			AspectPackDefOf.Starstorm = aspectPack.With(new SimpleAspect
			{
				identifier = "ZetAspectEthereal",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Health, 0.15f, 0.1f)
				},
				affix = "SS2ETHEREAL",
				equipmentName = "AffixEthereal",
				displayPriority = 17000,
				icon = () => Catalog.AdjustSprite(Catalog.Sprites.AffixHaunted, (Color?)new Color(0.2f, 0.8f, 0.3f), 0.5f),
				name = "Unstable Remnant",
				pickup = "Become an aspect of the unknown.",
				aspectOf = "<style=cDeath>Aspect of the Unknown</style> :",
				passive = "\nPeriodically create <style=cIsDamage>ethereal circles</style> nearby that detonate on enemies."
			}, new SimpleAspect
			{
				identifier = "ZetAspectToxic",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Damage, 0.12f, 0.08f)
				},
				affix = "SS2TOXIC",
				equipmentName = "ElitePurpleEquipment",
				displayPriority = 7502,
				fallbackIcon = () => Catalog.Sprites.AffixPoison,
				name = "Malignant Resolve",
				pickup = "Become an aspect of toxicity.",
				aspectOf = "<style=cDeath>Aspect of Toxicity</style> :",
				passive = "\nAttacks <style=cIsDamage>explode</style> into a toxic cloud that <style=cIsDamage>poisons</style> enemies, dealing more damage the healthier they are.\nPeriodically lob <style=cIsDamage>toxic bombs</style> at nearby enemies."
			}, new SimpleAspect
			{
				identifier = "ZetAspectTectonic",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Armor, 25f, 15f)
				},
				affix = "SS2TECTONIC",
				equipmentName = "EliteSuperEarthEquipment",
				displayPriority = 16000,
				defence = true,
				icon = () => Catalog.AdjustSprite(Catalog.Sprites.AffixEarth, null, 0.45f),
				name = "His Radiant Passion",
				pickup = "Become a harbinger of earth.",
				aspectOf = "<style=cDeath>Harbinger of Earth</style> :",
				passive = "\nGain the power of <style=cIsHealing>Mending</style> elites.\nEvery <style=cIsDamage>8 seconds</style>, send out <style=cIsDamage>3 sundering waves</style> for <style=cIsDamage>100%</style> damage.",
				configure = delegate(AspectDef aspectDef)
				{
					aspectDef.GrantsBuffs(() => Buffs.EliteEarth);
				}
			}, new SimpleAspect
			{
				identifier = "ZetAspectInfernal",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Damage, 0.2f, 0.1f)
				},
				affix = "SS2INFERNAL",
				equipmentName = "EliteSuperFireEquipment",
				displayPriority = 16001,
				icon = () => Catalog.AdjustSprite(Catalog.Sprites.AffixRed, null, 0.8f),
				name = "Royal Flame",
				pickup = "Become a harbinger of fire.",
				aspectOf = "<style=cDeath>Harbinger of Fire</style> :",
				passive = "\nGain the power of <style=cIsDamage>Blazing</style> elites.\nEvery <style=cIsDamage>8 seconds</style>, launch a <style=cIsDamage>giant fireball</style> for <style=cIsDamage>200%</style> damage.",
				configure = delegate(AspectDef aspectDef)
				{
					aspectDef.GrantsBuffs(() => Buffs.AffixRed);
				}
			}, new SimpleAspect
			{
				identifier = "ZetAspectBoreal",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Health, 0.2f, 0.1f)
				},
				affix = "SS2BOREAL",
				equipmentName = "EliteSuperIceEquipment",
				displayPriority = 16002,
				icon = () => Catalog.EquipmentIcon(Equipment.EliteCollectiveEquipment) ?? Catalog.Sprites.AffixHaunted,
				name = "Her Cosmic Brilliance",
				pickup = "Become a harbinger of ice.",
				aspectOf = "<style=cDeath>Harbinger of Ice</style> :",
				passive = "\nGain the power of <style=cIsUtility>Glacial</style> elites.\nEvery <style=cIsDamage>4 seconds</style>, call down an <style=cIsDamage>ice meteor</style> nearby for <style=cIsDamage>100%</style> damage.",
				configure = delegate(AspectDef aspectDef)
				{
					aspectDef.GrantsBuffs(() => Buffs.AffixWhite);
				}
			}, new SimpleAspect
			{
				identifier = "ZetAspectSupercharged",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.AttackSpeed, 0.2f, 0.1f)
				},
				affix = "SS2SUPERCHARGED",
				equipmentName = "EliteSuperLightningEquipment",
				displayPriority = 16003,
				icon = () => Catalog.AdjustSprite(Catalog.Sprites.AffixBead, null, 0.9f),
				name = "Eye of the Storm",
				pickup = "Become a harbinger of lightning.",
				aspectOf = "<style=cDeath>Harbinger of Lightning</style> :",
				passive = "\nGain the power of <style=cIsDamage>Overloading</style> elites.\nEvery <style=cIsUtility>4 seconds</style>, supercharge a nearby ally <style=cStack>(or yourself)</style>, granting <style=cIsDamage>+100% attack speed</style>, <style=cIsUtility>+100% movement speed</style> and <style=cIsUtility>greatly reduced cooldowns</style> for <style=cIsUtility>13 seconds</style>.",
				configure = delegate(AspectDef aspectDef)
				{
					aspectDef.GrantsBuffs(() => Buffs.AffixBlue);
				}
			}).Register();
			AspectPackDefOf.Meltdown = new AspectPack
			{
				identifier = "Meltdown",
				dependency = "com.pittabread.Meltdown",
				aspectDefs = new List<AspectDef>
				{
					new AspectDef
					{
						identifier = "ZetAspectNuclear",
						equipmentName = "ELITE_EQUIPMENT_NUCLEAR",
						itemName = "ZetAspectNuclear",
						displayPriority = 235,
						BaseIcon = () => Catalog.OwnSpriteOrRecolor((Func<Sprite>)(() => Catalog.Sprites.AffixEarth), (Color?)new Color(0.8f, 0.95f, 0.5f), Catalog.IconMode.OwnOrRecolor),
						OutlineIcon = () => Catalog.Sprites.OutlineStandard,
						SetupTokens = delegate
						{
							Catalog.SetupTokenBase("ZetAspectNuclear", "Nuclear");
							Catalog.AspectDescriptionBuilder(delegate(bool combine)
							{
								string text = Language.TextFragment("ASPECT_OF_RADIATION");
								text += Language.TextFragment("SLOWBLAST_NEARBY");
								return text + string.Format(Language.TextFragment("IRRADIATE_DOT"), Language.ScalingText(0.5f, 0f, "percent", "cIsDamage", combine), Language.TextFragment("TOTAL_DAMAGE"), Language.SecondText(4f, "over"));
							});
						},
						RefEquipmentDef = delegate(EquipmentDef equipmentDef)
						{
							EquipDefOf.AffixNuclear = equipmentDef;
						},
						RefBuffDef = delegate(BuffDef buffDef)
						{
							BuffDefOf.AffixNuclear = buffDef;
						}
					}
				},
				ContentLoad = delegate
				{
					Language.RegisterFragmentNoOverwrite("AFFIX_NUCLEAR_NAME", "Elephant's Foot");
					Language.RegisterFragmentNoOverwrite("AFFIX_NUCLEAR_PICKUP", "Become an aspect of radiation.");
					Language.RegisterFragmentNoOverwrite("AFFIX_NUCLEAR_ACTIVE", "<style=cStack>(???)</style>");
					Language.RegisterFragmentNoOverwrite("ASPECT_OF_RADIATION", "<style=cDeath>Aspect of Radiation</style> :");
					Language.RegisterFragmentNoOverwrite("SLOWBLAST_NEARBY", "\nPeriodically blast nearby enemies, slowing them.");
					Language.RegisterFragmentNoOverwrite("IRRADIATE_DOT", "\nAttacks <style=cIsDamage>irradiate</style> on hit for {0} {1} damage {2}.");
					ItemDef item = (ItemDefOf.ZetAspectNuclear = Catalog.CreateItemTemplate("ZetAspectNuclear", offense: true, defence: false));
					ZetAspectsContent.itemDefs.Add(item);
					Catalog.transformableAspectItemDefs.Add(item);
				}
			}.Register();
			AspectPackDefOf.RecoveredAndReformed = new AspectPack
			{
				identifier = "RecoveredAndReformed",
				dependency = "prodzpod.RecoveredAndReformed"
			}.With(new SimpleAspect
			{
				identifier = "ZetAspectSpeedy",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.AttackSpeed, 0.15f, 0.1f)
				},
				affix = "SECRETSPEED",
				equipmentName = "EliteSecretSpeedEquipment",
				displayPriority = 2510,
				icon = () => Catalog.ReplaceEdgeHue(Catalog.GetOwnSprite() ?? Catalog.Sprites.AffixRed, 0.03f, 0.12f, 0.15f, 6),
				configure = delegate(AspectDef aspectDef)
				{
					aspectDef.useOutline = false;
				},
				name = "Beyond the Limits",
				pickup = "Become an aspect of speed.",
				aspectOf = "<style=cDeath>Aspect of Speed</style> :",
				passive = "\nIncreases <style=cIsUtility>movement speed</style> by <style=cIsUtility>{0}%</style> and <style=cIsDamage>attack speed</style> by <style=cIsDamage>{1}%</style>.",
				passiveArgs = () => new object[2]
				{
					100f * Catalog.ModStaticField("prodzpod.RecoveredAndReformed", "RecoveredAndReformed.Recovered", "SecretSpeedMoveSpeed", 1f),
					100f * Catalog.ModStaticField("prodzpod.RecoveredAndReformed", "RecoveredAndReformed.Recovered", "SecretSpeedAttackSpeed", 0.5f)
				}
			}).Register();
			AspectPackDefOf.Expedition = new AspectPack
			{
				identifier = "Expedition",
				dependency = "ExpeditionCrew.EXPEDITION"
			}.With(new SimpleAspect
			{
				identifier = "ZetAspectPrimal",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.AttackSpeed, 0.15f, 0.1f)
				},
				affix = "INSTINCT",
				equipmentName = "ELITE_EQUIPMENT_INSTINCT_NAME",
				displayPriority = 2520,
				fallbackIcon = () => Catalog.Sprites.AffixRed,
				name = "Primal Call",
				pickup = "Become an aspect of wildness.",
				aspectOf = "<style=cDeath>Aspect of Wildness</style> :",
				passive = "\nAttacks <style=cIsUtility>injure</style> enemies, preventing them from sprinting for <style=cIsUtility>2 seconds</style>.\nWhile below <style=cIsHealth>50% health</style>, gain <style=cIsDamage>+50% attack speed</style>, <style=cIsUtility>+50% movement speed</style> and become <style=cIsUtility>immune to stuns</style>."
			}, new SimpleAspect
			{
				identifier = "ZetAspectUnstable",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Armor, 20f, 10f)
				},
				affix = "EXPUNSTABLE",
				equipmentName = "ELITE_EQUIPMENT_UNSTABLE_NAME",
				displayPriority = 14000,
				offense = false,
				defence = true,
				fallbackIcon = () => Catalog.Sprites.AffixHaunted,
				name = "Localized Anomaly",
				pickup = "Become an aspect of chaos.",
				aspectOf = "<style=cDeath>Aspect of Chaos</style> :",
				passive = "\nPeriodically <style=cIsUtility>teleport</style> a nearby ally to your target."
			}).Register();
			AspectPackDefOf.LostInTransitLegacy = new AspectPack
			{
				identifier = "LostInTransitLegacy",
				dependency = "Phreelosu.LostInTransitLegacy"
			}.With(new SimpleAspect
			{
				identifier = "ZetAspectFrenzying",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.MoveSpeed, 0.15f, 0.1f)
				},
				affix = "LITFRENZIED",
				equipmentName = "LITLegacyAffixFRENZIED",
				displayPriority = 1550,
				fallbackIcon = () => Catalog.Sprites.AffixRed,
				name = "Primordial Rage",
				pickup = "Become an aspect of seething.",
				aspectOf = "<style=cDeath>Aspect of Seething</style> :",
				passive = "\nIncreases <style=cIsUtility>movement speed</style> by <style=cIsUtility>{0}%</style> and <style=cIsDamage>attack speed</style> by <style=cIsDamage>{1}%</style>.\nReduces <style=cIsUtility>skill cooldowns</style> by <style=cIsUtility>{2}%</style>.\nEvery <style=cIsUtility>{3} seconds</style>, press <style=cIsUtility>{4}</style> to <style=cIsUtility>blink</style> forward.",
				passiveArgs = () => new object[5]
				{
					100f * Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Frenzying", "Movement Speed Bonus", 1f),
					100f * Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Frenzying", "Attack Speed Bonus", 1f),
					100f * Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Frenzying", "Cooldown Reduction", 0.5f),
					Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Frenzying", "Blink Cooldown", 10f),
					Catalog.ModConfig<KeyCode>("Phreelosu.LostInTransitLegacy", "Elite: Frenzying", "Player Blink Key", (KeyCode)102)
				}
			}, new SimpleAspect
			{
				identifier = "ZetAspectLeeching",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Regen, 4f, 2f)
				},
				affix = "LITLEECHING",
				equipmentName = "LITLegacyAffixLEECHING",
				displayPriority = 1551,
				defence = true,
				fallbackIcon = () => Catalog.Sprites.AffixPoison,
				name = "Guttural Whimpers",
				pickup = "Become an aspect of parasitism.",
				aspectOf = "<style=cDeath>Aspect of Parasitism</style> :",
				passive = "\n<style=cIsHealing>Heal</style> for <style=cIsHealing>{0}%</style> of the damage you deal.\nEvery <style=cIsUtility>{1} seconds</style>, charge a burst that <style=cIsHealing>regenerates</style> up to <style=cIsHealing>{2}%</style> of the maximum health of injured allies within <style=cIsUtility>{3}m</style>.",
				passiveArgs = () => new object[4]
				{
					100f * Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Leeching", "Player Lifesteal", 0.5f),
					Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Leeching", "Time Between Bursts", 10f),
					Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Leeching", "Burst Heal Percentage", 10f),
					Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Leeching", "Burst Radius", 25f)
				}
			}, new SimpleAspect
			{
				identifier = "ZetAspectLITVolatile",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Damage, 0.15f, 0.1f)
				},
				affix = "LITVOLATILE",
				equipmentName = "LITLegacyAffixVOLATILE",
				displayPriority = 1552,
				fallbackIcon = () => Catalog.Sprites.AffixRed,
				name = "Lingering Torment",
				pickup = "Become an aspect of instability.",
				aspectOf = "<style=cDeath>Aspect of Instability</style> :",
				passive = "\nAttacks <style=cIsDamage>explode</style> on hit for <style=cIsDamage>{0}%</style> of the damage dealt.\nTaking heavy damage drops <style=cIsDamage>spite bombs</style> around you.",
				passiveArgs = () => new object[1] { 100f * Catalog.ModConfig("Phreelosu.LostInTransitLegacy", "Elite: Volatile", "Explosion Damage", 0.3f) }
			}).Register();
			AspectPackDefOf.SivsContentPack = new AspectPack
			{
				identifier = "SivsContentPack",
				dependency = "Sivelos.SivsContentPack"
			}.With(new SimpleAspect
			{
				identifier = "ZetAspectObscuring",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.MoveSpeed, 0.15f, 0.1f)
				},
				affix = "SIVSHADOW",
				equipmentName = "eqEliteShadow",
				displayPriority = 7700,
				offense = false,
				defence = true,
				fallbackIcon = () => Catalog.Sprites.AffixHaunted,
				name = "What Waits In The Shadows",
				pickup = "Become an aspect of darkness.",
				aspectOf = "<style=cDeath>Aspect of Darkness</style> :",
				passive = "\nAttacks <style=cIsUtility>blind</style> enemies for <style=cIsUtility>{0} seconds</style>.\nWhile out of combat, <style=cIsUtility>turn invisible</style>.",
				passiveArgs = () => new object[1] { Catalog.ModStaticField("Sivelos.SivsContentPack", "SivsContentPack.Config.Configuration+Elites+Obscuring", "blindnessDuration", 10f) }
			}, new SimpleAspect
			{
				identifier = "ZetAspectTarSymbiont",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Health, 0.15f, 0.1f)
				},
				affix = "SIVTAR",
				equipmentName = "eqEliteTar",
				displayPriority = 7701,
				defence = true,
				fallbackIcon = () => Catalog.Sprites.AffixPoison,
				name = "Aphelian Sin",
				pickup = "Become an aspect of tar.",
				aspectOf = "<style=cDeath>Aspect of Tar</style> :",
				passive = "\nAttacks cover enemies in <style=cIsUtility>tar</style> for <style=cIsUtility>{0} seconds</style>.\n<style=cIsHealing>Heal</style> for <style=cIsHealing>{1}%</style> of the damage you deal.",
				passiveArgs = () => new object[2]
				{
					Catalog.ModStaticField("Sivelos.SivsContentPack", "SivsContentPack.Config.Configuration+Elites+Tar", "tarDuration", 5f),
					100f * Catalog.ModStaticField("Sivelos.SivsContentPack", "SivsContentPack.Config.Configuration+Elites+Tar", "lifeStealCoefficient", 1f)
				}
			}, new SimpleAspect
			{
				identifier = "ZetAspectPrototype",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Damage, 0.2f, 0.1f)
				},
				affix = "SIVPROTOTYPE",
				equipmentName = "eqEliteUnstable",
				displayPriority = 7702,
				icon = () => Catalog.AdjustSprite(Catalog.Sprites.AffixLunar, null, 0.65f),
				name = "Unfinished Design",
				pickup = "Become an aspect of design.",
				aspectOf = "<style=cDeath>Aspect of Design</style> :",
				passive = "\nIncreases <style=cIsDamage>damage</style> by <style=cIsDamage>{0}%</style>, but <style=cDeath>reduces maximum health by {1}%</style>.\nEvery <style=cIsUtility>{2} seconds</style>, launch <style=cIsDamage>{3}</style> fireballs for <style=cIsDamage>{4}%</style> damage each.",
				passiveArgs = () => new object[5]
				{
					100f * Catalog.ModStaticField("Sivelos.SivsContentPack", "SivsContentPack.Config.Configuration+Elites+Unstable", "damageMult", 1f),
					Mathf.Round(100f * (1f - 1f / (1f + Catalog.ModStaticField("Sivelos.SivsContentPack", "SivsContentPack.Config.Configuration+Elites+Unstable", "healthMult", 0.5f)))),
					Catalog.ModStaticField("Sivelos.SivsContentPack", "SivsContentPack.Config.Configuration+Elites+Unstable", "fireballInterval", 5f),
					Catalog.ModStaticField("Sivelos.SivsContentPack", "SivsContentPack.Config.Configuration+Elites+Unstable", "fireBallCount", 3),
					100f * Catalog.ModStaticField("Sivelos.SivsContentPack", "SivsContentPack.Config.Configuration+Elites+Unstable", "fireBallDamageCoefficient", 1.5f)
				}
			}).Register();
			AspectPackDefOf.EnemiesReturns = new AspectPack
			{
				identifier = "EnemiesReturns",
				dependency = "com.Viliger.EnemiesReturns"
			}.With(new SimpleAspect
			{
				identifier = "ZetAspectAeonian",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Armor, 30f, 15f)
				},
				affix = "AEONIAN",
				FindEquipmentDef = () => Catalog.FindEquipmentDefByNames("ER_EliteAeonianEquipment", "EliteAeonianEquipment"),
				displayPriority = 19000,
				defence = true,
				icon = () => Catalog.Sprites.AffixWhite,
				name = "Arraign's Decree",
				pickup = "Become an aspect of judgement.",
				aspectOf = "<style=cDeath>Aspect of Judgement</style> :",
				passive = "\nBecome <style=cIsUtility>immune</style> to <style=cIsDamage>attack speed</style> and <style=cIsUtility>movement speed</style> reductions.\nReduces the duration of <style=cIsUtility>stuns</style> and <style=cIsUtility>freezes</style> on you by <style=cIsUtility>{0}%</style>.",
				passiveArgs = () => new object[1] { 100f * Mathf.Clamp01(Catalog.ModStaticField("com.Viliger.EnemiesReturns", "EnemiesReturns.Configuration.Judgement.Judgement", "AeonianEliteStunAndFreezeReduction", 0.5f)) }
			}).Register();
			AspectPackDefOf.SwanSong = new AspectPack
			{
				identifier = "SwanSong",
				dependency = "com.RiskOfBrainrot.SwanSongExtended"
			}.With(new SimpleAspect
			{
				identifier = "ZetAspectHallowed",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Cooldown, 0.15f, 0.1f)
				},
				affix = "SSHALLOWED",
				equipmentName = "BORBO_ELITE_EQUIPMENT_AFFIX_SPEED",
				displayPriority = 2530,
				fallbackIcon = () => Catalog.Sprites.AffixBlue,
				name = "Chir's Tempo",
				pickup = "Become an aspect of velocity.",
				aspectOf = "<style=cDeath>Aspect of Velocity</style> :",
				passive = "\nIncreases <style=cIsUtility>movement speed</style> by <style=cIsUtility>{0}%</style> and <style=cIsDamage>base attack speed</style> by <style=cIsDamage>{1}</style>.\nReduces <style=cIsUtility>skill cooldowns</style> by <style=cIsUtility>{2}%</style>.",
				passiveArgs = () => new object[3]
				{
					100f * Catalog.ModStaticField("com.RiskOfBrainrot.SwanSongExtended", "SwanSongExtended.Elites.FrenziedAspect", "moveSpeedBonus", 1.2f),
					Catalog.ModStaticField("com.RiskOfBrainrot.SwanSongExtended", "SwanSongExtended.Elites.FrenziedAspect", "atkSpeedBonus", 1.8f),
					100f * Catalog.ModStaticField("com.RiskOfBrainrot.SwanSongExtended", "SwanSongExtended.Elites.FrenziedAspect", "cooldownReduction", 0.4f)
				}
			}, new SimpleAspect
			{
				identifier = "ZetAspectSSVolatile",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Damage, 0.15f, 0.1f)
				},
				affix = "SSVOLATILE",
				equipmentName = "BORBO_ELITE_EQUIPMENT_AFFIX_EXPLOSIVE",
				displayPriority = 2531,
				fallbackIcon = () => Catalog.Sprites.AffixRed,
				name = "Bava's Refrain",
				pickup = "Become an aspect of force.",
				aspectOf = "<style=cDeath>Aspect of Force</style> :",
				passive = "\nAttacks <style=cIsDamage>explode</style> on hit, <style=cIsUtility>knocking back</style> enemies.\nPeriodically fire a <style=cIsDamage>mortar</style>."
			}, new SimpleAspect
			{
				identifier = "ZetAspectMirrored",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.Crit, 10f, 5f)
				},
				affix = "SSMIRRORED",
				equipmentName = "BORBO_ELITE_EQUIPMENT_MIRRORED",
				displayPriority = 7800,
				offense = false,
				defence = true,
				fallbackIcon = () => Catalog.Sprites.AffixHaunted,
				name = "Fractured Belief",
				pickup = "Become an aspect of vanity.",
				aspectOf = "<style=cDeath>Aspect of Vanity</style> :",
				passive = "\nBecome <style=cIsUtility>immune to hitstun</style>, but <style=cDeath>greatly reduces maximum health</style>.\nGain extra <style=cIsHealing>health gates</style>. Triggering one makes you briefly <style=cIsUtility>invulnerable</style> and <style=cIsDamage>shattered</style>, increasing <style=cIsUtility>speed</style> and reducing <style=cIsUtility>cooldowns</style>."
			}, new SimpleAspect
			{
				identifier = "ZetAspectSurging",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.MoveSpeed, 0.2f, 0.1f)
				},
				affix = "SSSURGING",
				equipmentName = "BORBO_ELITE_EQUIPMENT_AFFIX_FLOOD",
				displayPriority = 15500,
				fallbackIcon = () => Catalog.Sprites.AffixBlue,
				name = "A Dormant Force",
				pickup = "Become an aspect of flood.",
				aspectOf = "<style=cDeath>Aspect of Flood</style> :",
				passive = "\nPeriodically <style=cIsUtility>surge</style> toward enemies, releasing <style=cIsDamage>waves</style> that drag them in a <style=cIsUtility>riptide</style>."
			}, new SimpleAspect
			{
				identifier = "ZetAspectHowling",
				stats = new AspectStat[1]
				{
					new AspectStat(AspectStatType.AttackSpeed, 0.2f, 0.1f)
				},
				affix = "SSHOWLING",
				equipmentName = "BORBO_ELITE_EQUIPMENT_AFFIX_SQUALL",
				displayPriority = 15501,
				fallbackIcon = () => Catalog.Sprites.AffixHaunted,
				name = "Twisted Stare",
				pickup = "Become an aspect of squall.",
				aspectOf = "<style=cDeath>Aspect of Squall</style> :",
				passive = "\nAttacks <style=cIsDamage>strip armor</style> from enemies.\nPeriodically fire <style=cIsDamage>wind missiles</style> and a <style=cIsDamage>squall beam</style>."
			}).Register();
			AspectPackDefOf.Deltarune = new AspectPack
			{
				identifier = "Deltarune",
				dependency = "AGU.DeltaruneMod"
			}.With(new SimpleAspect
			{
				identifier = "ZetAspectNEO",
				affix = "DRNEO",
				FindEquipmentDef = () => Catalog.FindEquipmentDefByNames("AffixN.E.O.") ?? Catalog.FindEquipmentDefByTokenOrBuff("Armor of N.E.O.", "N.E.O. Armor"),
				displayPriority = 2540,
				fallbackIcon = () => Catalog.Sprites.AffixHaunted,
				name = "Armor of N.E.O.",
				pickup = "Become an aspect of N.E.O.",
				aspectOf = "<style=cDeath>Aspect of N.E.O.</style> :",
				passive = "\nIncreases <style=cIsDamage>damage</style>, but <style=cDeath>reduces health and armor</style>.\nGain <style=cIsUtility>{0} random buffs</style> while active.",
				passiveArgs = () => new object[1] { Catalog.ModStaticField("AGU.DeltaruneMod", "DeltaruneMod.Elites.NeoElite", "maxBuffs", 2) }
			}).Register();
		}
	}
	public enum PopState
	{
		None = 0,
		Equip = 1,
		Buff = 2,
		Item = 4,
		Replace = 8,
		Populated = 0x10
	}
	public static class FlagExt
	{
		public static void SetFlag(this ref PopState flag, PopState other)
		{
			flag |= other;
		}

		public static bool CheckFlag(this PopState flag, PopState other)
		{
			return (flag & other) != 0;
		}
	}
	public class AspectDef
	{
		public string identifier = "";

		public AspectPack pack;

		public EquipmentDef equipmentDef;

		public BuffDef buffDef;

		public ItemDef itemDef;

		public string equipmentName = "";

		public string buffName = "";

		public string itemName = "";

		public Func<EquipmentDef> FindEquipmentDef;

		public Func<BuffDef> FindBuffDef;

		public Func<ItemDef> FindItemDef;

		public Action<EquipmentDef> RefEquipmentDef;

		public Action<BuffDef> RefBuffDef;

		public Action<ItemDef> RefItemDef;

		public Func<Sprite> BaseIcon;

		public Func<Sprite> OutlineIcon;

		public bool useOutline = true;

		public bool copyEquipmentPrefab = true;

		public int displayPriority = 1;

		public bool disableDisplayOnDeath = false;

		public Action SetupTokens;

		public List<Language.RecordedStat> recordedStats = new List<Language.RecordedStat>();

		public List<string> bodyBlacklist = new List<string>();

		public List<BodyIndex> blacklistedIndexes = new List<BodyIndex>();

		public Func<CharacterBody, Inventory, bool> AllowAffix;

		public Func<CharacterBody, Inventory, bool> PreBuffGrant;

		public Func<CharacterBody, IEnumerable<BuffIndex>> Promoter;

		public Action<CharacterBody> OnApplied;

		public Action<CharacterBody> OnRefresh;

		public Action<CharacterBody> OnExpire;

		public bool invalid = false;

		public ConfigEntry<float> DropWeight;

		public bool PackPopulated
		{
			get
			{
				if (pack != null)
				{
					return pack.Populated;
				}
				return false;
			}
		}

		public bool PackEnabled
		{
			get
			{
				if (pack != null)
				{
					return pack.Enabled;
				}
				return false;
			}
		}

		internal void CreateDropWeightConfig(ConfigFile config)
		{
			DropWeight = config.Bind<float>("0b-DropWeight", "aspectDropWeight" + identifier, 1f, "Drop chance multiplier for " + identifier);
		}
	}
	public class AspectPack
	{
		public string identifier = "";

		public string dependency = "";

		public List<string> dependencies = new List<string>();

		public Func<bool> CustomDependency = () => true;

		public bool alwaysValidate = false;

		public Action ContentLoad;

		public Action PostInit;

		private int _enabled = -1;

		private PopState PopState = PopState.None;

		public List<AspectDef> aspectDefs = new List<AspectDef>();

		public bool Enabled
		{
			get
			{
				if (_enabled == -1)
				{
					if (dependency == "")
					{
						if (dependencies.Count == 0)
						{
							_enabled = (CustomDependency() ? 1 : 0);
						}
						else
						{
							foreach (string dependency in dependencies)
							{
								if (!Catalog.PluginLoaded(dependency))
								{
									_enabled = 0;
									return false;
								}
							}
							_enabled = 1;
						}
					}
					else
					{
						_enabled = (Catalog.PluginLoaded(this.dependency) ? 1 : 0);
					}
				}
				return _enabled == 1;
			}
		}

		public bool Populated => PopState.CheckFlag(PopState.Populated);

		public AspectPack Register()
		{
			Catalog.aspectPacks.Add(this);
			foreach (AspectDef aspectDef in aspectDefs)
			{
				Catalog.aspectDefs.Add(aspectDef);
			}
			return this;
		}

		internal void Entrada()
		{
			if (Enabled)
			{
				AssignPack();
				PopulateEquipment();
				PopulateItems();
				ValidateDefs();
				DisableInactiveItems();
				ApplyIcons();
			}
			else if (alwaysValidate)
			{
				AssignPack();
				PopulateEquipment();
				PopulateItems();
				ValidateDefs();
				DisableInactiveItems();
			}
		}

		internal void Init()
		{
			if (Enabled)
			{
				PopulateEquipment();
				PopulateBuffs();
				PopulateItems();
				ValidateDefs();
				DisableInactiveItems();
				ResolveBlacklist();
				CopyExpansionReq();
				CopyModelPrefabs();
				ApplyIcons();
				EquipmentColor();
				SetupTokens();
				if (DropHooks.CanObtainEquipment())
				{
					EquipmentEntries(shown: true);
				}
				ItemEntries(DropHooks.CanObtainItem());
				FillEqualities();
				PopState.SetFlag(PopState.Populated);
			}
			else if (alwaysValidate)
			{
				PopulateEquipment();
				PopulateItems();
				ValidateDefs();
				DisableInactiveItems();
			}
		}

		internal void Finale()
		{
			if (Populated)
			{
				ItemEntries(shown: true);
				EquipmentEntries(shown: false);
			}
		}

		private void AssignPack()
		{
			foreach (AspectDef aspectDef in aspectDefs)
			{
				aspectDef.pack = this;
			}
		}

		private void PopulateEquipment()
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_005a: Invalid comparison between Unknown and I4
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			if (PopState.CheckFlag(PopState.Equip))
			{
				return;
			}
			foreach (AspectDef aspectDef in aspectDefs)
			{
				EquipmentDef val = null;
				if (aspectDef.equipmentName != "")
				{
					EquipmentIndex val2 = EquipmentCatalog.FindEquipmentIndex(aspectDef.equipmentName);
					if ((int)val2 != -1)
					{
						val = EquipmentCatalog.GetEquipmentDef(val2);
					}
					if (!Object.op_Implicit((Object)(object)val))
					{
						Logger.Warn("Failed to find EquipmentDef named : " + aspectDef.equipmentName);
					}
				}
				if (!Object.op_Implicit((Object)(object)val))
				{
					val = aspectDef.FindEquipmentDef?.Invoke();
				}
				if (Object.op_Implicit((Object)(object)val))
				{
					aspectDef.equipmentDef = val;
					aspectDef.RefEquipmentDef?.Invoke(val);
				}
				if (!Object.op_Implicit((Object)(object)aspectDef.equipmentDef))
				{
					aspectDef.invalid = true;
					Logger.Warn("Failed to find EquipmentDef for : " + aspectDef.identifier);
				}
			}
			PopState.SetFlag(PopState.Equip);
		}

		private void PopulateBuffs()
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_005a: Invalid comparison between Unknown and I4
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			if (PopState.CheckFlag(PopState.Buff))
			{
				return;
			}
			foreach (AspectDef aspectDef in aspectDefs)
			{
				BuffDef val = null;
				if (aspectDef.buffName != "")
				{
					BuffIndex val2 = BuffCatalog.FindBuffIndex(aspectDef.buffName);
					if ((int)val2 != -1)
					{
						val = BuffCatalog.GetBuffDef(val2);
					}
					if (!Object.op_Implicit((Object)(object)val))
					{
						Logger.Warn("Failed to find BuffDef named : " + aspectDef.buffName);
					}
				}
				if (!Object.op_Implicit((Object)(object)val))
				{
					val = aspectDef.FindBuffDef?.Invoke();
				}
				if (!Object.op_Implicit((Object)(object)val) && (Object)(object)aspectDef.equipmentDef != (Object)null)
				{
					val = aspectDef.equipmentDef.passiveBuffDef;
					if (!Object.op_Implicit((Object)(object)val))
					{
						Logger.Error("EquipmentDef of " + aspectDef.identifier + " does not have a passiveBuffDef!");
					}
				}
				if (Object.op_Implicit((Object)(object)val))
				{
					aspectDef.buffDef = val;
					aspectDef.RefBuffDef?.Invoke(val);
				}
				if (!Object.op_Implicit((Object)(object)aspectDef.buffDef))
				{
					aspectDef.invalid = true;
					Logger.Warn("Failed to find BuffDef for : " + aspectDef.identifier);
				}
			}
			PopState.SetFlag(PopState.Buff);
		}

		private void PopulateItems()
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_005a: Invalid comparison between Unknown and I4
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			if (PopState.CheckFlag(PopState.Item))
			{
				return;
			}
			foreach (AspectDef aspectDef in aspectDefs)
			{
				ItemDef val = null;
				if (aspectDef.itemName != "")
				{
					ItemIndex val2 = ItemCatalog.FindItemIndex(aspectDef.itemName);
					if ((int)val2 != -1)
					{
						val = ItemCatalog.GetItemDef(val2);
					}
					if (!Object.op_Implicit((Object)(object)val))
					{
						Logger.Warn("Failed to find ItemDef named : " + aspectDef.itemName);
					}
				}
				if (!Object.op_Implicit((Object)(object)val))
				{
					val = aspectDef.FindItemDef?.Invoke();
				}
				if (Object.op_Implicit((Object)(object)val))
				{
					aspectDef.itemDef = val;
					aspectDef.RefItemDef?.Invoke(val);
				}
				if (!Object.op_Implicit((Object)(object)aspectDef.itemDef))
				{
					aspectDef.invalid = true;
					Logger.Warn("Failed to find ItemDef for : " + aspectDef.identifier);
				}
			}
			PopState.SetFlag(PopState.Item);
		}

		private void ValidateDefs()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Invalid comparison between Unknown and I4
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Invalid comparison between Unknown and I4
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Invalid comparison between Unknown and I4
			if ((PopState & (PopState)7) == 0)
			{
				Logger.Warn("Tried to ValidateDefs of " + identifier + " but nothing is populated!");
				return;
			}
			foreach (AspectDef aspectDef in aspectDefs)
			{
				if (PopState.CheckFlag(PopState.Equip))
				{
					if (Object.op_Implicit((Object)(object)aspectDef.equipmentDef))
					{
						if ((int)aspectDef.equipmentDef.equipmentIndex == -1)
						{
							aspectDef.invalid = true;
							Logger.Warn(aspectDef.identifier + " : associated EquipmentIndex is [none]!");
						}
					}
					else
					{
						aspectDef.invalid = true;
						Logger.Warn(aspectDef.identifier + " : associated Equipment is null!");
					}
				}
				if (PopState.CheckFlag(PopState.Buff))
				{
					if (Object.op_Implicit((Object)(object)aspectDef.buffDef))
					{
						if ((int)aspectDef.buffDef.buffIndex == -1)
						{
							aspectDef.invalid = true;
							Logger.Warn(aspectDef.identifier + " : associated BuffIndex is [none]!");
						}
					}
					else
					{
						aspectDef.invalid = true;
						Logger.Warn(aspectDef.identifier + " : associated Buff is null!");
					}
				}
				if (!PopState.CheckFlag(PopState.Item))
				{
					continue;
				}
				if (Object.op_Implicit((Object)(object)aspectDef.itemDef))
				{
					if ((int)aspectDef.itemDef.itemIndex == -1)
					{
						aspectDef.invalid = true;
						Logger.Warn(aspectDef.identifier + " : associated ItemIndex is [none]!");
					}
				}
				else
				{
					aspectDef.invalid = true;
					Logger.Warn(aspectDef.identifier + " : associated Item is null!");
				}
			}
		}

		private void DisableInactiveItems()
		{
			foreach (AspectDef aspectDef in aspectDefs)
			{
				if (aspectDef.invalid)
				{
					DeactivateItem(aspectDef);
					aspectDef.RefEquipmentDef?.Invoke(null);
					aspectDef.RefBuffDef?.Invoke(null);
					aspectDef.RefItemDef?.Invoke(null);
				}
			}
		}

		private void ResolveBlacklist()
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Invalid comparison between Unknown and I4
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			foreach (AspectDef aspectDef in aspectDefs)
			{
				if (aspectDef.bodyBlacklist.Count <= 0)
				{
					continue;
				}
				foreach (string item in aspectDef.bodyBlacklist)
				{
					BodyIndex val = BodyCatalog.FindBodyIndex(item);
					if ((int)val != -1)
					{
						aspectDef.blacklistedIndexes.Add(val);
					}
				}
			}
		}

		private void CopyExpansionReq()
		{
			foreach (AspectDef aspectDef in aspectDefs)
			{
				CopyExpansion(aspectDef);
			}
		}

		private void CopyModelPrefabs()
		{
			foreach (AspectDef aspectDef in aspectDefs)
			{
				CopyModelPrefab(aspectDef);
			}
		}

		private void ApplyIcons()
		{
			if (PopState.CheckFlag(PopState.Replace))
			{
				return;
			}
			foreach (AspectDef aspectDef in aspectDefs)
			{
				SetupIcons(Catalog.currentIconTarget = aspectDef);
				Catalog.currentIconTarget = null;
			}
			PopState.SetFlag(PopState.Replace);
		}

		private void EquipmentColor()
		{
			foreach (AspectDef aspectDef in aspectDefs)
			{
				if (Object.op_Implicit((Object)(object)aspectDef.equipmentDef))
				{
					ColorEquipmentDroplet(aspectDef.equipmentDef);
				}
			}
		}

		private void SetupTokens()
		{
			foreach (AspectDef aspectDef2 in aspectDefs)
			{
				AspectDef aspectDef = (Catalog.currentTokenTarget = aspectDef2);
				Catalog.currentTokenAffix = "";
				Language.StartRecording();
				try
				{
					aspectDef.SetupTokens?.Invoke();
				}
				finally
				{
					aspectDef.recordedStats = Language.StopRecording();
				}
				Catalog.currentTokenTarget = null;
				Catalog.currentTokenAffix = "";
				if (LookingGlassCompat.Active)
				{
					LookingGlassCompat.RegisterAspect(aspectDef);
				}
			}
		}

		internal void ItemEntries(bool shown)
		{
			foreach (AspectDef aspectDef in aspectDefs)
			{
				SetItemState(aspectDef, shown);
			}
		}

		internal void EquipmentEntries(bool shown)
		{
			foreach (AspectDef aspectDef in aspectDefs)
			{
				SetEquipmentState(aspectDef, shown);
			}
		}

		internal void FillEqualities()
		{
			if ((PopState & (PopState)7) == (PopState)7)
			{
				foreach (AspectDef aspectDef in aspectDefs)
				{
					if (!aspectDef.invalid)
					{
						CreateEquality(aspectDef);
					}
				}
				return;
			}
			Logger.Error("Tried to FillEqualities for : " + identifier + " but defs have not been fully validated!");
			Logger.Warn("---- PopState: " + PopState);
		}

		private static void DeactivateItem(AspectDef aspectDef)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: 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)
			ItemDef itemDef = aspectDef.itemDef;
			if (!Object.op_Implicit((Object)(object)itemDef))
			{
				Logger.Warn("Tried to disable ItemDef of " + aspectDef.identifier + " but it is null!");
				return;
			}
			if (Catalog.disabledItemIndexes.Contains(itemDef.itemIndex))
			{
				Logger.Warn(((Object)itemDef).name + " : is already disabled!");
			}
			Logger.Warn("Deactivating : " + ((Object)itemDef).name);
			if ((Object)(object)itemDef._itemTierDef == (Object)(object)Catalog.BossItemTier && ItemCatalog.tier3ItemList.Contains(itemDef.itemIndex))
			{
				ItemCatalog.tier3ItemList.Remove(itemDef.itemIndex);
			}
			itemDef.tier = (ItemTier)5;
			Catalog.AssignDepricatedTier(itemDef, (ItemTier)5);
			itemDef.hidden = true;
			if (itemDef.DoesNotContainTag((ItemTag)9))
			{
				ItemTag[] array = itemDef.tags;
				int num = array.Length;
				Array.Resize(ref array, num + 1);
				array[num] = (ItemTag)9;
				itemDef.tags = array;
			}
			if (!Catalog.disabledItemIndexes.Contains(itemDef.itemIndex))
			{
				Catalog.disabledItemIndexes.Add(itemDef.itemIndex);
			}
		}

		private static void CopyExpansion(AspectDef aspectDef)
		{
			if (Object.op_Implicit((Object)(object)aspectDef.equipmentDef) && Object.op_Implicit((Object)(object)aspectDef.itemDef))
			{
				aspectDef.itemDef.requiredExpansion = aspectDef.equipmentDef.requiredExpansion;
				return;
			}
			Logger.Warn("Could not copy expansion requirement for " + aspectDef.identifier);
			LogNullInfo(aspectDef);
		}

		private static void CopyModelPrefab(AspectDef aspectDef)
		{
			if (Object.op_Implicit((Object)(object)aspectDef.equipmentDef) && Object.op_Implicit((Object)(object)aspectDef.itemDef))
			{
				if (aspectDef.copyEquipmentPrefab)
				{
					CopyEquipmentPrefab(aspectDef.itemDef, aspectDef.equipmentDef);
				}
				else
				{
					CopyItemPrefab(aspectDef.itemDef, aspectDef.equipmentDef);
				}
				return;
			}
			if (aspectDef.copyEquipmentPrefab)
			{
				Logger.Warn("Could not copy model prefab [EQUIP] --> [ITEM] for : " + aspectDef.identifier);
			}
			else
			{
				Logger.Warn("Could not copy model prefab [ITEM] --> [EQUIP] for : " + aspectDef.identifier);
			}
			LogNullInfo(aspectDef);
		}

		private static void LogNullInfo(AspectDef aspectDef)
		{
			if (!Object.op_Implicit((Object)(object)aspectDef.equipmentDef) && !Object.op_Implicit((Object)(object)aspectDef.itemDef))
			{
				Logger.Warn("---- EquipmentDef and ItemDef is null!");
			}
			else if (!Object.op_Implicit((Object)(object)aspectDef.itemDef))
			{
				Logger.Warn("---- ItemDef is null!");
			}
			else if (!Object.op_Implicit((Object)(object)aspectDef.itemDef))
			{
				Logger.Warn("---- EquipmentDef is null!");
			}
		}

		private static void CopyEquipmentPrefab(ItemDef itemDef, EquipmentDef equipDef)
		{
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			if (equipDef.pickupModelReference != null && ((AssetReference)equipDef.pickupModelReference).RuntimeKeyIsValid() && !Object.op_Implicit((Object)(object)equipDef.pickupModelPrefab))
			{
				PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(itemDef.itemIndex));
				itemDef.pickupModelReference = equipDef.pickupModelReference;
				pickupDef.displayPrefabReference = equipDef.pickupModelReference;
				AsyncOperationHandle<GameObject> val = equipDef.pickupModelReference.LoadAssetAsync();
				val.Completed += delegate(AsyncOperationHandle<GameObject> handle)
				{
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					//IL_0009: Invalid comparison between Unknown and I4
					if ((int)handle.Status == 1)
					{
						GameObject result = handle.Result;
						itemDef.pickupModelPrefab = result;
						pickupDef.displayPrefab = result;
					}
				};
			}
			else
			{
				PickupDef pickupDef2 = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(itemDef.itemIndex));
				itemDef.pickupModelPrefab = equipDef.pickupModelPrefab;
				pickupDef2.displayPrefab = equipDef.pickupModelPrefab;
			}
		}

		private static void CopyItemPrefab(ItemDef itemDef, EquipmentDef equipDef)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(equipDef.equipmentIndex));
			equipDef.pickupModelPrefab = itemDef.pickupModelPrefab;
			pickupDef.displayPrefab = itemDef.pickupModelPrefab;
		}

		private static void SetupIcons(AspectDef aspectDef)
		{
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: 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_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			Sprite val = null;
			Sprite val2 = ((aspectDef.OutlineIcon != null) ? aspectDef.OutlineIcon() : null);
			if (aspectDef.BaseIcon != null)
			{
				try
				{
					val = aspectDef.BaseIcon();
				}
				catch (Exception data)
				{
					Logger.Error("Failed getting BaseIcon for: " + aspectDef.identifier);
					Logger.Error(data);
					val = Catalog.Sprites.AffixUnknown;
				}
			}
			if ((Object)(object)val != (Object)null && (((Texture)val.texture).width != 128 || ((Texture)val.texture).height != 128))
			{
				Logger.Warn("BaseIcon MUST be 128x128, Resizing BaseIcon for " + aspectDef.identifier);
				val = Catalog.TryUseSprite(val);
			}
			if (Object.op_Implicit((Object)(object)val) && !aspectDef.useOutline)
			{
				ApplyIcon(aspectDef, val);
			}
			else if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val2))
			{
				EquipmentDef equipmentDef = aspectDef.equipmentDef;
				if (Object.op_Implicit((Object)(object)equipmentDef))
				{
					Color32 outlineColor = (aspectDef.equipmentDef.isLunar ? new Color32((byte)100, (byte)225, (byte)250, byte.MaxValue) : new Color32((byte)250, (byte)150, (byte)50, byte.MaxValue));
					equipmentDef.pickupIconSprite = Catalog.CreateAspectSprite(val, val2, outlineColor);
					PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(equipmentDef.equipmentIndex));
					pickupDef.iconSprite = equipmentDef.pickupIconSprite;
					pickupDef.iconTexture = (Texture)(object)equipmentDef.pickupIconSprite.texture;
				}
				ItemDef itemDef = aspectDef.itemDef;
				if (Object.op_Implicit((Object)(object)itemDef))
				{
					Color32 outlineColor2 = (Configuration.AspectRedTier.Value ? new Color32((byte)230, (byte)70, (byte)60, byte.MaxValue) : new Color32((byte)225, (byte)250, (byte)40, byte.MaxValue));
					if (Catalog.AsHighlander)
					{
						((Color32)(ref outlineColor2))..ctor((byte)225, (byte)220, (byte)165, byte.MaxValue);
					}
					if ((Object)(object)val2 == (Object)(object)Catalog.Sprites.OutlineVoid)
					{
						((Color32)(ref outlineColor2))..ctor(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
					}
					itemDef.pickupIconSprite = Catalog.CreateAspectSprite(val, val2, outlineColor2);
					PickupDef pickupDef2 = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(itemDef.itemIndex));
					pickupDef2.iconSprite = itemDef.pickupIconSprite;
					pickupDef2.iconTexture = (Texture)(object)itemDef.pickupIconSprite.texture;
				}
			}
			else
			{
				Logger.Warn("SetupIcons failed for : " + aspectDef.identifier);
				if ((Object)(object)val == (Object)null)
				{
					Logger.Warn("---- BaseSprite is null!");
				}
				if ((Object)(object)val2 == (Object)null)
				{
					Logger.Warn("---- OutlineSprite is null!");
				}
			}
		}

		private static void ApplyIcon(AspectDef aspectDef, Sprite sprite)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			EquipmentDef equipmentDef = aspectDef.equipmentDef;
			if (Object.op_Implicit((Object)(object)equipmentDef))
			{
				equipmentDef.pickupIconSprite = sprite;
				PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(equipmentDef.equipmentIndex));
				pickupDef.iconSprite = sprite;
				pickupDef.iconTexture = (Texture)(object)sprite.texture;
			}
			ItemDef itemDef = aspectDef.itemDef;
			if (Object.op_Implicit((Object)(object)itemDef))
			{
				itemDef.pickupIconSprite = sprite;
				PickupDef pickupDef2 = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(itemDef.itemIndex));
				pickupDef2.iconSprite = sprite;
				pickupDef2.iconTexture = (Texture)(object)sprite.texture;
			}
		}

		private static void ColorEquipmentDroplet(EquipmentDef equipDef)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//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_006b: 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)
			equipDef.isBoss = true;
			equipDef.colorIndex = (ColorIndex)24;
			PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(equipDef.equipmentIndex));
			pickupDef.isBoss = true;
			if (Object.op_Implicit((Object)(object)Catalog.BossDropletPrefab))
			{
				pickupDef.dropletDisplayPrefab = Catalog.BossDropletPrefab;
			}
			pickupDef.baseColor = new Color(0.9f, 0.7f, 0.75f);
			pickupDef.darkColor = new Color(0.9f, 0.7f, 0.75f);
		}

		private static void SetItemState(AspectDef aspectDef, bool shown)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: 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_0106: Invalid comparison between Unknown and I4
			ItemDef itemDef = aspectDef.itemDef;
			if (!Object.op_Implicit((Object)(object)itemDef))
			{
				Logger.Warn("Tried to set ItemState of " + aspectDef.identifier + " but it is null!");
				return;
			}
			if (!Catalog.aspectItemIndexes.Contains(itemDef.itemIndex))
			{
				Catalog.aspectItemIndexes.Add(itemDef.itemIndex);
			}
			if (itemDef.hidden)
			{
				return;
			}
			if ((Object)(object)itemDef == (Object)(object)ItemDefOf.ZetAspectVoid && Configuration.AspectVoidContagiousItem.Value)
			{
				if (!shown)
				{
					itemDef.tier = (ItemTier)5;
				}
				else
				{
					itemDef.tier = (ItemTier)(Configuration.AspectRedTier.Value ? 8 : 9);
				}
			}
			else if (!shown)
			{
				itemDef.tier = (ItemTier)5;
			}
			else
			{
				itemDef._itemTierDef = (Configuration.AspectRedTier.Value ? Catalog.RedItemTier : Catalog.BossItemTier);
			}
			if (Catalog.AsHighlander && (int)Catalog.highlanderTier != 1000 && ((Object)(object)itemDef._itemTierDef == (Object)(object)Catalog.BossItemTier || (Object)(object)itemDef._itemTierDef == (Object)(object)Catalog.RedItemTier))
			{
				itemDef._itemTierDef = Catalog.HighlanderItemTier;
			}
		}

		private static void SetEquipmentState(AspectDef aspectDef, bool canDrop)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			EquipmentDef equipmentDef = aspectDef.equipmentDef;
			if (!Object.op_Implicit((Object)(object)equipmentDef))
			{
				Logger.Warn("Tried to set EquipmentState of " + aspectDef.identifier + " but it is null!");
				return;
			}
			if (!Catalog.aspectEquipIndexes.Contains(equipmentDef.equipmentIndex))
			{
				Catalog.aspectEquipIndexes.Add(equipmentDef.equipmentIndex);
			}
			equipmentDef.canDrop = canDrop;
		}

		private static void CreateEquality(AspectDef aspectDef)
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: 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_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0387: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
			EquipmentDef equipmentDef = aspectDef.equipmentDef;
			BuffDef buffDef = aspectDef.buffDef;
			ItemDef itemDef = aspectDef.itemDef;
			Logger.Info("CreateEquality : " + (Object.op_Implicit((Object)(object)equipmentDef) ? ((Object)equipmentDef).name : "null") + " , " + (Object.op_Implicit((Object)(object)buffDef) ? ("[" + ((object)buffDef.buffIndex/*cast due to .constrained prefix*/).ToString() + "] " + ((Object)buffDef).name) : "null") + " , " + (Object.op_Implicit((Object)(object)itemDef) ? ((Object)itemDef).name : "null"));
			if (!Object.op_Implicit((Object)(object)itemDef))
			{
				Logger.Warn("CreateEquality called for : " + aspectDef.identifier + " but its associated item is null!");
			}
			else if (Catalog.disabledItemIndexes.Contains(itemDef.itemIndex))
			{
				Logger.Warn("CreateEquality called for disabled aspect : " + aspectDef.identifier);
			}
			else if (Object.op_Implicit((Object)(object)equipmentDef) && Object.op_Implicit((Object)(object)buffDef))
			{
				if (!Catalog.aspectBuffIndexes.Contains(buffDef.buffIndex))
				{
					Catalog.aspectBuffIndexes.Add(buffDef.buffIndex);
				}
				if (aspectDef.Promoter != null && !Catalog.aspectsWithPromoters.Contains(aspectDef))
				{
					Catalog.aspectsWithPromoters.Add(aspectDef);
					Logger.Info("Registered promoter: " + aspectDef.identifier);
				}
				if (!Catalog.buffToAspect.ContainsKey(buffDef.buffIndex))
				{
					Catalog.buffToAspect.Add(buffDef.buffIndex, aspectDef);
				}
				else
				{
					Logger.Warn("buffToAspect already contains key for : [" + ((object)buffDef.buffIndex/*cast due to .constrained prefix*/).ToString() + "] - " + ((Object)buffDef).name);
					Logger.Warn("---- current aspect : " + aspectDef.identifier);
					Logger.Warn("---- associated aspect : " + Catalog.buffToAspect[buffDef.buffIndex].identifier);
				}
				if (!Catalog.buffToItem.ContainsKey(buffDef.buffIndex))
				{
					Catalog.buffToItem.Add(buffDef.buffIndex, itemDef.itemIndex);
				}
				else
				{
					Logger.Warn("buffToItem already contains key for : [" + ((object)buffDef.buffIndex/*cast due to .constrained prefix*/).ToString() + "] - " + ((Object)buffDef).name);
					Logger.Warn("---- current item : " + ((Object)itemDef).name);
					Logger.Warn("---- associated item : " + ((Object)ItemCatalog.GetItemDef(Catalog.buffToItem[buffDef.buffIndex])).name);
				}
				if (!Catalog.buffToEquip.ContainsKey(buffDef.buffIndex))
				{
					Catalog.buffToEquip.Add(buffDef.buffIndex, equipmentDef.equipmentIndex);
				}
				else
				{
					Logger.Warn("buffToEquip already contains key for : [" + ((object)buffDef.buffIndex/*cast due to .constrained prefix*/).ToString() + "] - " + ((Object)buffDef).name);
					Logger.Warn("---- current equipment : " + ((Object)equipmentDef).name);
					Logger.Warn("---- associated equipment : " + ((Object)EquipmentCatalog.GetEquipmentDef(Catalog.buffToEquip[buffDef.buffIndex])).name);
				}
				if (!Catalog.equipToItem.ContainsKey(equipmentDef.equipmentIndex))
				{
					Catalog.equipToItem.Add(equipmentDef.equipmentIndex, itemDef.itemIndex);
					return;
				}
				Logger.Warn("equipToItem already contains key for : " + ((Object)equipmentDef).name);
				Logger.Warn("---- current item : " + ((Object)itemDef).name);
				Logger.Warn("---- associated item : " + ((Object)ItemCatalog.GetItemDef(Catalog.equipToItem[equipmentDef.equipmentIndex])).name);
			}
		}
	}
	public static class Catalog
	{
		public static class Sprites
		{
			public static Sprite OutlineStandard;

			public static Sprite OutlineVoid;

			public static Sprite OutlineNull;

			public static Sprite OutlineCracked;

			public static Sprite AffixUnknown;

			public static Sprite AffixWhite;

			public static Sprite AffixBlue;

			public static Sprite AffixRed;

			public static Sprite AffixHaunted;

			public static Sprite AffixPoison;

			public static Sprite AffixLunar;

			public static Sprite AffixEarth;

			pu