Decompiled source of UltitemsCyan v0.9.3

plugins/UltitemsCyan.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using EntityStates;
using EntityStates.Scrapper;
using HG;
using IL.RoR2;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates;
using On.RoR2;
using On.RoR2.Items;
using R2API;
using Rewired.Utils;
using RoR2;
using RoR2.ExpansionManagement;
using RoR2.Projectile;
using UltitemsCyan.Buffs;
using UltitemsCyan.Equipment;
using UltitemsCyan.Items;
using UltitemsCyan.Items.Lunar;
using UltitemsCyan.Items.Tier1;
using UltitemsCyan.Items.Tier2;
using UltitemsCyan.Items.Tier3;
using UltitemsCyan.Items.Untiered;
using UltitemsCyan.Items.Void;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[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.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("UltitemsCyan")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+d33d78f4826fe6f97ac1751ca23480a5b6f913ea")]
[assembly: AssemblyProduct("UltitemsCyan")]
[assembly: AssemblyTitle("UltitemsCyan")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace UltitemsCyan
{
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	public static class UltAssets
	{
		public static AssetBundle mainBundle;

		public static Sprite CremeBruleeSprite;

		public static Sprite FleaBagSprite;

		public static Sprite FrisbeeSprite;

		public static Sprite KoalaStickerSprite;

		public static Sprite ToyRobotSprite;

		public static GameObject CremeBruleePrefab;

		public static GameObject FleaBagPrefab;

		public static GameObject FrisbeePrefab;

		public static GameObject KoalaStickerPrefab;

		public static GameObject ToyRobotPrefab;

		public static Sprite BirthdayCandleSprite;

		public static Sprite DegreeScissorsSprite;

		public static Sprite HMTSprite;

		public static Sprite OverclockedGPUSprite;

		public static Sprite XenonAmpouleSprite;

		public static GameObject BirthdayCandlePrefab;

		public static GameObject DegreeScissorsPrefab;

		public static GameObject HMTPrefab;

		public static GameObject OverclockedGPUPrefab;

		public static GameObject XenonAmpoulePrefab;

		public static Sprite CorrodingVaultSprite;

		public static Sprite GrapevineSprite;

		public static Sprite RockyTaffySprite;

		public static Sprite SuesMandiblesSprite;

		public static Sprite ViralSmogSprite;

		public static GameObject CorrodingVaultPrefab;

		public static GameObject GrapevinePrefab;

		public static GameObject RockyTaffyPrefab;

		public static GameObject SuesMandiblesPrefab;

		public static GameObject ViralSmogPrefab;

		public static Sprite ChrysotopeSprite;

		public static Sprite DownloadedRAMSprite;

		public static Sprite DriedHamSprite;

		public static Sprite InhabitedCoffinSprite;

		public static Sprite JubilantFoeSprite;

		public static Sprite RottenBonesSprite;

		public static Sprite ZorsePillSprite;

		public static GameObject DownloadedRAMPrefab;

		public static GameObject ChrysotopePrefab;

		public static GameObject DriedHamPrefab;

		public static GameObject InhabitedCoffinPrefab;

		public static GameObject JubilantFoePrefab;

		public static GameObject RottenBonesPrefab;

		public static GameObject ZorsePillPrefab;

		public static Sprite DreamFuelSprite;

		public static Sprite UltravioletBulbSprite;

		public static Sprite SandPailSprite;

		public static Sprite SilverThreadSprite;

		public static GameObject UltravioletBulbPrefab;

		public static GameObject DreamFuelPrefab;

		public static GameObject SandPailPrefab;

		public static GameObject SilverThreadPrefab;

		public static Sprite CorrodingVaultConsumedSprite;

		public static Sprite InhabitedCoffinConsumedSprite;

		public static Sprite SuesMandiblesConsumedSprite;

		public static Sprite SilverThreadConsumedSprite;

		public static Sprite UniversalSolventSprite;

		public static GameObject CorrodingVaultConsumedPrefab;

		public static GameObject InhabitedCoffinConsumedPrefab;

		public static GameObject SuesMandiblesConsumedPrefab;

		public static GameObject SilverThreadConsumedPrefab;

		public static GameObject UniversalSolventPrefab;

		public static Sprite IceCubesSprite;

		public static Sprite YieldSignSprite;

		public static Sprite YieldSignStopSprite;

		public static GameObject IceCubesPrefab;

		public static GameObject YieldSignPrefab;

		public static GameObject YieldSignStopPrefab;

		public static Sprite MacroseismographSprite;

		public static Sprite MacroseismographConsumedSprite;

		public static Sprite PotOfRegolithSprite;

		public static Sprite UniversalSoluteSprite;

		public static GameObject MacroseismographPrefab;

		public static GameObject MacroseismographConsumedPrefab;

		public static GameObject PotOfRegolithPrefab;

		public static GameObject UniversalSolutePrefab;

		public static Sprite BirthdaySprite;

		public static Sprite ChrysotopeFlySprite;

		public static Sprite DownloadedSprite;

		public static Sprite DreamSpeedSprite;

		public static Sprite FrisbeeGlideSprite;

		public static Sprite GrapeSprite;

		public static Sprite OverclockedSprite;

		public static Sprite RottingSprite;

		public static Sprite TickCritSprite;

		public static Sprite ZorseStarveSprite;

		public static void Init()
		{
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0413: Unknown result type (might be due to invalid IL or missing references)
			//IL_0419: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0434: Unknown result type (might be due to invalid IL or missing references)
			//IL_0449: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0464: Unknown result type (might be due to invalid IL or missing references)
			//IL_046a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0597: Unknown result type (might be due to invalid IL or missing references)
			//IL_059d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0603: Unknown result type (might be due to invalid IL or missing references)
			//IL_0609: Unknown result type (might be due to invalid IL or missing references)
			//IL_061e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0624: Unknown result type (might be due to invalid IL or missing references)
			//IL_0639: Unknown result type (might be due to invalid IL or missing references)
			//IL_063f: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0715: Unknown result type (might be due to invalid IL or missing references)
			//IL_072a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0730: Unknown result type (might be due to invalid IL or missing references)
			//IL_0745: Unknown result type (might be due to invalid IL or missing references)
			//IL_074b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0828: Unknown result type (might be due to invalid IL or missing references)
			//IL_082e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0843: Unknown result type (might be due to invalid IL or missing references)
			//IL_0849: Unknown result type (might be due to invalid IL or missing references)
			//IL_085e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0864: Unknown result type (might be due to invalid IL or missing references)
			//IL_0879: Unknown result type (might be due to invalid IL or missing references)
			//IL_087f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0894: Unknown result type (might be due to invalid IL or missing references)
			//IL_089a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0927: Unknown result type (might be due to invalid IL or missing references)
			//IL_092d: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a03: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a18: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a33: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a39: Unknown result type (might be due to invalid IL or missing references)
			string text = Path.Combine(Path.GetDirectoryName(Ultitems.PInfo.Location), "ultitembundle");
			Log.Debug("Path of bundle: " + text);
			mainBundle = AssetBundle.LoadFromFile(text);
			if ((Object)(object)mainBundle == (Object)null)
			{
				Log.Warning("Null Bundle");
				text = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(Ultitems.PInfo.Location)), "assetbundle", "ultitembundle");
				mainBundle = AssetBundle.LoadFromFile(text);
			}
			float num = 0.1f;
			CremeBruleeSprite = mainBundle.LoadAsset<Sprite>("CremeBrulee.png");
			FleaBagSprite = mainBundle.LoadAsset<Sprite>("FleaBag.png");
			FrisbeeSprite = mainBundle.LoadAsset<Sprite>("Frisbee.png");
			KoalaStickerSprite = mainBundle.LoadAsset<Sprite>("KoalaSticker.png");
			ToyRobotSprite = mainBundle.LoadAsset<Sprite>("ToyRobot.png");
			CremeBruleePrefab = mainBundle.LoadAsset<GameObject>("CremeBrulee.prefab");
			FleaBagPrefab = mainBundle.LoadAsset<GameObject>("FleaBag.prefab");
			FrisbeePrefab = mainBundle.LoadAsset<GameObject>("Frisbee.prefab");
			KoalaStickerPrefab = mainBundle.LoadAsset<GameObject>("KoalaSticker.prefab");
			ToyRobotPrefab = mainBundle.LoadAsset<GameObject>("ToyRobot.prefab");
			CremeBruleePrefab.transform.localScale = Vector3.up * num;
			FleaBagPrefab.transform.localScale = Vector3.up * num;
			FrisbeePrefab.transform.localScale = Vector3.up * num;
			KoalaStickerPrefab.transform.localScale = Vector3.up * num;
			ToyRobotPrefab.transform.localScale = Vector3.up * num;
			BirthdayCandleSprite = mainBundle.LoadAsset<Sprite>("BirthdayCandles.png");
			DegreeScissorsSprite = mainBundle.LoadAsset<Sprite>("DegreeScissors.png");
			HMTSprite = mainBundle.LoadAsset<Sprite>("HMT.png");
			OverclockedGPUSprite = mainBundle.LoadAsset<Sprite>("OverclockedGPU.png");
			XenonAmpouleSprite = mainBundle.LoadAsset<Sprite>("XenonAmpoule.png");
			BirthdayCandlePrefab = mainBundle.LoadAsset<GameObject>("BirthdayCandle.prefab");
			DegreeScissorsPrefab = mainBundle.LoadAsset<GameObject>("DegreeScissors.prefab");
			HMTPrefab = mainBundle.LoadAsset<GameObject>("HMT.prefab");
			OverclockedGPUPrefab = mainBundle.LoadAsset<GameObject>("OverclockedGPU.prefab");
			XenonAmpoulePrefab = mainBundle.LoadAsset<GameObject>("XenonAmpoule.prefab");
			BirthdayCandlePrefab.transform.localScale = Vector3.up * num;
			DegreeScissorsPrefab.transform.localScale = Vector3.up * num;
			HMTPrefab.transform.localScale = Vector3.up * num;
			OverclockedGPUPrefab.transform.localScale = Vector3.up * num;
			XenonAmpoulePrefab.transform.localScale = Vector3.up * num;
			CorrodingVaultSprite = mainBundle.LoadAsset<Sprite>("CorrodingVault.png");
			GrapevineSprite = mainBundle.LoadAsset<Sprite>("Grapevine.png");
			RockyTaffySprite = mainBundle.LoadAsset<Sprite>("RockyTaffy.png");
			SuesMandiblesSprite = mainBundle.LoadAsset<Sprite>("SuesMandibles.png");
			ViralSmogSprite = mainBundle.LoadAsset<Sprite>("ViralSmog.png");
			CorrodingVaultPrefab = mainBundle.LoadAsset<GameObject>("CorrodingVault.prefab");
			GrapevinePrefab = mainBundle.LoadAsset<GameObject>("Grapevine.prefab");
			RockyTaffyPrefab = mainBundle.LoadAsset<GameObject>("RockyTaffy.prefab");
			SuesMandiblesPrefab = mainBundle.LoadAsset<GameObject>("SuesMandibles.prefab");
			ViralSmogPrefab = mainBundle.LoadAsset<GameObject>("ViralSmog.prefab");
			CorrodingVaultPrefab.transform.localScale = Vector3.up * num;
			GrapevinePrefab.transform.localScale = Vector3.up * num;
			RockyTaffyPrefab.transform.localScale = Vector3.up * num;
			SuesMandiblesPrefab.transform.localScale = Vector3.up * num;
			ViralSmogPrefab.transform.localScale = Vector3.up * num;
			ChrysotopeSprite = mainBundle.LoadAsset<Sprite>("Chrysotope.png");
			DownloadedRAMSprite = mainBundle.LoadAsset<Sprite>("DownloadedRAM.png");
			DriedHamSprite = mainBundle.LoadAsset<Sprite>("DriedHam.png");
			InhabitedCoffinSprite = mainBundle.LoadAsset<Sprite>("InhabitedCoffin.png");
			JubilantFoeSprite = mainBundle.LoadAsset<Sprite>("JubilantFoe.png");
			RottenBonesSprite = mainBundle.LoadAsset<Sprite>("RottenBones.png");
			ZorsePillSprite = mainBundle.LoadAsset<Sprite>("ZorsePill.png");
			ChrysotopePrefab = mainBundle.LoadAsset<GameObject>("Chrysotope.prefab");
			DownloadedRAMPrefab = mainBundle.LoadAsset<GameObject>("DownloadedRAM.prefab");
			DriedHamPrefab = mainBundle.LoadAsset<GameObject>("DriedHam.prefab");
			InhabitedCoffinPrefab = mainBundle.LoadAsset<GameObject>("InhabitedCoffin.prefab");
			JubilantFoePrefab = mainBundle.LoadAsset<GameObject>("JubilantFoe.prefab");
			RottenBonesPrefab = mainBundle.LoadAsset<GameObject>("RottenBones.prefab");
			ZorsePillPrefab = mainBundle.LoadAsset<GameObject>("ZorsePill.prefab");
			ChrysotopePrefab.transform.localScale = Vector3.up * num;
			DownloadedRAMPrefab.transform.localScale = Vector3.up * num;
			DriedHamPrefab.transform.localScale = Vector3.up * num;
			InhabitedCoffinPrefab.transform.localScale = Vector3.up * num;
			JubilantFoePrefab.transform.localScale = Vector3.up * num;
			RottenBonesPrefab.transform.localScale = Vector3.up * num;
			ZorsePillPrefab.transform.localScale = Vector3.up * num;
			DreamFuelSprite = mainBundle.LoadAsset<Sprite>("DreamFuel.png");
			UltravioletBulbSprite = mainBundle.LoadAsset<Sprite>("UltravioletBulb.png");
			SandPailSprite = mainBundle.LoadAsset<Sprite>("SandPail.png");
			SilverThreadSprite = mainBundle.LoadAsset<Sprite>("SilverThread.png");
			DreamFuelPrefab = mainBundle.LoadAsset<GameObject>("DreamFuel.prefab");
			UltravioletBulbPrefab = mainBundle.LoadAsset<GameObject>("UltravioletBulb.prefab");
			SandPailPrefab = mainBundle.LoadAsset<GameObject>("SandPail.prefab");
			SilverThreadPrefab = mainBundle.LoadAsset<GameObject>("SilverThread.prefab");
			DreamFuelPrefab.transform.localScale = Vector3.up * num;
			UltravioletBulbPrefab.transform.localScale = Vector3.up * num;
			SandPailPrefab.transform.localScale = Vector3.up * num;
			SilverThreadPrefab.transform.localScale = Vector3.up * num;
			CorrodingVaultConsumedSprite = mainBundle.LoadAsset<Sprite>("CorrodingVaultConsumed.png");
			InhabitedCoffinConsumedSprite = mainBundle.LoadAsset<Sprite>("InhabitedCoffinConsumed.png");
			SilverThreadConsumedSprite = mainBundle.LoadAsset<Sprite>("SilverThreadConsumed.png");
			SuesMandiblesConsumedSprite = mainBundle.LoadAsset<Sprite>("SuesMandiblesConsumed.png");
			UniversalSolventSprite = mainBundle.LoadAsset<Sprite>("UniversalSolvent.png");
			CorrodingVaultConsumedPrefab = mainBundle.LoadAsset<GameObject>("CorrodingVaultConsumed.prefab");
			InhabitedCoffinConsumedPrefab = mainBundle.LoadAsset<GameObject>("InhabitedCoffinConsumed.prefab");
			SilverThreadConsumedPrefab = mainBundle.LoadAsset<GameObject>("SilverThreadConsumed.prefab");
			SuesMandiblesConsumedPrefab = mainBundle.LoadAsset<GameObject>("SuesMandiblesConsumed.prefab");
			UniversalSolventPrefab = mainBundle.LoadAsset<GameObject>("UniversalSolvent.prefab");
			CorrodingVaultConsumedPrefab.transform.localScale = Vector3.up * num;
			InhabitedCoffinConsumedPrefab.transform.localScale = Vector3.up * num;
			SuesMandiblesConsumedPrefab.transform.localScale = Vector3.up * num;
			SilverThreadConsumedPrefab.transform.localScale = Vector3.up * num;
			UniversalSolventPrefab.transform.localScale = Vector3.up * num;
			IceCubesSprite = mainBundle.LoadAsset<Sprite>("IceCubes.png");
			YieldSignSprite = mainBundle.LoadAsset<Sprite>("YieldSign.png");
			YieldSignStopSprite = mainBundle.LoadAsset<Sprite>("YieldSignStop.png");
			IceCubesPrefab = mainBundle.LoadAsset<GameObject>("IceCubes.prefab");
			YieldSignPrefab = mainBundle.LoadAsset<GameObject>("YieldSign.prefab");
			YieldSignStopPrefab = mainBundle.LoadAsset<GameObject>("YieldSignStop.prefab");
			IceCubesPrefab.transform.localScale = Vector3.up * num;
			MacroseismographSprite = mainBundle.LoadAsset<Sprite>("Macroseismograph.png");
			MacroseismographConsumedSprite = mainBundle.LoadAsset<Sprite>("MacroseismographConsumed.png");
			PotOfRegolithSprite = mainBundle.LoadAsset<Sprite>("PotOfRegolith.png");
			UniversalSoluteSprite = mainBundle.LoadAsset<Sprite>("UniversalSolute.png");
			MacroseismographPrefab = mainBundle.LoadAsset<GameObject>("Macroseismograph.prefab");
			MacroseismographConsumedPrefab = mainBundle.LoadAsset<GameObject>("MacroseismographConsumed.prefab");
			PotOfRegolithPrefab = mainBundle.LoadAsset<GameObject>("PotOfRegolith.prefab");
			UniversalSolutePrefab = mainBundle.LoadAsset<GameObject>("UniversalSolute.prefab");
			MacroseismographPrefab.transform.localScale = Vector3.up * num;
			MacroseismographConsumedPrefab.transform.localScale = Vector3.up * num;
			PotOfRegolithPrefab.transform.localScale = Vector3.up * num;
			UniversalSolutePrefab.transform.localScale = Vector3.up * num;
			BirthdaySprite = mainBundle.LoadAsset<Sprite>("Birthday");
			ChrysotopeFlySprite = mainBundle.LoadAsset<Sprite>("ChrysotopeFly");
			DownloadedSprite = mainBundle.LoadAsset<Sprite>("Downloaded");
			DreamSpeedSprite = mainBundle.LoadAsset<Sprite>("DreamSpeed");
			FrisbeeGlideSprite = mainBundle.LoadAsset<Sprite>("FrisbeeGlide");
			GrapeSprite = mainBundle.LoadAsset<Sprite>("Grape");
			OverclockedSprite = mainBundle.LoadAsset<Sprite>("Overclocked");
			RottingSprite = mainBundle.LoadAsset<Sprite>("Rotting");
			TickCritSprite = mainBundle.LoadAsset<Sprite>("TickCrit");
			ZorseStarveSprite = mainBundle.LoadAsset<Sprite>("ZorseStarve");
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("SporkySpig.UltitemsCyan", "UltitemsCyan", "0.9.3")]
	public class Ultitems : BaseUnityPlugin
	{
		public static float stageStartTime;

		public const string PluginGUID = "SporkySpig.UltitemsCyan";

		public const string PluginAuthor = "SporkySpig";

		public const string PluginName = "UltitemsCyan";

		public const string PluginVersion = "0.9.3";

		public const string PluginSuffix = "Fixed Zorse and Pail!";

		public static List<Pair> CorruptionPairs = new List<Pair>();

		public static ExpansionDef sotvDLC;

		public static Sprite mysterySprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();

		public static GameObject mysteryPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();

		public static PluginInfo PInfo { get; private set; }

		public void Awake()
		{
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_034b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0355: Expected O, but got Unknown
			Log.Init(((BaseUnityPlugin)this).Logger);
			PInfo = ((BaseUnityPlugin)this).Info;
			UltAssets.Init();
			List<BuffBase> list = new List<BuffBase>();
			list.Add(new BirthdayBuff());
			list.Add(new ChrysotopeFlyingBuff());
			list.Add(new DreamSpeedBuff());
			list.Add(new DownloadedBuff());
			list.Add(new FrisbeeGlidingBuff());
			list.Add(new OverclockedBuff());
			list.Add(new RottingBuff());
			list.Add(new SlipperyGrape());
			list.Add(new TickCritBuff());
			list.Add(new ZorseStarvingBuff());
			foreach (BuffBase item in list)
			{
				item.Init();
			}
			Log.Debug("Buffs Done");
			List<ItemBase> list2 = new List<ItemBase>();
			list2.Add(new CorrodingVaultConsumed());
			list2.Add(new InhabitedCoffinConsumed());
			list2.Add(new SuesMandiblesConsumed());
			list2.Add(new SilverThreadConsumed());
			list2.Add(new GreySolvent());
			list2.Add(new CremeBrulee());
			list2.Add(new KoalaSticker());
			list2.Add(new ToyRobot());
			list2.Add(new FleaBag());
			list2.Add(new Frisbee());
			list2.Add(new BirthdayCandles());
			list2.Add(new HMT());
			list2.Add(new OverclockedGPU());
			list2.Add(new XenonAmpoule());
			list2.Add(new ViralSmog());
			list2.Add(new SuesMandibles());
			list2.Add(new CorrodingVault());
			list2.Add(new RockyTaffy());
			list2.Add(new Grapevine());
			list2.Add(new DreamFuel());
			list2.Add(new UltravioletBulb());
			list2.Add(new SilverThread());
			list2.Add(new SonorousPail());
			list2.Add(new IceCubes());
			list2.Add(new YieldSign());
			list2.Add(new YieldSignStop());
			list2.Add(new Macroseismograph());
			list2.Add(new MacroseismographConsumed());
			list2.Add(new PotOfRegolith());
			list2.Add(new UniversalSolute());
			list2.Add(new Chrysotope());
			list2.Add(new DriedHam());
			list2.Add(new RottenBones());
			list2.Add(new DownloadedRAM());
			list2.Add(new InhabitedCoffin());
			list2.Add(new ZorsePill());
			list2.Add(new DegreeScissors());
			Log.Debug("List Done");
			foreach (ItemBase item2 in list2)
			{
				item2.Init();
				if (Object.op_Implicit((Object)(object)item2.GetTransformItem))
				{
					CorruptionPairs.Add(new Pair
					{
						itemDef1 = item2.GetTransformItem,
						itemDef2 = item2.GetItemDef
					});
				}
			}
			Log.Debug("Items Done");
			Stage.onStageStartGlobal += Stage_onStageStartGlobal;
			ContagiousItemManager.Init += new hook_Init(ContagiousItemManager_Init);
			Log.Warning("Ultitems Cyan Done: 0.9.3 <- Fixed Zorse and Pail!");
		}

		private void Stage_onStageStartGlobal(Stage obj)
		{
			stageStartTime = Run.instance.time;
			Log.Warning("Ultitem Starts at: " + stageStartTime);
		}

		public void ContagiousItemManager_Init(orig_Init orig)
		{
			Log.Warning("Ultitem Create Void Transformations!");
			List<Pair> first = ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem].ToList();
			Log.Debug("My Void Items:");
			printPairList(CorruptionPairs);
			ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem] = first.Union(CorruptionPairs).ToArray();
			Log.Debug("Error?");
			orig.Invoke();
		}

		private void printPairList(List<Pair> list)
		{
			//IL_000d: 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_0019: 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)
			foreach (Pair item in list)
			{
				Log.Debug(". " + ((Object)item.itemDef1).name + " -> " + ((Object)item.itemDef2).name);
			}
			Log.Debug("end");
		}
	}
}
namespace UltitemsCyan.Text
{
	internal class ArchivedCode
	{
	}
}
namespace UltitemsCyan.Items
{
	public abstract class ItemBase
	{
		private readonly ExpansionDef Sovt = ((IEnumerable<ExpansionDef>)(object)ExpansionCatalog.expansionDefs).FirstOrDefault((Func<ExpansionDef, bool>)((ExpansionDef expansion) => expansion.nameToken == "DLC1_NAME"));

