Decompiled source of AlternativeGoldScaling v1.0.5

plugins/AlternativeGoldScaling.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using Microsoft.CodeAnalysis;
using MiscFixes.Modules;
using Mono.Cecil.Cil;
using MonoDetour;
using MonoDetour.Cil;
using MonoDetour.DetourTypes;
using MonoDetour.HookGen;
using MonoDetourHooks.RoR2.DeathRewards;
using MonoDetourHooks.RoR2.Run;
using MonoDetourHooks.SS2.Components.Empyrean;
using MonoDetourHooks.SS2.Components.Ethereal;
using MonoDetourHooks.SS2.Components.Ultra;
using MonoMod.Cil;
using RiskOfOptions;
using RoR2;
using SS2;
using SS2.Components;
using UnityEngine;

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

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

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

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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 MonoDetourHooks.SS2.Components.Ultra
{
	internal static class MakeElite
	{
		public delegate void PrefixSignature(Ultra self, ref CharacterBody body);

		public delegate void PostfixSignature(Ultra self, ref CharacterBody body);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(Ultra).GetMethod("MakeElite", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null) ?? throw new MissingMethodException("SS2.Components.Ultra", "MakeElite");
		}
	}
	internal static class get_EliteCreditCost
	{
	}
	internal static class get_CostMultiplier
	{
	}
	internal static class get_CostRequirement
	{
	}
	internal static class IsAvailable
	{
	}
	internal static class get_IsBoss
	{
	}
	internal static class _ctor
	{
	}
	internal static class _cctor
	{
	}
}
namespace MonoDetourHooks.SS2.Components.Ethereal
{
	internal static class MakeElite
	{
		public delegate void PrefixSignature(Ethereal self, ref CharacterBody body);

		public delegate void PostfixSignature(Ethereal self, ref CharacterBody body);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(Ethereal).GetMethod("MakeElite", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null) ?? throw new MissingMethodException("SS2.Components.Ethereal", "MakeElite");
		}
	}
	internal static class get_EliteCreditCost
	{
	}
	internal static class get_CostMultiplier
	{
	}
	internal static class get_CostRequirement
	{
	}
	internal static class IsAvailable
	{
	}
	internal static class CanAfford
	{
	}
	internal static class _ctor
	{
	}
	internal static class _cctor
	{
	}
}
namespace MonoDetourHooks.SS2.Components.Empyrean
{
	internal static class MakeElite
	{
		public delegate void PrefixSignature(Empyrean self, ref CharacterBody body);

		public delegate void PostfixSignature(Empyrean self, ref CharacterBody body);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(Empyrean).GetMethod("MakeElite", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null) ?? throw new MissingMethodException("SS2.Components.Empyrean", "MakeElite");
		}
	}
	internal static class get_EliteCreditCost
	{
	}
	internal static class get_CostMultiplier
	{
	}
	internal static class get_IsBoss
	{
	}
	internal static class IsAvailable
	{
	}
	internal static class CanAfford
	{
	}
	internal static class SubtractCost
	{
	}
	internal static class SetSpawnState
	{
	}
	internal static class MakeEmpyreanOLDstupidFUCK
	{
	}
	internal static class _ctor
	{
	}
}
namespace MonoDetourHooks.RoR2.Run
{
	internal static class GetDifficultyScaledCost_System_Int32_System_Single
	{
		public delegate void PrefixSignature(Run self, ref int baseCost, ref float difficultyCoefficient);

