Decompiled source of Lucky Blocks v1.4.0

plugins/legocool.LuckyBlocks.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.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using LuckyBlocks;
using Microsoft.CodeAnalysis;
using PEAKLib.Core;
using Peak;
using Photon.Pun;
using UnityEngine;
using UnityEngine.SceneManagement;
using Zorro.Core;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("legocool.LuckyBlocks")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyInformationalVersion("1.4.0+8764b1572bfb5bb0972e1fa55b720ef4609d4695")]
[assembly: AssemblyProduct("legocool.LuckyBlocks")]
[assembly: AssemblyTitle("Lucky_Blocks")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.4.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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]
	[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]
	[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;
		}
	}
}
public class GetIslandStuff
{
	public static bool LoadingWilIsland { get; private set; }

	public static GameObject EruptionPrefab { get; private set; }

	public static GameObject JungleSporeMushroomExploPrefab { get; private set; }

	public static GameObject CapybaraPool { get; private set; }

	public static GameObject? FindGameObjectByPath(string path)
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		if (string.IsNullOrWhiteSpace(path))
		{
			return null;
		}
		string text = path.Trim().Trim('/');
		string[] array = text.Split('/');
		for (int i = 0; i < SceneManager.sceneCount; i++)
		{
			Scene sceneAt = SceneManager.GetSceneAt(i);
			if (!((Scene)(ref sceneAt)).isLoaded)
			{
				continue;
			}
			GameObject[] rootGameObjects = ((Scene)(ref sceneAt)).GetRootGameObjects();
			foreach (GameObject val in rootGameObjects)
			{
				Transform val2 = val.transform;
				int num = (string.Equals(((Object)val).name, array[0], StringComparison.Ordinal) ? 1 : 0);
				if (num == 0 && array.Length == 1 && !string.Equals(((Object)val).name, array[0], StringComparison.Ordinal))
				{
					continue;
				}
				for (int k = num; k < array.Length; k++)
				{
					if (!((Object)(object)val2 != (Object)null))
					{
						break;
					}
					val2 = val2.Find(array[k]);
				}
				if ((Object)(object)val2 != (Object)null)
				{
					return ((Component)val2).gameObject;
				}
			}
		}
		return null;
	}

	public static IEnumerator Initialize()
	{
		LoadingWilIsland = true;
		Debug.Log((object)"Loading WilIsland...");
		AsyncOperation val = SceneManager.LoadSceneAsync("WilIsland", (LoadSceneMode)1);
		if (val == null)
		{
			Debug.LogError((object)"LoadSceneAsync returned null!");
			yield break;
		}
		yield return val;
		Debug.Log((object)"WilIsland finished loading.");
		EruptionSpawner val2 = Object.FindAnyObjectByType<EruptionSpawner>();
		if ((Object)(object)val2 == (Object)null)
		{
			Debug.LogError((object)"Couldn't find EruptionSpawner.");
			yield break;
		}
		EruptionPrefab = val2.eruption;
		GameObject val3 = FindGameObjectByPath("Map/Biome_2/Tropics/Jungle_Segment/Default/Props_Wall/ExploShrooms/Jungle_SporeMushroomExplo");
		SpawnGameObject val4 = ((val3 != null) ? val3.GetComponent<SpawnGameObject>() : null);
		if ((Object)(object)val4?.toSpawn == (Object)null)
		{
			Debug.LogError((object)"Couldn't find Jungle Spore Mushroom explosion prefab.");
			yield break;
		}
		JungleSporeMushroomExploPrefab = val4.toSpawn;
		GameObject val5 = FindGameObjectByPath("Map/Biome_3/Alpine/Snow_Segment/Onsen");
		if ((Object)(object)val5 == (Object)null)
		{
			Debug.LogError((object)"Couldn't find Capybara Pool.");
			yield break;
		}
		CapybaraPool = Object.Instantiate<GameObject>(val5);
		((Object)CapybaraPool).name = "CapybaraPoolTemplate";
		CapybaraPool.transform.SetParent((Transform)null);
		CapybaraPool.transform.position = new Vector3(0f, -10000f, 0f);
		((Object)CapybaraPool).hideFlags = (HideFlags)61;
		Object.DontDestroyOnLoad((Object)(object)CapybaraPool);
		CapybaraPool.SetActive(false);
		Debug.Log((object)"Created persistent Capybara Pool template.");
		yield return SceneManager.UnloadSceneAsync("WilIsland");
		LoadingWilIsland = false;
	}
}
[RequireComponent(typeof(PhotonView))]
public class LuckyBreakable : MonoBehaviour
{
	public Item item;

	public bool breakOnCollision = true;

	public float minBreakVelocity = 5f;

	public List<SFX_Instance> breakSFX;

	public List<GameObject> instantiateNonItemOnBreak;

	public List<Transform> instantiatePoints;

	public bool spawnsItemsKinematic;

	public bool playAnimationOnInstantiatedObject;

	public string animString;

	public bool ragdollCharacterOnBreak;

	private Rigidbody rig;

	private bool alreadyBroke;

	private Vector3 lastVelocity = Vector3.zero;

	public float pushForce = 2f;

	public float wholeBodyPushForce = 1f;

	private void Awake()
	{
		item = ((Component)this).GetComponent<Item>();
		rig = ((Component)this).GetComponent<Rigidbody>();
	}

	private void OnCollisionEnter(Collision collision)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		if (PhotonNetwork.IsMasterClient && (int)item.itemState == 0 && breakOnCollision && Object.op_Implicit((Object)(object)item.rig))
		{
			Vector3 relativeVelocity = collision.relativeVelocity;
			if (((Vector3)(ref relativeVelocity)).magnitude > minBreakVelocity)
			{
				Break(collision);
			}
		}
	}

	private void FixedUpdate()
	{
		//IL_0023: 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)
		if (!((Object)(object)rig == (Object)null) && !rig.isKinematic)
		{
			lastVelocity = rig.linearVelocity;
		}
	}

	public virtual void Break(Collision coll)
	{
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		if (alreadyBroke)
		{
			return;
		}
		alreadyBroke = true;
		for (int i = 0; i < breakSFX.Count; i++)
		{
			breakSFX[i].Play(((Component)this).transform.position);
		}
		if (ragdollCharacterOnBreak)
		{
			Character componentInParent = ((Component)coll.transform).GetComponentInParent<Character>();
			if (Object.op_Implicit((Object)(object)componentInParent))
			{
				Rigidbody componentInParent2 = ((Component)coll.transform).GetComponentInParent<Rigidbody>();
				Vector3 val = ((Vector3)(ref lastVelocity)).normalized * pushForce;
				componentInParent.AddForceToBodyPart(componentInParent2, val * pushForce, val * wholeBodyPushForce);
				componentInParent.Fall(2f, 15f);
			}
		}
		Outcomes.TriggerRandom(this, coll);
		PhotonNetwork.Destroy(((Component)this).gameObject);
	}

	[PunRPC]
	public void RPC_SpawnPrefab(string prefabName, Vector3 position, Quaternion rotation)
	{
		//IL_0040: 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)
		GameObject val = null;
		switch (prefabName)
		{
		case "EruptionPrefab":
			val = GetIslandStuff.EruptionPrefab;
			break;
		case "JungleSporeMushroomExploPrefab":
			val = GetIslandStuff.JungleSporeMushroomExploPrefab;
			break;
		case "CapybaraPool":
			val = GetIslandStuff.CapybaraPool;
			break;
		}
		GameObject val2 = Object.Instantiate<GameObject>(val, position, rotation);
		val2.SetActive(true);
		if (!(prefabName == "CapybaraPool"))
		{
			return;
		}
		string[] array = new string[3] { "berrybush Variant", "berrybush Variant (1)", "berrybush Variant (2)" };
		string[] array2 = new string[2] { "Capybara (3)", "Capybara (2)" };
		string[] array3 = array;
		foreach (string text in array3)
		{
			Transform[] componentsInChildren = val2.GetComponentsInChildren<Transform>(true);
			foreach (Transform val3 in componentsInChildren)
			{
				if (!(((Object)val3).name != text))
				{
					BerryBush component = ((Component)val3).GetComponent<BerryBush>();
					if ((Object)(object)component != (Object)null)
					{
						((Spawner)component).SpawnItems(((Spawner)component).spawnSpots);
					}
				}
			}
		}
		string[] array4 = array2;
		foreach (string text2 in array4)
		{
			Transform[] componentsInChildren2 = val2.GetComponentsInChildren<Transform>(true);
			foreach (Transform val4 in componentsInChildren2)
			{
				if (!(((Object)val4).name != "Yuzu Berry_Spawner"))
				{
					SingleItemSpawner component2 = ((Component)val4).GetComponent<SingleItemSpawner>();
					if ((Object)(object)component2 != (Object)null)
					{
						component2.TrySpawnItems();
					}
				}
			}
		}
	}
}
public class Outcomes
{
	public static List<(Action<LuckyBreakable, Collision> action, int weight)> ActionWeights;