		public ItemDef GetItemDef { get; set; }

		public EquipmentDef GetEquipmentDef { get; set; }

		public ItemDef GetTransformItem { get; set; }

		public abstract void Init();

		public ItemDef CreateItemDef(string tokenPrefix, string name, string pick, string desc, string lore, ItemTier tier, Sprite sprite, GameObject prefab, ItemTag[] tags, ItemDef transformItem = null)
		{
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Invalid comparison between Unknown and I4
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Expected O, but got Unknown
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Expected O, but got Unknown
			ItemDef val = ScriptableObject.CreateInstance<ItemDef>();
			LanguageAPI.Add(tokenPrefix + "_NAME", name);
			LanguageAPI.Add(tokenPrefix + "_PICK", pick);
			LanguageAPI.Add(tokenPrefix + "_DESC", desc);
			LanguageAPI.Add(tokenPrefix + "_LORE", lore);
			((Object)val).name = tokenPrefix + "_NAME";
			val.nameToken = tokenPrefix + "_NAME";
			val.pickupToken = tokenPrefix + "_PICK";
			val.descriptionToken = tokenPrefix + "_DESC";
			val.loreToken = tokenPrefix + "_LORE";
			ItemTierDef val2 = ScriptableObject.CreateInstance<ItemTierDef>();
			val2.tier = tier;
			val._itemTierDef = val2;
			val.canRemove = (int)tier != 5;
			val.hidden = false;
			val.pickupIconSprite = sprite;
			val.pickupModelPrefab = prefab;
			val.tags = tags;
			ItemDisplayRuleDict val3 = new ItemDisplayRuleDict((ItemDisplayRule[])null);
			ItemAPI.Add(new CustomItem(val, val3));
			Hooks();
			GetItemDef = val;
			if (Object.op_Implicit((Object)(object)transformItem))
			{
				GetTransformItem = transformItem;
				val.requiredExpansion = Sovt;
			}
			return val;
		}