		public delegate void PostfixSignature(Run self, ref int baseCost, ref float difficultyCoefficient, ref int returnValue);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(Run).GetMethod("GetDifficultyScaledCost", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(int),
				typeof(float)
			}, null) ?? throw new MissingMethodException("RoR2.Run", "GetDifficultyScaledCost");
		}
	}
	internal static class TimeStamp
	{
		internal static class Min
		{
			public delegate void PrefixSignature(ref TimeStamp a, ref TimeStamp b);

			public delegate void PostfixSignature(ref TimeStamp a, ref TimeStamp b, ref TimeStamp returnValue);

			public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
			}

			public static MethodBase Target()
			{
				return typeof(TimeStamp).GetMethod("Min", (BindingFlags)(-1), null, new Type[2]
				{
					typeof(TimeStamp),
					typeof(TimeStamp)
				}, null) ?? throw new MissingMethodException("RoR2.Run+TimeStamp", "Min");
			}
		}

		internal static class Max
		{
			public delegate void PrefixSignature(ref TimeStamp a, ref TimeStamp b);

			public delegate void PostfixSignature(ref TimeStamp a, ref TimeStamp b, ref TimeStamp returnValue);

			public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
			}

			public static MethodBase Target()
			{
				return typeof(TimeStamp).GetMethod("Max", (BindingFlags)(-1), null, new Type[2]
				{
					typeof(TimeStamp),
					typeof(TimeStamp)
				}, null) ?? throw new MissingMethodException("RoR2.Run+TimeStamp", "Max");
			}
		}

		internal static class _ctor
		{
		}

		internal static class get_timeUntil
		{
		}

		internal static class get_timeSince
		{
		}

		internal static class get_timeUntilClamped
		{
		}

		internal static class get_timeSinceClamped
		{
		}

		internal static class get_hasPassed
		{
		}

		internal new static class GetHashCode
		{
		}

		internal static class get_isInfinity
		{
		}

		internal static class get_isPositiveInfinity
		{
		}

		internal static class get_isNegativeInfinity
		{
		}

		internal static class Update
		{
		}

		internal static class get_now
		{
		}

		internal static class _ctor_System_Single
		{
		}

		internal static class Equals_RoR2_Run_TimeStamp
		{
		}

		internal static class Equals_System_Object
		{
		}

		internal static class CompareTo
		{
		}

		internal static class op_Addition
		{
		}

		internal static class op_Subtraction_RoR2_Run_TimeStamp_System_Single
		{
		}

		internal static class op_Subtraction_RoR2_Run_TimeStamp_RoR2_Run_TimeStamp
		{
		}

		internal static class op_LessThan
		{
		}

		internal static class op_GreaterThan
		{
		}

		internal static class op_LessThanOrEqual
		{
		}

		internal static class op_GreaterThanOrEqual
		{
		}

		internal static class op_Equality
		{
		}

		internal static class op_Inequality
		{
		}

		internal static class op_Subtraction_RoR2_Run_TimeStamp_RoR2_Run_FixedTimeStamp
		{
		}

		internal static class Deserialize
		{
		}

		internal static class Serialize
		{
		}

		internal static class ToXml
		{
		}

		internal static class FromXml
		{
		}

		internal static class InverseLerp
		{
		}

		internal static class _cctor
		{
		}
	}
	internal static class FixedTimeStamp
	{
		internal static class Min
		{
			public delegate void PrefixSignature(ref FixedTimeStamp a, ref FixedTimeStamp b);

			public delegate void PostfixSignature(ref FixedTimeStamp a, ref FixedTimeStamp b, ref FixedTimeStamp returnValue);

			public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
			}

			public static MethodBase Target()
			{
				return typeof(FixedTimeStamp).GetMethod("Min", (BindingFlags)(-1), null, new Type[2]
				{
					typeof(FixedTimeStamp),
					typeof(FixedTimeStamp)
				}, null) ?? throw new MissingMethodException("RoR2.Run+FixedTimeStamp", "Min");
			}
		}

		internal static class Max
		{
			public delegate void PrefixSignature(ref FixedTimeStamp a, ref FixedTimeStamp b);

			public delegate void PostfixSignature(ref FixedTimeStamp a, ref FixedTimeStamp b, ref FixedTimeStamp returnValue);

			public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
			}

			public static MethodBase Target()
			{
				return typeof(FixedTimeStamp).GetMethod("Max", (BindingFlags)(-1), null, new Type[2]
				{
					typeof(FixedTimeStamp),
					typeof(FixedTimeStamp)
				}, null) ?? throw new MissingMethodException("RoR2.Run+FixedTimeStamp", "Max");
			}
		}

		internal static class _ctor
		{
		}

		internal static class get_timeUntil
		{
		}

		internal static class get_timeSince
		{
		}

		internal static class get_timeUntilClamped
		{
		}

		internal static class get_timeSinceClamped
		{
		}

		internal static class get_hasPassed
		{
		}

		internal new static class GetHashCode
		{
		}

		internal static class get_isInfinity
		{
		}

		internal static class get_isPositiveInfinity
		{
		}

		internal static class get_isNegativeInfinity
		{
		}

		internal static class Update
		{
		}

		internal static class get_now
		{
		}

		internal static class _ctor_System_Single
		{
		}

		internal static class Equals_RoR2_Run_FixedTimeStamp
		{
		}

		internal static class Equals_System_Object
		{
		}

		internal static class CompareTo
		{
		}

		internal static class op_Addition
		{
		}

		internal static class op_Subtraction_RoR2_Run_FixedTimeStamp_System_Single
		{
		}

		internal static class op_Subtraction_RoR2_Run_FixedTimeStamp_RoR2_Run_FixedTimeStamp
		{
		}

		internal static class op_LessThan
		{
		}

		internal static class op_GreaterThan
		{
		}

		internal static class op_LessThanOrEqual
		{
		}

		internal static class op_GreaterThanOrEqual
		{
		}

		internal static class op_Equality
		{
		}

		internal static class op_Inequality
		{
		}

		internal static class Deserialize
		{
		}

		internal static class Serialize
		{
		}

		internal static class ToXml
		{
		}

		internal static class FromXml
		{
		}

		internal static class InverseLerp
		{
		}

		internal static class _cctor
		{
		}
	}
	internal static class get_instance
	{
	}
	internal static class set_instance
	{
	}
	internal static class OnEnable
	{
	}
	internal static class OnDisable
	{
	}
	internal static class Awake
	{
	}
	internal static class OnStageStartGlobal
	{
	}
	internal static class OnBeginExit
	{
	}
	internal static class get_ruleBook
	{
	}
	internal static class SetRuleBook
	{
	}
	internal static class OnRuleBookUpdated
	{
	}
	internal static class add_onServerRunSetRuleBookGlobal
	{
	}
	internal static class remove_onServerRunSetRuleBookGlobal
	{
	}
	internal static class add_onRunSetRuleBookGlobal
	{
	}
	internal static class remove_onRunSetRuleBookGlobal
	{
	}
	internal static class GetUniqueId
	{
	}
	internal static class AllowRemoteOperation
	{
	}
	internal static class IsRemoteOperationAllowed
	{
	}
	internal static class GetStartTimeUtc
	{
	}
	internal static class SetRunStopwatchPaused
	{
	}
	internal static class GetRunStopwatch
	{
	}
	internal static class SetRunStopwatch
	{
	}
	internal static class get_isRunStopwatchPaused
	{
	}
	internal static class get_loopClearCount
	{
	}
	internal static class get_stageClearCountInCurrentLoop
	{
	}
	internal static class add_onLoopBeginServer
	{
	}
	internal static class remove_onLoopBeginServer
	{
	}
	internal static class OnLoopBeginServer
	{
	}
	internal static class ShouldBeginLoop
	{
	}
	internal static class get_spawnWithPod
	{
	}
	internal static class get_autoGenerateSpawnPoints
	{
	}
	internal static class get_canFamilyEventTrigger
	{
	}
	internal static class get_uiInstances
	{
	}
	internal static class set_uiInstances
	{
	}
	internal static class InstantiateUi
	{
	}
	internal static class UnregisterUi
	{
	}
	internal static class get_seed
	{
	}
	internal static class set_seed
	{
	}
	internal static class GenerateStageRNG
	{
	}
	internal static class GenerateLoopRNG
	{
	}
	internal static class get_selectedDifficulty
	{
	}
	internal static class set_selectedDifficulty
	{
	}
	internal static class get_livingPlayerCount
	{
	}
	internal static class get_participatingPlayerCount
	{
	}
	internal static class get_ambientLevel
	{
	}
	internal static class set_ambientLevel
	{
	}
	internal static class get_ambientLevelFloor
	{
	}
	internal static class set_ambientLevelFloor
	{
	}
	internal static class add_onRunAmbientLevelUp
	{
	}
	internal static class remove_onRunAmbientLevelUp
	{
	}
	internal static class OnAmbientLevelUp
	{
	}
	internal static class get_teamlessDamageCoefficient
	{
	}
	internal static class FixedUpdate
	{
	}
	internal static class RecalculateDifficultyCoefficent
	{
	}
	internal static class RecalculateDifficultyCoefficentInternal
	{
	}
	internal static class InitializeTimeStamps
	{
	}
	internal static class OnFixedUpdate
	{
	}
	internal static class GetLowerPricedChestsTimer
	{
	}
	internal static class Update
	{
	}
	internal static class SetForcePauseRunStopwatch
	{
	}
	internal static class ShouldUpdateRunStopwatch
	{
	}
	internal static class CanUnlockableBeGrantedThisRun_System_String
	{
	}
	internal static class CanUnlockableBeGrantedThisRun_RoR2_UnlockableDef
	{
	}
	internal static class GrantUnlockToAllParticipatingPlayers_System_String
	{
	}
	internal static class GrantUnlockToAllParticipatingPlayers_RoR2_UnlockableDef
	{
	}
	internal static class GrantUnlockToSinglePlayer_System_String_RoR2_CharacterBody
	{
	}
	internal static class GrantUnlockToSinglePlayer_RoR2_UnlockableDef_RoR2_CharacterBody
	{
	}
	internal static class IsUnlockableUnlocked_System_String
	{
	}
	internal static class IsUnlockableUnlocked_RoR2_UnlockableDef
	{
	}
	internal static class DoesEveryoneHaveThisUnlockableUnlocked_System_String
	{
	}
	internal static class DoesEveryoneHaveThisUnlockableUnlocked_RoR2_UnlockableDef
	{
	}
	internal static class ForceUnlockImmediate_System_String
	{
	}
	internal static class ForceUnlockImmediate_RoR2_UnlockableDef
	{
	}
	internal static class PickNextStageSceneFromCurrentSceneDestinations
	{
	}
	internal static class CanPickStage
	{
	}
	internal static class PickNextStageScene
	{
	}
	internal static class GenerateSeedForNewRun
	{
	}
	internal static class RefreshUnlockAvailability
	{
	}
	internal static class BuildUnlockAvailability
	{
	}
	internal static class Start
	{
	}
	internal static class OnDestroy
	{
	}
	internal static class ServerGiveRebirthItems
	{
	}
	internal static class HandlePostRunDestination
	{
	}
	internal static class OnApplicationQuit
	{
	}
	internal static class GetUserMaster
	{
	}
	internal static class OnServerSceneChanged
	{
	}
	internal static class BeginStage
	{
	}
	internal static class EndStage
	{
	}
	internal static class OnUserAdded
	{
	}
	internal static class OnUserRemoved
	{
	}
	internal static class ShouldAllowNewParticipant
	{
	}
	internal static class SetupUserCharacterMaster
	{
	}
	internal static class add_onPlayerFirstCreatedServer
	{
	}
	internal static class remove_onPlayerFirstCreatedServer
	{
	}
	internal static class HandlePlayerFirstEntryAnimation
	{
	}
	internal static class OnServerBossAdded
	{
	}
	internal static class OnServerBossDefeated
	{
	}
	internal static class OnServerCharacterBodySpawned
	{
	}
	internal static class OnServerTeleporterPlaced
	{
	}
	internal static class OnPlayerSpawnPointsPlaced
	{
	}
	internal static class GetTeleportEffectPrefab
	{
	}
	internal static class GetDifficultyScaledCost_System_Int32
	{
	}
	internal static class BuildDropTable
	{
	}
	internal static class IsItemAvailable
	{
	}
	internal static class IsEquipmentAvailable
	{
	}
	internal static class IsDroneAvailable
	{
	}
	internal static class IsItemExpansionLocked
	{
	}
	internal static class IsEquipmentExpansionLocked
	{
	}
	internal static class IsDroneExpansionLocked
	{
	}
	internal static class IsPickupAvailable
	{
	}
	internal static class IsPowerShape
	{
	}
	internal static class DisablePickupDrop
	{
	}
	internal static class DisableItemDrop
	{
	}
	internal static class DisableEquipmentDrop
	{
	}
	internal static class EnablePickupDrop
	{
	}
	internal static class EnableItemDrop
	{
	}
	internal static class EnableEquipmentDrop
	{
	}
	internal static class RefreshLunarCombinedDropList
	{
	}
	internal static class CCRunEnd
	{
	}
	internal static class CCRunPrintUnlockables
	{
	}
	internal static class CCRunPrintSeed
	{
	}
	internal static class CCRunSetStagesCleared
	{
	}
	internal static class CCRunPreventGameOver
	{
	}
	internal static class AdvanceStage
	{
	}
	internal static class get_preventGameOver
	{
	}
	internal static class set_preventGameOver
	{
	}
	internal static class ResetEventFlagsOnNewLoop
	{
	}
	internal static class get_isGameOverServer
	{
	}
	internal static class set_isGameOverServer
	{
	}
	internal static class add_onServerGameOver
	{
	}
	internal static class remove_onServerGameOver
	{
	}
	internal static class BeginGameOver
	{
	}
	internal static class OnClientGameOver
	{
	}
	internal static class add_onClientGameOverGlobal
	{
	}
	internal static class remove_onClientGameOverGlobal
	{
	}
	internal static class OverrideRuleChoices
	{
	}
	internal static class ForceChoice_RoR2_RuleChoiceMask_RoR2_RuleChoiceMask_RoR2_RuleChoiceDef
	{
	}
	internal static class ForceChoice_RoR2_RuleChoiceMask_RoR2_RuleChoiceMask_System_String
	{
	}
	internal static class FindSafeTeleportPosition_RoR2_CharacterBody_UnityEngine_Transform
	{
	}
	internal static class FindSafeTeleportPosition_RoR2_CharacterBody_UnityEngine_Transform_System_Single_System_Single
	{
	}
	internal static class FindSafeTeleportPositionSimplified
	{
	}
	internal static class add_onRunStartGlobal
	{
	}
	internal static class remove_onRunStartGlobal
	{
	}
	internal static class add_onRunDestroyGlobal
	{
	}
	internal static class remove_onRunDestroyGlobal
	{
	}
	internal static class add_onAvailablePickupsModified
	{
	}
	internal static class remove_onAvailablePickupsModified
	{
	}
	internal static class SetEventFlag
	{
	}
	internal static class GetEventFlag
	{
	}
	internal static class ResetEventFlag
	{
	}
	internal static class ShouldAllowNonChampionBossSpawn
	{
	}
	internal static class IsExpansionEnabled
	{
	}
	internal static class OnSeedSet
	{
	}
	internal static class _ctor
	{
	}
	internal static class _cctor
	{
	}
	internal static class _PickNextStageScene_g__IsValidNextStage_157_0
	{
	}
	internal static class UNetVersion
	{
	}
	internal static class get_NetworkinSceneTransition
	{
	}
	internal static class set_NetworkinSceneTransition
	{
	}
	internal static class get_Network_uniqueId
	{
	}
	internal static class set_Network_uniqueId
	{
	}
	internal static class get_NetworkisRemoteOperationAllowed
	{
	}
	internal static class set_NetworkisRemoteOperationAllowed
	{
	}
	internal static class get_NetworkstartTimeUtc
	{
	}
	internal static class set_NetworkstartTimeUtc
	{
	}
	internal static class get_NetworkfixedTime
	{
	}
	internal static class set_NetworkfixedTime
	{
	}
	internal static class get_NetworkrunStopwatch
	{
	}
	internal static class set_NetworkrunStopwatch
	{
	}
	internal static class get_NetworkisRunStopwatchForcePaused
	{
	}
	internal static class set_NetworkisRunStopwatchForcePaused
	{
	}
	internal static class get_NetworkstageClearCount
	{
	}
	internal static class set_NetworkstageClearCount
	{
	}
	internal static class get_Network_loopClearCount
	{
	}
	internal static class set_Network_loopClearCount
	{
	}
	internal static class get_NetworkstageClearCountAtLoopStart
	{
	}
	internal static class set_NetworkstageClearCountAtLoopStart
	{
	}
	internal static class get_NetworkselectedDifficultyInternal
	{
	}
	internal static class set_NetworkselectedDifficultyInternal
	{
	}
	internal static class OnSerialize
	{
	}
	internal static class OnDeserialize
	{
	}
	internal static class PreStartClient
	{
	}
	internal static class RunStopwatch
	{
		internal static class _ctor
		{
		}

		internal static class Equals_RoR2_Run_RunStopwatch
		{
		}

		internal static class Equals_System_Object
		{
		}

		internal new static class GetHashCode
		{
		}
	}
	internal static class LoopBeginArgs
	{
		internal static class _ctor
		{
		}
	}
}
namespace MonoDetourHooks.RoR2.DeathRewards
{
	internal static class OnKilledServer
	{
		public delegate void PrefixSignature(DeathRewards self, ref DamageReport damageReport);

