Decompiled source of RSClasses v3.1.3

RSClasses.dll

Decompiled a week 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 BepInEx.Bootstrap;
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using ClassesManagerReborn;
using ExitGames.Client.Photon;
using HarmonyLib;
using InControl;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.Utils;
using Photon.Pun;
using Photon.Realtime;
using RSClasses.MonoBehaviors;
using RSClasses.MonoBehaviours;
using RSClasses.Utilities;
using RarityLib.Utils;
using SimulationChamber;
using Sonigon;
using Sonigon.Internal;
using TabInfo.Extensions;
using TabInfo.Utils;
using ToggleCardsCategories;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.Extensions;
using UnboundLib.GameModes;
using UnboundLib.Networking;
using UnityEngine;
using UnityEngine.UI;
using WeaponsManager;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace 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()
		{
			foreach (GameObject card in Cards)
			{
				CustomCard.RegisterUnityCard(card, "RSC", card.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
				CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(card.GetComponent<CardInfo>());
				cards.Add(card.GetComponent<CardInfo>().cardName, card.GetComponent<CardInfo>());
			}
			foreach (GameObject hiddenCard in HiddenCards)
			{
				CustomCard.RegisterUnityCard(hiddenCard, "RSC", hiddenCard.GetComponent<CardInfo>().cardName, false, (Action<CardInfo>)null);
				CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(hiddenCard.GetComponent<CardInfo>());
				Cards.instance.AddHiddenCard(hiddenCard.GetComponent<CardInfo>());
				cards.Add(hiddenCard.GetComponent<CardInfo>().cardName, hiddenCard.GetComponent<CardInfo>());
			}
		}
	}
	internal class AstronomerClass : ClassHandler
	{
		[CompilerGenerated]
		private sealed class <Init>d__0 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AstronomerClass <>4__this;

			private CardInfo <classCard>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Init>d__0(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<classCard>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<classCard>5__1 = CardHolder.cards["Astronomer"];
					ClassesRegistry.Register(CardHolder.cards["Astronomer"], (CardType)1, 0);
					ClassesRegistry.Register(CardHolder.cards["Domain Extension"], (CardType)16, CardHolder.cards["Astronomer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Faster Barriers"], (CardType)16, CardHolder.cards["Astronomer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Gravity Well"], (CardType)16, CardHolder.cards["Astronomer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Sharper Scythes"], (CardType)16, CardHolder.cards["Astronomer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Bigger Barriers"], (CardType)8, CardHolder.cards["Astronomer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Twin Scythes"], (CardType)8, CardHolder.cards["Astronomer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Stargazer"], (CardType)2, (CardInfo[])(object)new CardInfo[2]
					{
						CardHolder.cards["Bigger Barriers"],
						CardHolder.cards["Twin Scythes"]
					}, 0);
					ClassesRegistry.Register(CardHolder.cards["Coupled Comets"], (CardType)16, CardHolder.cards["Stargazer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Icemelt"], (CardType)16, CardHolder.cards["Stargazer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Stardust"], (CardType)16, CardHolder.cards["Stargazer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Stellar Impact"], (CardType)16, CardHolder.cards["Stargazer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Guardian"], (CardType)2, (CardInfo[])(object)new CardInfo[2]
					{
						CardHolder.cards["Bigger Barriers"],
						CardHolder.cards["Twin Scythes"]
					}, 0);
					ClassesRegistry.Register(CardHolder.cards["Perfect Guard"], (CardType)8, CardHolder.cards["Shield Spikes"], 0);
					ClassesRegistry.Register(CardHolder.cards["Shield Spikes"], (CardType)16, CardHolder.cards["Guardian"], 0);
					ClassesRegistry.Register(CardHolder.cards["Healing Shield"], (CardType)16, CardHolder.cards["Guardian"], 0);
					ClassesRegistry.Register(CardHolder.cards["Harvester"], (CardType)2, (CardInfo[])(object)new CardInfo[2]
					{
						CardHolder.cards["Bigger Barriers"],
						CardHolder.cards["Twin Scythes"]
					}, 0);
					ClassesRegistry.Register(CardHolder.cards["Harvest Sickle"], (CardType)8, CardHolder.cards["Harvester"], 0);
					ClassesRegistry.Register(CardHolder.cards["Soul Scythe"], (CardType)16, CardHolder.cards["Harvester"], 0);
					ClassesRegistry.Register(CardHolder.cards["Death's Blade"], (CardType)16, CardHolder.cards["Harvester"], 0);
					ClassesRegistry.Register(CardHolder.cards["Dark Harvest"], (CardType)16, CardHolder.cards["Harvest Sickle"], 0);
					<>2__current = null;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[IteratorStateMachine(typeof(<Init>d__0))]
		public override IEnumerator Init()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Init>d__0(0)
			{
				<>4__this = this
			};
		}
	}
	internal class KnightClass : ClassHandler
	{
		[CompilerGenerated]
		private sealed class <Init>d__0 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public KnightClass <>4__this;

			private CardInfo <classCard>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Init>d__0(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<classCard>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<classCard>5__1 = CardHolder.cards["Knight"];
					ClassesRegistry.Register(CardHolder.cards["Knight"], (CardType)1, 0);
					ClassesRegistry.Register(CardHolder.cards["Longsword"], (CardType)16, CardHolder.cards["Knight"], 0);
					ClassesRegistry.Register(CardHolder.cards["Lunge"], (CardType)8, CardHolder.cards["Knight"], 0);
					ClassesRegistry.Register(CardHolder.cards["Parry"], (CardType)8, CardHolder.cards["Knight"], 0);
					ClassesRegistry.Register(CardHolder.cards["Crusader"], (CardType)2, CardHolder.cards["Parry"], 0);
					ClassesRegistry.Register(CardHolder.cards["Heavily Armored"], (CardType)16, CardHolder.cards["Crusader"], 0);
					ClassesRegistry.Register(CardHolder.cards["Divine Smite"], (CardType)8, CardHolder.cards["Crusader"], 0);
					ClassesRegistry.Register(CardHolder.cards["Shield Bash"], (CardType)16, CardHolder.cards["Crusader"], 0);
					ClassesRegistry.Register(CardHolder.cards["Absolute End"], (CardType)16, CardHolder.cards["Divine Smite"], 0);
					ClassesRegistry.Register(CardHolder.cards["Spectre"], (CardType)2, CardHolder.cards["Lunge"], 0);
					ClassesRegistry.Register(CardHolder.cards["Ghostly Form"], (CardType)16, CardHolder.cards["Spectre"], 0);
					ClassesRegistry.Register(CardHolder.cards["Refine Blade"], (CardType)16, CardHolder.cards["Spectre"], 0);
					ClassesRegistry.Register(CardHolder.cards["Spectral Saber"], (CardType)8, CardHolder.cards["Spectre"], 0);
					ClassesRegistry.Register(CardHolder.cards["Phantom Lunge"], (CardType)16, CardHolder.cards["Spectral Saber"], 0);
					<>2__current = null;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[IteratorStateMachine(typeof(<Init>d__0))]
		public override IEnumerator Init()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Init>d__0(0)
			{
				<>4__this = this
			};
		}
	}
	internal class MirrorMageClass : ClassHandler
	{
		[CompilerGenerated]
		private sealed class <Init>d__0 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public MirrorMageClass <>4__this;

			private CardInfo <classCard>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Init>d__0(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<classCard>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<classCard>5__1 = CardHolder.cards["Mirror Mage"];
					ClassesRegistry.Register(CardHolder.cards["Mirror Mage"], (CardType)1, 0);
					ClassesRegistry.Register(CardHolder.cards["Polished Mirror"], (CardType)16, CardHolder.cards["Mirror Mage"], 0);
					ClassesRegistry.Register(CardHolder.cards["Prism"], (CardType)8, CardHolder.cards["Mirror Mage"], 0);
					ClassesRegistry.Register(CardHolder.cards["Reflection Replacement"], (CardType)8, CardHolder.cards["Mirror Mage"], 0);
					ClassesRegistry.Register(CardHolder.cards["Mirror Mind"], (CardType)8, CardHolder.cards["Reflection Replacement"], 0);
					ClassesRegistry.Register(CardHolder.cards["Fracture"], (CardType)8, CardHolder.cards["Reflection Replacement"], 0);
					ClassesRegistry.Register(CardHolder.cards["Voidseer"], (CardType)2, CardHolder.cards["Fracture"], 0);
					ClassesRegistry.Register(CardHolder.cards["Shatter"], (CardType)16, CardHolder.cards["Voidseer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Weakened Mirror"], (CardType)16, CardHolder.cards["Voidseer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Forced Reflection"], (CardType)16, CardHolder.cards["Voidseer"], 0);
					ClassesRegistry.Register(CardHolder.cards["Forced Refraction"], (CardType)16, (CardInfo[])(object)new CardInfo[2]
					{
						CardHolder.cards["Voidseer"],
						CardHolder.cards["Prism"]
					}, 0);
					ClassesRegistry.Register(CardHolder.cards["Kaleido Witch"], (CardType)2, (CardInfo[])(object)new CardInfo[2]
					{
						CardHolder.cards["Prism"],
						CardHolder.cards["Mirror Mind"]
					}, 0);
					ClassesRegistry.Register(CardHolder.cards["Emerald Glitter"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0);
					ClassesRegistry.Register(CardHolder.cards["Ruby Dust"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0);
					ClassesRegistry.Register(CardHolder.cards["Sapphire Shards"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0);
					ClassesRegistry.Register(CardHolder.cards["Kaleido Party"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0);
					<>2__current = null;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[IteratorStateMachine(typeof(<Init>d__0))]
		public override IEnumerator Init()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Init>d__0(0)
			{
				<>4__this = this
			};
		}
	}
	public class AbsoluteKill : MonoBehaviour
	{
		public class AbsoluteKillHitEffect : RayHitEffect
		{
			public bool active = true;

			public override HasToReturn DoHitEffect(HitInfo hit)
			{
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0098: Unknown result type (might be due to invalid IL or missing references)
				//IL_0095: Unknown result type (might be due to invalid IL or missing references)
				//IL_0082: Unknown result type (might be due to invalid IL or missing references)
				if (!Object.op_Implicit((Object)(object)hit.transform) || !active)
				{
					return (HasToReturn)1;
				}
				Player component = ((Component)hit.transform).GetComponent<Player>();
				if (component != null && (Object)(object)component != (Object)null)
				{
					component.data.stats.remainingRespawns = 0;
					if (component.data.view.IsMine)
					{
						component.data.view.RPC("RPCA_Die", (RpcTarget)0, new object[1] { hit.normal });
					}
				}
				return (HasToReturn)1;
			}
		}

		internal Gun sword;

		private ObjectsToSpawn effect;

		private void Start()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			WeaponManager componentInParent = ((Component)this).GetComponentInParent<WeaponManager>();
			sword = componentInParent.GetWeapon("RSC_Sword");
			effect = new ObjectsToSpawn();
			effect.AddToProjectile = new GameObject("AbsoluteKillEffect", new Type[1] { typeof(AbsoluteKillHitEffect) });
			sword.objectsToSpawn = CollectionExtensions.AddItem<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)sword.objectsToSpawn, effect).ToArray();
		}

		private void OnDestroy()
		{
			sword.objectsToSpawn = sword.objectsToSpawn.Where((ObjectsToSpawn x) => (Object)(object)x.effect.GetComponent<AbsoluteKillHitEffect>() == (Object)null).ToArray();
		}
	}
	public class AnimationParticlePlayer : MonoBehaviour
	{
		private ParticleSystem[] particles;

		private void Start()
		{
			particles = ((Component)this).GetComponentsInChildren<ParticleSystem>();
		}

		private void PlayParticles()
		{
			ParticleSystem[] array = particles;
			foreach (ParticleSystem val in array)
			{
				val.Play();
			}
		}
	}
	public class HeaterShield : MonoBehaviour
	{
		private Player player;

		private float rotVel;

		private float currentRot;

		private Transform position;

		internal GameObject shieldCollider;

		private void Start()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			player = ((Component)this).GetComponentInParent<Player>();
			((Graphic)((Component)this).GetComponentInChildren<Image>()).color = player.GetTeamColors().color;
			position = ((Component)this).transform.GetChild(0);
			shieldCollider = ((Component)position.GetChild(0)).gameObject;
			shieldCollider.transform.SetParent((Transform)null);
		}

		private void OnDisable()
		{
			shieldCollider.SetActive(false);
		}

		private void OnEnable()
		{
			shieldCollider.SetActive(true);
		}

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

		private void Update()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_00e5: Unknown result type (might be due to invalid IL or missing references)
			float num = Vector2.SignedAngle(Vector2.up, Vector2.op_Implicit(player.data.aimDirection));
			if (num - currentRot > 180f)
			{
				currentRot += 360f;
			}
			if (currentRot - num > 180f)
			{
				currentRot -= 360f;
			}
			rotVel = FRILerp.Lerp(rotVel, (num - currentRot) * 2.5f, 10f);
			currentRot += rotVel * TimeHandler.deltaTime;
			((Component)this).transform.localEulerAngles = new Vector3(0f, 0f, currentRot);
			shieldCollider.transform.SetPositionAndRotation(position.position, position.rotation);
		}
	}
	public class KaleidoBounce : MonoBehaviour
	{
		private float sinceBounce = 1f;

		private Camera mainCam;

		private RayHitReflect reflect;

		private Vector2 lastNormal;

		private ProjectileHit projHit;

		private RayHitBulletSound bulletSound;

		private PhotonView view;

		private bool positive;

		private bool positive2;

		private void Start()
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: 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)
			((Component)this).GetComponentInParent<ChildRPC>().childRPCsVector2Vector2IntInt.Add("KaleidoBounce", DoHit);
			view = ((Component)this).GetComponentInParent<PhotonView>();
			bulletSound = ((Component)this).GetComponentInParent<RayHitBulletSound>();
			projHit = ((Component)this).GetComponentInParent<ProjectileHit>();
			MirrorBounce[] componentsInChildren = ((Component)((Component)this).transform.root).GetComponentsInChildren<MirrorBounce>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				if (i > 0)
				{
					Object.Destroy((Object)(object)componentsInChildren[i]);
				}
			}
			mainCam = ((Component)((Component)MainCam.instance).transform).GetComponent<Camera>();
			reflect = ((Component)this).GetComponentInParent<RayHitReflect>();
			positive = ((Component)this).transform.position.x + ((Component)this).transform.position.y > 0f;
			positive2 = ((Component)this).transform.position.x - ((Component)this).transform.position.y > 0f;
		}

		private void FixedUpdate()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: 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_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: 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_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)
			//IL_00c2: 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_019e: 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_0182: 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_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			sinceBounce += Time.fixedDeltaTime;
			if (!view.IsMine || sinceBounce < 0.1f || (((Component)this).transform.position.x + ((Component)this).transform.position.y != 0f && ((Component)this).transform.position.x + ((Component)this).transform.position.y > 0f == positive && ((Component)this).transform.position.x - ((Component)this).transform.position.y != 0f && ((Component)this).transform.position.x - ((Component)this).transform.position.y > 0f == positive2))
			{
				return;
			}
			RaycastHit2D val = default(RaycastHit2D);
			Vector2 val2 = new Vector2(1f, -1f);
			((RaycastHit2D)(ref val)).normal = ((Vector2)(ref val2)).normalized;
			if (Math.Abs(((Component)this).transform.position.x + ((Component)this).transform.position.y) < Math.Abs(((Component)this).transform.position.x - ((Component)this).transform.position.y))
			{
				val2 = new Vector2(1f, 1f);
				((RaycastHit2D)(ref val)).normal = ((Vector2)(ref val2)).normalized;
			}
			((RaycastHit2D)(ref val)).point = Vector2.op_Implicit(((Component)this).transform.position);
			int num = -1;
			if (Object.op_Implicit((Object)(object)((RaycastHit2D)(ref val)).transform))
			{
				PhotonView component = ((Component)((RaycastHit2D)(ref val)).transform.root).GetComponent<PhotonView>();
				if (Object.op_Implicit((Object)(object)component))
				{
					num = component.ViewID;
				}
			}
			int num2 = -1;
			if (num == -1)
			{
				Collider2D[] componentsInChildren = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					if ((Object)(object)componentsInChildren[i] == (Object)(object)((RaycastHit2D)(ref val)).collider)
					{
						num2 = i;
					}
				}
			}
			((Component)this).GetComponentInParent<ChildRPC>().CallFunction("KaleidoBounce", ((RaycastHit2D)(ref val)).point, ((RaycastHit2D)(ref val)).normal, num, num2);
			sinceBounce = 0f;
		}

		private void DoHit(Vector2 hitPos, Vector2 hitNormal, int viewID = -1, int colliderID = -1)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			HitInfo val = new HitInfo();
			val.point = hitPos;
			val.normal = hitNormal;
			val.collider = null;
			if (viewID != -1)
			{
				PhotonView photonView = PhotonNetwork.GetPhotonView(viewID);
				val.collider = ((Component)photonView).GetComponentInChildren<Collider2D>();
				val.transform = ((Component)photonView).transform;
			}
			else if (colliderID != -1)
			{
				val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>()[colliderID];
				val.transform = ((Component)val.collider).transform;
			}
			DynamicParticles.instance.PlayBulletHit(projHit.damage, ((Component)this).transform, val, projHit.projectileColor);
			((RayHitEffect)bulletSound).DoHitEffect(val);
			if ((Object)(object)reflect != (Object)null)
			{
				((RayHitEffect)reflect).DoHitEffect(val);
			}
			if ((Object)(object)reflect == (Object)null || reflect.reflects <= 0)
			{
				ExtensionMethods.InvokeMethod((object)projHit, "DestroyMe", Array.Empty<object>());
			}
		}
	}
	public class Lunge : MonoBehaviour
	{
		private Gun sword;

		private Player player;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			WeaponManager componentInParent = ((Component)this).GetComponentInParent<WeaponManager>();
			sword = componentInParent.GetWeapon("RSC_Sword");
			Gun obj = sword;
			obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction));
		}

		private void OnDestroy()
		{
			Gun obj = sword;
			obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction));
		}

		private void OnShootProjectileAction(GameObject bullet)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = Vector2.op_Implicit(player.data.aimDirection);
			player.data.healthHandler.TakeForce(val * 15000f * Mathf.Min(sword.attackSpeed * sword.attackSpeedMultiplier, 2f), (ForceMode2D)1, true, true, 0f);
		}
	}
	public class MirrorBounce : MonoBehaviour
	{
		private float sinceBounce = 1f;

		private Camera mainCam;

		private RayHitReflect reflect;

		private Vector2 lastNormal;

		private ProjectileHit projHit;

		private RayHitBulletSound bulletSound;

		private PhotonView view;

		private bool positive;

		private void Start()
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			((Component)this).GetComponentInParent<ChildRPC>().childRPCsVector2Vector2IntInt.Add("MirrorBounce", DoHit);
			view = ((Component)this).GetComponentInParent<PhotonView>();
			bulletSound = ((Component)this).GetComponentInParent<RayHitBulletSound>();
			projHit = ((Component)this).GetComponentInParent<ProjectileHit>();
			MirrorBounce[] componentsInChildren = ((Component)((Component)this).transform.root).GetComponentsInChildren<MirrorBounce>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				if (i > 0)
				{
					Object.Destroy((Object)(object)componentsInChildren[i]);
				}
			}
			mainCam = ((Component)((Component)MainCam.instance).transform).GetComponent<Camera>();
			reflect = ((Component)this).GetComponentInParent<RayHitReflect>();
			positive = ((Component)this).transform.position.x > 0f;
		}

		private void FixedUpdate()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			sinceBounce += Time.fixedDeltaTime;
			if (!view.IsMine || sinceBounce < 0.1f || (((Component)this).transform.position.x != 0f && ((Component)this).transform.position.x > 0f == positive))
			{
				return;
			}
			RaycastHit2D val = default(RaycastHit2D);
			((RaycastHit2D)(ref val)).normal = Vector2.right;
			((RaycastHit2D)(ref val)).point = Vector2.op_Implicit(((Component)this).transform.position);
			int num = -1;
			if (Object.op_Implicit((Object)(object)((RaycastHit2D)(ref val)).transform))
			{
				PhotonView component = ((Component)((RaycastHit2D)(ref val)).transform.root).GetComponent<PhotonView>();
				if (Object.op_Implicit((Object)(object)component))
				{
					num = component.ViewID;
				}
			}
			int num2 = -1;
			if (num == -1)
			{
				Collider2D[] componentsInChildren = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					if ((Object)(object)componentsInChildren[i] == (Object)(object)((RaycastHit2D)(ref val)).collider)
					{
						num2 = i;
					}
				}
			}
			((Component)this).GetComponentInParent<ChildRPC>().CallFunction("MirrorBounce", ((RaycastHit2D)(ref val)).point, ((RaycastHit2D)(ref val)).normal, num, num2);
			sinceBounce = 0f;
		}

		private void DoHit(Vector2 hitPos, Vector2 hitNormal, int viewID = -1, int colliderID = -1)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			HitInfo val = new HitInfo();
			val.point = hitPos;
			val.normal = hitNormal;
			val.collider = null;
			if (viewID != -1)
			{
				PhotonView photonView = PhotonNetwork.GetPhotonView(viewID);
				val.collider = ((Component)photonView).GetComponentInChildren<Collider2D>();
				val.transform = ((Component)photonView).transform;
			}
			else if (colliderID != -1)
			{
				val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>()[colliderID];
				val.transform = ((Component)val.collider).transform;
			}
			DynamicParticles.instance.PlayBulletHit(projHit.damage, ((Component)this).transform, val, projHit.projectileColor);
			((RayHitEffect)bulletSound).DoHitEffect(val);
			if ((Object)(object)reflect != (Object)null)
			{
				((RayHitEffect)reflect).DoHitEffect(val);
			}
			if ((Object)(object)reflect == (Object)null || reflect.reflects <= 0)
			{
				ExtensionMethods.InvokeMethod((object)projHit, "DestroyMe", Array.Empty<object>());
			}
		}
	}
	public class Parry : MonoBehaviour
	{
		private Gun sword;

		private void Start()
		{
			WeaponManager componentInParent = ((Component)this).GetComponentInParent<WeaponManager>();
			sword = componentInParent.GetWeapon("RSC_Sword");
			Transform child = ((Component)sword).transform.GetChild(1);
			((Component)child.GetChild(4).GetChild(1)).gameObject.SetActive(true);
			Transform child2 = child.GetChild(5);
			((Component)child2.GetChild(3)).gameObject.SetActive(true);
			((Component)child2.GetChild(1).GetChild(1)).gameObject.SetActive(true);
			((Component)child2.GetChild(2).GetChild(1)).gameObject.SetActive(true);
		}

		private void OnDestroy()
		{
			Transform child = ((Component)sword).transform.GetChild(1);
			((Component)child.GetChild(4).GetChild(1)).gameObject.SetActive(false);
			Transform child2 = child.GetChild(5);
			((Component)child2.GetChild(3)).gameObject.SetActive(false);
			((Component)child2.GetChild(1).GetChild(1)).gameObject.SetActive(false);
			((Component)child2.GetChild(2).GetChild(1)).gameObject.SetActive(false);
		}
	}
	public class PhantomLunge : MonoBehaviour
	{
		private Gun sword;

		private Player player;

		private int framesCollisionDisabled;

		private PlayerCollision collision;

		private ParticleSystem particle;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			WeaponManager componentInParent = ((Component)this).GetComponentInParent<WeaponManager>();
			sword = componentInParent.GetWeapon("RSC_Sword");
			Gun obj = sword;
			obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction));
			collision = ((Component)player).GetComponent<PlayerCollision>();
			particle = ((Component)this).GetComponent<ParticleSystem>();
		}

		private void FixedUpdate()
		{
			//IL_0042: 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_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: 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_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			((Behaviour)collision).enabled = framesCollisionDisabled <= 0;
			if (framesCollisionDisabled == 0)
			{
				collision.IgnoreWallForFrames(2);
			}
			if (framesCollisionDisabled < 0 && Object.op_Implicit((Object)(object)Physics2D.OverlapCircle(Vector2.op_Implicit(((Component)this).transform.position), 0.01f, LayerMask.GetMask(new string[1] { "Default" }))) && player.data.view.IsMine)
			{
				((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.up * player.data.maxHealth * 0.25f * Time.fixedDeltaTime, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true);
			}
			framesCollisionDisabled--;
		}

		private void OnDestroy()
		{
			Gun obj = sword;
			obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction));
		}

		private void OnShootProjectileAction(GameObject bullet)
		{
			framesCollisionDisabled = 35;
			particle.Play();
		}
	}
	public class PrismBounce : MonoBehaviour
	{
		private float sinceBounce = 1f;

		private Camera mainCam;

		private RayHitReflect reflect;

		private Vector2 lastNormal;

		private ProjectileHit projHit;

		private RayHitBulletSound bulletSound;

		private PhotonView view;

		private bool positive;

		private void Start()
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			((Component)this).GetComponentInParent<ChildRPC>().childRPCsVector2Vector2IntInt.Add("PrismBounce", DoHit);
			view = ((Component)this).GetComponentInParent<PhotonView>();
			bulletSound = ((Component)this).GetComponentInParent<RayHitBulletSound>();
			projHit = ((Component)this).GetComponentInParent<ProjectileHit>();
			MirrorBounce[] componentsInChildren = ((Component)((Component)this).transform.root).GetComponentsInChildren<MirrorBounce>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				if (i > 0)
				{
					Object.Destroy((Object)(object)componentsInChildren[i]);
				}
			}
			mainCam = ((Component)((Component)MainCam.instance).transform).GetComponent<Camera>();
			reflect = ((Component)this).GetComponentInParent<RayHitReflect>();
			positive = ((Component)this).transform.position.y > 0f;
		}

		private void FixedUpdate()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			sinceBounce += Time.fixedDeltaTime;
			if (!view.IsMine || sinceBounce < 0.1f || (((Component)this).transform.position.y != 0f && ((Component)this).transform.position.y > 0f == positive))
			{
				return;
			}
			RaycastHit2D val = default(RaycastHit2D);
			((RaycastHit2D)(ref val)).normal = Vector2.up;
			((RaycastHit2D)(ref val)).point = Vector2.op_Implicit(((Component)this).transform.position);
			int num = -1;
			if (Object.op_Implicit((Object)(object)((RaycastHit2D)(ref val)).transform))
			{
				PhotonView component = ((Component)((RaycastHit2D)(ref val)).transform.root).GetComponent<PhotonView>();
				if (Object.op_Implicit((Object)(object)component))
				{
					num = component.ViewID;
				}
			}
			int num2 = -1;
			if (num == -1)
			{
				Collider2D[] componentsInChildren = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					if ((Object)(object)componentsInChildren[i] == (Object)(object)((RaycastHit2D)(ref val)).collider)
					{
						num2 = i;
					}
				}
			}
			((Component)this).GetComponentInParent<ChildRPC>().CallFunction("PrismBounce", ((RaycastHit2D)(ref val)).point, ((RaycastHit2D)(ref val)).normal, num, num2);
			sinceBounce = 0f;
		}

		private void DoHit(Vector2 hitPos, Vector2 hitNormal, int viewID = -1, int colliderID = -1)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			HitInfo val = new HitInfo();
			val.point = hitPos;
			val.normal = hitNormal;
			val.collider = null;
			if (viewID != -1)
			{
				PhotonView photonView = PhotonNetwork.GetPhotonView(viewID);
				val.collider = ((Component)photonView).GetComponentInChildren<Collider2D>();
				val.transform = ((Component)photonView).transform;
			}
			else if (colliderID != -1)
			{
				val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>()[colliderID];
				val.transform = ((Component)val.collider).transform;
			}
			DynamicParticles.instance.PlayBulletHit(projHit.damage, ((Component)this).transform, val, projHit.projectileColor);
			((RayHitEffect)bulletSound).DoHitEffect(val);
			if ((Object)(object)reflect != (Object)null)
			{
				((RayHitEffect)reflect).DoHitEffect(val);
			}
			if ((Object)(object)reflect == (Object)null || reflect.reflects <= 0)
			{
				ExtensionMethods.InvokeMethod((object)projHit, "DestroyMe", Array.Empty<object>());
			}
		}
	}
	public class ShieldBash : MonoBehaviour
	{
		private Player player;

		private Animator animator;

		private AttackLevel attackLevel;

		private Transform shieldCollider;

		private const float force = 20000f;

		private const float mapObjForce = 60000000f;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			HeaterShield componentInChildren = ((Component)player).GetComponentInChildren<HeaterShield>();
			animator = ((Component)componentInChildren).GetComponentInChildren<Animator>();
			shieldCollider = componentInChildren.shieldCollider.transform;
			attackLevel = ((Component)this).GetComponent<AttackLevel>();
			Block block = player.data.block;
			block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
		}

		private void OnDestroy()
		{
			try
			{
				Block block = player.data.block;
				block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
			}
			catch
			{
			}
		}

		private void OnBlock(BlockTriggerType trigger)
		{
			//IL_0018: 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_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: 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_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			animator.Play("Shield Bash");
			RaycastHit2D[] array = Physics2D.BoxCastAll(Vector2.op_Implicit(shieldCollider.position), Vector2.op_Implicit(shieldCollider.lossyScale), shieldCollider.eulerAngles.z, Vector2.op_Implicit(shieldCollider.up), 1f, LayerMask.op_Implicit(PlayerManager.instance.canSeePlayerMask));
			RaycastHit2D[] array2 = array;
			for (int i = 0; i < array2.Length; i++)
			{
				RaycastHit2D val = array2[i];
				Debug.Log((object)((Object)((Component)((RaycastHit2D)(ref val)).transform).gameObject).name);
				Collider2D collider = ((RaycastHit2D)(ref val)).collider;
				CharacterData val2 = ((collider != null) ? ((Component)collider).GetComponentInParent<CharacterData>() : null);
				if ((Object)(object)val2 != (Object)null && player.data.view.IsMine)
				{
					val2.view.RPC("RPCA_AddSlow", (RpcTarget)0, new object[1] { 0.75f });
					val2.healthHandler.CallTakeForce(Vector2.op_Implicit(shieldCollider.up * 20000f * attackLevel.LevelScale()), (ForceMode2D)1, false, false, 0f);
				}
				if ((Object)(object)((RaycastHit2D)(ref val)).rigidbody != (Object)null)
				{
					((RaycastHit2D)(ref val)).rigidbody.AddForce(Vector2.op_Implicit(shieldCollider.up * 60000000f * attackLevel.LevelScale()));
				}
			}
		}
	}
	public class SovereignBladeMono : MonoBehaviour, IOnEventCallback
	{
		private enum BladeState
		{
			Idle,
			Preparing,
			Attacking,
			Returning
		}

		private List<Collider2D> hitTargets = new List<Collider2D>();

		private ParticleSystem chargeParticles;

		internal PhotonView view;

		private GameObject blade;

		private Player player;

		private float targetRot = 0f;

		private float targetSpin = 0f;

		private float rotVel = 0f;

		private float spinVel = 0f;

		private float currentRot = 0f;

		private float currentSpin = 0f;

		private BladeState status = BladeState.Idle;

		public float spring = 25f;

		public float drag = 25f;

		private Vector2 targetPos;

		private Vector3 posVel = Vector3.zero;

		internal static byte InitEventCode = 65;

		private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);

		private void Start()
		{
			//IL_012a: 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_01a2: 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_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: 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_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			PhotonNetwork.AddCallbackTarget((object)this);
			player = ((Component)this).GetComponentInParent<Player>();
			if (player.data.view.IsMine)
			{
				view = ((Component)this).gameObject.GetComponent<PhotonView>();
				if (PhotonNetwork.AllocateViewID(view))
				{
					object[] data = new object[2] { player.playerID, view.ViewID };
					RaiseEventOptions raiseEventOptions = new RaiseEventOptions
					{
						Receivers = (ReceiverGroup)0,
						CachingOption = (EventCaching)4
					};
					SendOptions val = default(SendOptions);
					((SendOptions)(ref val)).Reliability = true;
					SendOptions sendOptions = val;
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
					{
						//IL_0012: Unknown result type (might be due to invalid IL or missing references)
						PhotonNetwork.RaiseEvent(InitEventCode, (object)data, raiseEventOptions, sendOptions);
					});
					PhotonNetwork.RemoveCallbackTarget((object)this);
				}
				else
				{
					Debug.LogError((object)"Failed to allocate a ViewId to Sovereign Blade.");
				}
			}
			blade = ((Component)((Component)this).transform.GetChild(0)).gameObject;
			((Graphic)((Component)blade.transform.GetChild(0)).GetComponent<Image>()).color = player.GetTeamColors().particleEffect;
			blade.transform.parent = null;
			chargeParticles = blade.GetComponent<ParticleSystem>();
			if (PlayerExtensions.GetAdditionalData(player).colorID == 165)
			{
				((Graphic)((Component)blade.transform).GetComponent<Image>()).color = player.GetTeamColors().color;
				MainModule main = chargeParticles.main;
				MinMaxGradient startColor = ((MainModule)(ref main)).startColor;
				((MinMaxGradient)(ref startColor)).colorMin = player.GetTeamColors().backgroundColor;
				((MinMaxGradient)(ref startColor)).colorMax = player.GetTeamColors().color;
				((MainModule)(ref main)).startColor = startColor;
			}
			Block block = player.data.block;
			block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
		}

		private void OnDestroy()
		{
			Block block = player.data.block;
			block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
			Object.Destroy((Object)(object)blade);
		}

		public void OnEvent(EventData photonEvent)
		{
			byte code = photonEvent.Code;
			if (code == InitEventCode)
			{
				object[] array = (object[])photonEvent.CustomData;
				if (player.playerID == (int)array[0])
				{
					view = ((Component)this).gameObject.GetComponent<PhotonView>();
					view.ViewID = (int)array[1];
					PhotonNetwork.RemoveCallbackTarget((object)this);
				}
			}
		}

		private void FixedUpdate()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Expected O, but got Unknown
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: 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_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			if (!player.data.view.IsMine || status != BladeState.Attacking)
			{
				hitTargets.Clear();
				return;
			}
			Vector2 val = Vector2.op_Implicit(blade.transform.position);
			Vector2 val2 = new Vector2(2.25f * player.data.GetAdditionalData().bladeSize, 0.55f * player.data.GetAdditionalData().bladeSize);
			Quaternion rotation = blade.transform.rotation;
			Collider2D[] array = Physics2D.OverlapBoxAll(val, val2, ((Quaternion)(ref rotation)).eulerAngles.z);
			Collider2D[] array2 = array;
			foreach (Collider2D val3 in array2)
			{
				if (hitTargets.Contains(val3))
				{
					continue;
				}
				hitTargets.Add(val3);
				Damagable component = ((Component)val3).gameObject.GetComponent<Damagable>();
				HealthHandler component2 = ((Component)val3).gameObject.GetComponent<HealthHandler>();
				float num = player.data.weaponHandler.gun.damage * 55f;
				if (Object.op_Implicit((Object)(object)component2))
				{
					Player val4 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player");
					if ((Object)(object)val4 == (Object)(object)player)
					{
						continue;
					}
					SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform);
					Vector3 right = blade.transform.right;
					component2.CallTakeForce(Vector2.op_Implicit(((Vector3)(ref right)).normalized * 2500f), (ForceMode2D)1, true, false, 0f);
					if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent<Block>().blockedThisFrame)
					{
						continue;
					}
				}
				if (Object.op_Implicit((Object)(object)component))
				{
					Vector2 val5 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(blade.transform.position);
					component.CallTakeDamage(((Vector2)(ref val5)).normalized * num, Vector2.op_Implicit(blade.transform.position), blade, player, true);
				}
			}
		}

		private void OnEnable()
		{
			blade.SetActive(true);
		}

		private void OnDisable()
		{
			blade.SetActive(false);
		}

		private void Update()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: 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_013b: 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_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: 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_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: 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_0196: 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_01ad: 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_01be: 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_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: 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_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: 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_0119: 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_00d2: 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_00e7: 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_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = ((Component)this).transform.up * 3f;
			switch (status)
			{
			case BladeState.Idle:
			{
				((Component)this).transform.Rotate(Vector3.forward, (0f - Time.deltaTime) * 60f);
				blade.transform.position = ((Component)this).transform.position + val;
				bool flag2 = player.data.aimDirection.x > 0f;
				targetRot = (flag2 ? 0f : 180f);
				targetSpin = 0f;
				break;
			}
			case BladeState.Preparing:
				if (targetRot == 0f)
				{
					targetSpin = Vector2.SignedAngle(Vector2.left, Vector2.op_Implicit(blade.transform.position) - targetPos);
				}
				else
				{
					targetSpin = 0f - Vector2.SignedAngle(Vector2.right, Vector2.op_Implicit(blade.transform.position) - targetPos);
				}
				break;
			case BladeState.Attacking:
			{
				posVel = FRILerp.Lerp(posVel, (Vector2.op_Implicit(targetPos) - blade.transform.position) * spring, 50f);
				Transform transform2 = blade.transform;
				transform2.position += posVel * TimeHandler.deltaTime;
				break;
			}
			case BladeState.Returning:
			{
				posVel = FRILerp.Lerp(posVel, (((Component)this).transform.position + val - blade.transform.position) * spring, drag);
				Transform transform = blade.transform;
				transform.position += posVel * TimeHandler.deltaTime;
				bool flag = player.data.aimDirection.x > 0f;
				targetRot = (flag ? 0f : 180f);
				targetSpin = 0f;
				break;
			}
			}
			rotVel = FRILerp.Lerp(rotVel, (targetRot - currentRot) * spring, drag);
			spinVel = FRILerp.Lerp(spinVel, (targetSpin - currentSpin) * spring, drag);
			currentRot += rotVel * TimeHandler.deltaTime;
			currentSpin += spinVel * TimeHandler.deltaTime;
			blade.transform.localEulerAngles = new Vector3(0f, currentRot, currentSpin);
			blade.transform.localScale = new Vector3(0.005f, 0.005f, 0.005f) * player.data.GetAdditionalData().bladeSize;
		}

		[PunRPC]
		public void StartBladeAttack(Vector2 pos)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			targetPos = pos;
			status = BladeState.Preparing;
			chargeParticles.Play();
			soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master;
			SoundManager.Instance.PlayAtPosition(RSClasses.sovereignBladeChargeSound, ((Component)this).transform, ((Component)this).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
			ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 0.5f, (Action)delegate
			{
				status = BladeState.Attacking;
			});
			ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 0.6f, (Action)delegate
			{
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				GamefeelManager.GameFeel(Vector2.op_Implicit(blade.transform.right * 10f));
				SoundManager.Instance.PlayAtPosition(RSClasses.sovereignBladeStrikeSound, ((Component)this).transform, ((Component)this).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
			});
			ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1.5f, (Action)delegate
			{
				status = BladeState.Returning;
			});
			ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1.75f, (Action)delegate
			{
				status = BladeState.Idle;
			});
		}

		private void OnBlock(BlockTriggerType trigger)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Invalid comparison between Unknown and I4
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: 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_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			if ((int)trigger == 0 && player.data.view.IsMine && status == BladeState.Idle)
			{
				if ((int)player.data.input.inputType == 1)
				{
					targetPos = Vector2.op_Implicit(MainCam.instance.cam.ScreenToWorldPoint(Input.mousePosition));
				}
				else
				{
					targetPos = Vector2.op_Implicit(((Component)this).transform.position + player.data.aimDirection * 30f);
				}
				view.RPC("StartBladeAttack", (RpcTarget)0, new object[1] { targetPos });
			}
		}
	}
	public class SwordLength_Mono : MonoBehaviour
	{
		private Gun gun;

		private Transform blade;

		private void Start()
		{
			gun = ((Component)this).GetComponent<Gun>();
			blade = ((Component)this).transform.Find("Spring/Blade");
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)RSClasses.instance, 1, (Action)delegate
			{
				//IL_0036: Unknown result type (might be due to invalid IL or missing references)
				Image[] componentsInChildren = ((Component)this).GetComponentsInChildren<Image>();
				foreach (Image val in componentsInChildren)
				{
					if (((Object)val).name == "Color")
					{
						((Graphic)val).color = gun.player.GetTeamColors().color;
					}
				}
			});
		}

		private void Update()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			float num = CalculateLength(gun.projectileSpeed);
			blade.localScale = new Vector3(num, 0.15f, 1f);
			blade.localPosition = new Vector3(0f, num / 2f, 0f);
			gun.numberOfProjectiles = 1;
			gun.bursts = 1;
			gun.reloadTime = 0.25f;
			gun.reloadTimeAdd = 0f;
		}

		internal static float CalculateLength(float projectileSpeed)
		{
			return Mathf.Clamp(2f * ((float)Math.Log10(projectileSpeed) + 1f), 1f, 10f);
		}
	}
	public class SwordNoAmmo_Mono : MonoBehaviour
	{
		public GunAmmo ammo;

		private void Update()
		{
			ExtensionMethods.SetFieldValue((object)ammo, "currentAmmo", (object)2);
			ammo.maxAmmo = 2;
			ammo.reloadTime = 0.01f;
			ammo.reloadTimeAdd = 0f;
		}
	}
	public class SwordSlash : MonoBehaviour
	{
		private class NoDestroyRayHitEffect : RayHitEffect
		{
			public override HasToReturn DoHitEffect(HitInfo hit)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				return (HasToReturn)0;
			}
		}

		private static GameObject particles;

		private ProjectileHit bullet;

		private List<HitInfo> hits = new List<HitInfo>();

		private float range;

		private bool hitDone = false;

		private void FixedUpdate()
		{
			//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)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			if (hitDone)
			{
				return;
			}
			Vector3 position = bullet.ownWeapon.transform.position;
			Vector3 val = bullet.ownWeapon.GetComponent<Gun>().shootPosition.position - bullet.ownWeapon.transform.position;
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			if (!bullet.view.IsMine)
			{
				return;
			}
			List<RaycastHit2D> first = Physics2D.RaycastAll(Vector2.op_Implicit(bullet.ownWeapon.transform.position), Vector2.op_Implicit(-normalized), 1f, LayerMask.op_Implicit(PlayerManager.instance.canSeePlayerMask)).ToList();
			first = first.Concat(Physics2D.RaycastAll(Vector2.op_Implicit(bullet.ownWeapon.transform.position), Vector2.op_Implicit(normalized), range + 0.5f, LayerMask.op_Implicit(PlayerManager.instance.canSeePlayerMask))).ToList();
			foreach (RaycastHit2D item in first)
			{
				RaycastHit2D current = item;
				if (!((Object)(object)((RaycastHit2D)(ref current)).collider != (Object)null))
				{
					continue;
				}
				HitInfo hitInfo = GetHitInfo(current);
				HealthHandler component = ((Component)hitInfo.transform).GetComponent<HealthHandler>();
				if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).GetComponent<Player>() == (Object)(object)bullet.ownPlayer)
				{
					continue;
				}
				foreach (HitInfo hit in hits)
				{
					if (!((Object)(object)hitInfo.transform == (Object)(object)hit.transform))
					{
					}
				}
				((RayHit)bullet).Hit(hitInfo, false);
				if (!bullet.ownPlayer.data.currentCards.Contains(CardHolder.cards["Spectral Saber"]))
				{
					hitDone = true;
					break;
				}
				hits.Append(hitInfo);
			}
		}

		private void Start()
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: 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_009e: 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_00a7: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: 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)
			if ((Object)(object)particles == (Object)null)
			{
				particles = RSClasses.assets.LoadAsset<GameObject>("Sword_Slash_Particles");
			}
			bullet = ((Component)this).GetComponent<ProjectileHit>();
			range = SwordLength_Mono.CalculateLength(bullet.ownWeapon.GetComponent<Gun>().projectileSpeed);
			Vector3 position = bullet.ownWeapon.transform.position;
			Vector3 val = bullet.ownWeapon.GetComponent<Gun>().shootPosition.position - bullet.ownWeapon.transform.position;
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			GameObject val2 = Object.Instantiate<GameObject>(particles, position + normalized * (range + 0.5f), bullet.ownWeapon.transform.rotation);
			val2.transform.localScale = new Vector3(range, range, range);
			((Behaviour)((Component)this).GetComponentInChildren<CircleCollider2D>()).enabled = false;
			ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 0.1f, (Action)delegate
			{
				ExtensionMethods.InvokeMethod((object)bullet, "DestroyMe", Array.Empty<object>());
			});
			RayHitEffect element = (RayHitEffect)(object)new NoDestroyRayHitEffect();
			bullet.effects = bullet.effects.Append(element).ToList();
			bullet.destroyOnBlock = false;
		}

		internal static HitInfo GetHitInfo(RaycastHit2D raycastHit2D)
		{
			//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_0009: 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_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			return new HitInfo
			{
				point = ((RaycastHit2D)(ref raycastHit2D)).point,
				normal = ((RaycastHit2D)(ref raycastHit2D)).normal,
				transform = ((RaycastHit2D)(ref raycastHit2D)).transform,
				collider = ((RaycastHit2D)(ref raycastHit2D)).collider,
				rigidbody = ((RaycastHit2D)(ref raycastHit2D)).rigidbody
			};
		}
	}
	[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.*/)]
	[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", "3.1.3")]
	[BepInProcess("Rounds.exe")]
	public class RSClasses : BaseUnityPlugin
	{
		private const string ModId = "com.rsmind.rounds.RSClasses";

		private const string ModName = "RSClasses";

		public const string Version = "3.1.3";

		public const string ModInitials = "RSC";

		internal static Harmony harmony;

		internal static SoundEvent reflectSound;

		internal static SoundEvent shatterSound;

		internal static SoundEvent stardustSound;

		internal static SoundEvent sovereignBladeChargeSound;

		internal static SoundEvent sovereignBladeStrikeSound;

		private static GameObject cardHolder;

		public static bool Debug;

		internal static AssetBundle assets;

		public static RSClasses instance { get; private set; }

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

		private void Start()
		{
			instance = this;
			List<BaseUnityPlugin> list = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
			if (list.Exists((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "com.willuwontu.rounds.tabinfo"))
			{
				TabinfoInterface.Setup();
			}
			AudioClip val = 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;
			AudioClip val3 = assets.LoadAsset<AudioClip>("shatter.ogg");
			SoundContainer val4 = ScriptableObject.CreateInstance<SoundContainer>();
			val4.setting.volumeIntensityEnable = true;
			val4.audioClip[0] = val;
			shatterSound = ScriptableObject.CreateInstance<SoundEvent>();
			shatterSound.soundContainerArray[0] = val4;
			AudioClip val5 = assets.LoadAsset<AudioClip>("stardustHit.ogg");
			SoundContainer val6 = ScriptableObject.CreateInstance<SoundContainer>();
			val6.setting.volumeIntensityEnable = true;
			val6.audioClip[0] = val5;
			stardustSound = ScriptableObject.CreateInstance<SoundEvent>();
			stardustSound.soundContainerArray[0] = val6;
			AudioClip val7 = assets.LoadAsset<AudioClip>("SovereignBladeCharge.ogg");
			SoundContainer val8 = ScriptableObject.CreateInstance<SoundContainer>();
			val8.setting.volumeIntensityEnable = true;
			val8.audioClip[0] = val7;
			sovereignBladeChargeSound = ScriptableObject.CreateInstance<SoundEvent>();
			sovereignBladeChargeSound.soundContainerArray[0] = val8;
			AudioClip val9 = assets.LoadAsset<AudioClip>("SovereignBladeStrike.ogg");
			SoundContainer val10 = ScriptableObject.CreateInstance<SoundContainer>();
			val10.setting.volumeIntensityEnable = true;
			val10.audioClip[0] = val9;
			sovereignBladeStrikeSound = ScriptableObject.CreateInstance<SoundEvent>();
			sovereignBladeStrikeSound.soundContainerArray[0] = val10;
			IPunPrefabPool prefabPool = PhotonNetwork.PrefabPool;
			DefaultPool val11 = (DefaultPool)(object)((prefabPool is DefaultPool) ? prefabPool : null);
			if (val11 != null)
			{
				val11.ResourceCache.Add("Comet", assets.LoadAsset<GameObject>("Comet"));
				val11.ResourceCache.Add("Stardust", assets.LoadAsset<GameObject>("Stardust"));
				val11.ResourceCache.Add("Sword_Slash", assets.LoadAsset<GameObject>("Sword_Slash"));
			}
		}
	}
}
namespace RSClasses.Utilities
{
	[Serializable]
	public class PlayerAdditionalData
	{
		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 float bladeSize;

		public PlayerAdditionalData()
		{
			invert = false;
			posMult = 1;
			scytheCount = 0;
			barrierCount = 0;
			scytheDamage = 30f;
			orbitalRadius = 1f;
			scytheSpeed = 270f;
			cometSpeed = 2f;
			cometDamage = 180f;
			cometCount = 0;
			barrierSpeed = 100f;
			fractureDuration = 1f;
			fractureSize = 0.0225f;
			reflectionCooldown = 3f;
			bladeSize = 1f;
		}

		public void Reset()
		{
			invert = false;
			posMult = 1;
			scytheCount = 0;
			barrierCount = 0;
			scytheDamage = 30f;
			orbitalRadius = 1f;
			scytheSpeed = 270f;
			cometSpeed = 2f;
			cometDamage = 180f;
			cometCount = 0;
			barrierSpeed = 100f;
			fractureDuration = 1f;
			fractureSize = 0.0225f;
			reflectionCooldown = 3f;
			bladeSize = 1f;
		}
	}
	public static class PlayerExtension
	{
		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)
			{
			}
		}
	}
	[HarmonyPatch(typeof(Player), "FullReset")]
	public class FullResetPatch
	{
		private static void Prefix(Player __instance)
		{
			__instance.data.GetAdditionalData().Reset();
		}
	}
	[Serializable]
	public class PlayerActionsAdditionalData
	{
		public PlayerAction selfHarm;

		public PlayerActionsAdditionalData()
		{
			selfHarm = null;
		}
	}
	public static class PlayerActionsExtension
	{
		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(typeof(PlayerActions))]
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	[HarmonyPatch(new Type[] { })]
	internal class PlayerActionsPatchPlayerActions
	{
		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.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, __instance, new object[1] { "Voidseer Hotkey" });
		}
	}
	[HarmonyPatch(typeof(PlayerActions), "CreateWithControllerBindings")]
	internal class PlayerActionsPatchCreateWithControllerBindings
	{
		private static void Postfix(ref PlayerActions __result)
		{
			__result.GetAdditionalData().selfHarm.AddDefaultBinding((InputControlType)11);
		}
	}
	[HarmonyPatch(typeof(PlayerActions), "CreateWithKeyboardBindings")]
	internal class PlayerActionsPatchCreateWithKeyboardBindings
	{
		private static void Postfix(ref PlayerActions __result)
		{
			__result.GetAdditionalData().selfHarm.AddDefaultBinding((Key[])(object)new Key[1] { (Key)53 });
		}
	}
	[HarmonyPatch(typeof(GeneralInput), "Update")]
	internal class GeneralInputPatchUpdate
	{
		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
			{
			}
		}
	}
	internal class RarityAdder : MonoBehaviour
	{
		public enum Rarity
		{
			Trinket,
			Common,
			Scarce,
			Uncommon,
			Exotic,
			Rare,
			Epic,
			Legendary,
			Mythical,
			Divine,
			Unique
		}

		private string[] rarityNames = new string[11]
		{
			"Trinket", "Common", "Scarce", "Uncommon", "Exotic", "Rare", "Epic", "Legendary", "Mythical", "Divine",
			"Unique"
		};

		public Rarity rarity = Rarity.Common;

		public void Start()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			((Component)this).GetComponent<CardInfo>().rarity = RarityUtils.GetRarity(rarityNames[(int)rarity]);
		}
	}
	public class RSPlayerStats : MonoBehaviour
	{
		[Header("Multiply")]
		public float barrierSpeed = 1f;

		public float cometDamage = 1f;

		public float cometSpeed = 1f;

		public float fractureSize = 1f;

		public float orbitalRadius = 1f;

		public float reflectionCooldown = 1f;

		public float scytheDamage = 1f;

		public float scytheSpeed = 1f;

		[Header("Add")]
		public int barriers = 0;

		public int comets = 0;

		public float fractureDuration = 0f;

		public int scythes = 0;

		public float bladeSize = 0f;

		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;
			player.data.GetAdditionalData().bladeSize += bladeSize;
		}
	}
	[HarmonyPatch(typeof(ApplyCardStats), "ApplyStats")]
	public class ApplyPlayerStatsPatch
	{
		private static void Postfix(ApplyCardStats __instance, Player ___playerToUpgrade)
		{
			((Component)__instance).GetComponent<RSPlayerStats>()?.Apply(___playerToUpgrade);
		}
	}
	public class TabinfoInterface
	{
		public static void Setup()
		{
			StatCategory val = TabInfoManager.RegisterCategory("Astronomer Stats", 2);
			TabInfoManager.RegisterStat(val, "\r\rScythe Count", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().scytheCount}"));
			TabInfoManager.RegisterStat(val, "\r\r\rScythe Damage", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func<Player, string>)((Player p) => string.Format("{0}", p.data.GetAdditionalData().scytheDamage + (p.data.currentCards.Contains(CardHolder.cards["Dark Harvest"]) ? (p.data.stats.lifeSteal * 50f) : 0f))));
			TabInfoManager.RegisterStat(val, "\r\rScythe Speed", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().scytheSpeed / 250f}"));
			TabInfoManager.RegisterStat(val, "Barrier Count", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().barrierCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().barrierCount}"));
			TabInfoManager.RegisterStat(val, "Barrier Speed", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().barrierCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().barrierSpeed / 100f}"));
			TabInfoManager.RegisterStat(val, "Orbital Size", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().barrierCount > 0 || p.data.GetAdditionalData().scytheCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().orbitalRadius}"));
			TabInfoManager.RegisterStat(val, "\rComet Count", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().cometCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().cometCount}"));
			TabInfoManager.RegisterStat(val, "\rComet Speed", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().cometCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().cometSpeed / 2f}"));
			StatCategory val2 = TabInfoManager.RegisterCategory("Mirror Mage Stats", 2);
			TabInfoManager.RegisterStat(val2, "Reflection Replacement Cooldown", (Func<Player, bool>)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Reflection Replacement"])), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().reflectionCooldown}"));
			TabInfoManager.RegisterStat(val2, "Fracture Duration", (Func<Player, bool>)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Fracture"])), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().fractureDuration}"));
			TabInfoManager.RegisterStat(val2, "Fracture Size", (Func<Player, bool>)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Fracture"])), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().fractureSize / 0.0225f}"));
		}
	}
}
namespace RSClasses.MonoBehaviors
{
	internal class Comet : MonoBehaviourPun
	{
		internal Vector3 velocity = new Vector3(0f, 0f, 0f);

