Decompiled source of RSClasses v2.3.0

RSClasses.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using ClassesManagerReborn;
using HarmonyLib;
using InControl;
using Jotunn.Utils;
using ModdingUtils.Utils;
using Photon.Compression;
using Photon.Pun;
using RSClasses.Extensions;
using RSClasses.MonoBehaviours;
using SimulationChamber;
using Sonigon;
using Sonigon.Internal;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyVersion("0.0.0.0")]
namespace RSClasses
{
	public class CardHolder : MonoBehaviour
	{
		public List<GameObject> Cards;

		public List<GameObject> HiddenCards;

		public static Dictionary<string, CardInfo> cards = new Dictionary<string, CardInfo>();

		internal void RegisterCards()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			Enumerator<GameObject> enumerator = Cards.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					GameObject current = enumerator.Current;
					CustomCard.RegisterUnityCard(current, "RSC", current.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
					CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(current.GetComponent<CardInfo>());
					cards.Add(current.GetComponent<CardInfo>().cardName, current.GetComponent<CardInfo>());
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
			Enumerator<GameObject> enumerator2 = HiddenCards.GetEnumerator();
			try
			{
				while (enumerator2.MoveNext())
				{
					GameObject current2 = enumerator2.Current;
					CustomCard.RegisterUnityCard(current2, "RSC", current2.GetComponent<CardInfo>().cardName, false, (Action<CardInfo>)null);
					CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(current2.GetComponent<CardInfo>());
					Cards.instance.AddHiddenCard(current2.GetComponent<CardInfo>());
					cards.Add(current2.GetComponent<CardInfo>().cardName, current2.GetComponent<CardInfo>());
				}
			}
			finally
			{
				((IDisposable)enumerator2).Dispose();
			}
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.rsmind.rounds.RSClasses", "RSClasses", "2.3.0")]
	[BepInProcess("Rounds.exe")]
	public class RSClasses : BaseUnityPlugin
	{
		private const string ModId = "com.rsmind.rounds.RSClasses";

		private const string ModName = "RSClasses";

		public const string Version = "2.3.0";

		public const string ModInitials = "RSC";

		public bool pickPhase = false;

		public static bool Debug = true;

		internal static AssetBundle assets;

		[field: CompilerGenerated]
		[field: DebuggerBrowsable(/*Could not decode attribute arguments.*/)]
		public static RSClasses instance
		{
			[CompilerGenerated]
			get;
			[CompilerGenerated]
			private set;
		}

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("com.rsmind.rounds.RSClasses");
			val.PatchAll();
			assets = AssetUtils.LoadAssetBundleFromResources("rsclassart", typeof(RSClasses).Assembly);
			if ((Object)(object)assets == (Object)null)
			{
				Debug.Log((object)"Failed to load RSClasses asset bundle");
			}
			assets.LoadAsset<GameObject>("CardHolder").GetComponent<CardHolder>().RegisterCards();
		}

		private void Start()
		{
			instance = this;
		}
	}
	public class RSPlayerStats : MonoBehaviour
	{
		public int scythes = 0;

		public float scytheDamage = 1f;

		public float scytheSpeed = 1f;

		public int barriers = 0;

		public float barrierSpeed = 1f;

		public float orbitalRadius = 1f;

		public int comets = 0;

		public float cometDamage = 1f;

		public float cometSpeed = 1f;

		public float fractureDuration = 0f;

		public float fractureSize = 1f;

		public float reflectionCooldown = 1f;

		public void Apply(Player player)
		{
			player.data.GetAdditionalData().scytheCount += scythes;
			player.data.GetAdditionalData().barrierCount += barriers;
			player.data.GetAdditionalData().scytheDamage *= scytheDamage;
			player.data.GetAdditionalData().orbitalRadius *= orbitalRadius;
			player.data.GetAdditionalData().barrierSpeed *= barrierSpeed;
			player.data.GetAdditionalData().cometCount += comets;
			player.data.GetAdditionalData().cometDamage *= cometDamage;
			player.data.GetAdditionalData().scytheSpeed *= scytheSpeed;
			player.data.GetAdditionalData().cometSpeed *= cometSpeed;
			player.data.GetAdditionalData().fractureDuration += fractureDuration;
			player.data.GetAdditionalData().fractureSize *= fractureSize;
			player.data.GetAdditionalData().reflectionCooldown *= reflectionCooldown;
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class ApplyPlayerStatsPatch : Object
	{
		private static void Postfix(ApplyCardStats __instance, Player ___playerToUpgrade)
		{
			((Component)__instance).GetComponent<RSPlayerStats>()?.Apply(___playerToUpgrade);
		}
	}
}
namespace RSClasses.Extensions
{
	[Serializable]
	public class PlayerAdditionalData : Object
	{
		public bool invert;

		public int posMult;

		public int scytheCount;

		public int barrierCount;

		public int cometCount;

		public float scytheDamage;

		public float orbitalRadius;

		public float barrierSpeed;

		public float scytheSpeed;

		public float cometDamage;

		public float cometSpeed;

		public float fractureDuration;

		public float fractureSize;

		public float reflectionCooldown;

		public PlayerAdditionalData()
		{
			invert = false;
			posMult = 1;
			scytheCount = 0;
			barrierCount = 0;
			scytheDamage = 20f;
			orbitalRadius = 1f;
			scytheSpeed = 250f;
			cometSpeed = 2f;
			cometDamage = 80f;
			cometCount = 0;
			barrierSpeed = 100f;
			fractureDuration = 1f;
			fractureSize = 0.0225f;
			reflectionCooldown = 3f;
		}
	}
	public static class PlayerExtension : Object
	{
		public static readonly ConditionalWeakTable<CharacterData, PlayerAdditionalData> data = new ConditionalWeakTable<CharacterData, PlayerAdditionalData>();

		public static PlayerAdditionalData GetAdditionalData(this CharacterData chara)
		{
			return data.GetOrCreateValue(chara);
		}