		public delegate void PostfixSignature(DeathRewards self, ref DamageReport damageReport);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(DeathRewards).GetMethod("OnKilledServer", (BindingFlags)(-1), null, new Type[1] { typeof(DamageReport) }, null) ?? throw new MissingMethodException("RoR2.DeathRewards", "OnKilledServer");
		}
	}
	internal static class get_goldReward
	{
	}
	internal static class set_goldReward
	{
	}
	internal static class get_expReward
	{
	}
	internal static class set_expReward
	{
	}
	internal static class get_spawnValue
	{
	}
	internal static class set_spawnValue
	{
	}
	internal static class LoadAssets
	{
	}
	internal static class Awake
	{
	}
	internal static class CCMigrateDeathRewardUnlockables
	{
	}
	internal static class _ctor
	{
	}
	internal static class __c
	{
		internal static class _cctor
		{
		}

		internal static class _ctor
		{
		}

		internal static class _LoadAssets_b__19_0
		{
		}

		internal static class _LoadAssets_b__19_1
		{
		}
	}
}
namespace MonoDetour.HookGen
{
	internal static class DefaultMonoDetourManager
	{
		internal static MonoDetourManager Instance { get; } = New();


		internal static MonoDetourManager New()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			return new MonoDetourManager(typeof(DefaultMonoDetourManager).Assembly.GetName().Name);
		}
	}
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
	internal class MonoDetourTargetsAttribute : Attribute, IMonoDetourTargets
	{
		public Type? TargetType { get; }

		public bool IncludeNestedTypes { get; set; }

		public string[]? Members { get; set; }

		public string[]? MemberNamePrefixes { get; set; }

		public string[]? MemberNameSuffixes { get; set; }

		public bool GenerateControlFlowVariants { get; set; }

		public MonoDetourTargetsAttribute(Type? targetType = null)
		{
			TargetType = targetType;
			IncludeNestedTypes = true;
			base..ctor();
		}
	}
}
namespace BepInEx
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class BepInAutoPluginAttribute : Attribute
	{
		public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace BepInEx.Preloader.Core.Patching
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class PatcherAutoPluginAttribute : Attribute
	{
		public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace Microsoft.CodeAnalysis
{
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace AlternativeGoldScaling
{
	public static class ConfigOptions
	{
		internal static ConfigEntry<bool> EnableLoggingMoneyChange;

		private const string _wrbGoldRewardSectionName = "WRB - Enemy gold reward scaling";

		public static ConfigEntry<bool> EnableWRBGoldScaling;

		public static ConfigEntry<float> BaseGoldScalingMultiplier;

		public static ConfigEntry<float> LoopMultiplier;

		public static ConfigEntry<float> StageDivisor;

		public static ConfigEntry<float> StageClearCountMultiplier;

		public static ConfigEntry<float> StageMultiplier;

		public static ConfigEntry<float> SquareRootMultiplier;

		public static ConfigEntry<float> StageAndLoopMultiplier;

		private const string _wrbMultiplayerCostSectionName = "WRB - Multiplayer cost scaling";

		public static ConfigEntry<bool> EnableWRBMultiplayerCostScaling;

		public static ConfigEntry<float> BaseMultiplayerCostMultiplier;

		public static ConfigEntry<float> PerPlayerCostMultiplier;

		private const string _ss2EntireSectionName = "Starstorm 2 - Late-game elites support";

		public static ConfigEntry<bool> EnableSS2Support;

		private const string _ss2EmpyreanSectionName = "Starstorm 2 - Empyrean Gold Reward";

		public static ConfigEntry<bool> SS2Empyrean_EnableChange;

		public static ConfigEntry<float> SS2Empyrean_NerfBaseMultiplier;

		public static ConfigEntry<int> SS2Empyrean_StageOfNerfStart;

		public static ConfigEntry<float> SS2Empyrean_NerfPerStageMultiplier;

		private const string _ss2EtherealSectionName = "Starstorm 2 - Ethereal Gold Reward";

		public static ConfigEntry<bool> SS2Ethereal_EnableChange;

		public static ConfigEntry<float> SS2Ethereal_NerfBaseMultiplier;

		public static ConfigEntry<float> SS2Ethereal_EtherealsUsedMultiplier;

		public static ConfigEntry<int> SS2Ethereal_StageOfNerfStart;

		public static ConfigEntry<float> SS2Ethereal_NerfPerStageMultiplier;

		private const string _ss2UltraSectionName = "Starstorm 2 - Ultra Gold Reward";

		public static ConfigEntry<bool> SS2Ultra_EnableChange;

		public static ConfigEntry<float> SS2Ultra_NerfBaseMultiplier;

		public static ConfigEntry<float> SS2Ultra_EtherealsUsedMultiplier;

		public static ConfigEntry<int> SS2Ultra_StageOfNerfStart;

		public static ConfigEntry<float> SS2Ultra_NerfPerStageMultiplier;

		internal static void BindConfigOptions(ConfigFile config)
		{
			if (ModSupport.RiskOfOptionsMod.ModIsRunning)
			{
				ModSupport.RiskOfOptionsMod.SetRiskOfOptionsDescription();
			}
			EnableLoggingMoneyChange = Extensions.BindOption<bool>(config, "Other", "Log before and after of money gained", "This is to help tune your formula values.", false, (ConfigFlags)0);
			BindWRBGoldRewardOptions(config);
			BindWRBMultiplayerGoldScalingOptions(config);
			BindSS2Options(config);
			Extensions.WipeConfig(config);
		}

		private static void BindWRBGoldRewardOptions(ConfigFile config)
		{
			EnableWRBGoldScaling = Extensions.BindOption<bool>(config, "WRB - Enemy gold reward scaling", "Enable", "Enable using the formula from Well-Rounded Balance (WRB) for scaling gold from enemy kills?\n\nFormula for gold reward: Minimum value between Vanilla Gold Reward * Base Multiplier and Base Multiplier * ((Vanilla Gold Reward / (Stage Divisor + (Stage Clear Count * Stage Clear Count Multiplier))) + Square Root(Square Root Multiplier * (Stage And Loop Multiplier + (Stage Clear Count * Stage Multiplier + Loop Clear Count * Loop Multiplier))))", true, (ConfigFlags)1);
			BaseGoldScalingMultiplier = Extensions.BindOptionSteppedSlider(config, "WRB - Enemy gold reward scaling", "Base Multiplier", "WRB's default value is 0.75", 1.13f, 0.01f, 0.01f, 2.5f, (ConfigFlags)0);
			LoopMultiplier = Extensions.BindOptionSteppedSlider(config, "WRB - Enemy gold reward scaling", "Loop Multiplier", "WRB's default value is unchanged", -660f, 5f, -1000f, 500f, (ConfigFlags)0);
			StageDivisor = Extensions.BindOptionSlider<float>(config, "WRB - Enemy gold reward scaling", "Stage Divisor", "WRB's default value is 3", 2f, (ConfigFlags)0);
			StageClearCountMultiplier = Extensions.BindOptionSlider<float>(config, "WRB - Enemy gold reward scaling", "Stage Clear Count Multiplier", "WRB's default value is 0.25", 0.5f, (ConfigFlags)0);
			StageMultiplier = Extensions.BindOptionSteppedSlider(config, "WRB - Enemy gold reward scaling", "Stage Multiplier", "WRB's default value is unchanged", 150f, 5f, 0f, 300f, (ConfigFlags)0);
			SquareRootMultiplier = Extensions.BindOptionSlider<float>(config, "WRB - Enemy gold reward scaling", "Square Root Multiplier", "WRB's default value is unchanged", 6f, (ConfigFlags)0);
			StageAndLoopMultiplier = Extensions.BindOptionSteppedSlider(config, "WRB - Enemy gold reward scaling", "Stage and Loop Multiplier", "WRB's default value is unchanged", 275f, 5f, 0f, 500f, (ConfigFlags)0);
		}

		private static void BindWRBMultiplayerGoldScalingOptions(ConfigFile config)
		{
			EnableWRBMultiplayerCostScaling = Extensions.BindOption<bool>(config, "WRB - Multiplayer cost scaling", "Enable", "Enable using the formula from Well-Rounded Balance (WRB) for scaling the cost of buyable things in multiplayer?\n\nFormula for cost scaling: Base Multiplier + (Per-Player Multiplier / Square Root(Player Count))", true, (ConfigFlags)0);
			BaseMultiplayerCostMultiplier = Extensions.BindOptionSlider<float>(config, "WRB - Multiplayer cost scaling", "Base Multiplier", "WRB's default value is unchanged", 1f, (ConfigFlags)0);
			PerPlayerCostMultiplier = Extensions.BindOptionSlider<float>(config, "WRB - Multiplayer cost scaling", "Per-Player cost multiplier", "WRB's default value is unchanged", 0.11f, (ConfigFlags)0);
		}

		private static void BindSS2Options(ConfigFile config)
		{
			EnableSS2Support = Extensions.BindOption<bool>(config, "Starstorm 2 - Late-game elites support", "Enable", "Enable special support for nerfing the gold reward from some late-game elites from Starstorm 2? The gold reward nerf for these elites are ON TOP OF the existing gold nerf from WRB if it's enabled.\n\nFormula for gold reward: Base Gold Reward * Highest value between 1 and (Base Multiplier + IF APPLICABLE (Ethereal Multiplier * Ethereals Used Count)) / (1 + (Highest value between 0 and ((Stage Clear Count + 1) - Starting Stage of Nerf) * Per-Stage Multiplier))", true, (ConfigFlags)1);
			SS2Empyrean_EnableChange = Extensions.BindOption<bool>(config, "Starstorm 2 - Empyrean Gold Reward", "Enable Empyrean Gold Reward Change", "", true, (ConfigFlags)1);
			SS2Empyrean_NerfBaseMultiplier = Extensions.BindOptionSlider<float>(config, "Starstorm 2 - Empyrean Gold Reward", "Empyrean - Base Multiplier", "", 10f, (ConfigFlags)0);
			SS2Empyrean_StageOfNerfStart = Extensions.BindOptionSlider<int>(config, "Starstorm 2 - Empyrean Gold Reward", "Empyrean - Starting stage of nerf", "", 9, (ConfigFlags)0);
			SS2Empyrean_NerfPerStageMultiplier = Extensions.BindOptionSlider<float>(config, "Starstorm 2 - Empyrean Gold Reward", "Empyrean - Per-Stage multiplier", "", 0.5f, (ConfigFlags)0);
			SS2Ethereal_EnableChange = Extensions.BindOption<bool>(config, "Starstorm 2 - Ethereal Gold Reward", "Enable Ethereal Gold Reward Change", "", false, (ConfigFlags)1);
			SS2Ethereal_NerfBaseMultiplier = Extensions.BindOptionSlider<float>(config, "Starstorm 2 - Ethereal Gold Reward", "Ethereal - Base Multiplier", "", 2f, (ConfigFlags)0);
			SS2Ethereal_EtherealsUsedMultiplier = Extensions.BindOptionSlider<float>(config, "Starstorm 2 - Ethereal Gold Reward", "Ethereal - Ethereals-used Multiplier", "", 2f, (ConfigFlags)0);
			SS2Ethereal_StageOfNerfStart = Extensions.BindOptionSlider<int>(config, "Starstorm 2 - Ethereal Gold Reward", "Ethereal - Starting stage of nerf", "", 8, (ConfigFlags)0);
			SS2Ethereal_NerfPerStageMultiplier = Extensions.BindOptionSlider<float>(config, "Starstorm 2 - Ethereal Gold Reward", "Ethereal - Per-Stage multiplier", "", 0.35f, (ConfigFlags)0);
			SS2Ultra_EnableChange = Extensions.BindOption<bool>(config, "Starstorm 2 - Ultra Gold Reward", "Enable Ultra Gold Reward Change", "", false, (ConfigFlags)1);
			SS2Ultra_NerfBaseMultiplier = Extensions.BindOptionSlider<float>(config, "Starstorm 2 - Ultra Gold Reward", "Ultra - Base Multiplier", "", 15f, (ConfigFlags)0);
			SS2Ultra_EtherealsUsedMultiplier = Extensions.BindOptionSlider<float>(config, "Starstorm 2 - Ultra Gold Reward", "Ultra - Ethereals-used Multiplier", "", 20f, (ConfigFlags)0);
			SS2Ultra_StageOfNerfStart = Extensions.BindOptionSlider<int>(config, "Starstorm 2 - Ultra Gold Reward", "Ultra - Starting stage of nerf", "", 12, (ConfigFlags)0);
			SS2Ultra_NerfPerStageMultiplier = Extensions.BindOptionSlider<float>(config, "Starstorm 2 - Ultra Gold Reward", "Ultra - Per-Stage multiplier", "", 0.8f, (ConfigFlags)0);
		}
	}
	internal static class Log
	{
		private static ManualLogSource _logSource;

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

		internal static void Debug(object 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);
		}

		internal static void BeforeAndAfter(object data)
		{
			if (ConfigOptions.EnableLoggingMoneyChange != null && ConfigOptions.EnableLoggingMoneyChange.Value)
			{
				_logSource.LogInfo(data);
			}
		}
	}
	internal static class MainChanges
	{
		[MonoDetourTargets(typeof(DeathRewards))]
		[MonoDetourTargets(typeof(Run))]
		internal static class Hooks
		{
			[CompilerGenerated]
			private static class <>O
			{
				public static OnKilledServer.PrefixSignature <0>__SetWRBGoldReward;

				public static Manipulator <1>__SetNewMultiplayerCostScaling;
			}

			[MonoDetourHookInitialize]
			internal static void Setup()
			{
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Expected O, but got Unknown
				if (ConfigOptions.EnableWRBGoldScaling.Value)
				{
					OnKilledServer.Prefix(SetWRBGoldReward);
					object obj = <>O.<1>__SetNewMultiplayerCostScaling;
					if (obj == null)
					{
						Manipulator val = SetNewMultiplayerCostScaling;
						<>O.<1>__SetNewMultiplayerCostScaling = val;
						obj = (object)val;
					}
					GetDifficultyScaledCost_System_Int32_System_Single.ILHook((Manipulator)obj);
				}
			}

			private static void SetWRBGoldReward(DeathRewards self, ref DamageReport damageReport)
			{
				Log.BeforeAndAfter($"Before WRB Gold Reward: {self.goldReward}");
				self.goldReward = GetWRBGoldReward(self.goldReward);
				Log.BeforeAndAfter($"After WRB Gold Reward: {self.goldReward}");
			}

			internal static uint GetWRBGoldReward(uint goldReward)
			{
				return Convert.ToUInt32(Mathf.Min((float)goldReward * ConfigOptions.BaseGoldScalingMultiplier.Value, ConfigOptions.BaseGoldScalingMultiplier.Value * ((float)goldReward / (ConfigOptions.StageDivisor.Value + (float)Run.instance.stageClearCount * ConfigOptions.StageClearCountMultiplier.Value) + Mathf.Sqrt(ConfigOptions.SquareRootMultiplier.Value * (ConfigOptions.StageAndLoopMultiplier.Value + ((float)Run.instance.stageClearCount * ConfigOptions.StageMultiplier.Value + (float)Run.instance.loopClearCount * ConfigOptions.LoopMultiplier.Value))))));
			}

			private static void SetNewMultiplayerCostScaling(ILManipulationInfo info)
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Expected O, but got Unknown
				ILWeaver w = new ILWeaver(info);
				w.MatchRelaxed(new Predicate<Instruction>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.25f) && w.SetCurrentTo(x)
				}).ThrowIfFailure();
				w.InsertAfterCurrent((IEnumerable<InstructionOrEnumerable>)new <>z__ReadOnlySingleElementList<InstructionOrEnumerable>(InstructionOrEnumerable.op_Implicit(w.CreateDelegateCall<Func<float, float>>((Func<float, float>)delegate(float originalScaling)
				{
					int participatingPlayerCount = Run.instance.participatingPlayerCount;
					float num = ConfigOptions.BaseMultiplayerCostMultiplier.Value + ConfigOptions.PerPlayerCostMultiplier.Value / Mathf.Sqrt((float)participatingPlayerCount);
					return (participatingPlayerCount > 1) ? num : originalScaling;
				}))));
			}
		}

		internal static int CurrentStageNumber => Run.instance.stageClearCount + 1;
	}
	internal static class ModSupport
	{
		internal static class RiskOfOptionsMod
		{
			private static bool? _modexists;

			public static bool ModIsRunning
			{
				get
				{
					bool valueOrDefault = _modexists.GetValueOrDefault();
					if (!_modexists.HasValue)
					{
						valueOrDefault = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
						_modexists = valueOrDefault;
					}
					return _modexists.Value;
				}
			}

			[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
			internal static void SetRiskOfOptionsDescription()
			{
				ModSettingsManager.SetModDescription("A standalone version of the Well-Rounded Balance mod's gold scaling, with some more values now configurable + some mod support.");
			}
		}

		internal static class Starstorm2
		{
			[MonoDetourTargets(typeof(Empyrean))]
			private static class EmpyreanGoldReward
			{
				[CompilerGenerated]
				private static class <>O
				{
					public static Manipulator <0>__ReplaceEmpyreanGoldReward;

					public static Func<uint, DeathRewards, uint> <1>__SetNewEmpyreanGoldReward;
				}

				[MonoDetourHookInitialize]
				internal static void Setup()
				{
					//IL_001d: 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_0028: Expected O, but got Unknown
					if (ConfigOptions.SS2Empyrean_EnableChange.Value)
					{
						object obj = <>O.<0>__ReplaceEmpyreanGoldReward;
						if (obj == null)
						{
							Manipulator val = ReplaceEmpyreanGoldReward;
							<>O.<0>__ReplaceEmpyreanGoldReward = val;
							obj = (object)val;
						}
						MonoDetourHooks.SS2.Components.Empyrean.MakeElite.ILHook((Manipulator)obj);
					}
				}

				private static void ReplaceEmpyreanGoldReward(ILManipulationInfo info)
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					//IL_0012: Expected O, but got Unknown
					//IL_004c: Unknown result type (might be due to invalid IL or missing references)
					ILWeaver w = new ILWeaver(info);
					w.MatchRelaxed(new Predicate<Instruction>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchCallvirt<DeathRewards>(x, "set_goldReward") && w.SetCurrentTo(x)
					}).ThrowIfFailure();
					w.InsertBeforeCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[2]
					{
						w.Create(OpCodes.Ldloc_3),
						w.CreateCall((Delegate)new Func<uint, DeathRewards, uint>(SetNewEmpyreanGoldReward))
					}));
				}

				private static uint SetNewEmpyreanGoldReward(uint oldGoldReward, DeathRewards deathRewards)
				{
					float value = ConfigOptions.SS2Empyrean_NerfBaseMultiplier.Value;
					int value2 = ConfigOptions.SS2Empyrean_StageOfNerfStart.Value;
					float value3 = ConfigOptions.SS2Empyrean_NerfPerStageMultiplier.Value;
					Log.BeforeAndAfter($"Before New Empyrean Gold Reward: {deathRewards.goldReward}");
					deathRewards.goldReward *= Convert.ToUInt32(MathF.Max(1f, value / (1f + MathF.Max(0f, (float)(MainChanges.CurrentStageNumber - value2) * value3))));
					Log.BeforeAndAfter($"After New Empyrean Gold Reward: {deathRewards.goldReward}");
					return deathRewards.goldReward;
				}
			}

			[MonoDetourTargets(typeof(Ethereal))]
			private static class EtherealGoldReward
			{
				[CompilerGenerated]
				private static class <>O
				{
					public static Manipulator <0>__ReplaceEtherealGoldReward;

					public static Func<uint, DeathRewards, uint> <1>__SetNewEtherealGoldReward;
				}

				[MonoDetourHookInitialize]
				internal static void Setup()
				{
					//IL_001d: 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_0028: Expected O, but got Unknown
					if (ConfigOptions.SS2Ethereal_EnableChange.Value)
					{
						object obj = <>O.<0>__ReplaceEtherealGoldReward;
						if (obj == null)
						{
							Manipulator val = ReplaceEtherealGoldReward;
							<>O.<0>__ReplaceEtherealGoldReward = val;
							obj = (object)val;
						}
						MonoDetourHooks.SS2.Components.Ethereal.MakeElite.ILHook((Manipulator)obj);
					}
				}

				private static void ReplaceEtherealGoldReward(ILManipulationInfo info)
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					//IL_0012: Expected O, but got Unknown
					//IL_004c: Unknown result type (might be due to invalid IL or missing references)
					ILWeaver w = new ILWeaver(info);
					w.MatchRelaxed(new Predicate<Instruction>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchCallvirt<DeathRewards>(x, "set_goldReward") && w.SetCurrentTo(x)
					}).ThrowIfFailure();
					w.InsertBeforeCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[2]
					{
						w.Create(OpCodes.Ldloc_3),
						w.CreateCall((Delegate)new Func<uint, DeathRewards, uint>(SetNewEtherealGoldReward))
					}));
				}

				private static uint SetNewEtherealGoldReward(uint oldGoldReward, DeathRewards deathRewards)
				{
					EtherealBehavior instance = EtherealBehavior.instance;
					float value = ConfigOptions.SS2Ethereal_NerfBaseMultiplier.Value;
					float value2 = ConfigOptions.SS2Ethereal_EtherealsUsedMultiplier.Value;
					int value3 = ConfigOptions.SS2Ethereal_StageOfNerfStart.Value;
					float value4 = ConfigOptions.SS2Ethereal_NerfPerStageMultiplier.Value;
					Log.BeforeAndAfter($"Before New Ethereal Gold Reward: {deathRewards.goldReward}");
					deathRewards.goldReward *= Convert.ToUInt32(MathF.Max(1f, (value + value2 * (float)instance.etherealsCompleted) / (1f + MathF.Max(0f, (float)(MainChanges.CurrentStageNumber - value3) * value4))));
					Log.BeforeAndAfter($"After New Ethereal Gold Reward: {deathRewards.goldReward}");
					return deathRewards.goldReward;
				}
			}

			[MonoDetourTargets(typeof(Ultra))]
			private static class UltraGoldReward
			{
				[CompilerGenerated]
				private static class <>O
				{
					public static Manipulator <0>__ReplaceUltraGoldReward;

					public static Func<uint, DeathRewards, uint> <1>__GetNewUltraGoldReward;
				}

				[MonoDetourHookInitialize]
				internal static void Setup()
				{
					//IL_001d: 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_0028: Expected O, but got Unknown
					if (ConfigOptions.SS2Ultra_EnableChange.Value)
					{
						object obj = <>O.<0>__ReplaceUltraGoldReward;
						if (obj == null)
						{
							Manipulator val = ReplaceUltraGoldReward;
							<>O.<0>__ReplaceUltraGoldReward = val;
							obj = (object)val;
						}
						MonoDetourHooks.SS2.Components.Ultra.MakeElite.ILHook((Manipulator)obj);
					}
				}

				private static void ReplaceUltraGoldReward(ILManipulationInfo info)
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					//IL_0012: Expected O, but got Unknown
					//IL_004c: Unknown result type (might be due to invalid IL or missing references)
					ILWeaver w = new ILWeaver(info);
					w.MatchRelaxed(new Predicate<Instruction>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchCallvirt<DeathRewards>(x, "set_goldReward") && w.SetCurrentTo(x)
					}).ThrowIfFailure();
					w.InsertBeforeCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[2]
					{
						w.Create(OpCodes.Ldloc_3),
						w.CreateCall((Delegate)new Func<uint, DeathRewards, uint>(GetNewUltraGoldReward))
					}));
				}

				private static uint GetNewUltraGoldReward(uint oldGoldReward, DeathRewards deathRewards)
				{
					EtherealBehavior instance = EtherealBehavior.instance;
					float value = ConfigOptions.SS2Ultra_NerfBaseMultiplier.Value;
					float value2 = ConfigOptions.SS2Ultra_EtherealsUsedMultiplier.Value;
					int value3 = ConfigOptions.SS2Ultra_StageOfNerfStart.Value;
					float value4 = ConfigOptions.SS2Ultra_NerfPerStageMultiplier.Value;
					Log.BeforeAndAfter($"Before New Ultra Gold Reward: {deathRewards.goldReward}");
					deathRewards.goldReward *= Convert.ToUInt32(MathF.Max(1f, (value + value2 * (float)instance.etherealsCompleted) / (1f + MathF.Max(0f, (float)(MainChanges.CurrentStageNumber - value3) * value4))));
					Log.BeforeAndAfter($"After New Ultra Gold Reward: {deathRewards.goldReward}");
					return deathRewards.goldReward;
				}
			}
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("LordVGames.AlternativeGoldScaling", "AlternativeGoldScaling", "1.0.5")]
	public class Plugin : BaseUnityPlugin
	{
		public const string Id = "LordVGames.AlternativeGoldScaling";

		public static string Name => "AlternativeGoldScaling";

		public static string Version => "1.0.5";

		public void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			ConfigOptions.BindConfigOptions(((BaseUnityPlugin)this).Config);
			MonoDetourManager.InvokeHookInitializers(typeof(Plugin).Assembly);
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}
[CompilerGenerated]
internal sealed class <>z__ReadOnlyArray<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T>
{
	int ICollection.Count => _items.Length;