	public static void Initialize()
	{
		ActionWeights = new List<(Action<LuckyBreakable, Collision>, int)>();
		if (Config.TornadoEnabled.Value)
		{
			ActionWeights.Add((SpawnTornado, Config.TornadoWeight.Value));
		}
		if (Config.LuggageEnabled.Value)
		{
			ActionWeights.Add((SpawnLuggage, Config.LuggageWeight.Value));
		}
		if (Config.BounceEnabled.Value)
		{
			ActionWeights.Add((SpawnBounce, Config.BounceWeight.Value));
		}
		if (Config.ShelfEnabled.Value)
		{
			ActionWeights.Add((SpawnShelf, Config.ShelfWeight.Value));
		}
		if (Config.LuckyRainEnabled.Value)
		{
			ActionWeights.Add((LuckyRain, Config.LuckyRainWeight.Value));
		}
		if (Config.EruptionEnabled.Value)
		{
			ActionWeights.Add((SpawnEruption, Config.EruptionWeight.Value));
		}
		if (Config.PeelRainEnabled.Value)
		{
			ActionWeights.Add((PeelRain, Config.PeelRainWeight.Value));
		}
		if (Config.ExplodeEnabled.Value)
		{
			ActionWeights.Add((Explode, Config.ExplodeWeight.Value));
		}
		if (Config.ScorpoRainEnabled.Value)
		{
			ActionWeights.Add((ScorpoRain, Config.ScorpoRainWeight.Value));
		}
		if (Config.BerryRainEnabled.Value)
		{
			ActionWeights.Add((BerryRain, Config.BerryRainWeight.Value));
		}
		if (Config.SummonScoutmasterEnabled.Value)
		{
			ActionWeights.Add((SummonScoutmaster, Config.SummonScoutmasterWeight.Value));
		}
		if (Config.RopeSpawnEnabled.Value)
		{
			ActionWeights.Add((RopeSpawn, Config.RopeSpawnWeight.Value));
		}
		if (Config.ChaosCloudEnabled.Value)
		{
			ActionWeights.Add((ChaosCloud, Config.ChaosCloudWeight.Value));
		}
		if (Config.ZombieEnabled.Value)
		{
			ActionWeights.Add((Zombie, Config.ZombieWeight.Value));
		}
		if (Config.BackpacksEnabled.Value)
		{
			ActionWeights.Add((Backpacks, Config.BackpacksWeight.Value));
		}
		if (Config.PuffHealSpawnEnabled.Value)
		{
			ActionWeights.Add((PuffHealSpawn, Config.PuffHealSpawnWeight.Value));
		}
		if (Config.EquipmentShowerEnabled.Value)
		{
			ActionWeights.Add((EquipmentShower, Config.EquipmentShowerWeight.Value));
		}
		if (Config.MythicSpawnEnabled.Value)
		{
			ActionWeights.Add((MythicSpawn, Config.MythicSpawnWeight.Value));
		}
		if (Config.FlagEnabled.Value)
		{
			ActionWeights.Add((Flag, Config.FlagWeight.Value));
		}
		if (Config.CannonEnabled.Value)
		{
			ActionWeights.Add((Cannon, Config.CannonWeight.Value));
		}
		if (Config.CookEnabled.Value)
		{
			ActionWeights.Add((Cook, Config.CookWeight.Value));
		}
		if (Config.SunscreenEnabled.Value)
		{
			ActionWeights.Add((Sunscreen, Config.SunscreenWeight.Value));
		}
		if (Config.EnderpearlEnabled.Value)
		{
			ActionWeights.Add((Enderpearl, Config.EnderpearlWeight.Value));
		}
		if (Config.FrogEnabled.Value)
		{
			ActionWeights.Add((FROG, Config.FrogWeight.Value));
		}
		if (Config.GhostBallEnabled.Value)
		{
			ActionWeights.Add((SpawnGhostBallGuyThing, Config.GhostBallWeight.Value));
		}
		if (Config.MimicLuggageEnabled.Value)
		{
			ActionWeights.Add((MimicLuggage, Config.MimicLuggageWeight.Value));
		}
		if (Config.ShellRainEnabled.Value)
		{
			ActionWeights.Add((ShellParty, Config.ShellRainWeight.Value));
		}
		if (Config.SporeExplosionEnabled.Value)
		{
			ActionWeights.Add((SpawnSporeExplosion, Config.SporeExplosionWeight.Value));
		}
		if (Config.AntiGravSphereEnabled.Value)
		{
			ActionWeights.Add((AntiGravSphere, Config.AntiGravSphereWeight.Value));
		}
		if (Config.CapybaraPoolEnabled.Value)
		{
			ActionWeights.Add((CapybaraPool, Config.CapybaraPoolWeight.Value));
		}
		if (Config.BeetlesEnabled.Value)
		{
			ActionWeights.Add((Beetles, Config.BeetlesWeight.Value));
		}
		if (Config.PetrifyScoutEnabled.Value)
		{
			ActionWeights.Add((SpawnPetrfyScout, Config.PetrifyScoutWeight.Value));
		}
		if (Config.AirPlaneLootEnabled.Value)
		{
			ActionWeights.Add((Explode, Config.AirPlaneLootWeight.Value));
		}
		if (Config.CactusBallsEnabled.Value)
		{
			ActionWeights.Add((CactusBalls, Config.CactusBallsWeight.Value));
		}
		if (Config.FireTornadoEnabled.Value)
		{
			ActionWeights.Add((FireTornado, Config.FireTornadoWeight.Value));
		}
		if (Config.ReviveScoutEnabled.Value)
		{
			ActionWeights.Add((RevivePlayer, Config.ReviveScoutWeight.Value));
		}
		if (Config.BasketBallsEnabled.Value)
		{
			ActionWeights.Add((BallBallBalling, Config.BasketBallsWeight.Value));
		}
	}

	public static void AddOutcome(Action<LuckyBreakable, Collision> action, int weight = 100, string? name = null)
	{
		if (name == null)
		{
			name = action.Method.Name;
		}
		ConfigEntry<bool> val = Config.Instance.Bind<bool>("Custom Outcomes." + name, name + " Enabled", true, "Enable custom outcome: " + name);
		ConfigEntry<int> val2 = Config.Instance.Bind<int>("Custom Outcomes." + name, name + " Weight", weight, "Weight for custom outcome: " + name);
		Plugin.Log.LogInfo((object)$"Adding outcome {name} with weight {val2.Value}");
		if (val.Value)
		{
			ActionWeights.Add((action, val2.Value));
		}
	}

	public static void TriggerRandom(LuckyBreakable lb, Collision coll)
	{
		if (ActionWeights == null || ActionWeights.Count == 0)
		{
			return;
		}
		if (Config.DebugMode.Value && !string.IsNullOrWhiteSpace(Config.ForcedOutcome.Value))
		{
			string text = Config.ForcedOutcome.Value.Trim();
			foreach (var actionWeight in ActionWeights)
			{
				if (string.Equals(actionWeight.action.Method.Name, text, StringComparison.OrdinalIgnoreCase))
				{
					actionWeight.action(lb, coll);
					return;
				}
			}
			Plugin.Log.LogWarning((object)("Could not find forced outcome '" + text + "'. Using random outcome."));
		}
		int num = 0;
		foreach (var actionWeight2 in ActionWeights)
		{
			if (actionWeight2.weight > 0)
			{
				num += actionWeight2.weight;
			}
		}
		if (num <= 0)
		{
			return;
		}
		int num2 = Random.Range(0, num);
		foreach (var actionWeight3 in ActionWeights)
		{
			if (actionWeight3.weight > 0)
			{
				if (num2 < actionWeight3.weight)
				{
					actionWeight3.action(lb, coll);
					break;
				}
				num2 -= actionWeight3.weight;
			}
		}
	}