		protected abstract void Hooks();
	}
	public class PowerChips : ItemBase
	{
		public static ItemDef item;

		private const float dontResetFraction = 0.5f;

		public override void Init()
		{
			item = CreateItemDef("POWERCHIPS", "Power Chips", "", "", "", (ItemTier)3, Ultitems.mysterySprite, Ultitems.mysteryPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 });
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			ChestBehavior.ItemDrop += new hook_ItemDrop(ChestBehavior_ItemDrop);
		}

		private void ChestBehavior_ItemDrop(orig_ItemDrop orig, ChestBehavior self)
		{
			Log.Warning("Tier 1 Chance: " + self.tier1Chance);
			Log.Debug("Player Controller: " + ((NetworkBehaviour)self).playerControllerId);
		}
	}
}
namespace UltitemsCyan.Items.Void
{
	public class Chrysotope : ItemBase
	{
		public class ChrysotopeBehavior : ItemBehavior
		{
			private CharacterMotor characterMotor;

			private const float baseDuration = 0.6f;

			private const float durationPerStack = 0.4f;

			public float flyingStopwatch = 0f;

			private bool _canHaveBuff = false;

			public bool CanHaveBuff
			{
				get
				{
					return _canHaveBuff;
				}
				set
				{
					//IL_0032: Unknown result type (might be due to invalid IL or missing references)
					if (_canHaveBuff != value)
					{
						_canHaveBuff = value;
						if (!_canHaveBuff)
						{
							base.body.SetBuffCount(ChrysotopeFlyingBuff.buff.buffIndex, 0);
						}
					}
				}
			}

			public void UpdateStopwatch(float newTime)
			{
				flyingStopwatch = newTime;
			}

			public void FixedUpdate()
			{
				if (Object.op_Implicit((Object)(object)characterMotor))
				{
					CanHaveBuff = !characterMotor.isGrounded && base.body.inputBank.jump.down && Run.instance.time <= flyingStopwatch + 0.6f + 0.4f * (float)(base.stack - 1);
					if (base.body.HasBuff(ChrysotopeFlyingBuff.buff) && base.body.characterMotor.velocity.y < 18f)
					{
						base.body.characterMotor.velocity.y = (base.body.characterMotor.velocity.y - 18f) * 0.9f + 18f;
					}
				}
			}

			public void Start()
			{
				characterMotor = base.body.characterMotor;
				((Behaviour)this).enabled = false;
			}

			private void OnDisable()
			{
				flyingStopwatch = 0f;
				CanHaveBuff = false;
			}

			public void OnDestroy()
			{
				flyingStopwatch = 0f;
				CanHaveBuff = false;
			}
		}

		public static ItemDef item;

		public static ItemDef transformItem;

		public const float dampeningForce = 0.9f;

		public const float riseSpeed = 18f;

		public const float baseDuration = 0.6f;

		public const float durationPerStack = 0.4f;

		public override void Init()
		{
			item = CreateItemDef("CHRYSOTOPE", "Chrysotope", "Rise after jumping. Hold jump to continue flying. <style=cIsVoid>Corrupts all Frisbees</style>.", "Rise after jumping for <style=cIsUtility>0.6</style> <style=cStack>(+0.4 per stack)</style> seconds. Hold jump to keep flying. <style=cIsVoid>Corrupts all Frisbees</style>.", "An eyeless crystal snake capbable of flying 100 meters", (ItemTier)6, UltAssets.ChrysotopeSprite, UltAssets.ChrysotopePrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, Frisbee.item);
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged);
			GenericCharacterMain.ProcessJump += new hook_ProcessJump(GenericCharacterMain_ProcessJump);
		}