	bool ICollection.IsSynchronized => false;

	object ICollection.SyncRoot => this;

	object IList.this[int index]
	{
		get
		{
			return _items[index];
		}
		set
		{
			throw new NotSupportedException();
		}
	}

	bool IList.IsFixedSize => true;

	bool IList.IsReadOnly => true;

	int IReadOnlyCollection<T>.Count => _items.Length;

	T IReadOnlyList<T>.this[int index] => _items[index];

	int ICollection<T>.Count => _items.Length;

	bool ICollection<T>.IsReadOnly => true;

	T IList<T>.this[int index]
	{
		get
		{
			return _items[index];
		}
		set
		{
			throw new NotSupportedException();
		}
	}

	public <>z__ReadOnlyArray(T[] items)
	{
		_items = items;
	}

	IEnumerator IEnumerable.GetEnumerator()
	{
		return ((IEnumerable)_items).GetEnumerator();
	}

	void ICollection.CopyTo(Array array, int index)
	{
		((ICollection)_items).CopyTo(array, index);
	}

	int IList.Add(object value)
	{
		throw new NotSupportedException();
	}

	void IList.Clear()
	{
		throw new NotSupportedException();
	}

	bool IList.Contains(object value)
	{
		return ((IList)_items).Contains(value);
	}

	int IList.IndexOf(object value)
	{
		return ((IList)_items).IndexOf(value);
	}