		public static void AddData(this CharacterData chara, PlayerAdditionalData value)
		{
			try
			{
				data.Add(chara, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[Serializable]
	public class PlayerActionsAdditionalData : Object
	{
		public PlayerAction selfHarm;

		public PlayerActionsAdditionalData()
		{
			selfHarm = null;
		}
	}
	public static class PlayerActionsExtension : Object
	{
		public static readonly ConditionalWeakTable<PlayerActions, PlayerActionsAdditionalData> data = new ConditionalWeakTable<PlayerActions, PlayerActionsAdditionalData>();

		public static PlayerActionsAdditionalData GetAdditionalData(this PlayerActions playerActions)
		{
			return data.GetOrCreateValue(playerActions);
		}

		public static void AddData(this PlayerActions playerActions, PlayerActionsAdditionalData value)
		{
			try
			{
				data.Add(playerActions, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class PlayerActionsPatchPlayerActions : Object
	{
		private static void Postfix(PlayerActions __instance)
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			__instance.GetAdditionalData().selfHarm = (PlayerAction)typeof(PlayerActions).InvokeMember("CreatePlayerAction", (BindingFlags)292, (Binder)null, (object)__instance, (object[])(object)new Object[1] { (Object)"Voidseer Hotkey" });
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class PlayerActionsPatchCreateWithControllerBindings : Object
	{
		private static void Postfix(ref PlayerActions __result)
		{
			__result.GetAdditionalData().selfHarm.AddDefaultBinding((InputControlType)11);
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class PlayerActionsPatchCreateWithKeyboardBindings : Object
	{
		private static void Postfix(ref PlayerActions __result)
		{
			__result.GetAdditionalData().selfHarm.AddDefaultBinding((Key[])(object)new Key[1] { (Key)40 });
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class GeneralInputPatchUpdate : Object
	{
		private static void Postfix(GeneralInput __instance)
		{
			try
			{
				if (((OneAxisInputControl)((Component)__instance).GetComponent<CharacterData>().playerActions.GetAdditionalData().selfHarm).WasPressed && Object.op_Implicit((Object)(object)((Component)__instance).GetComponentInChildren<Voidseer_Mono>()))
				{
					((Component)__instance).GetComponentInChildren<Voidseer_Mono>().Trigger();
				}
			}
			catch (Object)
			{
			}
		}
	}
}
namespace RSClasses.MonoBehaviours
{
	internal class Astro_Mono : MonoBehaviour
	{
		private Player player;

		private Scythe_Mono scythes;

		private Barrier_Mono barriers;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			scythes = ExtensionMethods.GetOrAddComponent<Scythe_Mono>(((Component)player).gameObject, false);
			barriers = ExtensionMethods.GetOrAddComponent<Barrier_Mono>(((Component)player).gameObject, false);
		}

		private void OnDestroy()
		{
			Object.Destroy((Object)(object)scythes);
			Object.Destroy((Object)(object)barriers);
		}
	}
	internal class Barrier : MonoBehaviour
	{
		private Transform origin;

		private Animator anim;

		private Player player;

		private BarrierCollider barrierCollider;

		private GameObject barrier;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			barrier = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Barrier"), ((Component)player).transform);
			barrier.SetActive(true);
			barrierCollider = ExtensionMethods.GetOrAddComponent<BarrierCollider>(((Component)barrier.transform.GetChild(0)).gameObject, false);
			anim = barrier.GetComponent<Animator>();
			origin = Enumerable.Last<Transform>((IEnumerable<Transform>)(object)barrier.GetComponentsInChildren<Transform>());
		}

		private void Update()
		{
			((Component)barrierCollider).gameObject.SetActive(!player.data.dead);
		}

		public void UpdatePos(double angle, float radius)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_00b4: 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)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			double num = angle * Math.PI / 180.0;
			Vector3 localPosition = default(Vector3);
			((Vector3)(ref localPosition))..ctor((float)((double)radius * Math.Sin(num)), (float)((double)radius * Math.Cos(num)), 0f);
			Quaternion rotation = default(Quaternion);
			((Quaternion)(ref rotation)).eulerAngles = new Vector3(0f, 0f, 0f - (float)angle);
			barrier.transform.localPosition = localPosition;
			barrier.transform.rotation = rotation;
			((Component)barrierCollider).transform.position = barrier.transform.position;
			((Component)barrierCollider).transform.rotation = barrier.transform.rotation;
			((Component)barrierCollider).transform.localScale = Vector3.Scale(barrier.transform.localScale, ((Component)player).transform.localScale);
		}

		public void DoHit()
		{
			//IL_001d: 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_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Expected O, but got Unknown
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			anim.SetTrigger("OnBlock");
			float num = barrier.transform.lossyScale.y * 5f;
			Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)origin).transform.position), num);
			if (!player.data.view.IsMine)
			{
				return;
			}
			Collider2D[] array2 = array;
			foreach (Collider2D val in array2)
			{
				Damagable component = ((Component)val).gameObject.GetComponent<Damagable>();
				HealthHandler component2 = ((Component)val).gameObject.GetComponent<HealthHandler>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					continue;
				}
				Vector2 val3;
				if (Object.op_Implicit((Object)(object)component2))
				{
					Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player");
					SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)origin).transform, ((Component)component).transform);
					val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(((Component)player).transform.position);
					component2.CallTakeForce(((Vector2)(ref val3)).normalized * 5000f, (ForceMode2D)1, true, false, 0f);
					if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent<Block>().blockedThisFrame)
					{
						continue;
					}
				}
				val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)origin).transform.position);
				component.CallTakeDamage(((Vector2)(ref val3)).normalized * (0.1f * player.data.maxHealth + 10f), Vector2.op_Implicit(((Component)origin).transform.position), barrier.gameObject, player, true);
			}
		}

		public void SetColor(Color color)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			barrier.GetComponent<SpriteRenderer>().color = color;
			Enumerable.Last<SpriteRenderer>((IEnumerable<SpriteRenderer>)(object)barrier.GetComponentsInChildren<SpriteRenderer>()).color = color;
		}