		private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory))
			{
				self.AddItemBehavior<ChrysotopeBehavior>(self.inventory.GetItemCount(item));
			}
		}

		private void GenericCharacterMain_ProcessJump(orig_ProcessJump orig, GenericCharacterMain self)
		{
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((EntityState)self).characterBody.inventory))
			{
				CharacterBody characterBody = ((EntityState)self).characterBody;
				int itemCount = characterBody.inventory.GetItemCount(item);
				if (itemCount > 0 && ((BaseCharacterMain)self).hasCharacterMotor && self.jumpInputReceived && ((EntityState)self).characterMotor.jumpCount < ((EntityState)self).characterBody.maxJumpCount)
				{
					Log.Debug("Chrysotope Jump ? ? ? adding buff for " + (0.6f + 0.4f * (float)(itemCount - 1)) + " seconds");
					ChrysotopeBehavior component = ((Component)((EntityState)self).characterBody).GetComponent<ChrysotopeBehavior>();
					((Behaviour)component).enabled = true;
					component.UpdateStopwatch(Run.instance.time);
					characterBody.SetBuffCount(ChrysotopeFlyingBuff.buff.buffIndex, 1);
					Log.Debug("Has Timed def Buff? " + ((BaseState)self).HasBuff(ChrysotopeFlyingBuff.buff));
				}
			}
			orig.Invoke(self);
		}
	}
	public class DownloadedRAM : ItemBase
	{
		public class DownloadedVoidBehavior : ItemBehavior
		{
			public const float notAttackingDelay = 4f;

			public float attackingStopwatch = 0f;

			private bool _attacking = false;

			public bool DealingDamage
			{
				get
				{
					return _attacking;
				}
				set
				{
					//IL_0032: Unknown result type (might be due to invalid IL or missing references)
					if (_attacking != value)
					{
						_attacking = value;
						if (!_attacking)
						{
							base.body.SetBuffCount(DownloadedBuff.buff.buffIndex, 0);
							((Behaviour)this).enabled = false;
						}
					}
				}
			}

			public void UpdateStopwatch(float newTime)
			{
				attackingStopwatch = newTime;
			}

			private void OnAwake()
			{
				((Behaviour)this).enabled = false;
			}

			private void OnDisable()
			{
				attackingStopwatch = 0f;
				DealingDamage = false;
			}

			private void FixedUpdate()
			{
				DealingDamage = Run.instance.time <= attackingStopwatch + 4f;
			}

			private void OnCharacterDeathGlobal(DamageReport damageReport)
			{
				Log.Warning("RAM ran this on death?");
			}
		}

		public static ItemDef item;

		public static ItemDef transformItem;

		public const float downloadedBuffMultiplier = 8f;

		public const int downloadsPerItem = 4;

		private const float downloadChance = 12f;

		public const float notAttackingDelay = 4f;

		public override void Init()
		{
			item = CreateItemDef("DOWNLOADEDRAM", "Downloaded RAM", "Chance on hit to increase damage. Lose stacks when not attacking. <style=cIsVoid>Corrupts all Overclocked GPUs</style>.", "<style=cIsDamage>12%</style> chance on hit to increase damage by <style=cIsDamage>8%</style>. Maxinum cap of <style=cIsDamage>4</style> <style=cStack>(+4 per stack)</style>. Lose stacks 4 seconds after inflicting damage. <style=cIsVoid>Corrupts all Overclocked GPUs</style>.", "Wow I can't belive it worked! I though for sure it was a scam!", (ItemTier)7, UltAssets.DownloadedRAMSprite, UltAssets.DownloadedRAMPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, OverclockedGPU.item);
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged);
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
		}

		private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory))
			{
				self.AddItemBehavior<DownloadedVoidBehavior>(self.inventory.GetItemCount(item));
			}
		}

		private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Invalid comparison between Unknown and I4
			orig.Invoke(self, damageInfo, victim);
			try
			{
				if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)victim) || !Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) || !Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>().inventory) || damageInfo.rejected || (int)damageInfo.damageType == 67108864)
				{
					return;
				}
				CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
				int itemCount = component.inventory.GetItemCount(item);
				if (itemCount <= 0)
				{
					return;
				}
				DownloadedVoidBehavior component2 = ((Component)component).GetComponent<DownloadedVoidBehavior>();
				((Behaviour)component2).enabled = true;
				component2.UpdateStopwatch(Run.instance.time);
				if (Util.CheckRoll(12f, component.master.luck, (CharacterMaster)null))
				{
					Log.Debug("downloading");
					if (component.GetBuffCount(DownloadedBuff.buff) < itemCount * 4)
					{
						component.AddBuff(DownloadedBuff.buff);
					}
				}
			}
			catch (NullReferenceException)
			{
			}
		}
	}
	public class DriedHam : ItemBase
	{
		public static ItemDef item;

		public static ItemDef transformItem;

		private const float threshold = 35f;

		private const float flatHealing = 4f;

		public override void Init()
		{
			item = CreateItemDef("DRIEDHAM", "Dried Ham", "Heal when hitting enemies below 35% health. <style=cIsVoid>Corrupts all Crème Brûlées</style>.", "<style=cIsHealing>Heal</style> for <style=cIsHealing>4</style> <style=cStack>(+5 per stack)</style> when dealing damage to enemies below <style=cIsDamage>35% health</style>. <style=cIsVoid>Corrupts all Crème Brûlées</style>.", "The bitter aftertaste is just the spoilage", (ItemTier)6, UltAssets.DriedHamSprite, UltAssets.DriedHamPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, CremeBrulee.item);
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Invalid comparison between Unknown and I4
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>().inventory) && !damageInfo.rejected && (int)damageInfo.damageType != 67108864)
				{
					CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
					int itemCount = component.inventory.GetItemCount(item);
					if (itemCount > 0 && self.combinedHealthFraction <= 0.35f)
					{
						component.healthComponent.Heal(4f * (float)itemCount, damageInfo.procChainMask, true);
						Util.PlaySound("Play_item_proc_thorns", ((Component)component).gameObject);
					}
				}
			}
			catch (NullReferenceException)
			{
			}
			orig.Invoke(self, damageInfo);
		}
	}
	public class InhabitedCoffin : ItemBase
	{
		public static ItemDef item;

		public static ItemDef transformItem;

		private const float freeCoffinChance = 20f;

		private const int minimumInCoffin = 5;

		public override void Init()
		{
			Sprite inhabitedCoffinSprite = UltAssets.InhabitedCoffinSprite;
			GameObject inhabitedCoffinPrefab = UltAssets.InhabitedCoffinPrefab;
			ItemTag[] array = new ItemTag[3];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			item = CreateItemDef("INHABITEDCOFFIN", "Inhabited Coffin", "Breaks at the start of the next stage. Contains void items. <style=cIsVoid>Corrupts all Corroding Vaults</style>.", "At the start of each stage, this item will <style=cIsUtility>break</style> and gives <style=cIsUtility>5</style> random void items. <style=cIsUtility>Affected by luck</style>. <style=cIsVoid>Corrupts all Corroding Vaults</style>.", "Something lives inside this coffin. That coffin is deeper than you think.", (ItemTier)8, inhabitedCoffinSprite, inhabitedCoffinPrefab, (ItemTag[])(object)array, CorrodingVault.item);
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			Stage.BeginServer += new hook_BeginServer(Stage_BeginServer);
		}

		private void Stage_BeginServer(orig_BeginServer orig, Stage self)
		{
			//IL_005d: 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_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Expected O, but got Unknown
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (!NetworkServer.active)
			{
				Log.Debug("Running on Client... return...");
				return;
			}
			foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList)
			{
				if (!Object.op_Implicit((Object)(object)readOnlyInstances.inventory))
				{
					continue;
				}
				int itemCount = readOnlyInstances.inventory.GetItemCount(item.itemIndex);
				if (itemCount > 0)
				{
					readOnlyInstances.inventory.RemoveItem(item, 1);
					readOnlyInstances.inventory.GiveItem(InhabitedCoffinConsumed.item, 1);
					List<PickupIndex>[] array = new List<PickupIndex>[4]
					{
						Run.instance.availableVoidTier1DropList,
						Run.instance.availableVoidTier2DropList,
						Run.instance.availableVoidTier3DropList,
						Run.instance.availableVoidBossDropList
					};
					int num = array[0].Count + array[1].Count + array[2].Count + array[3].Count;
					Log.Debug("All Void Items Length: " + num);
					int num2;
					if (Util.CheckRoll(80f, readOnlyInstances.luck, (CharacterMaster)null))
					{
						num2 = 5;
					}
					else
					{
						readOnlyInstances.inventory.GiveItem(item, 1);
						GenericPickupController.SendPickupMessage(readOnlyInstances, PickupCatalog.itemIndexToPickupIndex[item.itemIndex]);
						num2 = 4;
					}
					Xoroshiro128Plus val = new Xoroshiro128Plus(Run.instance.stageRng.nextUlong);
					for (int i = 0; i < num2; i++)
					{
						int index = val.RangeInt(0, num);
						PickupIndex voidItem = getVoidItem(array, index);
						readOnlyInstances.inventory.GiveItem(PickupCatalog.GetPickupDef(voidItem).itemIndex, 1);
						GenericPickupController.SendPickupMessage(readOnlyInstances, voidItem);
					}
				}
			}
		}

		private PickupIndex getVoidItem(List<PickupIndex>[] items, int index)
		{
			//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)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: 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)
			for (int i = 0; i < items.Length; i++)
			{
				if (index >= items[i].Count)
				{
					index -= items[i].Count;
					continue;
				}
				return items[i][index];
			}
			return PickupIndex.none;
		}
	}
	public class JealousFoe : ItemBase
	{
		public class DeathProjectile : MonoBehaviour
		{
			private ProjectileStickOnImpact projectileStickOnImpactController;

			private ProjectileController projectileController;

			private ProjectileDamage projectileDamage;

			private HealthComponent healthComponent;

			public GameObject OnKillTickEffect;

			public TeamIndex teamIndex;

			public string activeSoundLoopString;

			public string exitSoundString;

			private float duration;

			private float fixedAge;

			public float baseDuration = 8f;

			public float radius = 500f;

			public GameObject rotateObject;

			private bool doneWithRemovalEvents;

			public float removalTime = 1f;

			private bool shouldStopSound;

			private void Awake()
			{
				projectileController = ((Component)this).GetComponent<ProjectileController>();
				projectileDamage = ((Component)this).GetComponent<ProjectileDamage>();
				healthComponent = ((Component)this).GetComponent<HealthComponent>();
				duration = baseDuration;
				fixedAge = 0f;
			}

			private void FixedUpdate()
			{
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				//IL_009c: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_00be: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00db: 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_00f1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0102: Unknown result type (might be due to invalid IL or missing references)
				//IL_0109: Unknown result type (might be due to invalid IL or missing references)
				//IL_010e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0115: Expected O, but got Unknown
				//IL_0133: Unknown result type (might be due to invalid IL or missing references)
				//IL_013a: Expected O, but got Unknown
				fixedAge += Time.deltaTime;
				if (duration > 0f)
				{
					if (!(fixedAge >= 1f))
					{
						return;
					}
					if (projectileStickOnImpactController.stuck)
					{
						if (Object.op_Implicit((Object)(object)projectileController.owner))
						{
							RotateDoll(Random.Range(90f, 180f));
							SpawnTickEffect();
							if (NetworkServer.active)
							{
								DamageInfo val = new DamageInfo
								{
									attacker = projectileController.owner,
									crit = projectileDamage.crit,
									damage = projectileDamage.damage,
									position = ((Component)this).transform.position,
									procCoefficient = projectileController.procCoefficient,
									damageType = projectileDamage.damageType,
									damageColorIndex = projectileDamage.damageColorIndex
								};
								HealthComponent val2 = healthComponent;
								DamageReport val3 = new DamageReport(val, val2, val.damage, healthComponent.combinedHealth);
								GlobalEventManager.instance.OnCharacterDeath(val3);
							}
						}
						duration -= 1f;
					}
					fixedAge = 0f;
				}
				else
				{
					if (!doneWithRemovalEvents)
					{
						doneWithRemovalEvents = true;
						((Behaviour)rotateObject.GetComponent<ObjectScaleCurve>()).enabled = true;
					}
					if (fixedAge >= removalTime)
					{
						Util.PlaySound(exitSoundString, ((Component)this).gameObject);
						shouldStopSound = false;
						Object.Destroy((Object)(object)((Component)this).gameObject);
					}
				}
			}

			private void OnDisable()
			{
				if (shouldStopSound)
				{
					Util.PlaySound(exitSoundString, ((Component)this).gameObject);
					shouldStopSound = false;
				}
			}

			public void SpawnTickEffect()
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: 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)
				//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)
				//IL_0024: Expected O, but got Unknown
				EffectData val = new EffectData
				{
					origin = ((Component)this).transform.position,
					rotation = Quaternion.identity
				};
				EffectManager.SpawnEffect(OnKillTickEffect, val, false);
			}

			public void PlayStickSoundLoop()
			{
				Util.PlaySound(activeSoundLoopString, ((Component)this).gameObject);
				shouldStopSound = true;
			}

			public void RotateDoll(float rotationAmount)
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				rotateObject.transform.Rotate(new Vector3(0f, 0f, rotationAmount));
			}
		}

		public static ItemDef item;

		public static ItemDef transformItem;

		public const float chancePerStack = 5f;

		public readonly GameObject EyeballProjectile = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/DeathProjectile/DeathProjectile.prefab").WaitForCompletion();

		public override void Init()
		{
			item = CreateItemDef("JEALOUSFOE", "JealousFoe", "Chance of On-Kill effects upon grabbing pickups. <style=cIsVoid>Corrupts all Toy Robots</style>.", "<style=cIsDamage>5%</style> <style=cStack>(+5% per stack)</style> chance of triggering <style=cIsDamage>On-Kill</style> effects when <style=cIsDamage>grabbing pickups</style>. <style=cIsVoid>Corrupts all Toy Robots</style>.", "Look at it Jubilat. It just jubilant like jello jelly.", (ItemTier)6, UltAssets.JubilantFoeSprite, UltAssets.JubilantFoePrefab, (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)3,
				(ItemTag)6
			}, ToyRobot.item);
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			HealthPickup.OnTriggerStay += new hook_OnTriggerStay(HealthPickup_OnTriggerStay);
			AmmoPickup.OnTriggerStay += new hook_OnTriggerStay(AmmoPickup_OnTriggerStay);
			BuffPickup.OnTriggerStay += new hook_OnTriggerStay(BuffPickup_OnTriggerStay);
			MoneyPickup.OnTriggerStay += new hook_OnTriggerStay(MoneyPickup_OnTriggerStay);
		}

		private void HealthPickup_OnTriggerStay(orig_OnTriggerStay orig, HealthPickup self, Collider other)
		{
			orig.Invoke(self, other);
			GotPickup(other);
		}

		private void AmmoPickup_OnTriggerStay(orig_OnTriggerStay orig, AmmoPickup self, Collider other)
		{
			orig.Invoke(self, other);
			GotPickup(other);
		}

		private void BuffPickup_OnTriggerStay(orig_OnTriggerStay orig, BuffPickup self, Collider other)
		{
			orig.Invoke(self, other);
			GotPickup(other);
		}

		private void MoneyPickup_OnTriggerStay(orig_OnTriggerStay orig, MoneyPickup self, Collider other)
		{
			orig.Invoke(self, other);
			GotPickup(other);
		}

		private void GotPickup(Collider other)
		{
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: 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_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: 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_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Expected O, but got Unknown
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Expected O, but got Unknown
			Log.Debug("Foe Got Pickup?");
			CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory))
			{
				int itemCount = component.inventory.GetItemCount(item);
				if (itemCount > 0 && NetworkServer.active && Util.CheckRoll(5f * (float)itemCount, component.master.luck, (CharacterMaster)null))
				{
					Log.Debug("got Chance");
					GameObject val = Object.Instantiate<GameObject>(EyeballProjectile, component.footPosition, Quaternion.identity);
					val.transform.localScale = new Vector3(0f, 0f, 0f);
					val.GetComponent<DeathProjectile>().baseDuration = itemCount;
					Object.Destroy((Object)(object)val.GetComponent<DestroyOnTimer>());
					Object.Destroy((Object)(object)val.GetComponent<DeathProjectile>());
					Log.Debug("removing?");
					Object.Destroy((Object)(object)val.GetComponent<ApplyTorqueOnStart>());
					Object.Destroy((Object)(object)val.GetComponent<ProjectileDeployToOwner>());
					Object.Destroy((Object)(object)val.GetComponent<Deployable>());
					Object.Destroy((Object)(object)val.GetComponent<ProjectileStickOnImpact>());
					Object.Destroy((Object)(object)val.GetComponent<ProjectileController>());
					Log.Debug("removing 2 ?");
					val.transform.position = component.footPosition;
					HealthComponent component2 = val.GetComponent<HealthComponent>();
					DamageInfo val2 = new DamageInfo
					{
						attacker = ((Component)component).gameObject,
						crit = component.RollCrit(),
						damage = component.baseDamage,
						position = component.footPosition,
						procCoefficient = 0f,
						damageType = (DamageType)0,
						damageColorIndex = (DamageColorIndex)3
					};
					DamageReport val3 = new DamageReport(val2, component2, val2.damage, component2.combinedHealth);
					GlobalEventManager.instance.OnCharacterDeath(val3);
				}
			}
		}
	}
	public class RottenBones : ItemBase
	{
		public class RottenBonesVoidBehavior : ItemBehavior
		{
			private int _intervalsPassed = 0;

			public int IntervalsPassed
			{
				get
				{
					return _intervalsPassed;
				}
				set
				{
					_intervalsPassed = value;
					if (_intervalsPassed > 0)
					{
						ApplyRot(base.body, _intervalsPassed);
						if (_intervalsPassed >= 3)
						{
							Log.Debug("Pass rot Time Interval But Behavior!");
							((Behaviour)this).enabled = false;
						}
					}
				}
			}

			private void FixedUpdate()
			{
				float time = Run.instance.time;
				while (time > Ultitems.stageStartTime + 180f * (float)(_intervalsPassed + 1) && _intervalsPassed < 3)
				{
					IntervalsPassed++;
				}
			}
		}

		public static ItemDef item;

		public static ItemDef transformItem;

		public const int rotsPerItem = 3;

		public const float rottingBuffMultiplier = 15f;

		public const float rotTimeInterval = 180f;

		public override void Init()
		{
			item = CreateItemDef("ROTTENBONES", "Rotten Bones", "Deal more damage over time. <style=cIsVoid>Corrupts all Birthday Candles</style>.", "Increase damage by <style=cIsDamage>20%</style> <style=cStack>(+20% per stack)</style> damage for every 3 minutes</style> passed in a stage, up to a max of <style=cIsDamage>4</style> stacks. <style=cIsVoid>Corrupts all Birthday Candles</style>.", "The bitter aftertaste is just the spoilage", (ItemTier)7, UltAssets.RottenBonesSprite, UltAssets.RottenBonesPrefab, (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)3,
				(ItemTag)20
			}, BirthdayCandles.item);
		}

		protected override void Hooks()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			CharacterBody.onBodyStartGlobal += CharacterBody_onBodyStartGlobal;
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged);
		}

		private void CharacterBody_onBodyStartGlobal(CharacterBody self)
		{
			if (NetworkServer.active && Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory))
			{
				self.AddItemBehavior<RottenBonesVoidBehavior>(self.inventory.GetItemCount(item));
			}
		}

		private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.inventory))
			{
				return;
			}
			if (self.inventory.GetItemCount(item) > 0)
			{
				if (Run.instance.time < Ultitems.stageStartTime + 540f)
				{
					RottenBonesVoidBehavior rottenBonesVoidBehavior = self.AddItemBehavior<RottenBonesVoidBehavior>(self.inventory.GetItemCount(item));
					ApplyRot(self, rottenBonesVoidBehavior.IntervalsPassed);
				}
				else
				{
					ApplyRot(self, 3);
				}
			}
			else
			{
				self.SetBuffCount(RottingBuff.buff.buffIndex, 0);
			}
		}

		private static void ApplyRot(CharacterBody player, int intervals)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			int itemCount = player.inventory.GetItemCount(item);
			int num = itemCount * intervals;
			if (player.GetBuffCount(RottingBuff.buff) < num)
			{
				player.SetBuffCount(RottingBuff.buff.buffIndex, num);
			}
		}
	}
	public class ZorsePill : ItemBase
	{
		public static ItemDef item;

		public static ItemDef transformItem;

		private const float percentPerStack = 20f;

		public const float duration = 3f;

		public override void Init()
		{
			item = CreateItemDef("ZORSEPILL", "ZorsePill", "Starve enemies on hit to deal delayed damage. <style=cIsVoid>Corrupts all HMTs</style>.", "Starve an enemy for <style=cIsDamage>20%</style> <style=cStack>(+20% per stack)</style> of TOTAL damage. Status duration <style=cIsDamage>resets</style> when reapplied. <style=cIsVoid>Corrupts all HMTs</style>.", "Get this diet pill now! Eat one and it cut's your weight down. Disclaimer: the microbes inside are definitly not eating you from the inside out.", (ItemTier)7, UltAssets.ZorsePillSprite, UltAssets.ZorsePillPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, HMT.item);
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			DamageReport.ctor += new hook_ctor(DamageReport_ctor);
		}

		private void DamageReport_ctor(orig_ctor orig, DamageReport self, DamageInfo damageInfo, HealthComponent victim, float damageDealt, float combinedHealthBeforeDamage)
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Invalid comparison between Unknown and I4
			orig.Invoke(self, damageInfo, victim, damageDealt, combinedHealthBeforeDamage);
			try
			{
				GameObject gameObject = ((Component)victim.body).gameObject;
				if (Object.op_Implicit((Object)(object)gameObject) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>().inventory) && !damageInfo.rejected && (int)damageInfo.damageType != 67108864)
				{
					CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
					int itemCount = component.inventory.GetItemCount(item);
					if (itemCount > 0)
					{
						Log.Debug("  ...Starving enemy with reports...");
						InflictDotInfo val = default(InflictDotInfo);
						val.victimObject = gameObject;
						val.attackerObject = damageInfo.attacker;
						val.dotIndex = ZorseStarvingBuff.index;
						val.duration = 3f;
						val.damageMultiplier = damageDealt / component.damage * (float)itemCount * 20f / 100f;
						val.maxStacksFromAttacker = null;
						InflictDotInfo val2 = val;
						DotController.InflictDot(ref val2);
					}
				}
			}
			catch (NullReferenceException)
			{
				Log.Debug(" oh...  Zorse Pill had an expected null error");
			}
		}
	}
}
namespace UltitemsCyan.Items.Untiered
{
	public class CorrodingVaultConsumed : ItemBase
	{
		public static ItemDef item;