	void IList.Insert(int index, object value)
	{
		throw new NotSupportedException();
	}

	void IList.Remove(object value)
	{
		throw new NotSupportedException();
	}

	void IList.RemoveAt(int index)
	{
		throw new NotSupportedException();
	}

	IEnumerator<T> IEnumerable<T>.GetEnumerator()
	{
		return ((IEnumerable<T>)_items).GetEnumerator();
	}

	void ICollection<T>.Add(T item)
	{
		throw new NotSupportedException();
	}

	void ICollection<T>.Clear()
	{
		throw new NotSupportedException();
	}

	bool ICollection<T>.Contains(T item)
	{
		return ((ICollection<T>)_items).Contains(item);
	}

	void ICollection<T>.CopyTo(T[] array, int arrayIndex)
	{
		((ICollection<T>)_items).CopyTo(array, arrayIndex);
	}

	bool ICollection<T>.Remove(T item)
	{
		throw new NotSupportedException();
	}

	int IList<T>.IndexOf(T item)
	{
		return ((IList<T>)_items).IndexOf(item);
	}

	void IList<T>.Insert(int index, T item)
	{
		throw new NotSupportedException();
	}

	void IList<T>.RemoveAt(int index)
	{
		throw new NotSupportedException();
	}
}
[CompilerGenerated]
internal sealed class <>z__ReadOnlySingleElementList<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T>
{
	private sealed class Enumerator : IDisposable, IEnumerator, IEnumerator<T>
	{
		object IEnumerator.Current => _item;

