Decompiled source of StageBalancer v1.0.5

StageBalancer.dll

Decompiled 2 weeks ago
using System;
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 Microsoft.CodeAnalysis;
using On.RoR2;
using RoR2;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("StageBalancer")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("StageBalancer")]
[assembly: AssemblyTitle("StageBalancer")]
[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 StageBalancer
{
	[BepInPlugin("com.Nuxlar.StageBalancer", "StageBalancer", "1.0.5")]
	public class StageBalancer : BaseUnityPlugin
	{
		private SkillDef AWUUlt = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/RoboBallBoss/SuperFireDelayKnockup.asset").WaitForCompletion();

		private SpawnCard categoryChest2Healing = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/CategoryChest2/iscCategoryChest2Healing.asset").WaitForCompletion();

		private SpawnCard equipTrishop = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/TripleShopEquipment/iscTripleShopEquipment.asset").WaitForCompletion();

		private SpawnCard categoryChest2Damage = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/CategoryChest2/iscCategoryChest2Damage.asset").WaitForCompletion();

		private SpawnCard combatShrine = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineCombat/iscShrineCombat.asset").WaitForCompletion();

		private SpawnCard chanceShrine = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineChance/iscShrineChance.asset").WaitForCompletion();

		private SpawnCard larva = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/AcidLarva/cscAcidLarva.asset").WaitForCompletion();

		private SpawnCard alphaConstruct = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/MajorAndMinorConstruct/cscMinorConstruct.asset").WaitForCompletion();

		private SpawnCard lemurian = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/Lemurian/cscLemurian.asset").WaitForCompletion();

		private SpawnCard gup = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/Gup/cscGupBody.asset").WaitForCompletion();

		private SpawnCard apothecary = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/ClayGrenadier/cscClayGrenadier.asset").WaitForCompletion();

		private SpawnCard vermin = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/Vermin/cscVermin.asset").WaitForCompletion();

		private SpawnCard imp = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/Imp/cscImp.asset").WaitForCompletion();

		private SpawnCard grovetender = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/Gravekeeper/cscGravekeeper.asset").WaitForCompletion();

		private SpawnCard xiConstruct = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/MajorAndMinorConstruct/cscMegaConstruct.asset").WaitForCompletion();

		private SpawnCard magmaWorm = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/MagmaWorm/cscMagmaWorm.asset").WaitForCompletion();

		private SpawnCard solus = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/RoboBallBoss/cscRoboBallBoss.asset").WaitForCompletion();

		private DirectorCardCategorySelection poolsMonsters = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC1/sulfurpools/dccsSulfurPoolsMonstersDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection rpdMonsters = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/frozenwall/dccsFrozenWallMonstersDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection aqueductMonsters = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/goolake/dccsGooLakeMonstersDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection acresMonsters = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/wispgraveyard/dccsWispGraveyardMonstersDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection sirensMonsters = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/shipgraveyard/dccsShipgraveyardMonstersDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection abyssalMonsters = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/dampcave/dccsDampCaveMonstersDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection groveMonsters = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/rootjungle/dccsRootJungleMonstersDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection forestInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC1/snowyforest/dccsSnowyForestInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection plainsDLCInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/golemplains/dccsGolemplainsInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection aphelianInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC1/ancientloft/dccsAncientLoftInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection acqueductDLCInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/goolake/dccsGooLakeInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection wetlandDLCInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/foggyswamp/dccsFoggySwampInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection acresDLCInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/wispgraveyard/dccsWispGraveyardInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection poolsInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC1/sulfurpools/dccsSulfurPoolsInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection rpdDLCInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/frozenwall/dccsFrozenWallInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection sirensDLCInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/shipgraveyard/dccsShipgraveyardInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection groveDLCInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/rootjungle/dccsRootJungleInteractablesDLC1.asset").WaitForCompletion();

		private DirectorCardCategorySelection abyssalDLCInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/dampcave/dccsDampCaveInteractablesDLC1.asset").WaitForCompletion();

		public void Awake()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			AWUUlt.beginSkillCooldownOnSkillEnd = true;
			Stage.Start += new hook_Start(Stage_Start);
			ClassicStageInfo.Start += new hook_Start(ClassicStageInfo_Start);
			TimedChestController.OnEnable += new hook_OnEnable(TimedChestController_OnEnable);
			ChangeCatChest(forestInteractables, categoryChest2Healing, "iscCategoryChest2Damage");
			ChangeCatChest(plainsDLCInteractables, categoryChest2Damage, "iscCategoryChest2Healing");
			ChangeCatChest(acqueductDLCInteractables, categoryChest2Healing, "iscCategoryChest2Damage");
			ChangeCatChest(wetlandDLCInteractables, categoryChest2Damage, "iscCategoryChest2Healing");
			RemoveAphelianChest();
			ChangeAqueductMonsters();
			ChangeEnemy(poolsMonsters, vermin, "cscMinorConstruct");
			ChangeEnemy(acresMonsters, alphaConstruct, "cscBeetle");
			ChangeEnemy(acresMonsters, vermin, "cscImp");
			ChangeEnemy(acresMonsters, apothecary, "cscBeetleGuard");
			ChangeBoss(poolsMonsters, magmaWorm, "cscMegaConstruct");
			ChangeBoss(acresMonsters, xiConstruct, "cscImpBoss");
			ChangeEnemy(rpdMonsters, gup, "cscGolemSnowy");
			ChangeBoss(rpdMonsters, solus, "cscClayBoss");
			ChangeCatChest(acresDLCInteractables, categoryChest2Healing, "iscCategoryChest2Damage");
			ChangeCatChest(poolsInteractables, categoryChest2Damage, "iscCategoryChest2Healing");
			AcresBarrelIncrease();
			PoolsBarrelDecrease();
			AddEquipTrishopRPD();
			RPDDroneDecrease();
			ChangeEnemy(sirensMonsters, lemurian, "cscAcidLarva");
			ChangeBoss(groveMonsters, grovetender, "cscClayBoss");
			ChangeCatChest(abyssalDLCInteractables, categoryChest2Healing, "iscCategoryChest2Damage");
			ChangeCatChest(sirensDLCInteractables, categoryChest2Damage, "iscCategoryChest2Healing");
			BalanceSirenGrove();
			SirensDroneDecrease();
		}

		private void ChangeAqueductMonsters()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < aqueductMonsters.categories.Length; i++)
			{
				DirectorCard[] cards = aqueductMonsters.categories[i].cards;
				foreach (DirectorCard val in cards)
				{
					if (((Object)val.spawnCard).name == "cscClayBruiser")
					{
						val.minimumStageCompletions = 0;
					}
					if (((Object)val.spawnCard).name == "cscClayGrenadier")
					{
						val.minimumStageCompletions = 0;
					}
					if (((Object)val.spawnCard).name == "cscGreaterWisp")
					{
						val.minimumStageCompletions = 2;
					}
					if (((Object)val.spawnCard).name == "cscBeetleGuard")
					{
						val.minimumStageCompletions = 2;
					}
				}
			}
		}

		private void Stage_Start(orig_Start orig, Stage self)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == "blackbeach")
			{
				GameObject val = GameObject.Find("HOLDER: Preplaced Objects");
				if (Object.op_Implicit((Object)(object)val) && !((Component)val.transform.GetChild(0)).gameObject.activeSelf && !((Component)val.transform.GetChild(1)).gameObject.activeSelf && !((Component)val.transform.GetChild(2)).gameObject.activeSelf)
				{
					Debug.Log((object)"StageBalancer: Manually activating random newt altar");
					((Component)val.transform.GetChild(Random.Range(0, 2))).gameObject.SetActive(true);
				}
			}
			orig.Invoke(self);
		}

		private void ClassicStageInfo_Start(orig_Start orig, ClassicStageInfo self)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			string name = ((Scene)(ref activeScene)).name;
			switch (name)
			{
			case "golemplains":
			case "golemplains2":
			case "blackbeach":
			case "blackbeach2":
				self.sceneDirectorInteractibleCredits = 230;
				break;
			}
			if (name == "snowyforest")
			{
				self.sceneDirectorInteractibleCredits = 280;
			}
			if (name == "foggyswamp")
			{
				self.sceneDirectorInteractibleCredits = 300;
			}
			if (name == "shipgraveyard" || name == "rootjungle")
			{
				self.sceneDirectorInteractibleCredits = 420;
			}
			if (name == "dampcavesimple" && self.bonusInteractibleCreditObjects != null)
			{
				Debug.Log((object)"StageBalancer: Adjusting extra abyssal credits");
				for (int i = 0; i < self.bonusInteractibleCreditObjects.Length; i++)
				{
					self.bonusInteractibleCreditObjects[i].points /= 2;
				}
			}
			orig.Invoke(self);
		}

		private void TimedChestController_OnEnable(orig_OnEnable orig, TimedChestController self)
		{
			self.lockTime = 720f;
			orig.Invoke(self);
		}

		private void ChangeCatChest(DirectorCardCategorySelection dccs, SpawnCard newChest, string chestName)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < dccs.categories.Length; i++)
			{
				Category val = dccs.categories[i];
				if (!(val.name == "Chests"))
				{
					continue;
				}
				List<DirectorCard> list = new List<DirectorCard>();
				list.Add(new DirectorCard
				{
					spawnCard = newChest,
					selectionWeight = 3
				});
				DirectorCard[] cards = val.cards;
				foreach (DirectorCard val2 in cards)
				{
					if (((Object)val2.spawnCard).name != chestName)
					{
						list.Add(val2);
					}
				}
				dccs.categories[i].cards = list.ToArray();
			}
		}

		private void ChangeEnemy(DirectorCardCategorySelection dccs, SpawnCard newEnemy, string enemyName)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected O, but got Unknown
			for (int i = 0; i < dccs.categories.Length; i++)
			{
				Category val = dccs.categories[i];
				if (!(val.name == "Basic Monsters"))
				{
					continue;
				}
				List<DirectorCard> list = new List<DirectorCard>();
				DirectorCard[] cards = val.cards;
				foreach (DirectorCard val2 in cards)
				{
					if (((Object)val2.spawnCard).name != enemyName)
					{
						list.Add(val2);
						continue;
					}
					list.Add(new DirectorCard
					{
						spawnCard = newEnemy,
						selectionWeight = val2.selectionWeight
					});
				}
				dccs.categories[i].cards = list.ToArray();
			}
		}

		private void ChangeBoss(DirectorCardCategorySelection dccs, SpawnCard newBoss, string bossName)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected O, but got Unknown
			for (int i = 0; i < dccs.categories.Length; i++)
			{
				Category val = dccs.categories[i];
				if (!(val.name == "Champions"))
				{
					continue;
				}
				List<DirectorCard> list = new List<DirectorCard>();
				DirectorCard[] cards = val.cards;
				foreach (DirectorCard val2 in cards)
				{
					if (((Object)val2.spawnCard).name != bossName)
					{
						list.Add(val2);
						continue;
					}
					list.Add(new DirectorCard
					{
						spawnCard = newBoss,
						selectionWeight = val2.selectionWeight
					});
				}
				dccs.categories[i].cards = list.ToArray();
			}
		}

		private void RemoveAphelianChest()
		{
			//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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < aphelianInteractables.categories.Length; i++)
			{
				Category val = aphelianInteractables.categories[i];
				if (!(val.name == "Chests"))
				{
					continue;
				}
				List<DirectorCard> list = new List<DirectorCard>();
				DirectorCard[] cards = val.cards;
				foreach (DirectorCard val2 in cards)
				{
					if (((Object)val2.spawnCard).name != "iscLunarChest")
					{
						list.Add(val2);
					}
				}
				aphelianInteractables.categories[i].cards = list.ToArray();
			}
		}

		private void AddEquipTrishopRPD()
		{
			//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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < rpdDLCInteractables.categories.Length; i++)
			{
				Category val = rpdDLCInteractables.categories[i];
				if (!(val.name == "Chests"))
				{
					continue;
				}
				List<DirectorCard> list = new List<DirectorCard>();
				list.Add(new DirectorCard
				{
					spawnCard = equipTrishop,
					selectionWeight = 20
				});
				DirectorCard[] cards = val.cards;
				foreach (DirectorCard val2 in cards)
				{
					if (((Object)val2.spawnCard).name != "iscEquipmentBarrel")
					{
						list.Add(val2);
					}
					rpdDLCInteractables.categories[i].cards = list.ToArray();
				}
			}
		}

		private void AcresBarrelIncrease()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < acresDLCInteractables.categories.Length; i++)
			{
				Category val = acresDLCInteractables.categories[i];
				if (val.name == "Barrels")
				{
					DirectorCard[] cards = val.cards;
					foreach (DirectorCard val2 in cards)
					{
						val2.selectionWeight = (int)Math.Round(1.2f * (float)val2.selectionWeight);
					}
				}
			}
		}

		private void PoolsBarrelDecrease()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < poolsInteractables.categories.Length; i++)
			{
				Category val = poolsInteractables.categories[i];
				if (val.name == "Barrels")
				{
					DirectorCard[] cards = val.cards;
					foreach (DirectorCard val2 in cards)
					{
						val2.selectionWeight = (int)Math.Round(0.6f * (float)val2.selectionWeight);
					}
				}
			}
		}

		private void RPDDroneDecrease()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < rpdDLCInteractables.categories.Length; i++)
			{
				Category val = rpdDLCInteractables.categories[i];
				if (val.name == "Drones")
				{
					DirectorCard[] cards = val.cards;
					foreach (DirectorCard obj in cards)
					{
						obj.selectionWeight = (int)Math.Round((float)obj.selectionWeight / 2f);
					}
				}
			}
		}

		private void SirensDroneDecrease()
		{
			//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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < sirensDLCInteractables.categories.Length; i++)
			{
				Category val = sirensDLCInteractables.categories[i];
				if (val.name == "Drones")
				{
					DirectorCard[] cards = val.cards;
					foreach (DirectorCard obj in cards)
					{
						obj.selectionWeight = (int)Math.Round((float)obj.selectionWeight / 2f);
					}
				}
				if (val.name == "Misc")
				{
					DirectorCard[] cards = val.cards;
					for (int j = 0; j < cards.Length; j++)
					{
						cards[j].selectionWeight = 0;
					}
				}
			}
		}

		private void BalanceSirenGrove()
		{
			//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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < sirensDLCInteractables.categories.Length; i++)
			{
				Category val = sirensDLCInteractables.categories[i];
				DirectorCard[] cards;
				if (val.name == "Shrines")
				{
					List<DirectorCard> list = new List<DirectorCard>();
					cards = val.cards;
					foreach (DirectorCard val2 in cards)
					{
						if (((Object)val2.spawnCard).name == "iscShrineBoss")
						{
							val2.selectionWeight = 2;
							list.Add(val2);
						}
						if (((Object)val2.spawnCard).name == "iscShrineHealing")
						{
							val2.spawnCard = combatShrine;
							val2.selectionWeight = 3;
							list.Add(val2);
						}
						if (((Object)val2.spawnCard).name == "iscShrineBlood")
						{
							val2.spawnCard = chanceShrine;
							val2.selectionWeight = 4;
							list.Add(val2);
						}
					}
					sirensDLCInteractables.categories[i].cards = list.ToArray();
				}
				if (!(val.name == "Chests"))
				{
					continue;
				}
				cards = val.cards;
				foreach (DirectorCard val3 in cards)
				{
					if (((Object)val3.spawnCard).name == "iscChest1" || ((Object)val3.spawnCard).name == "iscChest2")
					{
						val3.selectionWeight -= (int)Math.Round((double)val3.selectionWeight * 0.1);
					}
					if (((Object)val3.spawnCard).name == "iscTripleShopLarge")
					{
						val3.selectionWeight += (int)Math.Round((double)val3.selectionWeight * 0.2);
					}
				}
			}
			for (int k = 0; k < groveDLCInteractables.categories.Length; k++)
			{
				Category val4 = groveDLCInteractables.categories[k];
				if (!(val4.name == "Chests"))
				{
					continue;
				}
				DirectorCard[] cards = val4.cards;
				foreach (DirectorCard val5 in cards)
				{
					if (((Object)val5.spawnCard).name == "iscChest1" || ((Object)val5.spawnCard).name == "iscChest2")
					{
						val5.selectionWeight -= (int)Math.Round((double)val5.selectionWeight * 0.1);
					}
					if (((Object)val5.spawnCard).name == "iscCasinoChest")
					{
						val5.selectionWeight += (int)Math.Round((double)val5.selectionWeight * 0.3);
					}
				}
			}
		}
	}
}