		public override void Init()
		{
			Sprite corrodingVaultConsumedSprite = UltAssets.CorrodingVaultConsumedSprite;
			GameObject corrodingVaultConsumedPrefab = UltAssets.CorrodingVaultConsumedPrefab;
			ItemTag[] array = new ItemTag[3];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			item = CreateItemDef("CORRODINGVAULTCONSUMED", "Corroding Vault (Corroded)", "It can't protect anything anymore...", "DESCRIPTION It can't protect anything anymore...", "Rusted Rusted Rusted", (ItemTier)5, corrodingVaultConsumedSprite, corrodingVaultConsumedPrefab, (ItemTag[])(object)array);
		}

		protected override void Hooks()
		{
		}
	}
	public class GreySolvent : ItemBase
	{
		public static ItemDef item;

		public override void Init()
		{
			item = CreateItemDef("GREYSOLVENT", "Grey Solvent", "Everything returns...", "DESCRIPTION Everything returns...", "So a Universal Solute just turns other things into Universal Solvents?\nI guess that makes sense... becasue if there is a universal solute, then everything else desolves it.\nSo then everything else is a universal solvent for the universal solute", (ItemTier)5, UltAssets.UniversalSolventSprite, UltAssets.UniversalSolventPrefab, (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)3,
				(ItemTag)4
			});
		}