		T IEnumerator<T>.Current => _item;

		public Enumerator(T item)
		{
			_item = item;
		}

		bool IEnumerator.MoveNext()
		{
			if (!_moveNextCalled)
			{
				return _moveNextCalled = true;
			}
			return false;
		}

		void IEnumerator.Reset()
		{
			_moveNextCalled = false;
		}

		void IDisposable.Dispose()
		{
		}
	}

	int ICollection.Count => 1;

	bool ICollection.IsSynchronized => false;

	object ICollection.SyncRoot => this;

	object IList.this[int index]
	{
		get
		{
			if (index != 0)
			{
				throw new IndexOutOfRangeException();
			}
			return _item;
		}
		set
		{
			throw new NotSupportedException();
		}
	}

	bool IList.IsFixedSize => true;

	bool IList.IsReadOnly => true;

	int IReadOnlyCollection<T>.Count => 1;

	T IReadOnlyList<T>.this[int index]
	{
		get
		{
			if (index != 0)
			{
				throw new IndexOutOfRangeException();
			}
			return _item;
		}
	}

	int ICollection<T>.Count => 1;

	bool ICollection<T>.IsReadOnly => true;

	T IList<T>.this[int index]
	{
		get
		{
			if (index != 0)
			{
				throw new IndexOutOfRangeException();
			}
			return _item;
		}
		set
		{
			throw new NotSupportedException();
		}
	}