	public static void SpawnTornado(LuckyBreakable lb, Collision coll)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = PhotonNetwork.Instantiate("Tornado", lb.item.Center(), Quaternion.identity, (byte)0, (object[])null);
		Tornado component = val.GetComponent<Tornado>();
		component.tornadoLifetimeMax = Config.TornadoMaxLifetime.Value;
		component.tornadoLifetimeMin = Config.TornadoMinLifetime.Value;
		component.force = Config.TornadoForce.Value;
	}

	public static void SpawnLuggage(LuckyBreakable lb, Collision coll)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		Quaternion val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		switch (Random.Range(0, 5))
		{
		case 0:
			PhotonNetwork.Instantiate("0_Items/LuggageSmall", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
			break;
		case 1:
			PhotonNetwork.Instantiate("0_Items/LuggageBig", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
			break;
		case 2:
			PhotonNetwork.Instantiate("0_Items/LuggageEpic", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
			break;
		case 3:
			PhotonNetwork.Instantiate("0_Items/LuggageAncient", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
			break;
		case 4:
			PhotonNetwork.Instantiate("0_Items/LuggageClown", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
			break;
		}
	}

	public static void SpawnBounce(LuckyBreakable lb, Collision coll)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: 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_0037: 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_004e: Unknown result type (might be due to invalid IL or missing references)
		Quaternion val = Quaternion.Euler(0f, (float)Random.Range(0, 360), 0f);
		val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		PhotonNetwork.Instantiate("0_Items/BounceShroomSpawn", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
	}

	public static void SpawnShelf(LuckyBreakable lb, Collision coll)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: 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)
		Quaternion val = Quaternion.Euler(0f, (float)Random.Range(0, 360), 0f);
		PhotonNetwork.Instantiate("0_Items/ShelfShroomSpawn", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
	}

	public static void LuckyRain(LuckyBreakable lb, Collision coll)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: 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_0057: 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)
		int value = Config.LuckyRainCount.Value;
		for (int i = 0; i < value; i++)
		{
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-3f, 3f), Random.Range(4f, 7f), Random.Range(-3f, 3f));
			GameObject val2 = PhotonNetwork.Instantiate("0_Items/legocool.LuckyBlocks:LuckyBlock", val, Quaternion.identity, (byte)0, (object[])null);
			Item component = val2.GetComponent<Item>();
			component.lastThrownCharacter = lb.item.lastThrownCharacter;
		}
	}

	public static void Enderpearl(LuckyBreakable lb, Collision coll)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//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_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + ((ContactPoint)(ref coll.contacts[0])).normal;
		Character lastThrownCharacter = lb.item.lastThrownCharacter;
		if ((Object)(object)lastThrownCharacter != (Object)null)
		{
			((MonoBehaviourPun)lastThrownCharacter).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { val, true });
		}
	}

	public static void SpawnEruption(LuckyBreakable lb, Collision coll)
	{
		//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_003f: Unknown result type (might be due to invalid IL or missing references)
		lb.item.view.RPC("RPC_SpawnPrefab", (RpcTarget)0, new object[3]
		{
			"EruptionPrefab",
			((ContactPoint)(ref coll.contacts[0])).point,
			Quaternion.LookRotation(Vector3.up)
		});
	}

	public static void PeelRain(LuckyBreakable lb, Collision coll)
	{
		//IL_0031: 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_004d: 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_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.PeelRainGridSize.Value;
		float value2 = Config.PeelRainSpacing.Value;
		float num = 0.75f;
		for (int i = 0; i < value; i++)
		{
			for (int j = 0; j < value; j++)
			{
				Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3((float)(i - value / 2) * value2, num, (float)(j - value / 2) * value2);
				GameObject val2 = PhotonNetwork.Instantiate("0_Items/Berrynana Peel Yellow", val, Quaternion.identity, (byte)0, (object[])null);
				RemoveAfterSeconds val3 = val2.AddComponent<RemoveAfterSeconds>();
				val3.photonRemove = true;
				val3.seconds = Config.PeelRainLifetime.Value;
			}
		}
	}

	public static void Explode(LuckyBreakable lb, Collision coll)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = PhotonNetwork.Instantiate("0_Items/Dynamite", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		Dynamite component = val.GetComponent<Dynamite>();
		component.LightFlare();
		component.startingFuseTime = 0f;
	}

	public static void ScorpoRain(LuckyBreakable lb, Collision coll)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: 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_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.ScorpoRainCount.Value;
		for (int i = 0; i < value; i++)
		{
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-0.1f, 0.1f), 1f, Random.Range(-0.1f, 0.1f));
			GameObject val2 = PhotonNetwork.Instantiate("0_Items/Scorpion", val, Quaternion.identity, (byte)0, (object[])null);
			RemoveAfterSeconds val3 = val2.AddComponent<RemoveAfterSeconds>();
			val3.photonRemove = true;
			val3.seconds = Config.ScorpoRainLifetime.Value;
		}
	}

	public static void BerryRain(LuckyBreakable lb, Collision coll)
	{
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.BerryRainCount.Value;
		string[] array = new string[23]
		{
			"0_items/Winterberry Yellow", "0_Items/Winterberry Orange", "0_Items/Prickleberry_Gold", "0_Items/Prickleberry_Red", "0_Items/Apple Berry Green", "0_Items/Apple Berry Red", "0_Items/Apple Berry Yellow", "0_Items/Berrynana Brown", "0_Items/Berrynana Blue", "0_Items/Berrynana Pink",
			"0_Items/Berrynana Yellow", "0_Items/Clusterberry Black", "0_Items/Clusterberry Red", "0_Items/Clusterberry Yellow", "0_Items/Kingberry Green", "0_Items/Kingberry Purple", "0_Items/Kingberry Yellow", "0_Items/Napberry", "0_Items/Shroomberry_Blue", "0_Items/Shroomberry_Green",
			"0_Items/Shroomberry_Purple", "0_Items/Shroomberry_Red", "0_Items/Shroomberry_Yellow"
		};
		for (int i = 0; i < value; i++)
		{
			string text = array[Random.Range(0, array.Length)];
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-0.1f, 0.1f), 1f, Random.Range(-0.1f, 0.1f));
			GameObject val2 = PhotonNetwork.Instantiate(text, val, Quaternion.identity, (byte)0, (object[])null);
			val2.GetComponent<Rigidbody>().isKinematic = false;
		}
	}

	public static void SummonScoutmaster(LuckyBreakable lb, Collision coll)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		Scoutmaster val = default(Scoutmaster);
		if (Scoutmaster.GetPrimaryScoutmaster(ref val))
		{
			Vector3 val2 = ((ContactPoint)(ref coll.contacts[0])).point + ((ContactPoint)(ref coll.contacts[0])).normal;
			float num = 30f;
			Character lastThrownCharacter = lb.item.lastThrownCharacter;
			if ((Object)(object)lastThrownCharacter != (Object)null)
			{
				val.SetCurrentTarget(lastThrownCharacter, num);
			}
			val.view.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { val2, true });
			val.view.RPC("StopClimbingRpc", (RpcTarget)0, new object[1] { 0f });
		}
	}

	public static void RopeSpawn(LuckyBreakable lb, Collision coll)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//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_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		Quaternion val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		GameObject val2 = null;
		switch (Random.Range(0, 2))
		{
		case 0:
			val2 = PhotonNetwork.Instantiate("RopeAnchorWithAntiRope", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
			break;
		case 1:
			val2 = PhotonNetwork.Instantiate("RopeAnchorWithRope", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
			break;
		}
		if ((Object)(object)val2 != (Object)null)
		{
			RopeAnchorWithRope component = val2.GetComponent<RopeAnchorWithRope>();
			component.SpawnRope();
		}
	}

	public static void ChaosCloud(LuckyBreakable lb, Collision coll)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = PhotonNetwork.Instantiate("0_Items/PandorasBox", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		ItemCooking component = val.GetComponent<ItemCooking>();
		component.FinishCooking();
	}

	public static void Zombie(LuckyBreakable lb, Collision coll)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = PhotonNetwork.Instantiate("MushroomZombie", lb.item.Center(), Quaternion.identity, (byte)0, (object[])null);
		MushroomZombie component = val.GetComponent<MushroomZombie>();
		component.zombieSprintDistance = Config.ZombieSprintDistance.Value;
		component.zombieLungeDistance = Config.ZombieLungeDistance.Value;
		component.lungeRecoveryTime = Config.ZombieLungeRecoveryTime.Value;
		component.lifetime = Config.ZombieLifetime.Value;
		component.currentState = (State)0;
	}

	public static void Backpacks(LuckyBreakable lb, Collision coll)
	{
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.BackpackCount.Value;
		string[] array = new string[4] { "0_Items/Backpack", "0_Items/Fannypack", "0_Items/Rocketpack", "0_Items/Jetpack" };
		for (int i = 0; i < value; i++)
		{
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-0.1f, 0.1f), 1f, Random.Range(-0.1f, 0.1f));
			PhotonNetwork.Instantiate(array[Random.Range(0, array.Length)], val, Quaternion.identity, (byte)0, (object[])null);
		}
	}

	public static void PuffHealSpawn(LuckyBreakable lb, Collision coll)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: 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)
		Quaternion val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		PhotonNetwork.Instantiate("0_Items/HealingPuffShroomSpawn", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
	}

	public static void EquipmentShower(LuckyBreakable lb, Collision coll)
	{
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.EquipmentShowerCount.Value;
		string[] array = new string[7] { "0_Items/ChainShooter", "0_Items/ClimbingSpike", "0_Items/Energy Drink", "0_Items/Lollipop", "0_Items/RescueHook", "0_Items/RopeShooter", "0_Items/RopeSpool" };
		for (int i = 0; i < value; i++)
		{
			string text = array[Random.Range(0, array.Length)];
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-0.1f, 0.1f), 1f, Random.Range(-0.1f, 0.1f));
			PhotonNetwork.Instantiate(text, val, Quaternion.identity, (byte)0, (object[])null);
		}
	}

	public static void MythicSpawn(LuckyBreakable lb, Collision coll)
	{
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		string[] array = new string[15]
		{
			"0_Items/Anti-Rope Spool", "0_Items/AncientIdol", "0_Items/BookOfBones", "0_Items/Bugle_Magic", "0_Items/Bugle_Scoutmaster Variant", "0_Items/Cure-All", "0_Items/Cursed Skull", "0_Items/Lantern_Faerie", "0_Items/PandorasBox", "0_Items/RopeShooterAnti",
			"0_Items/ScoutEffigy", "0_Items/Warp Compass", "0_Items/RitualDagger", "0_Items/AntiZooka", "0_Items/BookOfBones"
		};
		string text = array[Random.Range(0, array.Length)];
		PhotonNetwork.Instantiate(text, lb.item.Center(), Quaternion.identity, (byte)0, (object[])null);
	}

	public static void Sunscreen(LuckyBreakable lb, Collision coll)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = PhotonNetwork.Instantiate("0_Items/Sunscreen", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		ItemCooking component = val.GetComponent<ItemCooking>();
		component.FinishCooking();
	}

	public static void Cannon(LuckyBreakable lb, Collision coll)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: 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)
		Quaternion val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		PhotonNetwork.Instantiate("ScoutCannon_Placed", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
	}

	public static void Cook(LuckyBreakable lb, Collision coll)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: 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)
		Quaternion val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		PhotonNetwork.Instantiate("PortableStovetop_Placed", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
	}

	public static void Flag(LuckyBreakable lb, Collision coll)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: 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)
		Quaternion val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		GameObject val2 = PhotonNetwork.Instantiate("Flag_Planted_Checkpoint", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
		CheckpointFlag component = val2.GetComponent<CheckpointFlag>();
		component.Initialize(lb.item.lastThrownCharacter);
	}

	public static void FROG(LuckyBreakable lb, Collision coll)
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.FrogCount.Value;
		for (int i = 0; i < value; i++)
		{
			GameObject val = PhotonNetwork.Instantiate("0_Items/Frog", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
			RemoveAfterSeconds val2 = val.AddComponent<RemoveAfterSeconds>();
			val2.photonRemove = true;
			val2.seconds = Config.FrogLifetime.Value;
		}
	}

	public static void SpawnGhostBallGuyThing(LuckyBreakable lb, Collision coll)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = PhotonNetwork.Instantiate("GhostBall", lb.item.Center(), Quaternion.identity, (byte)0, (object[])null);
		GhostBall component = val.GetComponent<GhostBall>();
		component.lifetime = Config.GhostBallLifetime.Value;
	}

	public static void SpawnSporeExplosion(LuckyBreakable lb, Collision coll)
	{
		//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_003f: Unknown result type (might be due to invalid IL or missing references)
		lb.item.view.RPC("RPC_SpawnPrefab", (RpcTarget)0, new object[3]
		{
			"JungleSporeMushroomExploPrefab",
			((ContactPoint)(ref coll.contacts[0])).point,
			Quaternion.LookRotation(Vector3.up)
		});
	}

	public static void MimicLuggage(LuckyBreakable lb, Collision coll)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: 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)
		Quaternion val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		PhotonNetwork.Instantiate("0_Items/LuggageTrick", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
	}

	public static void ShellParty(LuckyBreakable lb, Collision coll)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: 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_0057: 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)
		int value = Config.ShellRainCount.Value;
		for (int i = 0; i < value; i++)
		{
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-2f, 2f), Random.Range(3f, 6f), Random.Range(-2f, 2f));
			PhotonNetwork.Instantiate("0_Items/Shell Big", val, Quaternion.identity, (byte)0, (object[])null);
		}
	}

	public static void AntiGravSphere(LuckyBreakable lb, Collision coll)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: 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)
		Quaternion val = Quaternion.LookRotation(Vector3.forward, ((ContactPoint)(ref coll.contacts[0])).normal);
		GameObject val2 = PhotonNetwork.Instantiate("AntiSphere_Projectile", ((ContactPoint)(ref coll.contacts[0])).point, val, (byte)0, (object[])null);
		AntiSphere component = val2.GetComponent<AntiSphere>();
		component.lifetime = Config.AntiGravSphereLifetime.Value;
	}

	public static void CapybaraPool(LuckyBreakable lb, Collision coll)
	{
		//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)
		lb.item.view.RPC("RPC_SpawnPrefab", (RpcTarget)0, new object[3]
		{
			"CapybaraPool",
			((ContactPoint)(ref coll.contacts[0])).point,
			Quaternion.identity
		});
	}

	public static void Beetles(LuckyBreakable lb, Collision coll)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: 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_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.BeetlesCount.Value;
		for (int i = 0; i < value; i++)
		{
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-0.1f, 0.1f), 0.75f, Random.Range(-0.1f, 0.1f));
			GameObject val2 = PhotonNetwork.Instantiate("0_Items/Beetle", val, Quaternion.identity, (byte)0, (object[])null);
			RemoveAfterSeconds val3 = val2.AddComponent<RemoveAfterSeconds>();
			val3.photonRemove = true;
			val3.seconds = Config.BeetlesLifetime.Value;
		}
	}

	public static void SpawnPetrfyScout(LuckyBreakable lb, Collision coll)
	{
		//IL_0011: 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)
		PhotonNetwork.Instantiate("PetrifiedScout", ((ContactPoint)(ref coll.contacts[0])).point, ((Component)lb.item.lastThrownCharacter.refs.ragdoll.bodySpawnPoint).transform.rotation, (byte)0, (object[])null).GetComponent<PhotonView>().RPC("RPC_SpawnPetrifiedScout", (RpcTarget)0, new object[2]
		{
			((MonoBehaviourPun)lb.item.lastThrownCharacter).photonView.ViewID,
			false
		});
	}

	public static void AirPlaneLoot(LuckyBreakable lb, Collision coll)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: 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_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e8: 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_010b: Unknown result type (might be due to invalid IL or missing references)
		PhotonNetwork.Instantiate("0_Items/BingBong", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		PhotonNetwork.Instantiate("0_Items/Binoculars", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		PhotonNetwork.Instantiate("0_Items/Flare", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		PhotonNetwork.Instantiate("0_Items/Bugle", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		PhotonNetwork.Instantiate("0_Items/Lantern", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		PhotonNetwork.Instantiate("0_Items/Frisbee", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		PhotonNetwork.Instantiate("0_Items/Compass", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
		PhotonNetwork.Instantiate("0_Items/Guidebook", ((ContactPoint)(ref coll.contacts[0])).point, Quaternion.identity, (byte)0, (object[])null);
	}

	public static void CactusBalls(LuckyBreakable lb, Collision coll)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: 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_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.CactusBallsCount.Value;
		for (int i = 0; i < value; i++)
		{
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-0.1f, 0.1f), 0.75f, Random.Range(-0.1f, 0.1f));
			GameObject val2 = PhotonNetwork.Instantiate("0_Items/CactusBall", val, Quaternion.identity, (byte)0, (object[])null);
			RemoveAfterSeconds val3 = val2.AddComponent<RemoveAfterSeconds>();
			val3.photonRemove = true;
			val3.seconds = Config.CactusBallsLifetime.Value;
		}
	}

	public static void SpawnAmulet(LuckyBreakable lb, Collision coll)
	{
	}

	public static void FireTornado(LuckyBreakable lb, Collision coll)
	{
		SpawnEruption(lb, coll);
		SpawnTornado(lb, coll);
	}

	public static void RevivePlayer(LuckyBreakable lb, Collision coll)
	{
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		List<Character> list = new List<Character>();
		foreach (Character allCharacter in Character.AllCharacters)
		{
			if (allCharacter.data.dead || allCharacter.data.fullyPassedOut)
			{
				list.Add(allCharacter);
			}
		}
		if (list.Count == 0)
		{
			TriggerRandom(lb, coll);
			return;
		}
		((MonoBehaviourPun)Util.RandomSelection<Character>((IEnumerable<Character>)list, (Func<Character, int>)((Character c) => 1))).photonView.RPC("RPCA_ReviveAtPosition", (RpcTarget)0, new object[3]
		{
			((ContactPoint)(ref coll.contacts[0])).point + Vector3.up * 1f,
			false,
			-1
		});
		if (Object.op_Implicit((Object)(object)Singleton<AchievementManager>.Instance))
		{
			Singleton<AchievementManager>.Instance.AddToRunBasedInt((RUNBASEDVALUETYPE)2, 1);
		}
	}

	public static void BallBallBalling(LuckyBreakable lb, Collision coll)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: 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_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		int value = Config.BasketBallsCount.Value;
		for (int i = 0; i < value; i++)
		{
			Vector3 val = ((ContactPoint)(ref coll.contacts[0])).point + new Vector3(Random.Range(-0.1f, 0.1f), 0.75f, Random.Range(-0.1f, 0.1f));
			GameObject val2 = PhotonNetwork.Instantiate("0_Items/Basketball", val, Quaternion.identity, (byte)0, (object[])null);
			RemoveAfterSeconds val3 = val2.AddComponent<RemoveAfterSeconds>();
			val3.photonRemove = true;
			val3.seconds = Config.BasketBallsLifetime.Value;
		}
	}
}
public static class Patches
{
	[HarmonyPatch(typeof(Tornado), "PickTarget")]
	public static class Tornado_PickTarget_Patch
	{
		private static bool Prefix(Tornado __instance)
		{
			return (Object)(object)__instance.targetParent != (Object)null;
		}
	}

	[HarmonyPatch(typeof(SFX_PlayOneShot), "PlayOneShot")]
	public static class SFX_PlayOneShot_PlayOneShot_Patch
	{
		private static bool Prefix(SFX_PlayOneShot __instance)
		{
			return !GetIslandStuff.LoadingWilIsland;
		}
	}

	[HarmonyPatch(typeof(LoadingScreenHandler), "LoadSceneProcess")]
	public static class LoadingScreenHandler_LoadSceneProcess_Patch
	{
		private static bool Prefix(LoadingScreenHandler __instance, string sceneName, bool networked, bool yieldForCharacterSpawn = false, float extraYieldTimeOnEnd = 3f)
		{
			if (sceneName == "Airport" && !islandStuffInitialized)
			{
				islandStuffInitialized = true;
				((MonoBehaviour)__instance).StartCoroutine(GetIslandStuff.Initialize());
			}
			return true;
		}
	}

	private static bool islandStuffInitialized;
}
namespace BepInEx
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	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")]
	internal sealed class PatcherAutoPluginAttribute : Attribute
	{
		public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace LuckyBlocks
{
	public static class Config
	{
		public static ConfigFile Instance;

		public static ConfigEntry<int> LuckyBlockItemSpawnWeight;

		public static ConfigEntry<int> LuckyBlockItemWeight;

		public static ConfigEntry<float> LuckyBlockItemMinBreakVelocity;

		public static ConfigEntry<bool> DebugMode;

		public static ConfigEntry<string> ForcedOutcome;

		public static ConfigEntry<bool> TornadoEnabled;

		public static ConfigEntry<int> TornadoWeight;

		public static ConfigEntry<float> TornadoMaxLifetime;

		public static ConfigEntry<float> TornadoMinLifetime;

		public static ConfigEntry<int> TornadoForce;

		public static ConfigEntry<bool> LuggageEnabled;

		public static ConfigEntry<int> LuggageWeight;

		public static ConfigEntry<bool> BounceEnabled;

		public static ConfigEntry<int> BounceWeight;

		public static ConfigEntry<bool> ShelfEnabled;

		public static ConfigEntry<int> ShelfWeight;

		public static ConfigEntry<bool> LuckyRainEnabled;

		public static ConfigEntry<int> LuckyRainWeight;

		public static ConfigEntry<int> LuckyRainCount;

		public static ConfigEntry<bool> EruptionEnabled;

		public static ConfigEntry<int> EruptionWeight;

		public static ConfigEntry<bool> PeelRainEnabled;

		public static ConfigEntry<int> PeelRainWeight;

		public static ConfigEntry<int> PeelRainGridSize;

		public static ConfigEntry<float> PeelRainSpacing;

		public static ConfigEntry<float> PeelRainLifetime;

		public static ConfigEntry<bool> ExplodeEnabled;

		public static ConfigEntry<int> ExplodeWeight;

		public static ConfigEntry<bool> ScorpoRainEnabled;

		public static ConfigEntry<int> ScorpoRainWeight;

		public static ConfigEntry<int> ScorpoRainCount;

		public static ConfigEntry<float> ScorpoRainLifetime;

		public static ConfigEntry<bool> BerryRainEnabled;

		public static ConfigEntry<int> BerryRainWeight;

		public static ConfigEntry<int> BerryRainCount;

		public static ConfigEntry<bool> SummonScoutmasterEnabled;

		public static ConfigEntry<int> SummonScoutmasterWeight;

		public static ConfigEntry<bool> RopeSpawnEnabled;

		public static ConfigEntry<int> RopeSpawnWeight;

		public static ConfigEntry<bool> ChaosCloudEnabled;

		public static ConfigEntry<int> ChaosCloudWeight;

		public static ConfigEntry<bool> ZombieEnabled;

		public static ConfigEntry<int> ZombieWeight;

		public static ConfigEntry<float> ZombieSprintDistance;

		public static ConfigEntry<float> ZombieLungeDistance;

		public static ConfigEntry<float> ZombieLungeRecoveryTime;

		public static ConfigEntry<float> ZombieLifetime;

		public static ConfigEntry<bool> BackpacksEnabled;

		public static ConfigEntry<int> BackpacksWeight;

		public static ConfigEntry<int> BackpackCount;

		public static ConfigEntry<bool> PuffHealSpawnEnabled;

		public static ConfigEntry<int> PuffHealSpawnWeight;

		public static ConfigEntry<bool> EquipmentShowerEnabled;

		public static ConfigEntry<int> EquipmentShowerWeight;

		public static ConfigEntry<int> EquipmentShowerCount;

		public static ConfigEntry<bool> MythicSpawnEnabled;

		public static ConfigEntry<int> MythicSpawnWeight;

		public static ConfigEntry<bool> FlagEnabled;

		public static ConfigEntry<int> FlagWeight;

		public static ConfigEntry<bool> CannonEnabled;

		public static ConfigEntry<int> CannonWeight;

		public static ConfigEntry<bool> CookEnabled;

		public static ConfigEntry<int> CookWeight;

		public static ConfigEntry<bool> SunscreenEnabled;

		public static ConfigEntry<int> SunscreenWeight;

		public static ConfigEntry<bool> EnderpearlEnabled;

		public static ConfigEntry<int> EnderpearlWeight;

		public static ConfigEntry<bool> FrogEnabled;

		public static ConfigEntry<int> FrogWeight;

		public static ConfigEntry<int> FrogCount;

		public static ConfigEntry<float> FrogLifetime;

		public static ConfigEntry<bool> GhostBallEnabled;

		public static ConfigEntry<int> GhostBallWeight;

		public static ConfigEntry<float> GhostBallLifetime;

		public static ConfigEntry<bool> MimicLuggageEnabled;

		public static ConfigEntry<int> MimicLuggageWeight;

		public static ConfigEntry<bool> SporeExplosionEnabled;

		public static ConfigEntry<int> SporeExplosionWeight;

		public static ConfigEntry<bool> ShellRainEnabled;

		public static ConfigEntry<int> ShellRainWeight;

		public static ConfigEntry<int> ShellRainCount;

		public static ConfigEntry<bool> AntiGravSphereEnabled;

		public static ConfigEntry<int> AntiGravSphereWeight;

		public static ConfigEntry<float> AntiGravSphereLifetime;

		public static ConfigEntry<bool> CapybaraPoolEnabled;

		public static ConfigEntry<int> CapybaraPoolWeight;

		public static ConfigEntry<bool> BeetlesEnabled;

		public static ConfigEntry<int> BeetlesWeight;

		public static ConfigEntry<int> BeetlesCount;

		public static ConfigEntry<float> BeetlesLifetime;

		public static ConfigEntry<bool> PetrifyScoutEnabled;

		public static ConfigEntry<int> PetrifyScoutWeight;

		public static ConfigEntry<bool> AirPlaneLootEnabled;

		public static ConfigEntry<int> AirPlaneLootWeight;

		public static ConfigEntry<bool> CactusBallsEnabled;

		public static ConfigEntry<int> CactusBallsWeight;

		public static ConfigEntry<int> CactusBallsCount;

		public static ConfigEntry<float> CactusBallsLifetime;

		public static ConfigEntry<bool> FireTornadoEnabled;

		public static ConfigEntry<int> FireTornadoWeight;

		public static ConfigEntry<bool> ReviveScoutEnabled;

		public static ConfigEntry<int> ReviveScoutWeight;

		public static ConfigEntry<bool> BasketBallsEnabled;

		public static ConfigEntry<int> BasketBallsWeight;

		public static ConfigEntry<int> BasketBallsCount;

		public static ConfigEntry<float> BasketBallsLifetime;

		public static void BindAll()
		{
			LuckyBlockItemSpawnWeight = Instance.Bind<int>("Lucky Block Item", "Spawn Weight", 500, "Weight for Lucky Block Item spawn (Rarity Weight Reference: Common 100, Uncommon 50, Rare 35, Epic 20, Legendary 15, Mythic 6, Ridiculously Rare 3)");
			LuckyBlockItemWeight = Instance.Bind<int>("Lucky Block Item", "Item Weight", 1, "Weight for Lucky Block Item spawn");
			LuckyBlockItemMinBreakVelocity = Instance.Bind<float>("Lucky Block Item", "Min Break Velocity", 10f, "Minimum velocity required to break the Lucky Block Item (Recommended to not change this value)");
			TornadoEnabled = Instance.Bind<bool>("Outcomes.Tornado", "Spawn Tornado Enabled", true, "Enable Spawn Tornado outcome");
			TornadoWeight = Instance.Bind<int>("Outcomes.Tornado", "Spawn Tornado Weight", 80, "Weight for Spawn Tornado");
			TornadoMinLifetime = Instance.Bind<float>("Outcomes.Tornado", "Tornado Min Lifetime", 6f, "Minimum lifetime for the tornado (in seconds)");
			TornadoMaxLifetime = Instance.Bind<float>("Outcomes.Tornado", "Tornado Max Lifetime", 10f, "Maximum lifetime for the tornado (in seconds)");
			TornadoForce = Instance.Bind<int>("Outcomes.Tornado", "Tornado Force", 50, "Force applied by the tornado");
			LuggageEnabled = Instance.Bind<bool>("Outcomes.Luggage", "Spawn Luggage Enabled", true, "Enable Spawn Luggage outcome");
			LuggageWeight = Instance.Bind<int>("Outcomes.Luggage", "Spawn Luggage Weight", 110, "Weight for Spawn Luggage");
			BounceEnabled = Instance.Bind<bool>("Outcomes.Bounce Shroom", "Spawn Bounce Shroom Enabled", true, "Enable Spawn Bounce Shroom outcome");
			BounceWeight = Instance.Bind<int>("Outcomes.Bounce Shroom", "Spawn Bounce Shroom Weight", 100, "Weight for Spawn Bounce Shroom");
			ShelfEnabled = Instance.Bind<bool>("Outcomes.Shelf Fungus", "Spawn Shelf Fungus Enabled", true, "Enable Spawn Shelf Fungus outcome");
			ShelfWeight = Instance.Bind<int>("Outcomes.Shelf Fungus", "Spawn Shelf Fungus Weight", 90, "Weight for Spawn Shelf Fungus");
			LuckyRainEnabled = Instance.Bind<bool>("Outcomes.LuckyRain", "Lucky Block Rain Enabled", true, "Enable Lucky Block Rain outcome");
			LuckyRainWeight = Instance.Bind<int>("Outcomes.LuckyRain", "Lucky Block Rain Weight", 75, "Weight for Lucky Block Rain");
			LuckyRainCount = Instance.Bind<int>("Outcomes.LuckyRain", "Lucky Block Count", 3, "Number of lucky blocks to spawn");
			EruptionEnabled = Instance.Bind<bool>("Outcomes.Eruption", "Spawn Eruption Enabled", true, "Enable Spawn Eruption outcome");
			EruptionWeight = Instance.Bind<int>("Outcomes.Eruption", "Spawn Eruption Weight", 90, "Weight for Spawn Eruption");
			PeelRainEnabled = Instance.Bind<bool>("Outcomes.Berrynana Peel Rain", "Berrynana Peel Rain Enabled", true, "Enable Berrynana Peel Rain outcome");
			PeelRainWeight = Instance.Bind<int>("Outcomes.Berrynana Peel Rain", "Berrynana Peel Rain Weight", 100, "Weight for Berrynana Peel Rain");
			PeelRainGridSize = Instance.Bind<int>("Outcomes.Berrynana Peel Rain", "Grid Size", 5, "Grid size for Berrynana Peel Rain (size of 5 = 5x5 grid or 25 peels)");
			PeelRainSpacing = Instance.Bind<float>("Outcomes.Berrynana Peel Rain", "Berrynana Peel Spacing", 1f, "Spacing between the peels");
			PeelRainLifetime = Instance.Bind<float>("Outcomes.Berrynana Peel Rain", "Berrynana Peel Lifetime", 120f, "Time before the peels despawn (in seconds)");
			ExplodeEnabled = Instance.Bind<bool>("Outcomes.Explosion", "Explosion Enabled", true, "Enable Explosion outcome");
			ExplodeWeight = Instance.Bind<int>("Outcomes.Explosion", "Explosion Weight", 80, "Weight for Explosion");
			ScorpoRainEnabled = Instance.Bind<bool>("Outcomes.Scorpion Rain", "Scorpion Rain Enabled", true, "Enable Scorpion Rain outcome");
			ScorpoRainWeight = Instance.Bind<int>("Outcomes.Scorpion Rain", "Scorpion Rain Weight", 60, "Weight for Scorpion Rain");
			ScorpoRainCount = Instance.Bind<int>("Outcomes.Scorpion Rain", "Scorpion Count", 3, "Number of scorpions to spawn");
			ScorpoRainLifetime = Instance.Bind<float>("Outcomes.Scorpion Rain", "Scorpion Lifetime", 60f, "Time before scorpions despawn (in seconds)");
			BerryRainEnabled = Instance.Bind<bool>("Outcomes.Berry Rain", "Berry Rain Enabled", true, "Enable Berry Rain outcome");
			BerryRainWeight = Instance.Bind<int>("Outcomes.Berry Rain", "Berry Rain Weight", 100, "Weight for Berry Rain");
			BerryRainCount = Instance.Bind<int>("Outcomes.Berry Rain", "Berry Count", 4, "Number of berries to spawn");
			SummonScoutmasterEnabled = Instance.Bind<bool>("Outcomes.Scoutmaster", "Spawn Scoutmaster Enabled", false, "Enable Spawn Scoutmaster outcome");
			SummonScoutmasterWeight = Instance.Bind<int>("Outcomes.Scoutmaster", "Spawn Scoutmaster Weight", 50, "Weight for Spawn Scoutmaster");
			RopeSpawnEnabled = Instance.Bind<bool>("Outcomes.Rope/Anti Rope Spawn", "Rope/Anti Rope Spawn Enabled", true, "Enable Rope/Anti Rope Spawn outcome");
			RopeSpawnWeight = Instance.Bind<int>("Outcomes.Rope/Anti Rope Spawn", "Rope/Anti Rope Spawn Weight", 95, "Weight for Rope/Anti Rope Spawn");
			ChaosCloudEnabled = Instance.Bind<bool>("Outcomes.Chaos Cloud", "Chaos Cloud Enabled", true, "Enable Chaos Cloud outcome");
			ChaosCloudWeight = Instance.Bind<int>("Outcomes.Chaos Cloud", "Chaos Cloud Weight", 100, "Weight for Chaos Cloud");
			ZombieEnabled = Instance.Bind<bool>("Outcomes.Zombie", "Spawn Zombie Enabled", true, "Enable Spawn Zombie outcome");
			ZombieWeight = Instance.Bind<int>("Outcomes.Zombie", "Spawn Zombie Weight", 70, "Weight for Spawn Zombie");
			ZombieSprintDistance = Instance.Bind<float>("Outcomes.Zombie", "Zombie Sprint Distance", 30f, "Distance at which the zombie starts sprinting");
			ZombieLungeDistance = Instance.Bind<float>("Outcomes.Zombie", "Zombie Lunge Distance", 15f, "Distance at which the zombie can lunge");
			ZombieLungeRecoveryTime = Instance.Bind<float>("Outcomes.Zombie", "Zombie Lunge Recovery Time", 2f, "Time it takes for the zombie to recover after lunging (in seconds)");
			ZombieLifetime = Instance.Bind<float>("Outcomes.Zombie", "Zombie Lifetime", 90f, "Time before the zombie dies (in seconds)");
			BackpacksEnabled = Instance.Bind<bool>("Outcomes.Backpacks", "Backpack Spawn Enabled", true, "Enable Backpack Spawn outcome");
			BackpacksWeight = Instance.Bind<int>("Outcomes.Backpacks", "Backpack Spawn Weight", 90, "Weight for Backpack Spawn");
			BackpackCount = Instance.Bind<int>("Outcomes.Backpacks", "Backpack Count", 3, "Number of backpacks to spawn");
			PuffHealSpawnEnabled = Instance.Bind<bool>("Outcomes.Remed Fungus Heal", "Remed Fungus Heal Spawn Enabled", true, "Enable Remed Fungus Heal Spawn outcome");
			PuffHealSpawnWeight = Instance.Bind<int>("Outcomes.Remed Fungus Heal", "Remed Fungus Heal Spawn Weight", 100, "Weight for Remed Fungus Heal Spawn");
			EquipmentShowerEnabled = Instance.Bind<bool>("Outcomes.Equipment Shower", "Equipment Shower Enabled", true, "Enable Equipment Shower outcome");
			EquipmentShowerWeight = Instance.Bind<int>("Outcomes.Equipment Shower", "Equipment Shower Weight", 100, "Weight for Equipment Shower");
			EquipmentShowerCount = Instance.Bind<int>("Outcomes.Equipment Shower", "Equipment Count", 4, "Number of equipment pieces to spawn");
			MythicSpawnEnabled = Instance.Bind<bool>("Outcomes.Mythic Item Spawn", "Mythic Item Spawn Enabled", true, "Enable Mythic Item Spawn outcome");
			MythicSpawnWeight = Instance.Bind<int>("Outcomes.Mythic Item Spawn", "Mythic Item Spawn Weight", 85, "Weight for Mythic Item Spawn");
			FlagEnabled = Instance.Bind<bool>("Outcomes.Checkpoint Flag", "Checkpoint Flag Enabled", true, "Enable Checkpoint Flag outcome");
			FlagWeight = Instance.Bind<int>("Outcomes.Checkpoint Flag", "Checkpoint Flag Weight", 90, "Weight for Checkpoint Flag");
			CannonEnabled = Instance.Bind<bool>("Outcomes.Scout Cannon", "Scout Cannon Spawn Enabled", true, "Enable Scout Cannon outcome");
			CannonWeight = Instance.Bind<int>("Outcomes.Scout Cannon", "Scout Cannon Spawn Weight", 95, "Weight for Scout Cannon");
			CookEnabled = Instance.Bind<bool>("Outcomes.Portable Pot", "Portable Pot Spawn Enabled", true, "Enable Portable Pot Spawn outcome");
			CookWeight = Instance.Bind<int>("Outcomes.Portable Pot", "Portable Pot Spawn Weight", 85, "Weight for Portable Pot Spawn");
			SunscreenEnabled = Instance.Bind<bool>("Outcomes.Sunscreen Area", "Sunscreen Area Enabled", true, "Enable Sunscreen area outcome");
			SunscreenWeight = Instance.Bind<int>("Outcomes.Sunscreen Area", "Sunscreen Area Weight", 65, "Weight for Sunscreen area");
			EnderpearlEnabled = Instance.Bind<bool>("Outcomes.Teleport", "Teleport Enabled", true, "Enable Teleport outcome");
			EnderpearlWeight = Instance.Bind<int>("Outcomes.Teleport", "Teleport Weight", 80, "Weight for Teleport");
			FrogEnabled = Instance.Bind<bool>("Outcomes.Frog", "Frog Spawn Enabled", true, "Enable Frog Spawn outcome");
			FrogWeight = Instance.Bind<int>("Outcomes.Frog", "Frog Spawn Weight", 70, "Weight for Frog Spawn");
			FrogCount = Instance.Bind<int>("Outcomes.Frog", "Frog Count", 2, "Number of frogs to spawn");
			FrogLifetime = Instance.Bind<float>("Outcomes.Frog", "Frog Lifetime", 60f, "Time before frogs despawn (in seconds)");
			GhostBallEnabled = Instance.Bind<bool>("Outcomes.Ghost Ball", "Ghost Ball Spawn Enabled", true, "Enable Ghost Ball outcome");
			GhostBallWeight = Instance.Bind<int>("Outcomes.Ghost Ball", "Ghost Ball Spawn Weight", 75, "Weight for Ghost Ball Spawn");
			GhostBallLifetime = Instance.Bind<float>("Outcomes.Ghost Ball", "Ghost Ball Lifetime", 30f, "Time before ghost ball despawns (in seconds)");
			MimicLuggageEnabled = Instance.Bind<bool>("Outcomes.Luggage Mimic", "Luggage Mimic Spawn Enabled", true, "Enable Luggage Mimic outcome");
			MimicLuggageWeight = Instance.Bind<int>("Outcomes.Luggage Mimic", "Luggage Mimic Spawn Weight", 75, "Weight for Luggage Mimic Spawn");
			SporeExplosionEnabled = Instance.Bind<bool>("Outcomes.Spore Explosion", "Spore Explosion Enabled", true, "Enable Spore Explosion outcome");
			SporeExplosionWeight = Instance.Bind<int>("Outcomes.Spore Explosion", "Spore Explosion Weight", 60, "Weight for Spore Explosion");
			ShellRainEnabled = Instance.Bind<bool>("Outcomes.ShellParty", "Shell Party Enabled", true, "Enable Shell Party outcome");
			ShellRainWeight = Instance.Bind<int>("Outcomes.ShellParty", "Shell Party Weight", 100, "Weight for Shell Party");
			ShellRainCount = Instance.Bind<int>("Outcomes.ShellParty", "Shell Party Count", 5, "Number of shells to spawn");
			AntiGravSphereEnabled = Instance.Bind<bool>("Outcomes.Anti Gravity Sphere", "Anti Gravity Sphere Enabled", true, "Enable Anti Gravity Sphere outcome");
			AntiGravSphereWeight = Instance.Bind<int>("Outcomes.Anti Gravity Sphere", "Anti Gravity Sphere Weight", 80, "Weight for Anti Gravity Sphere");
			AntiGravSphereLifetime = Instance.Bind<float>("Outcomes.Anti Gravity Sphere", "Anti Gravity Sphere Lifetime", 60f, "Time before Anti Gravity Sphere despawns (in seconds)");
			CapybaraPoolEnabled = Instance.Bind<bool>("Outcomes.Capybara Pool", "Capybara Pool Enabled", true, "Enable Capybara Pool outcome");
			CapybaraPoolWeight = Instance.Bind<int>("Outcomes.Capybara Pool", "Capybara Pool Weight", 50, "Weight for Capybara Pool");
			BeetlesEnabled = Instance.Bind<bool>("Outcomes.Beetles", "Beetles Enabled", true, "Enable Beetles outcome");
			BeetlesWeight = Instance.Bind<int>("Outcomes.Beetles", "Beetles Weight", 75, "Weight for Beetles");
			BeetlesCount = Instance.Bind<int>("Outcomes.Beetles", "Beetles Count", 4, "Number of beetles to spawn");
			BeetlesLifetime = Instance.Bind<float>("Outcomes.Beetles", "Beetles Lifetime", 60f, "Time before beetles despawn (in seconds)");
			PetrifyScoutEnabled = Instance.Bind<bool>("Outcomes.Petrify Scout", "Petrify Scout Enabled", true, "Enable Petrify Scout outcome");
			PetrifyScoutWeight = Instance.Bind<int>("Outcomes.Petrify Scout", "Petrify Scout Weight", 100, "Weight for Petrify Scout");
			AirPlaneLootEnabled = Instance.Bind<bool>("Outcomes.Airplane Loot", "Airplane Loot Enabled", true, "Enable Airplane Loot outcome");
			AirPlaneLootWeight = Instance.Bind<int>("Outcomes.Airplane Loot", "Airplane Loot Weight", 100, "Weight for Airplane Loot");
			CactusBallsEnabled = Instance.Bind<bool>("Outcomes.Cactus Balls", "Cactus Balls Enabled", true, "Enable Cactus Balls outcome");
			CactusBallsWeight = Instance.Bind<int>("Outcomes.Cactus Balls", "Cactus Balls Weight", 90, "Weight for Cactus Balls");
			CactusBallsCount = Instance.Bind<int>("Outcomes.Cactus Balls", "Cactus Balls Count", 5, "Number of cactus balls to spawn");
			CactusBallsLifetime = Instance.Bind<float>("Outcomes.Cactus Balls", "Cactus Balls Lifetime", 120f, "Time before cactus balls despawn (in seconds)");
			FireTornadoEnabled = Instance.Bind<bool>("Outcomes.Fire Tornado", "Fire Tornado Enabled", true, "Enable Fire Tornado outcome");
			FireTornadoWeight = Instance.Bind<int>("Outcomes.Fire Tornado", "Fire Tornado Weight", 100, "Weight for Fire Tornado");
			ReviveScoutEnabled = Instance.Bind<bool>("Outcomes.Revive Scout", "Revive Scout Enabled", true, "Enable Revive Scout outcome");
			ReviveScoutWeight = Instance.Bind<int>("Outcomes.Revive Scout", "Revive Scout Weight", 200, "Weight for Revive Scout");
			BasketBallsEnabled = Instance.Bind<bool>("Outcomes.BasketBalls", "BasketBalls Enabled", true, "Enable BasketBalls outcome");
			BasketBallsWeight = Instance.Bind<int>("Outcomes.BasketBalls", "BasketBalls Weight", 100, "Weight for BasketBalls");
			BasketBallsCount = Instance.Bind<int>("Outcomes.BasketBalls", "BasketBalls Count", 5, "Number of basketballs to spawn");
			BasketBallsLifetime = Instance.Bind<float>("Outcomes.BasketBalls", "BasketBalls Lifetime", 120f, "Time before basketballs despawn (in seconds)");
			DebugMode = Instance.Bind<bool>("Debug", "Debug Mode", false, "Always trigger the selected outcome");
			ForcedOutcome = Instance.Bind<string>("Debug", "Forced Outcome", "", "Outcome method name to trigger");
		}
	}
	public static class LuckyBlockRarity
	{
		public const Rarity LuckyBlockDefault = (Rarity)(-1);
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("legocool.LuckyBlocks", "Lucky_Blocks", "1.4.0")]
	public class Plugin : BaseUnityPlugin
	{
		private Harmony _harmony;

		public const string Id = "legocool.LuckyBlocks";

		internal static ManualLogSource Log { get; private set; }

		public static string Name => "Lucky_Blocks";

		public static string Version => "1.4.0";

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			_harmony = new Harmony("legocool.LuckBlock");
			_harmony.PatchAll();
			Log = ((BaseUnityPlugin)this).Logger;
			Config.Instance = ((BaseUnityPlugin)this).Config;
			Config.BindAll();
			Outcomes.Initialize();
			BundleLoader.LoadBundleWithName((BaseUnityPlugin)(object)this, "luckyblock.peakbundle", (Action<PeakBundle>)InitLuckyBlock);
			LocalizedText.mainTable["NAME_LUCKYBLOCK"] = new List<string>(new string[14]);
			for (int i = 0; i < 14; i++)
			{
				LocalizedText.mainTable["NAME_LUCKYBLOCK"][i] = "Lucky Block";
			}
			LocalizedText.mainTable["NAME_LUCKYBLOCK"][9] = "幸运方块";
			LootData.RarityWeights.Add((Rarity)(-1), Config.LuckyBlockItemSpawnWeight.Value);
			Log.LogInfo((object)("Plugin " + Name + " is loaded!"));
		}

		private void InitLuckyBlock(PeakBundle bundle)
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			string[] allAssetNames = bundle.GetAllAssetNames();
			foreach (string text in allAssetNames)
			{
				Log.LogInfo((object)("Asset: " + text));
			}
			GameObject val = bundle.LoadAsset<GameObject>("LuckyBlock.prefab");
			LuckyBreakable luckyBreakable = val.AddComponent<LuckyBreakable>();
			luckyBreakable.breakOnCollision = true;
			luckyBreakable.minBreakVelocity = Config.LuckyBlockItemMinBreakVelocity.Value;
			LootData component = val.GetComponent<LootData>();
			component.Rarity = (Rarity)(-1);
			val.GetComponent<Item>().carryWeight = Config.LuckyBlockItemWeight.Value;
			bundle.Mod.RegisterContent();
		}

		private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
		{
			Outcomes.Initialize();
		}

		private void Start()
		{
			SceneManager.sceneLoaded += OnSceneLoaded;
		}

		private void OnDestroy()
		{
			SceneManager.sceneLoaded -= OnSceneLoaded;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}