		protected override void Hooks()
		{
		}
	}
	public class InhabitedCoffinConsumed : ItemBase
	{
		public static ItemDef item;

		public override void Init()
		{
			Sprite inhabitedCoffinConsumedSprite = UltAssets.InhabitedCoffinConsumedSprite;
			GameObject inhabitedCoffinConsumedPrefab = UltAssets.InhabitedCoffinConsumedPrefab;
			ItemTag[] array = new ItemTag[3];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			item = CreateItemDef("INHABITEDCOFFINCONSUMED", "Inhabited Coffin (Vaccant)", "It has been let loose...", "DESCRIPTION It has been let loose...", "Watch Out!", (ItemTier)5, inhabitedCoffinConsumedSprite, inhabitedCoffinConsumedPrefab, (ItemTag[])(object)array);
		}

		protected override void Hooks()
		{
		}
	}
	public class SilverThreadConsumed : ItemBase
	{
		public static ItemDef item;

		public override void Init()
		{
			item = CreateItemDef("SILVERTHREADCONSUMED", "Silver Thread (Snapped)", "Proof of death", "DESCRIPTION Proof of death", "This is a garbage death zone. How did you get here?", (ItemTier)5, UltAssets.SilverThreadConsumedSprite, UltAssets.SilverThreadConsumedPrefab, (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)3,
				(ItemTag)4
			});
		}

		protected override void Hooks()
		{
		}
	}
	public class SuesMandiblesConsumed : ItemBase
	{
		public static ItemDef item;

		public override void Init()
		{
			Sprite suesMandiblesConsumedSprite = UltAssets.SuesMandiblesConsumedSprite;
			GameObject suesMandiblesConsumedPrefab = UltAssets.SuesMandiblesConsumedPrefab;
			ItemTag[] array = new ItemTag[3];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			item = CreateItemDef("SUESMANDIBLESCONSUMED", "Sue's Mandibles (Consumed)", "Resting in pieces", "DESCRIPTION Resting in pieces", "I don't know sue", (ItemTier)5, suesMandiblesConsumedSprite, suesMandiblesConsumedPrefab, (ItemTag[])(object)array);
		}

		protected override void Hooks()
		{
		}
	}
}
namespace UltitemsCyan.Items.Tier3
{
	public class CorrodingVault : ItemBase
	{
		public static ItemDef item;

		private const int quantityInVault = 15;

		public override void Init()
		{
			Sprite corrodingVaultSprite = UltAssets.CorrodingVaultSprite;
			GameObject corrodingVaultPrefab = UltAssets.CorrodingVaultPrefab;
			ItemTag[] array = new ItemTag[3];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			item = CreateItemDef("CORRODINGVAULT", "Corroding Vault", "Breaks at the start of the next stage. Contains white items.", "At the start of each stage, this item will <style=cIsUtility>break</style> and gives <style=cIsUtility>15</style> unique white items", "This vault is sturdy, but over time the rust will just crack it open", (ItemTier)2, corrodingVaultSprite, corrodingVaultPrefab, (ItemTag[])(object)array);
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			Stage.BeginServer += new hook_BeginServer(Stage_BeginServer);
		}