		public void SetScale(float scale)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			barrier.transform.localScale = new Vector3(scale, scale, scale);
		}

		private void OnDestroy()
		{
			Object.Destroy((Object)(object)barrier);
			Object.Destroy((Object)(object)barrierCollider);
		}
	}
	internal class BarrierCollider : MonoBehaviour
	{
		private Player player;

		private void Start()
		{
			((Component)this).gameObject.layer = LayerMask.NameToLayer("Projectile");
			player = ((Component)this).GetComponentInParent<Player>();
			((Component)this).gameObject.transform.SetParent((Transform)null, true);
		}

		public void Update()
		{
			((Component)this).gameObject.SetActive(!player.data.dead);
		}
	}
	public class Barrier_Mono : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass8_0 : Object
		{
			public Barrier barrier;

			public Barrier_Mono <>4__this;

			internal void <UpdateStats>b__0()
			{
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				((Component)barrier).GetComponent<Barrier>().SetColor(<>4__this.color);
			}

			internal void <UpdateStats>b__1()
			{
				barrier.SetScale(<>4__this.player.data.GetAdditionalData().orbitalRadius * (19f / 160f));
			}
		}

		private Block block;

		private double angle = 0.0;

		private Color color = new Color(1f, 1f, 63f / 85f);

		private List<Barrier> barriers = new List<Barrier>();

		private Player player;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			block = ((Component)this).GetComponentInParent<CharacterData>().block;
			block.BlockAction = (Action<BlockTriggerType>)(object)Delegate.Combine((Delegate)(object)block.BlockAction, (Delegate)(object)new Action<BlockTriggerType>(OnBlock));
			GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart);
		}

		private void FixedUpdate()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			angle = (angle - (double)(player.data.GetAdditionalData().barrierSpeed * TimeHandler.deltaTime)) % 360.0;
			int num = 0;
			Enumerator<Barrier> enumerator = barriers.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Barrier current = enumerator.Current;
					double num2 = (angle + (double)(num % 2 * 180 + 45 * (num / 2))) % 360.0;
					current.UpdatePos(num2, player.data.GetAdditionalData().orbitalRadius * 0.0125f);
					num++;
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}

		private void OnBlock(BlockTriggerType blockTrigger)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			if (!player.data.currentCards.Contains(CardHolder.cards["Shield Spikes"]))
			{
				return;
			}
			Enumerator<Barrier> enumerator = barriers.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Barrier current = enumerator.Current;
					current.DoHit();
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}

		public void UpdateStats()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Expected O, but got Unknown
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Expected O, but got Unknown
			while (Enumerable.Count<Barrier>((IEnumerable<Barrier>)(object)barriers) < player.data.GetAdditionalData().barrierCount)
			{
				GameObject val = new GameObject("Barrier", (Type[])(object)new Type[1] { typeof(Barrier) });
				val.transform.SetParent(((Component)player).transform);
				barriers.Add(val.GetComponent<Barrier>());
			}
			while (Enumerable.Count<Barrier>((IEnumerable<Barrier>)(object)barriers) > Math.Max(player.data.GetAdditionalData().barrierCount, 0))
			{
				Object.Destroy((Object)(object)barriers[0]);
				barriers.Remove(barriers[0]);
			}
			if (player.data.currentCards.Contains(CardHolder.cards["Guardian"]))
			{
				color = new Color(0.4f, 1f, 1f);
			}
			else if (player.data.currentCards.Contains(CardHolder.cards["Stargazer"]))
			{
				color = player.GetTeamColors().color * 1.75f;
			}
			else if (player.data.currentCards.Contains(CardHolder.cards["Harvester"]))
			{
				color = new Color(0.69803923f, 0f, 1f);
			}
			Enumerator<Barrier> enumerator = barriers.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					<>c__DisplayClass8_0 CS$<>8__locals0 = new <>c__DisplayClass8_0();
					CS$<>8__locals0.<>4__this = this;
					CS$<>8__locals0.barrier = enumerator.Current;
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
					{
						//IL_0011: Unknown result type (might be due to invalid IL or missing references)
						((Component)CS$<>8__locals0.barrier).GetComponent<Barrier>().SetColor(CS$<>8__locals0.<>4__this.color);
					});
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
					{
						CS$<>8__locals0.barrier.SetScale(CS$<>8__locals0.<>4__this.player.data.GetAdditionalData().orbitalRadius * (19f / 160f));
					});
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}

		private void OnDestroy()
		{
			GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart);
			block.BlockAction = (Action<BlockTriggerType>)(object)Delegate.Remove((Delegate)(object)block.BlockAction, (Delegate)(object)new Action<BlockTriggerType>(OnBlock));
			while (Enumerable.Count<Barrier>((IEnumerable<Barrier>)(object)barriers) > 0)
			{
				Object.Destroy((Object)(object)barriers[0]);
				barriers.Remove(barriers[0]);
			}
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		private IEnumerator PointStart(IGameModeHandler gm)
		{
			angle = 0.0;
			UpdateStats();
			yield break;
		}
	}
	internal class Comet : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass12_0 : Object
		{
			public GameObject newDust;

			internal void <DoHit>b__0()
			{
				Object.Destroy((Object)(object)newDust);
			}
		}

		public Vector3 velocity = new Vector3(0f, 0f, 0f);

		public bool active = true;

		private float baseScale = 1f;

		private float dustTimer = 0f;

		public Player player;

		public GameObject comet;

		private GameObject stardust;

		private TrailRenderer trailRenderer;

		private Dictionary<int, float> hitPlayers = new Dictionary<int, float>();

		private Random rand;

		private void Awake()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			player = ((Component)this).GetComponentInParent<Player>();
			comet = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Comet"), (Transform)null);
			stardust = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Stardust"), (Transform)null);
			IncludeAxisExtensions.SetPosition(stardust, new Vector3(100000f, 100000f, 0f), (IncludedAxes)3, false);
		}

		private void Start()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			comet.SetActive(true);
			trailRenderer = Enumerable.Last<TrailRenderer>((IEnumerable<TrailRenderer>)(object)comet.GetComponentsInChildren<TrailRenderer>());
			comet.GetComponentInChildren<SpriteRenderer>().color = player.GetTeamColors().color * 1.75f;
			((Renderer)trailRenderer).material.SetColor(Shader.PropertyToID("_Color"), player.GetTeamColors().color);
			((Renderer)trailRenderer).material.SetColor(Shader.PropertyToID("_EmissionColor"), player.GetTeamColors().color * 1.75f);
			stardust.GetComponent<Stardust_Mono>().player = player;
			stardust.GetComponent<SpriteRenderer>().color = player.GetTeamColors().color * 1.75f;
		}

		public void DoHit()
		{
			//IL_005d: 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_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Expected O, but got Unknown
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Expected O, but got Unknown
			//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0330: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_033e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			if (player.data.currentCards.Contains(CardHolder.cards["Stardust"]))
			{
				dustTimer += Time.deltaTime;
				while (dustTimer > 0.15f)
				{
					<>c__DisplayClass12_0 CS$<>8__locals0 = new <>c__DisplayClass12_0();
					CS$<>8__locals0.newDust = Object.Instantiate<GameObject>(stardust, comet.transform.position, new Quaternion(0f, 0f, (float)(rand.Next() % 360), (float)(rand.Next() % 360)));
					CS$<>8__locals0.newDust.GetComponent<Stardust_Mono>().rotationDirection = rand.Next(-120, 120);
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 2f, (Action)delegate
					{
						Object.Destroy((Object)(object)CS$<>8__locals0.newDust);
					});
					dustTimer -= 0.15f;
				}
			}
			float num = 1f;
			if (player.data.currentCards.Contains(CardHolder.cards["Stellar Impact"]))
			{
				Mathf.Clamp((((Vector3)(ref velocity)).magnitude / 5f - 1f) * player.data.GetAdditionalData().cometSpeed, 1f, 3f * player.data.GetAdditionalData().cometSpeed);
			}
			if (!player.data.view.IsMine)
			{
				return;
			}
			int[] array = Enumerable.ToArray<int>((IEnumerable<int>)(object)hitPlayers.Keys);
			int[] array2 = array;
			foreach (int num2 in array2)
			{
				Dictionary<int, float> val = hitPlayers;
				int num3 = num2;
				val[num3] -= TimeHandler.deltaTime;
				if (hitPlayers[num2] <= 0f)
				{
					hitPlayers.Remove(num2);
				}
			}
			float num4 = ((Component)this).transform.lossyScale.y * 0.9f;
			Collider2D[] array3 = Physics2D.OverlapCircleAll(Vector2.op_Implicit(comet.transform.position), num4);
			Collider2D[] array4 = array3;
			foreach (Collider2D val2 in array4)
			{
				Damagable component = ((Component)val2).gameObject.GetComponent<Damagable>();
				HealthHandler component2 = ((Component)val2).gameObject.GetComponent<HealthHandler>();
				Vector2 val4;
				if (Object.op_Implicit((Object)(object)component2))
				{
					Player val3 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player");
					if ((Object)(object)val3 == (Object)(object)player || hitPlayers.ContainsKey(val3.playerID))
					{
						continue;
					}
					SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform);
					val4 = Vector2.op_Implicit(((Component)val3).transform.position) - Vector2.op_Implicit(comet.transform.position);
					component2.CallTakeForce(((Vector2)(ref val4)).normalized * 2500f, (ForceMode2D)1, true, false, 0f);
					hitPlayers[val3.playerID] = 1f;
					if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent<Block>().blockedThisFrame)
					{
						continue;
					}
				}
				if (Object.op_Implicit((Object)(object)component))
				{
					val4 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)this).transform.position);
					component.CallTakeDamage(((Vector2)(ref val4)).normalized * (player.data.GetAdditionalData().cometDamage * num), Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true);
				}
			}
		}

		public void UpdatePos(Vector3 playerPos)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: 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_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = playerPos - comet.transform.position;
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			float num = Vector3.Distance(comet.transform.position, playerPos) / 2f;
			float num2 = baseScale;
			if (player.data.currentCards.Contains(CardHolder.cards["Icemelt"]))
			{
				num2 *= (((double)num < 7.5) ? (0f - num / 7.5f + 2f) : 1f);
			}
			trailRenderer.widthMultiplier = num2;
			comet.transform.localScale = new Vector3(num2, num2, num2);
			float num3 = 100f / num;
			velocity *= (float)Math.Pow(0.949999988079071, (double)Time.deltaTime);
			velocity += new Vector3(normalized.x * num3, normalized.y * num3) * Time.deltaTime;
			if (((Vector3)(ref velocity)).magnitude > 15f)
			{
				velocity *= 15f / ((Vector3)(ref velocity)).magnitude;
			}
			Transform transform = comet.transform;
			transform.position += velocity * Time.deltaTime * player.data.GetAdditionalData().cometSpeed;
			Quaternion rotation = default(Quaternion);
			float num4 = (float)Math.Atan2((double)((Vector3)(ref velocity)).normalized.x, (double)(0f - ((Vector3)(ref velocity)).normalized.y));
			((Quaternion)(ref rotation)).eulerAngles = new Vector3(0f, 0f, (float)((double)num4 * (180.0 / Math.PI)) - 90f);
			comet.transform.rotation = rotation;
		}

		public void SetScale(float scale)
		{
			baseScale = scale;
		}

		private void OnDestroy()
		{
			Object.Destroy((Object)(object)comet);
		}

		public Comet()
		{
			//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_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_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			DateTime now = DateTime.Now;
			rand = new Random(((DateTime)(ref now)).Millisecond);
			((MonoBehaviour)this)..ctor();
		}
	}
	public class Comet_Mono : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass7_0 : Object
		{
			public Comet comet;

			public Comet_Mono <>4__this;

			internal void <UpdateStats>b__0()
			{
				comet.SetScale(<>4__this.player.data.GetAdditionalData().orbitalRadius * 0.5f + 0.5f);
			}
		}

		private double angle = 0.0;

		private float rotation = 0f;

		private bool active = false;

		private List<Comet> comets = new List<Comet>();

		private Player player;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd);
			GameModeManager.AddHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart);
			GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart);
			GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
		}

		private void FixedUpdate()
		{
			//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_0030: Unknown result type (might be due to invalid IL or missing references)
			if (!active)
			{
				return;
			}
			Enumerator<Comet> enumerator = comets.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Comet current = enumerator.Current;
					current.UpdatePos(((Component)player).transform.position);
					current.DoHit();
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}

		public void UpdateStats()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: 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_0126: Expected O, but got Unknown
			while (Enumerable.Count<Comet>((IEnumerable<Comet>)(object)comets) < player.data.GetAdditionalData().cometCount)
			{
				GameObject val = new GameObject("Comet", (Type[])(object)new Type[1] { typeof(Comet) });
				val.transform.SetParent(((Component)player).transform);
				comets.Add(val.GetComponent<Comet>());
				val.GetComponent<Comet>().player = player;
			}
			while (Enumerable.Count<Comet>((IEnumerable<Comet>)(object)comets) > Math.Max(player.data.GetAdditionalData().cometCount, 0))
			{
				Object.Destroy((Object)(object)comets[0]);
				comets.Remove(comets[0]);
			}
			Enumerator<Comet> enumerator = comets.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					<>c__DisplayClass7_0 CS$<>8__locals0 = new <>c__DisplayClass7_0();
					CS$<>8__locals0.<>4__this = this;
					CS$<>8__locals0.comet = enumerator.Current;
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
					{
						CS$<>8__locals0.comet.SetScale(CS$<>8__locals0.<>4__this.player.data.GetAdditionalData().orbitalRadius * 0.5f + 0.5f);
					});
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}

		private void OnDestroy()
		{
			GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd);
			GameModeManager.RemoveHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart);
			GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart);
			GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
			while (Enumerable.Count<Comet>((IEnumerable<Comet>)(object)comets) > 0)
			{
				Object.Destroy((Object)(object)comets[0]);
				comets.Remove(comets[0]);
			}
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		private IEnumerator PickEnd(IGameModeHandler gm)
		{
			UpdateStats();
			yield break;
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		private IEnumerator PointStart(IGameModeHandler gm)
		{
			rotation = 0f;
			angle = 0.0;
			int index = 0;
			Enumerator<Comet> enumerator = comets.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Comet comet = enumerator.Current;
					comet.comet.transform.position = ((Component)player).transform.position + new Vector3(0f, 7.5f - (float)(15 * index), 0f);
					comet.velocity = new Vector3(0f, 0f, 0f);
					index++;
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
			yield break;
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		private IEnumerator BattleStart(IGameModeHandler gm)
		{
			active = true;
			yield break;
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		private IEnumerator PointEnd(IGameModeHandler gm)
		{
			active = false;
			yield break;
		}
	}
	public class ForcedReflection_Mono : MonoBehaviour
	{
		private Player player;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			Gun gun = player.data.weaponHandler.gun;
			gun.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)gun.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
		}

		private void OnShootProjectileAction(GameObject obj)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			GameObject val = new GameObject();
			val.AddComponent<ForcedReflectionEffect>();
			val.transform.SetParent(obj.transform);
		}
	}
	public class ForcedReflectionEffect : RayHitEffect
	{
		private Random rand;

		private SoundParameterIntensity soundParameterIntensity;

		private SoundEvent reflectSound;

		private void Start()
		{
			AudioClip val = RSClasses.assets.LoadAsset<AudioClip>("reflect.ogg");
			SoundContainer val2 = ScriptableObject.CreateInstance<SoundContainer>();
			val2.setting.volumeIntensityEnable = true;
			val2.audioClip[0] = val;
			reflectSound = ScriptableObject.CreateInstance<SoundEvent>();
			reflectSound.soundContainerArray[0] = val2;
		}

		public override HasToReturn DoHitEffect(HitInfo hit)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)hit.transform))
			{
				return (HasToReturn)1;
			}
			Player componentInParent = ((Component)hit.transform).GetComponentInParent<Player>();
			if (!Object.op_Implicit((Object)(object)componentInParent))
			{
				return (HasToReturn)1;
			}
			if (componentInParent.data.view.IsMine && rand.Next() % 2 == 0)
			{
				soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master;
				SoundManager.Instance.PlayAtPosition(reflectSound, hit.transform, hit.transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
				((Component)componentInParent).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
				((Component)componentInParent).transform.SetPositionAndRotation(new Vector3(0f - ((Component)componentInParent).transform.position.x, ((Component)componentInParent).transform.position.y, ((Component)componentInParent).transform.position.z), ((Component)componentInParent).transform.rotation);
				componentInParent.data.block.RPCA_DoBlock(false, false, (BlockTriggerType)0, default(Vector3), false);
			}
			return (HasToReturn)1;
		}

		public ForcedReflectionEffect()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			DateTime now = DateTime.Now;
			rand = new Random(((DateTime)(ref now)).Millisecond);
			soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);
			((RayHitEffect)this)..ctor();
		}
	}
	public class ForcedRefraction_Mono : MonoBehaviour
	{
		private Player player;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			Gun gun = player.data.weaponHandler.gun;
			gun.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)gun.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
		}

		private void OnShootProjectileAction(GameObject obj)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			GameObject val = new GameObject();
			val.AddComponent<ForcedRefractionEffect>();
			val.transform.SetParent(obj.transform);
		}
	}
	public class ForcedRefractionEffect : RayHitEffect
	{
		private Random rand;

		private SoundParameterIntensity soundParameterIntensity;

		private SoundEvent reflectSound;

		private void Start()
		{
			AudioClip val = RSClasses.assets.LoadAsset<AudioClip>("reflect.ogg");
			SoundContainer val2 = ScriptableObject.CreateInstance<SoundContainer>();
			val2.setting.volumeIntensityEnable = true;
			val2.audioClip[0] = val;
			reflectSound = ScriptableObject.CreateInstance<SoundEvent>();
			reflectSound.soundContainerArray[0] = val2;
		}

		public override HasToReturn DoHitEffect(HitInfo hit)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)hit.transform))
			{
				return (HasToReturn)1;
			}
			Player componentInParent = ((Component)hit.transform).GetComponentInParent<Player>();
			if (!Object.op_Implicit((Object)(object)componentInParent))
			{
				return (HasToReturn)1;
			}
			if (componentInParent.data.view.IsMine)
			{
				rand.Next();
				if (rand.Next() % 2 == 0)
				{
					soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master;
					SoundManager.Instance.PlayAtPosition(reflectSound, hit.transform, hit.transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
					((Component)componentInParent).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
					((Component)componentInParent).transform.SetPositionAndRotation(new Vector3(((Component)componentInParent).transform.position.x, 0f - ((Component)componentInParent).transform.position.y, ((Component)componentInParent).transform.position.z), ((Component)componentInParent).transform.rotation);
					componentInParent.data.block.RPCA_DoBlock(false, false, (BlockTriggerType)0, default(Vector3), false);
				}
			}
			return (HasToReturn)1;
		}

		public ForcedRefractionEffect()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			DateTime now = DateTime.Now;
			rand = new Random(((DateTime)(ref now)).Millisecond);
			soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);
			((RayHitEffect)this)..ctor();
		}
	}
	public class KaleidoParty_Mono : MonoBehaviour
	{
		private Player player;

		private Gun gun;

		public void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			gun = player.data.weaponHandler.gun;
			Gun obj = gun;
			obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
		}

		public void OnShootProjectileAction(GameObject obj)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Expected I4, but got Unknown
			if (Object.op_Implicit((Object)(object)obj))
			{
				RayHitReflect orAddComponent = ExtensionMethods.GetOrAddComponent<RayHitReflect>(obj, false);
				try
				{
					GunAmmo val = (GunAmmo)ExtensionMethods.GetFieldValue((object)gun, "gunAmmo");
					int num = (int)(Int32)ExtensionMethods.GetFieldValue((object)val, "currentAmmo");
					orAddComponent.reflects += num - 1;
				}
				catch (Object)
				{
				}
			}
		}

		public void OnDestroy()
		{
			Gun obj = gun;
			obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
		}
	}
	public class Mirror_Mono : MonoBehaviour
	{
		private Player player;

		private Gun gun;

		private SimulatedGun[] savedGuns = (SimulatedGun[])(object)new SimulatedGun[4];

		private static GameObject _stopRecursionObj;

		private static GameObject _PoisonObj;

		private static GameObject _DazzleObj;

		private static GameObject _ColdObj;

		public static GameObject StopRecursionObj
		{
			get
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Expected O, but got Unknown
				if ((Object)(object)_stopRecursionObj == (Object)null)
				{
					_stopRecursionObj = new GameObject("A_StopRecursion", (Type[])(object)new Type[1] { typeof(StopRecursion) });
					Object.DontDestroyOnLoad((Object)(object)_stopRecursionObj);
				}
				return _stopRecursionObj;
			}
		}

		public static ObjectsToSpawn[] StopRecursionSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
		{
			new ObjectsToSpawn
			{
				AddToProjectile = StopRecursionObj
			}
		};

		public static GameObject PoisonObj
		{
			get
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Expected O, but got Unknown
				if ((Object)(object)_PoisonObj == (Object)null)
				{
					_PoisonObj = new GameObject("A_Poison", (Type[])(object)new Type[1] { typeof(RayHitPoison) });
					Object.DontDestroyOnLoad((Object)(object)_PoisonObj);
				}
				return _PoisonObj;
			}
		}

		public static ObjectsToSpawn[] PoisonSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
		{
			new ObjectsToSpawn
			{
				AddToProjectile = PoisonObj
			}
		};

		public static GameObject DazzleObj
		{
			get
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Expected O, but got Unknown
				if ((Object)(object)_DazzleObj == (Object)null)
				{
					_DazzleObj = new GameObject("A_Dazzle", (Type[])(object)new Type[1] { typeof(RayHitBash) });
					Object.DontDestroyOnLoad((Object)(object)_DazzleObj);
				}
				return _DazzleObj;
			}
		}

		public static ObjectsToSpawn[] DazzleSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
		{
			new ObjectsToSpawn
			{
				AddToProjectile = DazzleObj
			}
		};

		public static GameObject ColdObj
		{
			get
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Expected O, but got Unknown
				if ((Object)(object)_ColdObj == (Object)null)
				{
					_ColdObj = new GameObject("A_Cold", (Type[])(object)new Type[1] { typeof(ChillingTouch) });
					Object.DontDestroyOnLoad((Object)(object)_ColdObj);
				}
				return _ColdObj;
			}
		}

		public static ObjectsToSpawn[] ColdSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
		{
			new ObjectsToSpawn
			{
				AddToProjectile = ColdObj
			}
		};

		public void Start()
		{
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			player = ((Component)this).GetComponentInParent<Player>();
			gun = player.data.weaponHandler.gun;
			Gun obj = gun;
			obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
			if ((Object)(object)savedGuns[0] == (Object)null)
			{
				savedGuns[0] = new GameObject("Mirror Gun").AddComponent<SimulatedGun>();
			}
			if ((Object)(object)savedGuns[1] == (Object)null)
			{
				savedGuns[1] = new GameObject("Sapphire Gun").AddComponent<SimulatedGun>();
			}
			if ((Object)(object)savedGuns[2] == (Object)null)
			{
				savedGuns[2] = new GameObject("Ruby Gun").AddComponent<SimulatedGun>();
			}
			if ((Object)(object)savedGuns[3] == (Object)null)
			{
				savedGuns[3] = new GameObject("Emerald Gun").AddComponent<SimulatedGun>();
			}
		}

		public void OnShootProjectileAction(GameObject obj)
		{
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_036e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: Unknown result type (might be due to invalid IL or missing references)
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_040e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0603: Unknown result type (might be due to invalid IL or missing references)
			//IL_0613: Unknown result type (might be due to invalid IL or missing references)
			//IL_0618: Unknown result type (might be due to invalid IL or missing references)
			//IL_0623: Unknown result type (might be due to invalid IL or missing references)
			//IL_0628: Unknown result type (might be due to invalid IL or missing references)
			//IL_062d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0649: Unknown result type (might be due to invalid IL or missing references)
			//IL_064e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0653: Unknown result type (might be due to invalid IL or missing references)
			//IL_0658: Unknown result type (might be due to invalid IL or missing references)
			//IL_065d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0671: Unknown result type (might be due to invalid IL or missing references)
			//IL_0681: Unknown result type (might be due to invalid IL or missing references)
			//IL_0690: Unknown result type (might be due to invalid IL or missing references)
			//IL_069b: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_06db: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0703: Unknown result type (might be due to invalid IL or missing references)
			//IL_0719: Unknown result type (might be due to invalid IL or missing references)
			//IL_072e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0739: Unknown result type (might be due to invalid IL or missing references)
			//IL_0749: Unknown result type (might be due to invalid IL or missing references)
			//IL_074e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0756: Unknown result type (might be due to invalid IL or missing references)
			//IL_0758: Unknown result type (might be due to invalid IL or missing references)
			//IL_075d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0786: Unknown result type (might be due to invalid IL or missing references)
			//IL_079c: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0803: Unknown result type (might be due to invalid IL or missing references)
			//IL_0818: Unknown result type (might be due to invalid IL or missing references)
			//IL_0822: Unknown result type (might be due to invalid IL or missing references)
			//IL_0827: Unknown result type (might be due to invalid IL or missing references)
			//IL_0832: Unknown result type (might be due to invalid IL or missing references)
			//IL_0837: Unknown result type (might be due to invalid IL or missing references)
			//IL_051a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0530: Unknown result type (might be due to invalid IL or missing references)
			//IL_0545: Unknown result type (might be due to invalid IL or missing references)
			//IL_0550: Unknown result type (might be due to invalid IL or missing references)
			//IL_0566: Unknown result type (might be due to invalid IL or missing references)
			//IL_057b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0496: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04db: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f0: Unknown result type (might be due to invalid IL or missing references)
			if (obj.GetComponentsInChildren<StopRecursion>().Length != 0)
			{
				return;
			}
			SimulatedGun val = savedGuns[0];
			val.CopyGunStatsExceptActions(gun);
			val.CopyAttackAction(gun);
			val.CopyShootProjectileAction(gun);
			((Gun)val).ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)((Gun)val).ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
			((Gun)val).numberOfProjectiles = 1;
			((Gun)val).bursts = 0;
			((Gun)val).spread = 0f;
			((Gun)val).evenSpread = 0f;
			((Gun)val).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
			if (player.data.currentCards.Contains(CardHolder.cards["Sapphire Shards"]))
			{
				((Gun)val).slow = 0.7f;
				((Gun)val).projectileColor = new Color(0f, 172f, 191f);
			}
			SimulatedGun val2 = savedGuns[1];
			val2.CopyGunStatsExceptActions(gun);
			val2.CopyAttackAction(gun);
			val2.CopyShootProjectileAction(gun);
			((Gun)val2).ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)((Gun)val2).ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
			((Gun)val2).numberOfProjectiles = 1;
			((Gun)val2).bursts = 0;
			((Gun)val2).spread = 0f;
			((Gun)val2).evenSpread = 0f;
			((Gun)val2).gravity = ((Gun)val2).gravity * -1f;
			((Gun)val2).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val2).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
			SimulatedGun val3 = savedGuns[2];
			val3.CopyGunStatsExceptActions(gun);
			val3.CopyAttackAction(gun);
			val3.CopyShootProjectileAction(gun);
			((Gun)val3).ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)((Gun)val3).ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
			((Gun)val3).numberOfProjectiles = 1;
			((Gun)val3).bursts = 0;
			((Gun)val3).spread = 0f;
			((Gun)val3).evenSpread = 0f;
			((Gun)val3).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val3).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
			if (player.data.currentCards.Contains(CardHolder.cards["Emerald Glitter"]))
			{
				((Gun)val3).damage = ((Gun)val3).damage * 1.25f;
				((Gun)val3).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val3).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)PoisonSpawn));
				((Gun)val3).projectileColor = Color.green;
			}
			SimulatedGun val4 = savedGuns[3];
			val4.CopyGunStatsExceptActions(gun);
			val4.CopyAttackAction(gun);
			val4.CopyShootProjectileAction(gun);
			((Gun)val4).ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)((Gun)val4).ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
			((Gun)val4).numberOfProjectiles = 1;
			((Gun)val4).bursts = 0;
			((Gun)val4).spread = 0f;
			((Gun)val4).evenSpread = 0f;
			((Gun)val4).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val4).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
			if (player.data.currentCards.Contains(CardHolder.cards["Ruby Dust"]))
			{
				((Gun)val4).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val4).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)DazzleSpawn));
				((Gun)val4).projectileColor = Color.magenta;
			}
			if (!player.data.view.IsMine && !PhotonNetwork.OfflineMode)
			{
				return;
			}
			val.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x * -1f, obj.transform.position.y, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.left) * Vector3.left, 1f, 1f, (Transform)null, false);
			if (player.data.currentCards.Contains(CardHolder.cards["Prism"]))
			{
				if (!player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"]))
				{
					val2.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x, obj.transform.position.y * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.up) * Vector3.up, 1f, 1f, (Transform)null, false);
				}
				val2.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x * -1f, obj.transform.position.y * -1f, 0f), new Vector3(obj.transform.forward.x * -1f, obj.transform.forward.y * -1f, 0f), 1f, 1f, (Transform)null, false);
			}
			if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"]))
			{
				val.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x, obj.transform.position.y * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.up) * Vector3.up, 1f, 1f, (Transform)null, false);
				Vector3 val5 = Quaternion.AngleAxis(45f, Vector3.forward) * Vector3.up;
				val3.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y, obj.transform.position.x, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, val5) * val5, 1f, 1f, (Transform)null, false);
				val5 = Quaternion.AngleAxis(45f, Vector3.forward) * Vector3.left;
				val3.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y * -1f, obj.transform.position.x * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, val5) * val5, 1f, 1f, (Transform)null, false);
				val4.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y * -1f, obj.transform.position.x, 0f), Quaternion.AngleAxis(90f, Vector3.forward) * obj.transform.forward, 1f, 1f, (Transform)null, false);
				val4.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y, obj.transform.position.x * -1f, 0f), Quaternion.AngleAxis(270f, Vector3.forward) * obj.transform.forward, 1f, 1f, (Transform)null, false);
			}
		}

		public void OnDestroy()
		{
			Gun obj = gun;
			obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
			Object.Destroy((Object)(object)savedGuns[0]);
			Object.Destroy((Object)(object)savedGuns[1]);
			Object.Destroy((Object)(object)savedGuns[2]);
			Object.Destroy((Object)(object)savedGuns[3]);
			Object.Destroy((Object)(object)savedGuns[4]);
			Object.Destroy((Object)(object)savedGuns[5]);
			Object.Destroy((Object)(object)savedGuns[6]);
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class GeneralInputPatchUpdate : Object
	{
		private static GameObject mirror;

		private static GameObject prism;

		private static GameObject kaleido1;

		private static GameObject kaleido2;

		private static void Postfix(GeneralInput __instance)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Expected O, but got Unknown
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Expected O, but got Unknown
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Expected O, but got Unknown
			//IL_0316: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_0420: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cd: Unknown result type (might be due to invalid IL or missing references)
			Player player = ((CharacterData)ExtensionMethods.GetFieldValue((object)__instance, "data")).player;
			if ((!player.data.view.IsMine && !PhotonNetwork.OfflineMode) || !player.data.currentCards.Contains(CardHolder.cards["Mirror Mage"]))
			{
				return;
			}
			if ((Object)(object)mirror == (Object)null)
			{
				mirror = new GameObject();
				LineRenderer orAddComponent = ExtensionMethods.GetOrAddComponent<LineRenderer>(mirror, false);
				orAddComponent.startWidth = 0.25f;
				orAddComponent.endWidth = 0.25f;
				((Renderer)orAddComponent).material = RSClasses.assets.LoadAsset<Material>("Mirror");
				orAddComponent.SetPositions((Vector3[])(object)new Vector3[2]
				{
					new Vector3(0f, -1000f, 0f),
					new Vector3(0f, 1000f, 0f)
				});
			}
			if (player.data.currentCards.Contains(CardHolder.cards["Prism"]) && (Object)(object)prism == (Object)null)
			{
				prism = new GameObject();
				LineRenderer orAddComponent2 = ExtensionMethods.GetOrAddComponent<LineRenderer>(prism, false);
				orAddComponent2.startWidth = 0.25f;
				orAddComponent2.endWidth = 0.25f;
				((Renderer)orAddComponent2).material = RSClasses.assets.LoadAsset<Material>("Prism");
				orAddComponent2.SetPositions((Vector3[])(object)new Vector3[2]
				{
					new Vector3(-1000f, 0f, 0f),
					new Vector3(1000f, 0f, 0f)
				});
			}
			if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"]))
			{
				if ((Object)(object)kaleido1 == (Object)null)
				{
					kaleido1 = new GameObject();
					LineRenderer orAddComponent3 = ExtensionMethods.GetOrAddComponent<LineRenderer>(kaleido1, false);
					orAddComponent3.startWidth = 0.25f;
					orAddComponent3.endWidth = 0.25f;
					((Renderer)orAddComponent3).material = RSClasses.assets.LoadAsset<Material>("Kaleido");
					orAddComponent3.SetPositions((Vector3[])(object)new Vector3[2]
					{
						new Vector3(-1000f, -1000f, 0f),
						new Vector3(1000f, 1000f, 0f)
					});
				}
				if ((Object)(object)kaleido2 == (Object)null)
				{
					kaleido2 = new GameObject();
					LineRenderer orAddComponent4 = ExtensionMethods.GetOrAddComponent<LineRenderer>(kaleido2, false);
					orAddComponent4.startWidth = 0.25f;
					orAddComponent4.endWidth = 0.25f;
					((Renderer)orAddComponent4).material = RSClasses.assets.LoadAsset<Material>("Kaleido");
					orAddComponent4.SetPositions((Vector3[])(object)new Vector3[2]
					{
						new Vector3(1000f, -1000f, 0f),
						new Vector3(-1000f, 1000f, 0f)
					});
				}
			}
			if (player.data.currentCards.Contains(CardHolder.cards["Mirror Mind"]))
			{
				if (((Component)player).transform.position.x * (float)player.data.GetAdditionalData().posMult > 5f)
				{
					player.data.GetAdditionalData().posMult *= -1;
				}
				if (((Component)player).transform.position.x * (float)player.data.GetAdditionalData().posMult > 0f)
				{
					player.data.GetAdditionalData().invert = !player.data.GetAdditionalData().invert;
					((Component)player).transform.position = new Vector3(0f, ((Component)player).transform.position.y, ((Component)player).transform.position.z);
					ExtensionMethods.SetFieldValue((object)player.data.playerVel, "velocity", (object)Vector2.Scale(new Vector2(-1f, 1f), (Vector2)ExtensionMethods.GetFieldValue((object)player.data.playerVel, "velocity")));
				}
				if (player.data.GetAdditionalData().invert)
				{
					__instance.direction = new Vector3(0f - __instance.direction.x, __instance.direction.y, __instance.direction.z);
				}
			}
		}
	}
	internal class PolishedMirror_Mono : MonoBehaviour
	{
		private Dictionary<int, List<GameObject>> reflections = new Dictionary<int, List<GameObject>>();

		private Player player;

		public void Awake()
		{
			player = ((Component)this).GetComponentInParent<Player>();
		}

		public void Update()
		{
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_031f: Unknown result type (might be due to invalid IL or missing references)
			//IL_032f: Unknown result type (might be due to invalid IL or missing references)
			//IL_033f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0349: Unknown result type (might be due to invalid IL or missing references)
			//IL_0354: Unknown result type (might be due to invalid IL or missing references)
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0405: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_041a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0447: Unknown result type (might be due to invalid IL or missing references)
			//IL_0458: Unknown result type (might be due to invalid IL or missing references)
			//IL_0469: Unknown result type (might be due to invalid IL or missing references)
			//IL_0473: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			if (!player.data.view.IsMine)
			{
				return;
			}
			IEnumerator<Player> enumerator = Enumerable.Where<Player>((IEnumerable<Player>)(object)PlayerManager.instance.players, (Func<Player, bool>)([CompilerGenerated] (Player p) => p.playerID != player.playerID)).GetEnumerator();
			try
			{
				while (((IEnumerator)enumerator).MoveNext())
				{
					Player current = enumerator.Current;
					if (!reflections.ContainsKey(current.playerID))
					{
						List<GameObject> val = new List<GameObject>();
						GameObject val2 = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Reflection"), ((Component)current).transform);
						val2.transform.SetPositionAndRotation(new Vector3(1000f, 1000f, 1000f), ((Component)current).transform.rotation);
						val2.SetActive(true);
						val2.GetComponent<SpriteRenderer>().color = current.GetTeamColors().color;
						val.Add(val2);
						val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
						val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
						val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
						val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
						val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
						val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
						reflections[current.playerID] = val;
					}
					reflections[current.playerID][0].transform.SetPositionAndRotation(new Vector3(0f - ((Component)current).transform.position.x, ((Component)current).transform.position.y, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
					if (player.data.currentCards.Contains(CardHolder.cards["Prism"]))
					{
						reflections[current.playerID][1].transform.SetPositionAndRotation(new Vector3(((Component)current).transform.position.x, 0f - ((Component)current).transform.position.y, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
						reflections[current.playerID][2].transform.SetPositionAndRotation(new Vector3(0f - ((Component)current).transform.position.x, 0f - ((Component)current).transform.position.y, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
					}
					if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"]))
					{
						reflections[current.playerID][3].transform.SetPositionAndRotation(new Vector3(((Component)current).transform.position.y, ((Component)current).transform.position.x, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
						reflections[current.playerID][4].transform.SetPositionAndRotation(new Vector3(0f - ((Component)current).transform.position.y, ((Component)current).transform.position.x, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
						reflections[current.playerID][5].transform.SetPositionAndRotation(new Vector3(((Component)current).transform.position.y, 0f - ((Component)current).transform.position.x, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
						reflections[current.playerID][6].transform.SetPositionAndRotation(new Vector3(0f - ((Component)current).transform.position.y, 0f - ((Component)current).transform.position.x, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
					}
				}
			}
			finally
			{
				if (enumerator != null)
				{
					((IDisposable)enumerator).Dispose();
				}
			}
		}

		private void OnDestroy()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			Enumerator<int, List<GameObject>> enumerator = reflections.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Enumerator<GameObject> enumerator2 = enumerator.Current.Value.GetEnumerator();
					try
					{
						while (enumerator2.MoveNext())
						{
							GameObject current = enumerator2.Current;
							Object.Destroy((Object)(object)current);
						}
					}
					finally
					{
						((IDisposable)enumerator2).Dispose();
					}
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}
	}
	internal class Scythe : MonoBehaviour
	{
		public bool active = true;

		public bool hitBullets = true;

		public bool ableToHit = true;

		private Player player;

		private GameObject scythe;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			scythe = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Scythe"), ((Component)player).transform);
			scythe.SetActive(true);
		}

		public void DoHit()
		{
			//IL_0007: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: 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_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			float y = ((Component)this).transform.localScale.y;
			Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(scythe.transform.position), y);
			if (!player.data.view.IsMine)
			{
				return;
			}
			Collider2D[] array2 = array;
			foreach (Collider2D val in array2)
			{
				Damagable component = ((Component)val).gameObject.GetComponent<Damagable>();
				HealthHandler component2 = ((Component)val).gameObject.GetComponent<HealthHandler>();
				Vector2 val3;
				if (Object.op_Implicit((Object)(object)component2))
				{
					Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player");
					SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform);
					val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(scythe.transform.position);
					component2.CallTakeForce(((Vector2)(ref val3)).normalized * 2500f, (ForceMode2D)1, true, false, 0f);
					ableToHit = false;
					if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent<Block>().blockedThisFrame)
					{
						continue;
					}
				}
				if (Object.op_Implicit((Object)(object)component))
				{
					float num = 0f;
					if (player.data.currentCards.Contains(CardHolder.cards["Dark Harvest"]))
					{
						num = player.data.stats.lifeSteal * 50f;
					}
					val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)this).transform.position);
					component.CallTakeDamage(((Vector2)(ref val3)).normalized * (player.data.GetAdditionalData().scytheDamage + num), Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true);
				}
			}
		}

		public void UpdatePos(double angle, float rotation, float radius)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: 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)
			double num = angle * Math.PI / 180.0;
			Vector3 localPosition = default(Vector3);
			((Vector3)(ref localPosition))..ctor((float)((double)radius * Math.Sin(num)), (float)((double)radius * Math.Cos(num)), 0f);
			Quaternion rotation2 = default(Quaternion);
			((Quaternion)(ref rotation2)).eulerAngles = new Vector3(0f, 0f, rotation);
			scythe.transform.localPosition = localPosition;
			scythe.transform.rotation = rotation2;
		}

		public void SetColor(Color color)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			scythe.GetComponent<SpriteRenderer>().color = color;
		}

		public void SetScale(float scale)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			scythe.transform.localScale = new Vector3(scale, scale, scale);
		}

		private void OnDestroy()
		{
			Object.Destroy((Object)(object)scythe);
		}
	}
	public class Scythe_Mono : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass8_0 : Object
		{
			public Scythe scythe;

			public Scythe_Mono <>4__this;

			internal void <UpdateStats>b__0()
			{
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				((Component)scythe).GetComponent<Scythe>().SetColor(<>4__this.color);
			}

			internal void <UpdateStats>b__1()
			{
				scythe.SetScale(<>4__this.player.data.GetAdditionalData().orbitalRadius * (5f / 32f));
			}
		}

		private double angle = 0.0;

		private float rotation = 0f;

		private bool active = false;

		private Color color = new Color(1f, 1f, 63f / 85f);

		private List<Scythe> scythes = new List<Scythe>();

		private Player player;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart);
			GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
		}

		private void FixedUpdate()
		{
			//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)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			angle += player.data.GetAdditionalData().scytheSpeed * TimeHandler.deltaTime;
			if (angle > 360.0)
			{
				Enumerator<Scythe> enumerator = scythes.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						Scythe current = enumerator.Current;
						current.ableToHit = true;
					}
				}
				finally
				{
					((IDisposable)enumerator).Dispose();
				}
				angle -= 360.0;
			}
			rotation = (rotation - 1200f * TimeHandler.deltaTime) % 360f;
			int num = 0;
			Enumerator<Scythe> enumerator2 = scythes.GetEnumerator();
			try
			{
				while (enumerator2.MoveNext())
				{
					Scythe current2 = enumerator2.Current;
					double num2 = angle + (double)(360f / (float)Enumerable.Count<Scythe>((IEnumerable<Scythe>)(object)scythes) * (float)num);
					current2.UpdatePos(num2, rotation, player.data.GetAdditionalData().orbitalRadius * 2.5f);
					if (active && current2.ableToHit)
					{
						current2.DoHit();
					}
					if (current2.ableToHit)
					{
						Color val = color;
						val.a = 1f;
						current2.SetColor(val);
					}
					else
					{
						Color val2 = color;
						val2.a = 0.5f;
						current2.SetColor(val2);
					}
					num++;
				}
			}
			finally
			{
				((IDisposable)enumerator2).Dispose();
			}
		}

		public void UpdateStats()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Expected O, but got Unknown
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Expected O, but got Unknown
			while (Enumerable.Count<Scythe>((IEnumerable<Scythe>)(object)scythes) < player.data.GetAdditionalData().scytheCount)
			{
				GameObject val = new GameObject("Scythe", (Type[])(object)new Type[1] { typeof(Scythe) });
				val.transform.SetParent(((Component)player).transform);
				scythes.Add(val.GetComponent<Scythe>());
			}
			while (Enumerable.Count<Scythe>((IEnumerable<Scythe>)(object)scythes) > Math.Max(player.data.GetAdditionalData().scytheCount, 0))
			{
				Object.Destroy((Object)(object)scythes[0]);
				scythes.Remove(scythes[0]);
			}
			if (player.data.currentCards.Contains(CardHolder.cards["Harvester"]))
			{
				color = new Color(0.69803923f, 0f, 1f);
			}
			else if (player.data.currentCards.Contains(CardHolder.cards["Stargazer"]))
			{
				color = player.GetTeamColors().color * 1.75f;
			}
			else if (player.data.currentCards.Contains(CardHolder.cards["Guardian"]))
			{
				color = new Color(0.4f, 1f, 1f);
			}
			Enumerator<Scythe> enumerator = scythes.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					<>c__DisplayClass8_0 CS$<>8__locals0 = new <>c__DisplayClass8_0();
					CS$<>8__locals0.<>4__this = this;
					CS$<>8__locals0.scythe = enumerator.Current;
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
					{
						//IL_0011: Unknown result type (might be due to invalid IL or missing references)
						((Component)CS$<>8__locals0.scythe).GetComponent<Scythe>().SetColor(CS$<>8__locals0.<>4__this.color);
					});
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
					{
						CS$<>8__locals0.scythe.SetScale(CS$<>8__locals0.<>4__this.player.data.GetAdditionalData().orbitalRadius * (5f / 32f));
					});
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}

		private void OnDestroy()
		{
			GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart);
			GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
			while (Enumerable.Count<Scythe>((IEnumerable<Scythe>)(object)scythes) > 0)
			{
				Object.Destroy((Object)(object)scythes[0]);
				scythes.Remove(scythes[0]);
			}
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		private IEnumerator PointStart(IGameModeHandler gm)
		{
			active = true;
			rotation = 0f;
			angle = 0.0;
			UpdateStats();
			yield break;
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		private IEnumerator PointEnd(IGameModeHandler gm)
		{
			active = false;
			yield break;
		}
	}
	internal class ShatterEffect : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass13_0 : Object
		{
			public GameObject shatter;

			public ShatterEffect <>4__this;

			internal void <TriggerFracture>b__0()
			{
				<>4__this.DestroyShatter(shatter);
			}
		}

		private GameObject reflection;

		private Random rand;

		private List<GameObject> shatters;

		private SoundEvent reflectSound;

		private SoundEvent shatterSound;

		private float cooldownTimer;

		private Player player;

		private SoundParameterIntensity soundParameterIntensity;

		private void Awake()
		{
			player = ((Component)this).gameObject.GetComponentInParent<Player>();
		}

		private void Start()
		{
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			AudioClip val = RSClasses.assets.LoadAsset<AudioClip>("shatter.ogg");
			SoundContainer val2 = ScriptableObject.CreateInstance<SoundContainer>();
			val2.setting.volumeIntensityEnable = true;
			val2.audioClip[0] = val;
			shatterSound = ScriptableObject.CreateInstance<SoundEvent>();
			shatterSound.soundContainerArray[0] = val2;
			AudioClip val3 = RSClasses.assets.LoadAsset<AudioClip>("reflect.ogg");
			SoundContainer val4 = ScriptableObject.CreateInstance<SoundContainer>();
			val4.setting.volumeIntensityEnable = true;
			val4.audioClip[0] = val3;
			reflectSound = ScriptableObject.CreateInstance<SoundEvent>();
			reflectSound.soundContainerArray[0] = val4;
			if (player.data.view.IsMine)
			{
				reflection = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Reflection"), ((Component)player).transform);
				reflection.SetActive(true);
				reflection.GetComponent<SpriteRenderer>().color = player.GetTeamColors().color;
			}
		}

		public void Update()
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: 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)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			if (player.data.view.IsMine)
			{
				reflection.transform.SetPositionAndRotation(new Vector3(0f - ((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z), ((Component)player).transform.rotation);
			}
		}

		public void FixedUpdate()
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			cooldownTimer = ((cooldownTimer - TimeHandler.deltaTime < 0f) ? 0f : (cooldownTimer - TimeHandler.deltaTime));
			if (!player.data.view.IsMine || shatters.Count <= 0)
			{
				return;
			}
			Enumerator<GameObject> enumerator = shatters.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					GameObject current = enumerator.Current;
					Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(current.transform.position), 166.66f * player.data.GetAdditionalData().fractureSize);
					Collider2D[] array2 = array;
					foreach (Collider2D val in array2)
					{
						HealthHandler component = ((Component)val).gameObject.GetComponent<HealthHandler>();
						if (Object.op_Implicit((Object)(object)component))
						{
							Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component, "player");
							if (val2.playerID != player.playerID)
							{
								Vector2 val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(current.transform.position);
								((Damagable)component).CallTakeDamage(((Vector2)(ref val3)).normalized * Time.deltaTime * player.data.weaponHandler.gun.damage, Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true);
							}
						}
					}
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}

		public void TriggerReflect()
		{
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			if (coo