		private bool icemelt = false;

		private bool stardust = false;

		private bool stellarImpact = false;

		private float baseScale = 1f;

		private float dustTimer = 0f;

		private float cometSpeed = 2f;

		private Player player;

		private TrailRenderer trailRenderer;

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

		private Random rand = new Random(DateTime.Now.Millisecond);

		private const float dustInterval = 0.1f;

		private const float dustDuration = 2.5f;

		public void DoHit()
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Expected O, but got Unknown
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_037a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0385: Unknown result type (might be due to invalid IL or missing references)
			//IL_038a: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: 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_03bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0301: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			if (stardust)
			{
				dustTimer += Time.fixedDeltaTime;
				while (dustTimer > 0.1f)
				{
					GameObject newDust = PhotonNetwork.Instantiate("Stardust", ((Component)this).gameObject.transform.position, new Quaternion(0f, 0f, (float)(rand.Next() % 360), (float)(rand.Next() % 360)), (byte)0, (object[])null);
					newDust.GetComponent<PhotonView>().RPC("SetValues", (RpcTarget)0, new object[2]
					{
						player.playerID,
						rand.Next(-120, 120)
					});
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 2.5f, (Action)delegate
					{
						PhotonNetwork.Destroy(newDust);
					});
					dustTimer -= 0.1f;
				}
			}
			float num = 1f;
			if (stellarImpact)
			{
				Mathf.Clamp((((Vector3)(ref velocity)).magnitude / 5f - 1f) * player.data.GetAdditionalData().cometSpeed, 1f, 1.5f * player.data.GetAdditionalData().cometSpeed);
			}
			int[] array = hitPlayers.Keys.ToArray();
			int[] array2 = array;
			foreach (int key in array2)
			{
				hitPlayers[key] -= TimeHandler.deltaTime;
				if (hitPlayers[key] <= 0f)
				{
					hitPlayers.Remove(key);
				}
			}
			float num2 = ((Component)this).transform.lossyScale.y * 0.9f;
			Collider2D[] array3 = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).gameObject.transform.position), num2);
			Collider2D[] array4 = array3;
			foreach (Collider2D val in array4)
			{
				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");
					if ((Object)(object)val2 == (Object)(object)player || hitPlayers.ContainsKey(val2.playerID))
					{
						continue;
					}
					SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform);
					val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(((Component)this).gameObject.transform.position);
					component2.CallTakeForce(((Vector2)(ref val3)).normalized * 2500f, (ForceMode2D)1, true, false, 0f);
					hitPlayers[val2.playerID] = 1f;
					if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent<Block>().blockedThisFrame)
					{
						continue;
					}
				}
				if (Object.op_Implicit((Object)(object)component))
				{
					val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)this).transform.position);
					component.CallTakeDamage(((Vector2)(ref val3)).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_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_00c1: 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_00cd: 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_00da: 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_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: 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)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: 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_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: 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_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: 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_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = playerPos - ((Component)this).gameObject.transform.position;
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			float num = Vector3.Distance(((Component)this).gameObject.transform.position, playerPos) / 2f;
			float num2 = baseScale;
			if (icemelt)
			{
				num2 *= (((double)num < 7.5) ? (0f - num / 7.5f + 2f) : 1f);
			}
			trailRenderer.widthMultiplier = num2;
			((Component)this).gameObject.transform.localScale = new Vector3(num2, num2, num2);
			float num3 = 100f / num;
			velocity *= (float)Math.Pow(0.949999988079071, Time.fixedDeltaTime);
			velocity += new Vector3(normalized.x * num3, normalized.y * num3) * Time.fixedDeltaTime;
			if (((Vector3)(ref velocity)).magnitude > 15f)
			{
				velocity *= 15f / ((Vector3)(ref velocity)).magnitude;
			}
			Vector3 val2 = velocity * Time.fixedDeltaTime * cometSpeed;
			if (Vector3.Distance(((Component)this).gameObject.transform.position + val2, playerPos) <= ((Component)this).transform.lossyScale.y * 0.9f)
			{
				Vector3 val3 = Vector3.Normalize(playerPos - ((Component)this).gameObject.transform.position);
				val2 -= 2f * Vector3.Dot(val2, val3) * val3;
			}
			Transform transform = ((Component)this).gameObject.transform;
			transform.position += val2;
			Quaternion rotation = default(Quaternion);
			float num4 = (float)Math.Atan2(((Vector3)(ref velocity)).normalized.x, 0f - ((Vector3)(ref velocity)).normalized.y);
			((Quaternion)(ref rotation)).eulerAngles = new Vector3(0f, 0f, (float)((double)num4 * (180.0 / Math.PI)) - 90f);
			((Component)this).gameObject.transform.rotation = rotation;
			if (((MonoBehaviourPun)this).photonView.IsMine)
			{
				((MonoBehaviourPun)this).photonView.RPC("SyncVelocity", (RpcTarget)1, new object[1] { velocity });
			}
		}

		[PunRPC]
		public void SyncVelocity(Vector3 syncVel)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			velocity = syncVel;
		}

		[PunRPC]
		public void SetAttributes(int ownerID, float scale)
		{
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			player = PlayerManager.instance.players.Find((Player p) => p.playerID == ownerID);
			((Object)this).name = "Comet " + player.playerID;
			cometSpeed = player.data.GetAdditionalData().cometSpeed;
			icemelt = player.data.currentCards.Contains(CardHolder.cards["Icemelt"]);
			stellarImpact = player.data.currentCards.Contains(CardHolder.cards["Stellar Impact"]);
			stardust = player.data.currentCards.Contains(CardHolder.cards["Stardust"]);
			baseScale = scale;
			trailRenderer = ((Component)this).gameObject.GetComponentsInChildren<TrailRenderer>().Last();
			((Component)this).gameObject.GetComponentInChildren<SpriteRenderer>().color = player.GetTeamColors().particleEffect * 1.75f;
			((Renderer)trailRenderer).material.SetColor(Shader.PropertyToID("_Color"), player.GetTeamColors().particleEffect);
			((Renderer)trailRenderer).material.SetColor(Shader.PropertyToID("_EmissionColor"), player.GetTeamColors().particleEffect * 1.75f);
		}

		public void FixedUpdate()
		{
		}
	}
	internal class SoulScythe_Mono : MonoBehaviour
	{
		private Player player;

		private Scythe_Mono scythes;

		private void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			scythes = ((Component)player).GetComponent<Scythe_Mono>();
		}

		public void OnKill()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			GameObject val = new GameObject("Scythe", new Type[1] { typeof(Scythe) });
			val.transform.SetParent(((Component)player).transform);
			scythes.scythes.Add(val.GetComponent<Scythe>());
		}
	}
	[HarmonyPatch(typeof(HealthHandler), "RPCA_Die")]
	public class SoulScytheDeathPatch
	{
		private static void Prefix(HealthHandler __instance)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			CharacterData val = (CharacterData)ExtensionMethods.GetFieldValue((object)__instance, "data");
			Player lastSourceOfDamage = val.lastSourceOfDamage;
			if ((Object)(object)lastSourceOfDamage != (Object)null)
			{
				SoulScythe_Mono componentInChildren = ((Component)lastSourceOfDamage).gameObject.GetComponentInChildren<SoulScythe_Mono>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					componentInChildren.OnKill();
				}
			}
		}
	}
}
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
	{
		public bool