		private void Stage_BeginServer(orig_BeginServer orig, Stage self)
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (!NetworkServer.active)
			{
				Log.Debug("Running on Client... return...");
				return;
			}
			foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList)
			{
				if (!Object.op_Implicit((Object)(object)readOnlyInstances.inventory))
				{
					continue;
				}
				int itemCount = readOnlyInstances.inventory.GetItemCount(item.itemIndex);
				if (itemCount <= 0)
				{
					continue;
				}
				readOnlyInstances.inventory.RemoveItem(item, 1);
				readOnlyInstances.inventory.GiveItem(CorrodingVaultConsumed.item, 1);
				PickupIndex[] array = (PickupIndex[])(object)new PickupIndex[Run.instance.availableTier1DropList.Count];
				Run.instance.availableTier1DropList.CopyTo(array);
				int num = array.Length;
				Xoroshiro128Plus val = new Xoroshiro128Plus(Run.instance.stageRng.nextUlong);
				for (int i = 0; i < 15; i++)
				{
					int num2 = val.RangeInt(0, num);
					ItemIndex itemIndex = PickupCatalog.GetPickupDef(array[num2]).itemIndex;
					readOnlyInstances.inventory.GiveItem(itemIndex, 1);
					GenericPickupController.SendPickupMessage(readOnlyInstances, array[num2]);
					array[num2] = array[num - 1];
					num--;
					if (num == 0)
					{
						Log.Debug("Ran out of white items...   Reseting Pool");
						num = array.Length;
						Run.instance.availableTier1DropList.CopyTo(array);
					}
				}
			}
		}
	}
	public class Grapevine : ItemBase
	{
		public static ItemDef item;

		private static GameObject GrapeOrbPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Tooth/HealPack.prefab").WaitForCompletion();

		private static GameObject GrapeEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/HealthOrbEffect.prefab").WaitForCompletion();

		private const float baseGrapeDropChance = 50f;

		private const float stackGrapeDropChance = 25f;

		public const float grapeBlockChance = 85f;

		public const int maxGrapes = 20;

		public override void Init()
		{
			item = CreateItemDef("GRAPEVINE", "Grapevine", "Chance on kill to drop grapes that block damage.", "<style=cIsHealing>50%</style> <style=cStack>(+25% per stack)</style> chance on kill to grow a grape. <style=cIsHealing>85%</style> to <style=cIsHealing>block</style> incomming damage per grape. Block chance is <style=cIsUtility>unaffected by luck</style>.", "If you close your eyes, you can pretend their eyeballs", (ItemTier)2, UltAssets.GrapevineSprite, UltAssets.GrapevinePrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 });
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath);
		}

		private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
		{
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageReport);
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)damageReport.attacker) && Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.attackerBody.inventory))
			{
				CharacterBody attackerBody = damageReport.attackerBody;
				CharacterBody victimBody = damageReport.victimBody;
				int itemCount = attackerBody.inventory.GetItemCount(item);
				if (itemCount > 0 && Util.CheckRoll(50f + 24f * (float)itemCount, attackerBody.master.luck, (CharacterMaster)null))
				{
					Log.Warning("Dropping grape from " + ((Object)victimBody).name);
					SpawnOrb(victimBody.transform.position, victimBody.transform.rotation, TeamComponent.GetObjectTeam(((Component)attackerBody).gameObject), itemCount);
				}
			}
		}

		public static void SpawnOrb(Vector3 position, Quaternion rotation, TeamIndex teamIndex, int itemCount)
		{
			//IL_0020: 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_003a: 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_00d6: 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_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(GrapeOrbPrefab);
			if (Object.op_Implicit((Object)(object)val))
			{
			}
			val.transform.position = position;
			val.transform.rotation = rotation;
			val.GetComponent<TeamFilter>().teamIndex = teamIndex;
			VelocityRandomOnStart component = val.GetComponent<VelocityRandomOnStart>();
			component.maxSpeed = 20f;
			component.minSpeed = 15f;
			component.directionMode = (DirectionMode)2;
			component.coneAngle = 1f;
			HealthPickup componentInChildren = val.GetComponentInChildren<HealthPickup>();
			Log.Debug("health Component? " + componentInChildren.alive);
			componentInChildren.alive = false;
			GrapePickup grapePickup = ((Component)componentInChildren).gameObject.AddComponent<GrapePickup>();
			grapePickup.baseObject = val;
			grapePickup.teamFilter = val.GetComponent<TeamFilter>();
			grapePickup.pickupEffect = GrapeEffect;
			val.GetComponent<Rigidbody>().useGravity = true;
			val.transform.localScale = Vector3.one * 2.5f;
			Vector3 position2 = val.transform.position;
			Log.Debug("Spawning orb at: " + ((object)(Vector3)(ref position2)).ToString());
			NetworkServer.Spawn(val);
		}
	}
	public class GrapePickup : MonoBehaviour
	{
		private int maxGrapes = 20;

		private BuffDef buffDef = SlipperyGrape.buff;

		public GameObject baseObject;

		public TeamFilter teamFilter;

		public GameObject pickupEffect;

		private bool alive = true;

		private void OnTriggerStay(Collider other)
		{
			//IL_0016: 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)
			if (NetworkServer.active && alive && TeamComponent.GetObjectTeam(((Component)other).gameObject) == teamFilter.teamIndex)
			{
				CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component) && component.GetBuffCount(buffDef) < maxGrapes)
				{
					component.AddBuff(buffDef);
				}
				Object.Destroy((Object)(object)baseObject);
			}
		}
	}
	public class RockyTaffy : ItemBase
	{
		public class RockyTaffyBehaviour : ItemBehavior
		{
			public HealthComponent healthComponent;

			private bool _hasShield = true;

			public bool HasShield
			{
				get
				{
					return _hasShield;
				}
				set
				{
					if (_hasShield != value)
					{
						_hasShield = value;
						Log.Debug(_hasShield + " > Sticky Taffy Dirty Stats (has shield changed)");
						base.body.statsDirty = true;
					}
				}
			}

			public void FixedUpdate()
			{
				if (Object.op_Implicit((Object)(object)healthComponent))
				{
					HasShield = healthComponent.shield > 0f;
				}
			}

			public void Start()
			{
				healthComponent = ((Component)this).GetComponent<HealthComponent>();
			}

			public void OnDestroy()
			{
				HasShield = true;
			}
		}

		public static ItemDef item;

		private const float shieldPercent = 40f;

		public static GameObject CaptainBodyArmorBlockEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Captain/CaptainBodyArmorBlockEffect.prefab").WaitForCompletion();

		public override void Init()
		{
			item = CreateItemDef("ROCKYTAFFY", "Rocky Taffy", "Gain a recharging shield. Gain a stable barrier without your shield.", "Gain a <style=cIsHealing>shield</style> equal to <style=cIsHealing>40%</style> <style=cStack>(+40% per stack)</style> of your maximum health. On losing your shield, gain a <style=cIsHealing>stable barrier</style> for 100% of your <style=cIsHealing>max shield</style>. No barrier decay without a shield.", "This vault is sturdy, but over time the rust will just crack it open", (ItemTier)2, UltAssets.RockyTaffySprite, UltAssets.RockyTaffyPrefab, (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)3,
				(ItemTag)2
			});
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory))
			{
				int itemCount = sender.inventory.GetItemCount(item);
				if (itemCount > 0)
				{
					Log.Debug("Taffy On the rocks | Health: " + sender.healthComponent.fullHealth);
					args.baseShieldAdd += sender.healthComponent.fullHealth * (0.4f * (float)itemCount);
				}
			}
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			bool flag = true;
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && Object.op_Implicit((Object)(object)self.body.inventory))
			{
				int itemCount = self.body.inventory.GetItemCount(item);
				if (itemCount > 0)
				{
					flag = false;
					bool flag2 = self.shield > 0f;
					orig.Invoke(self, damageInfo);
					bool flag3 = self.shield > 0f;
					if (flag2 && !flag3)
					{
						Log.Debug("Taffy Shield lost! Gain Barrier");
						Util.PlaySound("Play_voidDevastator_m2_chargeUp", ((Component)self.body).gameObject);
						self.AddBarrier(self.fullShield);
					}
				}
			}
			if (flag)
			{
				orig.Invoke(self, damageInfo);
			}
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.inventory))
			{
				return;
			}
			int itemCount = self.inventory.GetItemCount(item);
			if (itemCount > 0)
			{
				if (self.healthComponent.shield <= 0f)
				{
					self.barrierDecayRate = 0f;
				}
				Log.Debug("After Barrier Decay: " + self.barrierDecayRate);
			}
		}

		private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory))
			{
				self.AddItemBehavior<RockyTaffyBehaviour>(self.inventory.GetItemCount(item));
			}
		}
	}
	public class SuesMandibles : ItemBase
	{
		public static ItemDef item;

		private const float warningDelay = 25f;

		private const float effectDuration = 30f;

		public override void Init()
		{
			item = CreateItemDef("SUESMANDIBLES", "Sue's Mandibles", "Endure a killing blow then gain invulnerability and disable healing for 30s. Consumed on use.", "<style=cIsUtility>Upon a killing blow</style>, this item will be <style=cIsUtility>consumed</style> and you'll <style=cIsHealing>live on 1 health</style> with <style=cIsHealing>30 seconds</style> of <style=cIsHealing>invulnerability</style> and <style=cIsHealth>disabled healing</style>.", "Last Stand", (ItemTier)2, UltAssets.SuesMandiblesSprite, UltAssets.SuesMandiblesPrefab, (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)3,
				(ItemTag)16
			});
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageInfo);
			CharacterBody component = ((Component)self).GetComponent<CharacterBody>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && Object.op_Implicit((Object)(object)self) && !self.alive && self.health <= 0f)
			{
				int itemCount = component.inventory.GetItemCount(item);
				if (itemCount > 0)
				{
					Log.Warning(" ! ! ! Killing Blow ! ! ! ");
					Log.Debug("S Combined: " + self.combinedHealth + " FullCombined: " + self.fullCombinedHealth + " Damage: " + damageInfo.damage + " Alive? " + self.alive);
					self.health = 1f;
					component.inventory.RemoveItem(item, 1);
					component.inventory.GiveItem(SuesMandiblesConsumed.item, 1);
					component.AddTimedBuffAuthority(Buffs.Immune.buffIndex, 30f);
					component.AddTimedBuffAuthority(Buffs.HealingDisabled.buffIndex, 30f);
					Util.PlaySound("Play_item_proc_ghostOnKill", ((Component)component).gameObject);
					Util.PlaySound("Play_item_proc_ghostOnKill", ((Component)component).gameObject);
					Util.PlaySound("Play_item_proc_phasing", ((Component)component).gameObject);
					Util.PlaySound("Play_item_proc_phasing", ((Component)component).gameObject);
					Util.PlaySound("Play_elite_haunt_ghost_convert", ((Component)component).gameObject);
				}
			}
		}
	}
	public class ViralSmog : ItemBase
	{
		public static ItemDef item;

		private const float speedPerStackStatus = 25f;

		public override void Init()
		{
			item = CreateItemDef("VIRALSMOG", "Viral Smog", "Increase speed per unique status effect.", "Increases <style=cIsUtility>movement speed</style> by <style=cIsUtility>25%</style> <style=cStack>(+25% per stack)</style> per <style=cIsDamage>unique status</style> you have.", "Illness", (ItemTier)2, UltAssets.ViralSmogSprite, UltAssets.ViralSmogPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 });
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (!Object.op_Implicit((Object)(object)sender) || !Object.op_Implicit((Object)(object)sender.inventory))
			{
				return;
			}
			int itemCount = sender.inventory.GetItemCount(item);
			if (itemCount <= 0)
			{
				return;
			}
			int activeBuffsListCount = sender.activeBuffsListCount;
			BuffIndex[] activeBuffsList = sender.activeBuffsList;
			int num = activeBuffsListCount;
			for (int i = 0; i < activeBuffsListCount; i++)
			{
				BuffDef buffDef = BuffCatalog.GetBuffDef(activeBuffsList[i]);
				if (buffDef.isCooldown)
				{
					num--;
				}
			}
			if (activeBuffsListCount > 0)
			{
				args.moveSpeedMultAdd += 0.25f * (float)num * (float)itemCount;
			}
		}
	}
}
namespace UltitemsCyan.Items.Tier2
{
	public class BirthdayCandles : ItemBase
	{
		public static ItemDef item;

		private const float birthdayDuration = 300f;

		public const float birthdayBuffMultiplier = 32f;

