Decompiled source of SamsMod v1.11.0

plugins/FirstRoundsMod.dll

Decompiled 3 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using FirstRoundsMod.Cards;
using FirstRoundsMod.Effects;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnboundLib.Networking;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("FirstRoundsMod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.11.0.0")]
[assembly: AssemblyInformationalVersion("1.11.0")]
[assembly: AssemblyProduct("FirstRoundsMod")]
[assembly: AssemblyTitle("FirstRoundsMod")]
[assembly: AssemblyVersion("1.11.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace FirstRoundsMod
{
	[BepInPlugin("com.samsh.rounds.firstmod", "First Rounds Mod", "1.11.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("Rounds.exe")]
	public sealed class Plugin : BaseUnityPlugin
	{
		public const string Id = "com.samsh.rounds.firstmod";

		public const string Name = "First Rounds Mod";

		public const string Version = "1.11.0";

		private Harmony harmony;

		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.samsh.rounds.firstmod");
			harmony.PatchAll(typeof(Plugin).Assembly);
		}

		private void Start()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"First Rounds Mod 1.11.0 loaded; registering cards.");
			CustomCard.BuildCard<Knockout>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (10x knockback / -50% bullet damage)."));
			});
			CustomCard.BuildCard<Scattershot>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (wide spread / +4 ammo / +50% attack speed)."));
			});
			CustomCard.BuildCard<KirbyFlight>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (+6 jumps / -30% jump strength / -10% player gravity)."));
			});
			CustomCard.BuildCard<RecklessRicochet>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (+1 bounce / +50% bullet speed per bounce)."));
			});
			CustomCard.BuildCard<PanicShot>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (free shot on bullet hit; ammo and reload unchanged)."));
			});
			CustomCard.BuildCard<FatalPoison>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (4x bullet damage over 20 seconds)."));
			});
			CustomCard.BuildCard<EmergencyRecall>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (block marker / recall; separate 2s ability cooldown)."));
			});
			CustomCard.BuildCard<TrainingWheels>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (-50% self-damage per copy)."));
			});
			CustomCard.BuildCard<RocketJump>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (explosive bullets; -75% self-blast damage / 10x self-knockback / 4x other-player knockback)."));
			});
			CustomCard.BuildCard<SplitterBlock>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (3 full-damage return bullets per successful block)."));
			});
			CustomCard.BuildCard<DevilsBargain>((Action<CardInfo>)delegate(CardInfo card)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Registered card: " + card.cardName + " (+10% damage / -5% max health per round)."));
			});
			GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)OnGameStart);
			GameModeManager.AddHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)OnRoundStart);
			GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)OnStatsReady);
			GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)OnStatsReady);
			GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)OnRecallReset);
		}

		private IEnumerator OnGameStart(IGameModeHandler gameMode)
		{
			SplitterBlockFactory.Clear();
			EmergencyRecallEffect.ClearMarkers();
			DevilsBargainEffect.ResetMatch();
			yield break;
		}

		private IEnumerator OnRoundStart(IGameModeHandler gameMode)
		{
			EmergencyRecallEffect.ClearMarkers();
			DevilsBargainEffect.StartRound();
			yield break;
		}

		private IEnumerator OnStatsReady(IGameModeHandler gameMode)
		{
			DevilsBargainEffect.ReconcileAll();
			yield break;
		}

		private IEnumerator OnRecallReset(IGameModeHandler gameMode)
		{
			SplitterBlockFactory.Clear();
			EmergencyRecallEffect.ClearMarkers();
			yield break;
		}

		private void OnDestroy()
		{
			GameModeManager.RemoveHook("GameStart", (Func<IGameModeHandler, IEnumerator>)OnGameStart);
			GameModeManager.RemoveHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)OnRoundStart);
			GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)OnStatsReady);
			GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)OnStatsReady);
			GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)OnRecallReset);
			DevilsBargainEffect.ClearAll();
			PanicShotEffect.ClearAll();
			EmergencyRecallEffect.DetachAll();
			FatalPoisonVisual.ReleaseSharedResources();
			SplitterBlockFactory.Clear();
			Harmony obj = harmony;
			if (obj != null)
			{
				obj.UnpatchSelf();
			}
		}
	}
}
namespace FirstRoundsMod.Patches
{
	[HarmonyPatch(typeof(Gun), "ResetStats")]
	internal static class BargainGunResetPatch
	{
		private static void Postfix(Gun __instance)
		{
			if ((Object)(object)__instance.player != (Object)null)
			{
				((Component)__instance.player).GetComponent<DevilsBargainEffect>()?.DamageWasReset(__instance);
			}
		}
	}
	[HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")]
	internal static class BargainHealthResetPatch
	{
		private static void Postfix(CharacterStatModifiers __instance)
		{
			((Component)__instance).GetComponent<DevilsBargainEffect>()?.HealthWasReset();
		}
	}
	[HarmonyPatch(typeof(Block), "IDoBlock")]
	internal static class EmergencyRecallBlockPatch
	{
		private static void Postfix(Block __instance, bool firstBlock, bool dontSetCD, BlockTriggerType triggerType, Vector3 useBlockPos, bool onlyBlockEffects, ref IEnumerator __result)
		{
			//IL_002a: 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_001d: Invalid comparison between Unknown and I4
			EmergencyRecallEffect component = ((Component)__instance).GetComponent<EmergencyRecallEffect>();
			if (!((Object)(object)component == (Object)null))
			{
				bool eligible = firstBlock && !dontSetCD && !onlyBlockEffects && (int)triggerType == 0;
				__result = AfterBlock(__result, __instance, component, useBlockPos, eligible);
			}
		}

		private static IEnumerator AfterBlock(IEnumerator original, Block block, EmergencyRecallEffect effect, Vector3 useBlockPos, bool eligible)
		{
			//IL_001c: 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)
			int token = effect.BeginBlock();
			Vector3 origin = ((useBlockPos != Vector3.zero) ? useBlockPos : ((Component)block).transform.position);
			bool completed = false;
			try
			{
				while (original.MoveNext())
				{
					yield return original.Current;
				}
				completed = true;
			}
			finally
			{
				(original as IDisposable)?.Dispose();
				if ((Object)(object)effect != (Object)null)
				{
					effect.EndBlock(token, origin, eligible, completed);
				}
			}
		}
	}
	[HarmonyPatch(typeof(Gun), "BulletInit")]
	internal static class FatalPoisonBulletPatch
	{
		private static void Postfix(Gun __instance, GameObject __0)
		{
			bool flag = false;
			if ((Object)(object)__instance.player != (Object)null)
			{
				foreach (CardInfo currentCard in __instance.player.data.currentCards)
				{
					if ((Object)(object)currentCard != (Object)null && (Object)(object)((Component)currentCard).GetComponent<FatalPoison>() != (Object)null)
					{
						flag = true;
						break;
					}
				}
			}
			ProjectileHit component = __0.GetComponent<ProjectileHit>();
			if (!((Object)(object)component == (Object)null))
			{
				FatalPoisonProjectile fatalPoisonProjectile = ((Component)component).GetComponent<FatalPoisonProjectile>();
				if ((Object)(object)fatalPoisonProjectile == (Object)null && flag)
				{
					fatalPoisonProjectile = ((Component)component).gameObject.AddComponent<FatalPoisonProjectile>();
				}
				if ((Object)(object)fatalPoisonProjectile != (Object)null)
				{
					fatalPoisonProjectile.ConvertsDamage = flag;
				}
				FatalPoisonVisual fatalPoisonVisual = ((Component)component).GetComponent<FatalPoisonVisual>();
				if ((Object)(object)fatalPoisonVisual == (Object)null && flag)
				{
					fatalPoisonVisual = ((Component)component).gameObject.AddComponent<FatalPoisonVisual>();
				}
				if ((Object)(object)fatalPoisonVisual != (Object)null)
				{
					fatalPoisonVisual.Configure(flag);
				}
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")]
	internal static class FatalPoisonHitPatch
	{
		private static void Prefix(ProjectileHit __instance)
		{
			FatalPoisonProjectile component = ((Component)__instance).GetComponent<FatalPoisonProjectile>();
			if (!((Object)(object)component == (Object)null) && component.ConvertsDamage && __instance.effects != null && __instance.effects.RemoveAll((RayHitEffect effect) => effect is RayHitPoison) > 0)
			{
				AccessTools.Field(typeof(ProjectileHit), "bulletCanDealDeamage").SetValue(__instance, true);
			}
		}

		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			MethodInfo original = AccessTools.Method(typeof(Damagable), "CallTakeDamage", (Type[])null, (Type[])null);
			MethodInfo replacement = AccessTools.Method(typeof(FatalPoisonProjectile), "ApplyHit", (Type[])null, (Type[])null);
			int replacements = 0;
			foreach (CodeInstruction instruction in instructions)
			{
				if (CodeInstructionExtensions.Calls(instruction, original))
				{
					yield return CodeInstructionExtensions.MoveBlocksFrom(CodeInstructionExtensions.MoveLabelsFrom(new CodeInstruction(OpCodes.Ldarg_0, (object)null), instruction), instruction);
					yield return new CodeInstruction(OpCodes.Call, (object)replacement);
					replacements++;
				}
				else
				{
					yield return instruction;
				}
			}
			if (replacements == 0)
			{
				throw new InvalidOperationException("Fatal Poison: projectile damage call sites were not found.");
			}
		}
	}
	[HarmonyPatch(typeof(Gun), "BulletInit")]
	internal static class RocketJumpBulletPatch
	{
		private static void Postfix(Gun __instance, GameObject __0)
		{
			ProjectileHit component = __0.GetComponent<ProjectileHit>();
			if ((Object)(object)component == (Object)null)
			{
				return;
			}
			bool flag = false;
			if ((Object)(object)__instance.player != (Object)null)
			{
				foreach (CardInfo currentCard in __instance.player.data.currentCards)
				{
					if ((Object)(object)currentCard != (Object)null && (Object)(object)((Component)currentCard).GetComponent<RocketJump>() != (Object)null)
					{
						flag = true;
					}
				}
			}
			RocketJumpImpact rocketJumpImpact = ((Component)component).GetComponent<RocketJumpImpact>();
			if ((Object)(object)rocketJumpImpact == (Object)null && flag)
			{
				rocketJumpImpact = ((Component)component).gameObject.AddComponent<RocketJumpImpact>();
			}
			if ((Object)(object)rocketJumpImpact != (Object)null)
			{
				rocketJumpImpact.Configure(component, flag, __instance.knockback);
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileHit), "Start")]
	internal static class RocketJumpProjectileStartPatch
	{
		private static void Postfix(ProjectileHit __instance)
		{
			((Component)__instance).GetComponent<RocketJumpImpact>()?.Register();
		}
	}
	[HarmonyPatch(typeof(Block), "blocked")]
	internal static class SplitterBlockSuccessPatch
	{
		private static void Postfix(Block __instance, GameObject __0, Vector3 __2)
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)__0 == (Object)null)
			{
				return;
			}
			ProjectileHit component = __0.GetComponent<ProjectileHit>();
			Player component2 = ((Component)__instance).GetComponent<Player>();
			if ((Object)(object)component == (Object)null || (Object)(object)component2 == (Object)null || component2.data.dead)
			{
				return;
			}
			foreach (CardInfo currentCard in component2.data.currentCards)
			{
				if ((Object)(object)currentCard != (Object)null && (Object)(object)((Component)currentCard).GetComponent<SplitterBlock>() != (Object)null)
				{
					SplitterBlockFactory.Split(component, component2, __2);
					break;
				}
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileHit), "Start")]
	internal static class SplitterBlockReplicaStartPatch
	{
		private static bool Prefix(ProjectileHit __instance)
		{
			SplitterBlockReplica component = ((Component)__instance).GetComponent<SplitterBlockReplica>();
			if ((Object)(object)component == (Object)null)
			{
				return true;
			}
			component.InitializeHit(__instance);
			return false;
		}
	}
	[HarmonyPatch(typeof(HealthHandler), "DoDamage")]
	internal static class TrainingWheelsDamagePatch
	{
		private static void Prefix(HealthHandler __instance, ref Vector2 damage, Player damagingPlayer)
		{
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: 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)
			Player component = ((Component)__instance).GetComponent<Player>();
			if ((Object)(object)component == (Object)null || (Object)(object)component.data == (Object)null || (Object)(object)damagingPlayer == (Object)null || (Object)(object)damagingPlayer != (Object)(object)component)
			{
				return;
			}
			int num = 0;
			foreach (CardInfo currentCard in component.data.currentCards)
			{
				if ((Object)(object)currentCard != (Object)null && (Object)(object)((Component)currentCard).GetComponent<TrainingWheels>() != (Object)null)
				{
					num++;
				}
			}
			damage *= SelfDamageReduction.Multiplier(component.playerID, damagingPlayer.playerID, num);
		}
	}
}
namespace FirstRoundsMod.Effects
{
	internal sealed class BargainProgress
	{
		private double appliedDamage = 1.0;