	public <>z__ReadOnlySingleElementList(T item)
	{
		_item = item;
	}

	IEnumerator IEnumerable.GetEnumerator()
	{
		return new Enumerator(_item);
	}

	void ICollection.CopyTo(Array array, int index)
	{
		array.SetValue(_item, index);
	}

	int IList.Add(object value)
	{
		throw new NotSupportedException();
	}

	void IList.Clear()
	{
		throw new NotSupportedException();
	}

	bool IList.Contains(object value)
	{
		return EqualityComparer<T>.Default.Equals(_item, (T)value);
	}

	int IList.IndexOf(object value)
	{
		if (!EqualityComparer<T>.Default.Equals(_item, (T)value))
		{
			return -1;
		}
		return 0;
	}

	void IList.Insert(int index, object value)
	{
		throw new NotSupportedException();
	}

	void IList.Remove(object value)
	{
		throw new NotSupportedException();
	}

	void IList.RemoveAt(int index)
	{
		throw new NotSupportedException();
	}

	IEnumerator<T> IEnumerable<T>.GetEnumerator()
	{
		return new Enumerator(_item);
	}

	void ICollection<T>.Add(T item)
	{
		throw new NotSupportedException();
	}

	void ICollection<T>.Clear()
	{
		throw new NotSupportedException();
	}

	bool ICollection<T>.Contains(T item)
	{
		return EqualityComparer<T>.Default.Equals(_item, item);
	}

	void ICollection<T>.CopyTo(T[] array, int arrayIndex)
	{
		array[arrayIndex] = _item;
	}

	bool ICollection<T>.Remove(T item)
	{
		throw new NotSupportedException();
	}

	int IList<T>.IndexOf(T item)
	{
		if (!EqualityComparer<T>.Default.Equals(_item, item))
		{
			return -1;
		}
		return 0;
	}

	void IList<T>.Insert(int index, T item)
	{
		throw new NotSupportedException();
	}

	void IList<T>.RemoveAt(int index)
	{
		throw new NotSupportedException();
	}
}