		public override void Init()
		{
			item = CreateItemDef("BIRTHDAYCANDLES", "Birthday Candles", "Temporarily deal extra damage after pickup and at the start of each stage.", "Increase damage by <style=cIsDamage>32%</style> <style=cStack>(+32% per stack)</style> for<style=cIsUtility>5 minutes</style>after pickup and after the start of each stage.", "I don't know what to get you for your birthday...", (ItemTier)1, UltAssets.BirthdayCandleSprite, UltAssets.BirthdayCandlePrefab, (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)1,
				(ItemTag)20
			});
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged);
			CharacterBody.onBodyStartGlobal += CharacterBody_onBodyStartGlobal;
			Inventory.GiveItem_ItemIndex_int += new hook_GiveItem_ItemIndex_int(Inventory_GiveItem_ItemIndex_int);
		}

		private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(item) < 1)
			{
				self.SetBuffCount(BirthdayBuff.buff.buffIndex, 0);
			}
		}

		protected void CharacterBody_onBodyStartGlobal(CharacterBody self)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active && Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory))
			{
				int itemCount = self.inventory.GetItemCount(item.itemIndex);
				if (itemCount > 0)
				{
					Log.Debug("Birthday Candles On Body Start Global for " + self.GetUserName() + " | Candles: " + itemCount);
					ApplyBirthday(self, itemCount, itemCount);
				}
			}
		}

		protected void Inventory_GiveItem_ItemIndex_int(orig_GiveItem_ItemIndex_int orig, Inventory self, ItemIndex itemIndex, int count)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			Log.Debug("Into orig Birthday Candles");
			orig.Invoke(self, itemIndex, count);
			Log.Debug("Out orig Birthday Candles");
			if (Object.op_Implicit((Object)(object)self) && itemIndex == item.itemIndex)
			{
				Log.Debug("Give Birthday Candles");
				CharacterBody val = CharacterBody.readOnlyInstancesList.ToList().Find((CharacterBody body) => (Object)(object)body.inventory == (Object)(object)self);
				if (!Object.op_Implicit((Object)(object)val))
				{
					Log.Warning("Null Player has Birthday");
				}
				if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.inventory) && val.inventory.GetItemCount(RottenBones.item) <= 0)
				{
					ApplyBirthday(val, count, self.GetItemCount(item.itemIndex));
				}
			}
		}

		protected void ApplyBirthday(CharacterBody recipient, int count, int max)
		{
			for (int i = 0; i < count; i++)
			{
				recipient.AddTimedBuff(BirthdayBuff.buff, 300f, max);
			}
			Util.PlaySound("Play_item_proc_igniteOnKill", ((Component)recipient).gameObject);
		}
	}
	public class DegreeScissors : ItemBase
	{
		public static ItemDef item;

		private const int consumedPerScissor = 2;

		private const int scrapsPerConsumed = 2;

		public override void Init()
		{
			Sprite degreeScissorsSprite = UltAssets.DegreeScissorsSprite;
			GameObject degreeScissorsPrefab = UltAssets.DegreeScissorsPrefab;
			ItemTag[] array = new ItemTag[3];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			item = CreateItemDef("DEGREESCISSORS", "1000 Degree Scissors", "Melts two consumed items into scraps. Otherwise melts itself.", "At the start of each stage, <style=cIsUtility>melts</style> two <style=cIsUtility>consumed</style> items into <style=cIsUtility>2 common scraps</style> each. If no scissor is used, then it <style=cIsUtility>melts</style> itself.", "What's Youtube?", (ItemTier)1, degreeScissorsSprite, degreeScissorsPrefab, (ItemTag[])(object)array);
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			Stage.BeginServer += new hook_BeginServer(Stage_BeginServer);
		}

		private void Stage_BeginServer(orig_BeginServer orig, Stage self)
		{
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			Log.Debug(" / / / Into Server Begin");
			orig.Invoke(self);
			Log.Debug(" / / / Out the Server Begin");
			if (!NetworkServer.active)
			{
				Log.Debug("Running on Client... return...");
				return;
			}
			foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList)
			{
				if (Object.op_Implicit((Object)(object)readOnlyInstances.inventory))
				{
					int num = readOnlyInstances.inventory.GetItemCount(item.itemIndex) * 2;
					if (num > 0)
					{
						Log.Warning("Scissors on body start global..." + ((Object)readOnlyInstances).name);
						List<ItemIndex> itemAcquisitionOrder = readOnlyInstances.inventory.itemAcquisitionOrder;
						List<ItemDef> untieredItems = getUntieredItems(itemAcquisitionOrder);
						MeltItems(readOnlyInstances, untieredItems, num);
					}
				}
			}
		}

		private void Run_BeginStage(orig_BeginStage orig, Run self)
		{
			Log.Debug(" . . . In Beginin Stage");
			orig.Invoke(self);
			Log.Debug(" . . . Outing the Begin Stage");
		}

		private List<ItemDef> getUntieredItems(List<ItemIndex> list)
		{
			//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)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			List<ItemDef> list2 = new List<ItemDef>();
			foreach (ItemIndex item in list)
			{
				ItemDef itemDef = ItemCatalog.GetItemDef(item);
				ItemTier tier = itemDef.tier;
				if (((object)(ItemTier)(ref tier)).Equals((object)(ItemTier)5) && !itemDef.hidden)
				{
					list2.Add(itemDef);
				}
			}
			return list2;
		}

		private void MeltItems(CharacterMaster master, List<ItemDef> consumedItems, int grabCount)
		{
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			int num = consumedItems.Count;
			if (num > 0)
			{
				int num2 = 0;
				while (grabCount > 0)
				{
					grabCount--;
					int index = Random.Range(0, num);
					ItemDef val = consumedItems[index];
					master.inventory.RemoveItem(val, 1);
					num2 += 2;
					CharacterMasterNotificationQueue.SendTransformNotification(master, val.itemIndex, Items.ScrapWhite.itemIndex, (TransformationType)0);
					if (master.inventory.GetItemCount(val) <= 0)
					{
						consumedItems.RemoveAt(index);
						num--;
						if (num == 0)
						{
							Log.Debug("Scissors can't cut Empty List");
							break;
						}
					}
				}
				master.inventory.GiveItem(ItemCatalog.FindItemIndex("ScrapWhite"), num2);
			}
			else
			{
				Log.Warning(((Object)master).name + " has no consumed items: Scissors cuts itself");
				master.inventory.RemoveItem(item, 1);
				master.inventory.GiveItem(ItemCatalog.FindItemIndex("ScrapWhite"), 2);
			}
		}
	}
	public class HMT : ItemBase
	{
		public static ItemDef item;

		public GameObject onHitAttacker;

		public const float igniteChance = 10f;

		public const float baseBurnDuration = 8f;

		public const float durationPerItem = 2.5f;

		public override void Init()
		{
			item = CreateItemDef("HMT", "H.M.T", "Chance to ignite enemies when you inflict something else", "<style=cIsDamage>10%</style> <style=cStack>(+10% per stack)</style> chance to ignite enemies when inflicting something other than burning. Enemies burn for <style=cIsDamage>400%</style> <style=cStack>(+125% per stack)</style> base damage.", "Fiery Compilation\r\nSizzling Playlist\r\nBlazing Tracklist\r\nScorching Mix\r\nTorrid Tunes\r\nSweltering Sounds\r\nBoiling Beats\r\nBurning Medley\r\nHeated Harmony\r\nIncandescent Melodies\r\nFlaming Rhythms\r\nSultry Selections\r\nPiping Hot Hits\r\nFervent Fusion\r\nArdent Anthology\r\nWarm Jams\r\nHot-blooded Mixdown\r\nThermal Tracks\r\nCaliente Collection\r\nFeverish Features\r\nToasty Tapes\r\nIgnited Arrangement\r\nGlowing Grooves\r\nLava-like Lineup\r\nSmoldering Series\r\nSteamy Set\r\nInfernal Playlist\r\nRadiant Recordings\r\nBlistering Bangers\r\nSearing Serenade", (ItemTier)1, UltAssets.HMTSprite, UltAssets.HMTPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 });
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
			CharacterBody.AddTimedBuff_BuffDef_float += new hook_AddTimedBuff_BuffDef_float(CharacterBody_AddTimedBuff);
			DotController.InflictDot_GameObject_GameObject_DotIndex_float_float_Nullable1 += new hook_InflictDot_GameObject_GameObject_DotIndex_float_float_Nullable1(DotController_InflictDot_GameObject);
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			Log.Debug("HMT Health Take Damage!");
			if (Object.op_Implicit((Object)(object)damageInfo.attacker))
			{
				onHitAttacker = damageInfo.attacker;
			}
			orig.Invoke(self, damageInfo);
			onHitAttacker = null;
			Log.Debug(" ! HMT Health Off Damage...");
		}

		private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			if (Object.op_Implicit((Object)(object)damageInfo.attacker))
			{
				if (Object.op_Implicit((Object)(object)onHitAttacker) && (Object)(object)onHitAttacker != (Object)(object)damageInfo.attacker)
				{
					Log.Warning("Health Component attacker and OnHitEnemy attacker are different! Assumption was wrong...   " + ((Object)onHitAttacker).name + " | " + ((Object)damageInfo.attacker).name);
				}
				onHitAttacker = damageInfo.attacker;
			}
			orig.Invoke(self, damageInfo, victim);
			onHitAttacker = null;
		}

		private void CharacterBody_AddTimedBuff(orig_AddTimedBuff_BuffDef_float orig, CharacterBody self, BuffDef buffDef, float duration)
		{
			orig.Invoke(self, buffDef, duration);
			if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)onHitAttacker) || !buffDef.isDebuff)
			{
				return;
			}
			CharacterBody component = onHitAttacker.GetComponent<CharacterBody>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && Object.op_Implicit((Object)(object)component.master) && Object.op_Implicit((Object)(object)((Component)self).gameObject))
			{
				int itemCount = component.inventory.GetItemCount(item);
				if (itemCount > 0 && Util.CheckRoll(10f * (float)itemCount, component.master.luck, (CharacterMaster)null))
				{
					inflictBurn(((Component)self).gameObject, onHitAttacker, component.inventory, itemCount);
				}
			}
		}

		private void DotController_InflictDot_GameObject(orig_InflictDot_GameObject_GameObject_DotIndex_float_float_Nullable1 orig, GameObject victimObject, GameObject attackerObject, DotIndex dotIndex, float duration, float damageMultiplier, uint? maxStacksFromAttacker)
		{
			//IL_0004: 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_0030: Invalid comparison between Unknown and I4
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Invalid comparison between Unknown and I4
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Invalid comparison between Unknown and I4
			orig.Invoke(victimObject, attackerObject, dotIndex, duration, damageMultiplier, maxStacksFromAttacker);
			Log.Debug(" * * * DotController HMT Inflicting burn?");
			if (Object.op_Implicit((Object)(object)victimObject) && Object.op_Implicit((Object)(object)attackerObject) && (int)dotIndex != 1 && (int)dotIndex != 2 && (int)dotIndex != 7 && NetworkServer.active)
			{
				CharacterBody component = attackerObject.GetComponent<CharacterBody>();
				int itemCount = component.inventory.GetItemCount(item);
				if (itemCount > 0 && Util.CheckRoll(10f * (float)itemCount, component.master.luck, (CharacterMaster)null))
				{
					inflictBurn(victimObject, attackerObject, component.inventory, itemCount);
				}
			}
		}

		private void inflictBurn(GameObject victimObject, GameObject attackerObject, Inventory inventory, int grabCount)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			Log.Debug("Hot Burns! HMT");
			InflictDotInfo val = default(InflictDotInfo);
			val.victimObject = victimObject;
			val.attackerObject = attackerObject;
			val.dotIndex = (DotIndex)1;
			val.duration = 8f + 2.5f * (float)(grabCount - 1);
			val.damageMultiplier = 1f;
			val.maxStacksFromAttacker = null;
			InflictDotInfo val2 = val;
			StrengthenBurnUtils.CheckDotForUpgrade(inventory, ref val2);
			DotController.InflictDot(ref val2);
		}
	}
	public class OverclockedGPU : ItemBase
	{
		public static ItemDef item;

		private const int maxOverclocked = 10;

		public const float buffAttackSpeedPerItem = 3f;

		public override void Init()
		{
			item = CreateItemDef("OVERCLOCKEDGPU", "Overclocked GPU", "Increase attack speed on kill. Stacks 10 times. Resets after getting hurt.", "Killing an enemy increases <style=cIsDamage>attack speed</style> by <style=cIsDamage>3%</style> <style=cStack>(+3% per stack)</style>. Maximum cap of <style=cIsDamage>10</style> stacks. Lose stacks upon getting hit.", "GPU GPU", (ItemTier)1, UltAssets.OverclockedGPUSprite, UltAssets.OverclockedGPUPrefab, (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)1,
				(ItemTag)6
			});
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath);
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
		}

		private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
		{
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)damageReport.attacker) && Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.attackerBody.inventory))
			{
				CharacterBody attacke