		private double appliedHealth = 1.0;

		public int Rounds { get; private set; }

		public bool Active { get; private set; }

		public void Acquire()
		{
			Active = true;
		}

		public void Suspend()
		{
			Active = false;
		}

		public void ConfirmOwnership(bool ownsCard)
		{
			Active = ownsCard;
			if (!ownsCard)
			{
				Rounds = 0;
			}
		}

		public void StartRound()
		{
			if (Active)
			{
				Rounds++;
			}
		}

		public void ResetMatch()
		{
			Rounds = 0;
		}

		public void DamageWasReset()
		{
			appliedDamage = 1.0;
		}

		public void HealthWasReset()
		{
			appliedHealth = 1.0;
		}

		public void ApplyDamage(ref float damage)
		{
			double num = (Active ? Math.Pow(1.1, Rounds) : 1.0);
			damage = (float)((double)damage * (num / appliedDamage));
			appliedDamage = num;
		}

		public bool ApplyHealth(ref float maxHealth, ref float currentHealth)
		{
			double num = (Active ? Math.Pow(0.95, Rounds) : 1.0);
			if (num == appliedHealth)
			{
				return false;
			}
			maxHealth = (float)((double)maxHealth * (num / appliedHealth));
			currentHealth = Math.Min(currentHealth, maxHealth);
			appliedHealth = num;
			return true;
		}
	}
	public sealed class DevilsBargainEffect : MonoBehaviour
	{
		private static readonly List<DevilsBargainEffect> instances = new List<DevilsBargainEffect>();

		private static readonly MethodInfo configureMassAndSize = AccessTools.Method(typeof(CharacterStatModifiers), "ConfigureMassAndSize", (Type[])null, (Type[])null);

		private readonly BargainProgress progress = new BargainProgress();

		private Player player;

		private Gun gun;

		private void Awake()
		{
			instances.Add(this);
		}

		public void Acquire(Player owner, Gun weapon)
		{
			player = owner;
			gun = weapon;
			progress.Acquire();
			Apply();
		}

		public void Suspend()
		{
			progress.Suspend();
			Apply();
		}

		private bool OwnsCard()
		{
			if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null)
			{
				return false;
			}
			foreach (CardInfo currentCard in player.data.currentCards)
			{
				if ((Object)(object)currentCard != (Object)null && (Object)(object)((Component)currentCard).GetComponent<DevilsBargain>() != (Object)null)
				{
					return true;
				}
			}
			return false;
		}

		private void Reconcile()
		{
			progress.ConfirmOwnership(OwnsCard());
			Apply();
		}

		private void Apply()
		{
			if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null))
			{
				if ((Object)(object)gun != (Object)null)
				{
					progress.ApplyDamage(ref gun.damage);
				}
				if (progress.ApplyHealth(ref player.data.maxHealth, ref player.data.health))
				{
					configureMassAndSize.Invoke(player.data.stats, null);
				}
			}
		}

		internal void DamageWasReset(Gun weapon)
		{
			gun = weapon;
			progress.DamageWasReset();
			Apply();
		}

		internal void HealthWasReset()
		{
			progress.HealthWasReset();
			Apply();
		}

		public static void StartRound()
		{
			DevilsBargainEffect[] array = instances.ToArray();
			foreach (DevilsBargainEffect obj in array)
			{
				obj.Reconcile();
				obj.progress.StartRound();
				obj.Apply();
			}
		}

		public static void ReconcileAll()
		{
			DevilsBargainEffect[] array = instances.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				array[i].Reconcile();
			}
		}

		public static void ResetMatch()
		{
			DevilsBargainEffect[] array = instances.ToArray();
			foreach (DevilsBargainEffect obj in array)
			{
				obj.progress.ResetMatch();
				obj.Reconcile();
			}
		}

		public static void ClearAll()
		{
			DevilsBargainEffect[] array = instances.ToArray();
			foreach (DevilsBargainEffect obj in array)
			{
				obj.progress.ConfirmOwnership(ownsCard: false);
				obj.Apply();
			}
		}

		private void OnDestroy()
		{
			instances.Remove(this);
		}
	}
	public sealed class EmergencyRecallEffect : MonoBehaviour
	{
		private static readonly List<EmergencyRecallEffect> instances = new List<EmergencyRecallEffect>();

		private readonly EmergencyRecallState state = new EmergencyRecallState();

		private Player player;

		private bool acquired;

		private int generation;

		private int blocksInProgress;

		private int sentSequence;

		private int receivedSequence;

		private int appliedSequence;

		private double clock;

		private Vector3 markerPosition;

		private GameObject marker;

		private Material markerMaterial;

		private void Awake()
		{
			instances.Add(this);
			SceneManager.sceneLoaded += OnSceneLoaded;
		}

		public void Acquire(Player owner)
		{
			player = owner;
			acquired = true;
			Clear();
		}

		public void Detach()
		{
			acquired = false;
			Clear();
		}

		private void Update()
		{
			clock += TimeHandler.deltaTime;
			if ((Object)(object)player != (Object)null && player.data.dead)
			{
				Clear();
			}
		}

		internal int BeginBlock()
		{
			blocksInProgress++;
			return generation;
		}

		internal void EndBlock(int token, Vector3 origin, bool eligible, bool completed)
		{
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: 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_010b: Unknown result type (might be due to invalid IL or missing references)
			if (token != generation)
			{
				return;
			}
			blocksInProgress = Math.Max(0, blocksInProgress - 1);
			if (completed && acquired && !((Object)(object)player == (Object)null) && !player.data.dead && player.data.isPlaying && !((Object)(object)player.data.view == (Object)null) && player.data.view.IsMine)
			{
				EmergencyRecallState.Action action = state.TryBlock(clock, eligible);
				switch (action)
				{
				case EmergencyRecallState.Action.None:
					return;
				case EmergencyRecallState.Action.Place:
					markerPosition = origin;
					break;
				}
				Vector3 val = ((action == EmergencyRecallState.Action.Place) ? origin : markerPosition);
				NetworkingManager.RPC(typeof(EmergencyRecallEffect), "RPCA_Apply", new object[4]
				{
					player.playerID,
					++sentSequence,
					action == EmergencyRecallState.Action.Recall,
					val
				});
			}
		}

		[UnboundRPC]
		public static void RPCA_Apply(int playerId, int sequence, bool recall, Vector3 position)
		{
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			Player val = PlayerManager.instance.players.Find((Player candidate) => candidate.playerID == playerId);
			if (!((Object)(object)val == (Object)null))
			{
				EmergencyRecallEffect component = ((Component)val).GetComponent<EmergencyRecallEffect>();
				if (!((Object)(object)component == (Object)null) && component.acquired && sequence > component.receivedSequence)
				{
					component.receivedSequence = sequence;
					((MonoBehaviour)component).StartCoroutine(component.ApplyAfterBlock(component.generation, sequence, recall, position));
				}
			}
		}

		private IEnumerator ApplyAfterBlock(int token, int sequence, bool recall, Vector3 position)
		{
			//IL_0023: 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)
			while (blocksInProgress > 0)
			{
				yield return null;
			}
			if (!acquired || token != generation || sequence <= appliedSequence || (Object)(object)player == (Object)null || player.data.dead || !player.data.isPlaying)
			{
				yield break;
			}
			appliedSequence = sequence;
			if (!recall)
			{
				markerPosition = position;
				ShowMarker(position);
				yield break;
			}
			HideMarker();
			PlayerCollision component = ((Component)player).GetComponent<PlayerCollision>();
			if ((Object)(object)component != (Object)null)
			{
				AccessTools.Method(typeof(PlayerCollision), "IgnoreWallForFrames", (Type[])null, (Type[])null).Invoke(component, new object[1] { 2 });
			}
			((Component)player).transform.position = position;
			AccessTools.Field(typeof(PlayerVelocity), "velocity").SetValue(player.data.playerVel, Vector2.zero);
			player.data.sinceGrounded = 0f;
		}

		private void ShowMarker(Vector3 position)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: 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
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			HideMarker();
			marker = new GameObject($"Emergency Recall Marker {player.playerID}");
			LineRenderer val = marker.AddComponent<LineRenderer>();
			markerMaterial = new Material(Shader.Find("Sprites/Default"));
			((Renderer)val).sharedMaterial = markerMaterial;
			val.useWorldSpace = true;
			val.loop = true;
			val.positionCount = 32;
			float startWidth = (val.endWidth = 0.08f);
			val.startWidth = startWidth;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0.25f, 0.75f, 1f, 1f);
			val.endColor = val2;
			val.startColor = val2;
			((Renderer)val).sortingOrder = 100;
			for (int i = 0; i < 32; i++)
			{
				float num2 = (float)i * MathF.PI * 2f / 32f;
				val.SetPosition(i, position + new Vector3(Mathf.Cos(num2) * 0.7f, Mathf.Sin(num2) * 0.7f, -0.1f));
			}
			AddMarkerParticles(position);
		}

		private void AddMarkerParticles(Vector3 position)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_0028: 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_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: 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_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: 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_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Expected O, but got Unknown
			//IL_0148: 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_0157: 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_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: 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_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: 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)
			//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_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("Recall Marker Shimmer");
			val.transform.SetParent(marker.transform, false);
			val.transform.position = position + new Vector3(0f, 0f, -0.1f);
			ParticleSystem val2 = val.AddComponent<ParticleSystem>();
			val2.Stop(true, (ParticleSystemStopBehavior)0);
			MainModule main = val2.main;
			((MainModule)(ref main)).loop = true;
			((MainModule)(ref main)).playOnAwake = false;
			((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.5f, 0.9f);
			((MainModule)(ref main)).startSpeed = new MinMaxCurve(0.05f, 0.15f);
			((MainModule)(ref main)).startSize = new MinMaxCurve(0.04f, 0.09f);
			((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(new Color(0.35f, 0.85f, 1f, 0.75f));
			((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(0f);
			((MainModule)(ref main)).maxParticles = 20;
			((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1;
			EmissionModule emission = val2.emission;
			((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(8f);
			ShapeModule shape = val2.shape;
			((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10;
			((ShapeModule)(ref shape)).radius = 0.7f;
			((ShapeModule)(ref shape)).radiusThickness = 0.1f;
			Gradient val3 = new Gradient();
			val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[2]
			{
				new GradientColorKey(Color.white, 0f),
				new GradientColorKey(Color.white, 1f)
			}, (GradientAlphaKey[])(object)new GradientAlphaKey[3]
			{
				new GradientAlphaKey(0f, 0f),
				new GradientAlphaKey(1f, 0.15f),
				new GradientAlphaKey(0f, 1f)
			});
			ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime;
			((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true;
			((ColorOverLifetimeModule)(ref colorOverLifetime)).color = new MinMaxGradient(val3);
			SizeOverLifetimeModule sizeOverLifetime = val2.sizeOverLifetime;
			((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true;
			((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, AnimationCurve.Linear(0f, 1f, 1f, 0f));
			ParticleSystemRenderer component = val.GetComponent<ParticleSystemRenderer>();
			((Renderer)component).sharedMaterial = markerMaterial;
			component.renderMode = (ParticleSystemRenderMode)0;
			((Renderer)component).sortingOrder = 101;
			val2.Play();
		}

		private void HideMarker()
		{
			if ((Object)(object)marker != (Object)null)
			{
				Object.Destroy((Object)(object)marker);
			}
			if ((Object)(object)markerMaterial != (Object)null)
			{
				Object.Destroy((Object)(object)markerMaterial);
			}
			marker = null;
			markerMaterial = null;
		}

		private void Clear()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			generation++;
			blocksInProgress = 0;
			state.Clear();
			markerPosition = Vector3.zero;
			HideMarker();
		}

		private void OnDisable()
		{
			Clear();
		}

		private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
		{
			Clear();
		}

		public static void ClearMarkers()
		{
			EmergencyRecallEffect[] array = instances.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				array[i].Clear();
			}
		}

		public static void DetachAll()
		{
			EmergencyRecallEffect[] array = instances.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				array[i].Detach();
			}
		}

		private void OnDestroy()
		{
			Detach();
			SceneManager.sceneLoaded -= OnSceneLoaded;
			instances.Remove(this);
		}
	}
	internal sealed class EmergencyRecallState
	{
		public enum Action
		{
			None,
			Place,
			Recall
		}

		private double readyAt;

		public bool HasMarker { get; private set; }

		public Action TryBlock(double now, bool primaryManualBlock)
		{
			if (!primaryManualBlock || now < readyAt)
			{
				return Action.None;
			}
			int result = ((!HasMarker) ? 1 : 2);
			HasMarker = !HasMarker;
			readyAt = now + 2.0;
			return (Action)result;
		}

		public void Clear()
		{
			HasMarker = false;
			readyAt = 0.0;
		}
	}
	public sealed class FatalPoisonProjectile : MonoBehaviour
	{
		public bool ConvertsDamage;

		public static void ApplyHit(Damagable target, Vector2 damage, Vector2 position, GameObject weapon, Player attacker, bool lethal, ProjectileHit projectile)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			FatalPoisonProjectile component = ((Component)projectile).GetComponent<FatalPoisonProjectile>();
			HealthHandler val = (HealthHandler)(object)((target is HealthHandler) ? target : null);
			if ((Object)(object)component == (Object)null || !component.ConvertsDamage || (Object)(object)val == (Object)null)
			{
				target.CallTakeDamage(damage, position, weapon, attacker, lethal);
				PanicShotBulletEvents.Notify(val, damage);
				return;
			}
			Player component2 = ((Component)val).GetComponent<Player>();
			if (!((Object)(object)component2 == (Object)null) && !component2.data.dead && !component2.data.block.IsBlocking() && ((Vector2)(ref damage)).sqrMagnitude > 0f)
			{
				NetworkingManager.RPC(typeof(FatalPoisonProjectile), "RPCA_ApplyPoison", new object[5]
				{
					component2.playerID,
					((Object)(object)attacker != (Object)null) ? attacker.playerID : (-1),
					damage,
					position,
					lethal
				});
				PanicShotBulletEvents.Notify(val, damage);
			}
		}

		[UnboundRPC]
		public static void RPCA_ApplyPoison(int victimId, int attackerId, Vector2 damage, Vector2 position, bool lethal)
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			List<Player> players = PlayerManager.instance.players;
			Player val = players.Find((Player player) => player.playerID == victimId);
			Player attacker = players.Find((Player player) => player.playerID == attackerId);
			if (!((Object)(object)val == (Object)null) && !val.data.dead && val.data.isPlaying)
			{
				DamageOverTime component = ((Component)val).GetComponent<DamageOverTime>();
				if (!((Object)(object)component == (Object)null))
				{
					((MonoBehaviour)component).StartCoroutine(DealPoison(val, attacker, damage, position, lethal));
				}
			}
		}

		private static IEnumerator DealPoison(Player victim, Player attacker, Vector2 damage, Vector2 position, bool lethal)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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)
			Vector2 direction = ((Vector2)(ref damage)).normalized;
			GameObject weapon = (((Object)(object)attacker != (Object)null) ? ((Component)attacker.data.weaponHandler.gun).gameObject : null);
			foreach (FatalPoisonSchedule.Tick tick in FatalPoisonSchedule.GetTicks(((Vector2)(ref damage)).magnitude))
			{
				yield return (object)new WaitForSeconds(tick.Delay / TimeHandler.timeScale);
				if (!((Object)(object)victim == (Object)null) && !victim.data.dead && victim.data.isPlaying)
				{
					victim.data.healthHandler.DoDamage(direction * tick.Damage, position, Color.green, weapon, attacker, true, lethal, false);
					continue;
				}
				yield break;
			}
		}
	}
	internal static class FatalPoisonSchedule
	{
		internal struct Tick
		{
			public float Delay;

			public float Damage;
		}

		public const float Duration = 20f;

		public const int TickCount = 40;

		public const float Interval = 0.5f;

		public static IEnumerable<Tick> GetTicks(float normalHitDamage)
		{
			if (normalHitDamage > 0f && !float.IsInfinity(normalHitDamage))
			{
				double total = (double)normalHitDamage * 5.0;
				double num = 0.0;
				for (int i = 1; i <= 40; i++)
				{
					double next = total * (double)i / 40.0;
					yield return new Tick
					{
						Delay = 0.5f,
						Damage = (float)(next - num)
					};
					num = next;
				}
			}
		}
	}
	public sealed class FatalPoisonVisual : MonoBehaviour
	{
		private static readonly Color bulletColor = new Color(1f, 0.55f, 1f, 1f);

		private static Sprite glowSprite;

		private static Texture2D glowTexture;

		private static Material trailMaterial;

		private SpriteRenderer[] bodySprites;

		private Color[] originalColors;

		private GameObject visualRoot;

		private TrailRenderer trail;

		public void Configure(bool active)
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			if (active && (Object)(object)visualRoot == (Object)null)
			{
				CreateVisuals();
			}
			((Behaviour)this).enabled = active;
			if ((Object)(object)visualRoot != (Object)null)
			{
				visualRoot.SetActive(active);
			}
			if ((Object)(object)trail != (Object)null)
			{
				trail.Clear();
			}
			if (bodySprites == null)
			{
				return;
			}
			for (int i = 0; i < bodySprites.Length; i++)
			{
				if ((Object)(object)bodySprites[i] != (Object)null)
				{
					bodySprites[i].color = (active ? bulletColor : originalColors[i]);
				}
			}
		}

		private void CreateVisuals()
		{
			//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_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Expected O, but got Unknown
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			Transform val = ((Component)this).transform.Find("Fatal Poison Glow and Tail");
			if ((Object)(object)val != (Object)null)
			{
				Object.DestroyImmediate((Object)(object)((Component)val).gameObject);
			}
			bodySprites = ((Component)this).GetComponentsInChildren<SpriteRenderer>(true);
			originalColors = (Color[])(object)new Color[bodySprites.Length];
			for (int i = 0; i < bodySprites.Length; i++)
			{
				originalColors[i] = bodySprites[i].color;
			}
			EnsureSharedResources();
			visualRoot = new GameObject("Fatal Poison Glow and Tail");
			visualRoot.transform.SetParent(((Component)this).transform, false);
			SpriteRenderer obj = visualRoot.AddComponent<SpriteRenderer>();
			obj.sprite = glowSprite;
			obj.color = new Color(0.8f, 0.15f, 1f, 0.7f);
			((Renderer)obj).sortingOrder = 110;
			trail = visualRoot.AddComponent<TrailRenderer>();
			((Renderer)trail).sharedMaterial = trailMaterial;
			trail.time = 0.1f;
			trail.minVertexDistance = 0.15f;
			trail.widthMultiplier = 0.24f;
			trail.widthCurve = AnimationCurve.Linear(0f, 1f, 1f, 0f);
			trail.numCornerVertices = 2;
			trail.numCapVertices = 2;
			((Renderer)trail).sortingOrder = 109;
			Gradient val2 = new Gradient();
			val2.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
			{
				new GradientColorKey(bulletColor, 0f),
				new GradientColorKey(new Color(0.65f, 0.1f, 1f), 0.35f),
				new GradientColorKey(new Color(0.3f, 0.02f, 0.65f), 1f)
			}, (GradientAlphaKey[])(object)new GradientAlphaKey[3]
			{
				new GradientAlphaKey(0.9f, 0f),
				new GradientAlphaKey(0.5f, 0.4f),
				new GradientAlphaKey(0f, 1f)
			});
			trail.colorGradient = val2;
		}

		private void LateUpdate()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			if (bodySprites == null)
			{
				return;
			}
			SpriteRenderer[] array = bodySprites;
			foreach (SpriteRenderer val in array)
			{
				if ((Object)(object)val != (Object)null)
				{
					val.color = bulletColor;
				}
			}
		}

		private void OnDisable()
		{
			if ((Object)(object)trail != (Object)null)
			{
				trail.Clear();
			}
		}

		private static void EnsureSharedResources()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_0127: 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_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)trailMaterial == (Object)null)
			{
				trailMaterial = new Material(Shader.Find("Sprites/Default"));
			}
			if ((Object)(object)glowSprite != (Object)null)
			{
				return;
			}
			glowTexture = new Texture2D(32, 32, (TextureFormat)4, false);
			((Texture)glowTexture).wrapMode = (TextureWrapMode)1;
			((Texture)glowTexture).filterMode = (FilterMode)1;
			Color[] array = (Color[])(object)new Color[1024];
			for (int i = 0; i < 32; i++)
			{
				for (int j = 0; j < 32; j++)
				{
					float num = ((float)j + 0.5f) * 2f / 32f - 1f;
					float num2 = ((float)i + 0.5f) * 2f / 32f - 1f;
					float num3 = Mathf.Clamp01(1f - Mathf.Sqrt(num * num + num2 * num2));
					array[i * 32 + j] = new Color(1f, 1f, 1f, num3 * num3);
				}
			}
			glowTexture.SetPixels(array);
			glowTexture.Apply(false, true);
			glowSprite = Sprite.Create(glowTexture, new Rect(0f, 0f, 32f, 32f), new Vector2(0.5f, 0.5f), 32f);
		}

		public static void ReleaseSharedResources()
		{
			if ((Object)(object)glowSprite != (Object)null)
			{
				Object.Destroy((Object)(object)glowSprite);
			}
			if ((Object)(object)glowTexture != (Object)null)
			{
				Object.Destroy((Object)(object)glowTexture);
			}
			if ((Object)(object)trailMaterial != (Object)null)
			{
				Object.Destroy((Object)(object)trailMaterial);
			}
			glowSprite = null;
			glowTexture = null;
			trailMaterial = null;
		}
	}
	internal static class PanicShotBulletEvents
	{
		public static void Notify(HealthHandler health, Vector2 damage)
		{
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)health == (Object)null || health.isRespawning || !(((Vector2)(ref damage)).sqrMagnitude > 0f))
			{
				return;
			}
			Player component = ((Component)health).GetComponent<Player>();
			if (!((Object)(object)component == (Object)null) && !component.data.dead && component.data.isPlaying && !component.data.block.IsBlocking())
			{
				PanicShotEffect component2 = ((Component)component).GetComponent<PanicShotEffect>();
				if (!((Object)(object)component2 == (Object)null) && component2.Acquired)
				{
					NetworkingManager.RPC(typeof(PanicShotBulletEvents), "RPCA_BulletHit", new object[2] { component.playerID, damage });
				}
			}
		}

		[UnboundRPC]
		public static void RPCA_BulletHit(int victimId, Vector2 damage)
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			Player val = PlayerManager.instance.players.Find((Player player) => player.playerID == victimId);
			if ((Object)(object)val != (Object)null)
			{
				((Component)val).GetComponent<PanicShotEffect>()?.OnBulletHit(damage);
			}
		}
	}
	public sealed class PanicShotEffect : MonoBehaviour
	{
		private static readonly List<PanicShotEffect> instances = new List<PanicShotEffect>();

		private Player player;

		private bool firing;

		internal bool Acquired { get; private set; }

		private void Awake()
		{
			instances.Add(this);
		}

		public void Acquire(Player owner)
		{
			player = owner;
			Acquired = true;
		}

		public void Detach()
		{
			Acquired = false;
		}

		internal void OnBulletHit(Vector2 damage)
		{
			if (!Acquired || firing || !(((Vector2)(ref damage)).sqrMagnitude > 0f) || (Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null)
			{
				return;
			}
			CharacterData data = player.data;
			if (data.dead || (Object)(object)data.view == (Object)null || !data.view.IsMine || (Object)(object)data.weaponHandler == (Object)null)
			{
				return;
			}
			Gun gun = data.weaponHandler.gun;
			if ((Object)(object)gun == (Object)null || !((Component)gun).gameObject.activeInHierarchy)
			{
				return;
			}
			firing = true;
			float sinceAttack = ((Weapon)gun).sinceAttack;
			try
			{
				((Weapon)gun).Attack(0f, true, 1f, 1f, false);
			}
			finally
			{
				((Weapon)gun).sinceAttack = sinceAttack;
				firing = false;
			}
		}

		public static void ClearAll()
		{
			PanicShotEffect[] array = instances.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				array[i].Detach();
			}
		}

		private void OnDestroy()
		{
			Detach();
			instances.Remove(this);
		}
	}
	public sealed class RocketJumpBlastVisual : MonoBehaviour
	{
		private LineRenderer ring;

		private Material material;

		private float elapsed;

		public static void Show(Vector2 position)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("Rocket Jump Blast");
			val.transform.position = new Vector3(position.x, position.y, -0.1f);
			val.AddComponent<RocketJumpBlastVisual>().Initialize();
		}

		private void Initialize()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			//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_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			material = new Material(Shader.Find("Sprites/Default"));
			ring = ((Component)this).gameObject.AddComponent<LineRenderer>();
			((Renderer)ring).sharedMaterial = material;
			ring.useWorldSpace = false;
			ring.loop = true;
			ring.positionCount = 32;
			LineRenderer obj = ring;
			float startWidth = (ring.endWidth = 0.12f);
			obj.startWidth = startWidth;
			((Renderer)ring).sortingOrder = 105;
			ParticleSystem obj2 = ((Component)this).gameObject.AddComponent<ParticleSystem>();
			obj2.Stop(true, (ParticleSystemStopBehavior)0);
			MainModule main = obj2.main;
			((MainModule)(ref main)).loop = false;
			((MainModule)(ref main)).playOnAwake = false;
			((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.15f, 0.3f);
			((MainModule)(ref main)).startSize = new MinMaxCurve(0.08f, 0.18f);
			((MainModule)(ref main)).startSpeed = new MinMaxCurve(6f, 10f);
			((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(new Color(1f, 0.65f, 0.1f));
			((MainModule)(ref main)).maxParticles = 24;
			EmissionModule emission = obj2.emission;
			((EmissionModule)(ref emission)).enabled = false;
			ShapeModule shape = obj2.shape;
			((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10;
			((ShapeModule)(ref shape)).radius = 0.1f;
			ParticleSystemRenderer component = ((Component)obj2).GetComponent<ParticleSystemRenderer>();
			((Renderer)component).sharedMaterial = material;
			((Renderer)component).sortingOrder = 106;
			obj2.Play();
			obj2.Emit(24);
			UpdateRing(0f);
			Object.Destroy((Object)(object)((Component)this).gameObject, 0.4f);
		}

		private void Update()
		{
			elapsed += Time.deltaTime;
			UpdateRing(Mathf.Clamp01(elapsed / 0.3f));
		}

		private void UpdateRing(float progress)
		{
			//IL_003a: 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_007b: Unknown result type (might be due to invalid IL or missing references)
			float num = Mathf.Lerp(0.15f, 3f, progress);
			LineRenderer obj = ring;
			LineRenderer obj2 = ring;
			Color val = default(Color);
			((Color)(ref val))..ctor(1f, 0.65f, 0.1f, 1f - progress);
			obj2.endColor = val;
			obj.startColor = val;
			for (int i = 0; i < 32; i++)
			{
				float num2 = (float)i * MathF.PI * 2f / 32f;
				ring.SetPosition(i, new Vector3(Mathf.Cos(num2) * num, Mathf.Sin(num2) * num, 0f));
			}
		}

		private void OnDestroy()
		{
			if ((Object)(object)material != (Object)null)
			{
				Object.Destroy((Object)(object)material);
			}
		}
	}
	public sealed class RocketJumpImpact : RayHitEffect
	{
		private static readonly FieldInfo hasControl = AccessTools.Field(typeof(ProjectileHit), "hasControl");

		[SerializeField]
		private bool explosive;

		[SerializeField]
		private float knockbackMultiplier;

		[SerializeField]
		private ProjectileHit projectile;

		internal void Configure(ProjectileHit hit, bool ownsCard, float knockback)
		{
			projectile = hit;
			explosive = ownsCard;
			knockbackMultiplier = knockback;
			base.priority = int.MaxValue;
			Register();
		}

		internal void Register()
		{
			if (!((Object)(object)projectile == (Object)null) && projectile.effects != null)
			{
				projectile.effects.RemoveAll((RayHitEffect effect) => (Object)(object)effect == (Object)(object)this);
				projectile.effects.Add((RayHitEffect)(object)this);
				projectile.effects.Sort((RayHitEffect left, RayHitEffect right) => right.priority.CompareTo(left.priority));
			}
		}

		public override HasToReturn DoHitEffect(HitInfo hit)
		{
			//IL_0047: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: 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_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: 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_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: 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_01b3: Unknown result type (might be due to invalid IL or missing references)
			if (explosive && !((Object)(object)projectile == (Object)null) && (bool)hasControl.GetValue(projectile))
			{
				Player ownPlayer = projectile.ownPlayer;
				if (!((Object)(object)ownPlayer == (Object)null))
				{
					Vector2 val = hit.point + hit.normal * 0.05f;
					float damage = projectile.damage;
					GameObject ownWeapon = projectile.ownWeapon;
					NetworkingManager.RPC(typeof(RocketJumpImpact), "RPCA_ShowBlast", new object[1] { val });
					Player[] array = PlayerManager.instance.players.ToArray();
					foreach (Player val2 in array)
					{
						if ((Object)(object)val2 == (Object)null || val2.data.dead || !val2.data.isPlaying)
						{
							continue;
						}
						CharacterData data = val2.data;
						if ((Object)(object)data.mainCol == (Object)null || data.block.IsBlocking())
						{
							continue;
						}
						Bounds bounds = data.mainCol.bounds;
						float num = Vector2.Distance(val, Vector2.op_Implicit(((Bounds)(ref bounds)).ClosestPoint(Vector2.op_Implicit(val))));
						if (!(num > 3f) && PlayerManager.instance.CanSeePlayer(val, val2).canSee)
						{
							bool isOwner = (Object)(object)val2 == (Object)(object)ownPlayer;
							Vector2 val3 = Vector2.op_Implicit(((Component)val2).transform.position) - val;
							if (((Vector2)(ref val3)).sqrMagnitude < 0.0001f)
							{
								val3 = ((((Vector2)(ref hit.normal)).sqrMagnitude > 0f) ? hit.normal : Vector2.up);
							}
							((Vector2)(ref val3)).Normalize();
							float num2 = RocketJumpRules.Force(knockbackMultiplier, isOwner, num);
							float num3 = RocketJumpRules.Damage(damage, isOwner, num);
							data.healthHandler.CallTakeForce(val3 * num2, (ForceMode2D)1, false, false, 0f);
							((Damagable)data.healthHandler).CallTakeDamage(val3 * num3, val, ownWeapon, ownPlayer, true);
						}
					}
					return (HasToReturn)1;
				}
				return (HasToReturn)1;
			}
			return (HasToReturn)1;
		}

		[UnboundRPC]
		public static void RPCA_ShowBlast(Vector2 position)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			RocketJumpBlastVisual.Show(position);
		}
	}
	internal static class RocketJumpRules
	{
		public const float Radius = 3f;

		public const float BaseForce = 2000f;

		public static float Damage(float bulletDamage, bool isOwner, float distance)
		{
			if (!(bulletDamage > 0f) || !(distance >= 0f) || !(distance <= 3f))
			{
				return 0f;
			}
			return bulletDamage * (isOwner ? 0.25f : 1f);
		}

		public static float Force(float knockbackMultiplier, bool isOwner, float distance)
		{
			if (!(knockbackMultiplier > 0f) || !(distance >= 0f) || !(distance <= 3f))
			{
				return 0f;
			}
			return 2000f * knockbackMultiplier * (isOwner ? 10f : 4f);
		}
	}
	internal static class SelfDamageReduction
	{
		public static float Multiplier(int? victimId, int? attackerId, int copies)
		{
			if (!victimId.HasValue || !attackerId.HasValue || victimId != attackerId || copies <= 0)
			{
				return 1f;
			}
			return (float)Math.Pow(0.5, copies);
		}
	}
	internal static class SplitterBlockFactory
	{
		private static readonly Dictionary<string, GameObject> templates = new Dictionary<string, GameObject>();

		private static readonly HashSet<string> spawned = new HashSet<string>();

		private static GameObject inactiveRoot;

		public static void Split(ProjectileHit source, Player defender, Vector3 hitPosition)
		{
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			PhotonView component = ((Component)source).GetComponent<PhotonView>();
			MoveTransform component2 = ((Component)source).GetComponent<MoveTransform>();
			if ((Object)(object)component == (Object)null || !component.IsMine || (Object)(object)component2 == (Object)null || ((Vector3)(ref component2.velocity)).sqrMagnitude < 0.0001f)
			{
				return;
			}
			if (!(PhotonNetwork.PrefabPool is DefaultPool))
			{
				Debug.LogWarning("Splitter Block requires the default Photon prefab pool; keeping normal reflection.");
				return;
			}
			SplitterBlockHistory splitterBlockHistory = ((Component)source).GetComponent<SplitterBlockHistory>();
			if ((Object)(object)splitterBlockHistory == (Object)null)
			{
				splitterBlockHistory = ((Component)source).gameObject.AddComponent<SplitterBlockHistory>();
			}
			string text = $"FRM_Split_{component.ViewID}_{++splitterBlockHistory.Sequence}";
			if (Prepare(text, source, defender.playerID, component2.velocity))
			{
				NetworkingManager.RPC(typeof(SplitterBlockFactory), "RPCA_Split", new object[6] { text, component.ViewID, component.OwnerActorNr, defender.playerID, hitPosition, component2.velocity });
			}
		}

		private static bool Prepare(string key, ProjectileHit source, int defenderId, Vector3 returnVelocity)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			if (templates.ContainsKey(key))
			{
				return true;
			}
			IPunPrefabPool prefabPool = PhotonNetwork.PrefabPool;
			DefaultPool val = (DefaultPool)(object)((prefabPool is DefaultPool) ? prefabPool : null);
			if (val == null || (Object)(object)source == (Object)null)
			{
				return false;
			}
			if ((Object)(object)inactiveRoot == (Object)null)
			{
				inactiveRoot = new GameObject("Splitter Block Templates");
				inactiveRoot.SetActive(false);
				Object.DontDestroyOnLoad((Object)(object)inactiveRoot);
			}
			GameObject val2 = Object.Instantiate<GameObject>(((Component)source).gameObject, inactiveRoot.transform, false);
			val2.SetActive(false);
			((Object)val2).name = key;
			PhotonView[] componentsInChildren = val2.GetComponentsInChildren<PhotonView>(true);
			foreach (PhotonView val3 in componentsInChildren)
			{
				AccessTools.Field(typeof(PhotonView), "viewIdField").SetValue(val3, 0);
				val3.InstantiationId = 0;
				AccessTools.Field(typeof(PhotonView), "isRuntimeInstantiated").SetValue(val3, false);
				AccessTools.Field(typeof(PhotonView), "instantiationDataField").SetValue(val3, null);
			}
			SplitterBlockReplica splitterBlockReplica = val2.GetComponent<SplitterBlockReplica>();
			if ((Object)(object)splitterBlockReplica == (Object)null)
			{
				splitterBlockReplica = val2.AddComponent<SplitterBlockReplica>();
			}
			splitterBlockReplica.ReturnVelocity = returnVelocity;
			splitterBlockReplica.Damage = source.damage;
			splitterBlockReplica.Force = source.force;
			splitterBlockReplica.DefenderId = defenderId;
			val2.GetComponent<MoveTransform>().DontRunStart = true;
			templates.Add(key, val2);
			val.ResourceCache[key] = val2;
			return true;
		}

		[UnboundRPC]
		public static void RPCA_Split(string key, int sourceViewId, int ownerActor, int defenderId, Vector3 hitPosition, Vector3 returnVelocity)
		{
			//IL_0025: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			if (!templates.ContainsKey(key))
			{
				PhotonView val = PhotonView.Find(sourceViewId);
				if ((Object)(object)val == (Object)null || !Prepare(key, ((Component)val).GetComponent<ProjectileHit>(), defenderId, returnVelocity))
				{
					return;
				}
			}
			if (PhotonNetwork.LocalPlayer.ActorNumber == ownerActor && spawned.Add(key))
			{
				float[] array = new float[2] { -15f, 15f };
				Vector3 val2 = default(Vector3);
				foreach (float num in array)
				{
					SplitterBlockRules.Direction direction = SplitterBlockRules.Rotate(returnVelocity.x, returnVelocity.y, num);
					((Vector3)(ref val2))..ctor(direction.X, direction.Y, returnVelocity.z);
					PhotonNetwork.Instantiate(key, hitPosition + ((Vector3)(ref val2)).normalized * 0.15f, Quaternion.LookRotation(val2, Vector3.forward), (byte)0, new object[1] { num });
				}
			}
		}

		public static void Clear()
		{
			IPunPrefabPool prefabPool = PhotonNetwork.PrefabPool;
			DefaultPool val = (DefaultPool)(object)((prefabPool is DefaultPool) ? prefabPool : null);
			foreach (KeyValuePair<string, GameObject> template in templates)
			{
				val?.ResourceCache.Remove(template.Key);
				if ((Object)(object)template.Value != (Object)null)
				{
					Object.Destroy((Object)(object)template.Value);
				}
			}
			templates.Clear();
			spawned.Clear();
			if ((Object)(object)inactiveRoot != (Object)null)
			{
				Object.Destroy((Object)(object)inactiveRoot);
			}
			inactiveRoot = null;
		}
	}
	public sealed class SplitterBlockHistory : MonoBehaviour
	{
		public int Sequence;
	}
	public sealed class SplitterBlockReplica : MonoBehaviour, IPunInstantiateMagicCallback
	{
		public Vector3 ReturnVelocity;

		public float Damage;

		public float Force;

		public int DefenderId;

		public void OnPhotonInstantiate(PhotonMessageInfo info)
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			float degrees = (float)((Component)this).GetComponent<PhotonView>().InstantiationData[0];
			SplitterBlockRules.Direction direction = SplitterBlockRules.Rotate(ReturnVelocity.x, ReturnVelocity.y, degrees);
			MoveTransform component = ((Component)this).GetComponent<MoveTransform>();
			component.DontRunStart = true;
			component.velocity = new Vector3(direction.X, direction.Y, ReturnVelocity.z);
			((Component)this).transform.rotation = Quaternion.LookRotation(component.velocity, Vector3.forward);
			TrailRenderer[] componentsInChildren = ((Component)this).GetComponentsInChildren<TrailRenderer>(true);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				componentsInChildren[i].Clear();
			}
			FatalPoisonProjectile component2 = ((Component)this).GetComponent<FatalPoisonProjectile>();
			FatalPoisonVisual component3 = ((Component)this).GetComponent<FatalPoisonVisual>();
			if ((Object)(object)component3 != (Object)null)
			{
				component3.Configure((Object)(object)component2 != (Object)null && component2.ConvertsDamage);
			}
		}

		internal void InitializeHit(ProjectileHit hit)
		{
			hit.damage = Damage;
			hit.force = Force;
			AccessTools.Field(typeof(ProjectileHit), "move").SetValue(hit, ((Component)this).GetComponent<MoveTransform>());
			AccessTools.Field(typeof(ProjectileHit), "view").SetValue(hit, ((Component)this).GetComponent<PhotonView>());
			AccessTools.Field(typeof(ProjectileHit), "spawnedAttack").SetValue(hit, ((Component)this).GetComponent<SpawnedAttack>());
			AccessTools.Field(typeof(ProjectileHit), "hasControl").SetValue(hit, ((Component)this).GetComponent<PhotonView>().IsMine);
			AccessTools.Field(typeof(ProjectileHit), "playersHit").SetValue(hit, new List<HealthHandler>());
			hit.effects = new List<RayHitEffect>(((Component)this).GetComponentsInChildren<RayHitEffect>());
			hit.effects.Sort((RayHitEffect left, RayHitEffect right) => right.priority.CompareTo(left.priority));
			Player val = PlayerManager.instance.players.Find((Player player) => player.playerID == DefenderId);
			if ((Object)(object)val != (Object)null)
			{
				hit.AddPlayerToHeld(val.data.healthHandler);
			}
			RayCastTrail component = ((Component)this).GetComponent<RayCastTrail>();
			if (component != null)
			{
				component.WasBlocked();
			}
		}
	}
	internal static class SplitterBlockRules
	{
		public struct Direction
		{
			public float X;

			public float Y;
		}

		public static Direction Rotate(float returnX, float returnY, float degrees)
		{
			double num = (double)degrees * Math.PI / 180.0;
			return new Direction
			{
				X = (float)((double)returnX * Math.Cos(num) - (double)returnY * Math.Sin(num)),
				Y = (float)((double)returnX * Math.Sin(num) + (double)returnY * Math.Cos(num))
			};
		}
	}
}
namespace FirstRoundsMod.Cards
{
	public sealed class DevilsBargain : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			DevilsBargainEffect devilsBargainEffect = ((Component)player).GetComponent<DevilsBargainEffect>();
			if ((Object)(object)devilsBargainEffect == (Object)null)
			{
				devilsBargainEffect = ((Component)player).gameObject.AddComponent<DevilsBargainEffect>();
			}
			devilsBargainEffect.Acquire(player, gun);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			((Component)player).GetComponent<DevilsBargainEffect>()?.Suspend();
		}

		protected override string GetTitle()
		{
			return "Devil's Bargain";
		}

		protected override string GetDescription()
		{
			return "Each round, gain 10% damage and lose 5% maximum health.";
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)0;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Damage/round",
					amount = "+10%",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Health/round",
					amount = "-5%",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class EmergencyRecall : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			EmergencyRecallEffect emergencyRecallEffect = ((Component)player).GetComponent<EmergencyRecallEffect>();
			if ((Object)(object)emergencyRecallEffect == (Object)null)
			{
				emergencyRecallEffect = ((Component)player).gameObject.AddComponent<EmergencyRecallEffect>();
			}
			emergencyRecallEffect.Acquire(player);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			((Component)player).GetComponent<EmergencyRecallEffect>()?.Detach();
		}

		protected override string GetTitle()
		{
			return "Emergency Recall";
		}

		protected override string GetDescription()
		{
			return "Block to place a marker. Your next block returns you to it. Block effects activate before teleporting.";
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)2;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Block",
					amount = "Place/recall",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Ability CD",
					amount = "2s",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class FatalPoison : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Fatal Poison";
		}

		protected override string GetDescription()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)5;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Total damage",
					amount = "5x",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Damage time",
					amount = "20s",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class KirbyFlight : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			statModifiers.numberOfJumps = 6;
			statModifiers.jump = 0.7f;
			statModifiers.gravity = 0.85f;
			cardInfo.allowMultiple = true;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Kirby Flight";
		}

		protected override string GetDescription()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)1;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)2;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: 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)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Jumps",
					amount = "+6",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Jump power",
					amount = "-30%",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Gravity",
					amount = "-15%",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class Knockout : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.knockback = 10f;
			gun.damage = 0.5f;
			cardInfo.allowMultiple = true;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Knockout";
		}

		protected override string GetDescription()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)0;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)0;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Knockback",
					amount = "+900%",
					simepleAmount = (SimpleAmount)4
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Damage",
					amount = "-50%",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class PanicShot : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			PanicShotEffect panicShotEffect = ((Component)player).GetComponent<PanicShotEffect>();
			if ((Object)(object)panicShotEffect == (Object)null)
			{
				panicShotEffect = ((Component)player).gameObject.AddComponent<PanicShotEffect>();
			}
			panicShotEffect.Acquire(player);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			((Component)player).GetComponent<PanicShotEffect>()?.Detach();
		}

		protected override string GetTitle()
		{
			return "Panic Shot";
		}

		protected override string GetDescription()
		{
			return "Being hit by a bullet automatically fires a free shot, even while reloading.";
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)1;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)0;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Panic shots",
					amount = "+1",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class RecklessRicochet : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.reflects = 1;
			gun.speedMOnBounce = 1.5f;
			cardInfo.allowMultiple = true;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Reckless Ricochet";
		}

		protected override string GetDescription()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)1;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)1;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Bounces",
					amount = "+1",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Bounce speed",
					amount = "+50%",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class RocketJump : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Rocket Jump";
		}

		protected override string GetDescription()
		{
			return "Your bullets explode on impact.";
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)1;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: 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)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			//IL_008c: 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_0098: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[4]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Blast radius",
					amount = "3",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Self damage",
					amount = "-75%",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Self push",
					amount = "10x",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Others push",
					amount = "4x",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class Scattershot : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.spread = 0.3f;
			gun.ammo = 4;
			gun.attackSpeed = 2f / 3f;
			cardInfo.allowMultiple = true;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Scattershot";
		}

		protected override string GetDescription()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)0;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)1;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: 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)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = false,
					stat = "Spread",
					amount = "Much more",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Ammo",
					amount = "+4",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Attack speed",
					amount = "+50%",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class SplitterBlock : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Splitter Block";
		}

		protected override string GetDescription()
		{
			return "Successfully block a bullet to split its return into a fan.";
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)2;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: 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)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Return shots",
					amount = "3",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Shot damage",
					amount = "100%",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Fan angle",
					amount = "30 deg",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
	public sealed class TrainingWheels : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = true;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Training Wheels";
		}

		protected override string GetDescription()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)1;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)2;
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		public override string GetModName()
		{
			return "FRM";
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Self-damage",
					amount = "-50%",
					simepleAmount = (SimpleAmount)2
				}
			};
		}
	}
}