Decompiled source of ClassRoulette v1.0.2

ClassRoulette.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using ClassRoulette.Framework;
using ClassesManagerReborn;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModdingUtils.Utils;
using ModsPlus;
using Photon.Pun;
using RarityLib.Utils;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnboundLib.Networking;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyVersion("0.0.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 ClassRoulette
{
	[BepInPlugin("com.jasonbellz.classroulette", "Class Roulette", "1.0.2")]
	[BepInProcess("Rounds.exe")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class ClassRoulettePlugin : BaseUnityPlugin
	{
		public const string ModId = "com.jasonbellz.classroulette";

		public static ClassRoulettePlugin Instance { get; private set; }

		private void Awake()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			Instance = this;
			new Harmony("com.jasonbellz.classroulette").PatchAll();
		}

		private void Start()
		{
			ClassSecondDraw.Register(((BaseUnityPlugin)this).Logger);
			((MonoBehaviour)this).StartCoroutine(BuildWhenReady());
		}

		private IEnumerator BuildWhenReady()
		{
			while (!RaritiesReady())
			{
				yield return null;
			}
			CardBuilder.BuildAll(((BaseUnityPlugin)this).Logger);
		}

		private static bool RaritiesReady()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				RarityUtils.GetRarity("Common");
				return true;
			}
			catch
			{
				return false;
			}
		}
	}
}
namespace ClassRoulette.Framework
{
	public static class CardBuilder
	{
		private static readonly Dictionary<Type, CardInfo> Built = new Dictionary<Type, CardInfo>();

		private static readonly Dictionary<Type, ClassCardAttribute> Meta = new Dictionary<Type, ClassCardAttribute>();

		private static int _expected;

		private static ManualLogSource _log;

		public static void BuildAll(ManualLogSource log)
		{
			_log = log;
			List<Type> list = (from t in Assembly.GetExecutingAssembly().GetTypes()
				where !t.IsAbstract && typeof(CustomCard).IsAssignableFrom(t) && t.GetCustomAttribute<ClassCardAttribute>() != null
				select t).OrderBy<Type, string>((Type t) => t.FullName, StringComparer.Ordinal).ToList();
			_expected = list.Count;
			_log.LogInfo((object)$"[ClassRoulette] Building {_expected} class cards...");
			MethodInfo methodInfo = typeof(CustomCard).GetMethods(BindingFlags.Static | BindingFlags.Public).First((MethodInfo m) => m.Name == "BuildCard" && m.IsGenericMethod && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType == typeof(Action<CardInfo>));
			foreach (Type item in list)
			{
				Meta[item] = item.GetCustomAttribute<ClassCardAttribute>();
				Type captured = item;
				Action<CardInfo> action = delegate(CardInfo ci)
				{
					OnCardBuilt(captured, ci);
				};
				methodInfo.MakeGenericMethod(item).Invoke(null, new object[1] { action });
			}
		}

		private static void OnCardBuilt(Type type, CardInfo info)
		{
			Built[type] = info;
			if (Built.Count >= _expected)
			{
				WireAll();
			}
		}

		private static void WireAll()
		{
			foreach (KeyValuePair<Type, ClassCardAttribute> item in Meta.Where((KeyValuePair<Type, ClassCardAttribute> m) => m.Value.Role == CardRole.Entry))
			{
				CardInfo val = Built[item.Key];
				val.allowMultiple = false;
				ClassesRegistry.Register(val, (CardType)1, 0);
				ClassManager.Entries[item.Value.ClassName] = val;
			}
			foreach (KeyValuePair<Type, ClassCardAttribute> item2 in Meta.Where((KeyValuePair<Type, ClassCardAttribute> m) => m.Value.Role != CardRole.Entry))
			{
				ClassCardAttribute value = item2.Value;
				CardInfo val2 = Built[item2.Key];
				if (!ClassManager.Entries.TryGetValue(value.ClassName, out var value2))
				{
					_log.LogError((object)("[ClassRoulette] No entry registered for class '" + value.ClassName + "' (card " + val2.cardName + ")."));
				}
				else if (value.Role == CardRole.Ultimate)
				{
					val2.allowMultiple = false;
					ClassesRegistry.Register(val2, (CardType)16, value2, 0);
					ClassManager.Ultimates[val2] = value.ClassName;
				}
				else
				{
					val2.allowMultiple = true;
					ClassesRegistry.Register(val2, (CardType)16, value2, 0);
					ClassManager.PoolCards[val2] = value.ClassName;
				}
			}
			_log.LogInfo((object)($"[ClassRoulette] Registered {ClassManager.Entries.Count} classes, " + $"{ClassManager.PoolCards.Count} pool cards, {ClassManager.Ultimates.Count} ultimates."));
		}
	}
	public static class Cr
	{
		public const string ModName = "ClassRoulette";

		public static Rarity Common => RarityUtils.GetRarity("Common");

		public static Rarity Uncommon => RarityUtils.GetRarity("Uncommon");

		public static Rarity Rare => RarityUtils.GetRarity("Rare");

		public static CardInfoStat Stat(string name, string amount, bool positive = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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_0022: Expected O, but got Unknown
			return new CardInfoStat
			{
				positive = positive,
				stat = name,
				amount = amount,
				simepleAmount = (SimpleAmount)0
			};
		}

		public static CardInfoStat[] Stats(params CardInfoStat[] stats)
		{
			return stats;
		}
	}
	public abstract class ClassStatCard : SimpleCard
	{
		protected abstract string Name { get; }

		protected abstract string Text { get; }

		protected abstract Rarity CardRarity { get; }

		protected abstract CardThemeColorType Color { get; }

		protected virtual CardInfoStat[] StatList => null;

		public override CardDetails Details => new CardDetails
		{
			Title = Name,
			Description = Text,
			ModName = "ClassRoulette",
			Rarity = CardRarity,
			Theme = Color,
			Stats = StatList,
			Art = null
		};
	}
	public abstract class ClassEffectCard<T> : CustomEffectCard<T> where T : CardEffect
	{
		protected abstract string Name { get; }

		protected abstract string Text { get; }

		protected abstract Rarity CardRarity { get; }

		protected abstract CardThemeColorType Color { get; }

		protected virtual CardInfoStat[] StatList => null;

		public override CardDetails<T> Details => new CardDetails<T>
		{
			Title = Name,
			Description = Text,
			ModName = "ClassRoulette",
			Rarity = CardRarity,
			Theme = Color,
			Stats = StatList,
			Art = null
		};
	}
	public enum CardRole
	{
		Entry,
		Pool,
		Ultimate
	}
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
	public class ClassCardAttribute : Attribute
	{
		public string ClassName { get; }

		public CardRole Role { get; }

		public ClassCardAttribute(string className, CardRole role)
		{
			ClassName = className;
			Role = role;
		}
	}
	[HarmonyPatch(typeof(Cards), "PlayerIsAllowedCard")]
	internal static class ClassCardGatePatch
	{
		private static void Postfix(ref bool __result, Player player, CardInfo card)
		{
			if (!__result || (Object)(object)player == (Object)null || (Object)(object)card == (Object)null)
			{
				return;
			}
			if (ClassPickState.Active && player.playerID == ClassPickState.PlayerID)
			{
				string value;
				if (!ClassManager.CardBelongsToClass(card, ClassPickState.ClassName))
				{
					__result = false;
				}
				else if (ClassManager.Ultimates.TryGetValue(card, out value) && !ClassManager.IsUltimateUnlocked(player, value))
				{
					__result = false;
				}
			}
			else if (ClassManager.IsClassPoolOrUltimate(card))
			{
				__result = false;
			}
		}
	}
	public static class ClassManager
	{
		public const int UltimateThreshold = 8;

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

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

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

		public static int CountPoolCards(Player player, string className)
		{
			if (player?.data?.currentCards == null)
			{
				return 0;
			}
			int num = 0;
			foreach (CardInfo currentCard in player.data.currentCards)
			{
				if ((Object)(object)currentCard != (Object)null && PoolCards.TryGetValue(currentCard, out var value) && value == className)
				{
					num++;
				}
			}
			return num;
		}

		public static bool IsUltimateUnlocked(Player player, string className)
		{
			return CountPoolCards(player, className) >= 8;
		}

		public static bool CardBelongsToClass(CardInfo card, string className)
		{
			if ((Object)(object)card == (Object)null || className == null)
			{
				return false;
			}
			if (PoolCards.TryGetValue(card, out var value) && value == className)
			{
				return true;
			}
			if (Ultimates.TryGetValue(card, out var value2) && value2 == className)
			{
				return true;
			}
			return false;
		}

		public static bool IsClassPoolOrUltimate(CardInfo card)
		{
			if ((Object)(object)card != (Object)null)
			{
				if (!PoolCards.ContainsKey(card))
				{
					return Ultimates.ContainsKey(card);
				}
				return true;
			}
			return false;
		}

		public static string GetOwnedClass(Player player)
		{
			if (player?.data?.currentCards == null)
			{
				return null;
			}
			foreach (KeyValuePair<string, CardInfo> entry in Entries)
			{
				if (player.data.currentCards.Contains(entry.Value))
				{
					return entry.Key;
				}
			}
			return null;
		}
	}
	public static class ClassPickState
	{
		public static bool Active;

		public static int PlayerID = -1;

		public static string ClassName;

		public static void Begin(int playerID, string className)
		{
			Active = true;
			PlayerID = playerID;
			ClassName = className;
		}

		public static void End()
		{
			Active = false;
			PlayerID = -1;
			ClassName = null;
		}
	}
	public static class ClassSecondDraw
	{
		private static ManualLogSource _log;

		private static bool _hooked;

		public static void Register(ManualLogSource log)
		{
			_log = log;
			EnforceClassRules();
			if (!_hooked)
			{
				_hooked = true;
				GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)ClassPicks, -1000);
			}
		}

		private static void EnforceClassRules()
		{
			try
			{
				if (ClassesManager.Class_War != null && !ClassesManager.Class_War.Value)
				{
					ClassesManager.Class_War.Value = true;
				}
				if (ClassesManager.Ignore_Blacklist != null && ClassesManager.Ignore_Blacklist.Value)
				{
					ClassesManager.Ignore_Blacklist.Value = false;
				}
			}
			catch
			{
			}
		}

		private static IEnumerator WaitForSyncUp()
		{
			if (!PhotonNetwork.OfflineMode && (Object)(object)ClassRoulettePlugin.Instance != (Object)null)
			{
				yield return MonoBehaviourExtensions.SyncMethod((MonoBehaviour)(object)ClassRoulettePlugin.Instance, "RPC_RequestSync", (int[])null, new object[1] { PhotonNetwork.LocalPlayer.ActorNumber });
			}
		}

		[UnboundRPC]
		public static void RPC_RequestSync(int requestingPlayer)
		{
			NetworkingManager.RPC(typeof(ClassSecondDraw), "RPC_SyncResponse", new object[2]
			{
				requestingPlayer,
				PhotonNetwork.LocalPlayer.ActorNumber
			});
		}

		[UnboundRPC]
		public static void RPC_SyncResponse(int requestingPlayer, int readyPlayer)
		{
			if (PhotonNetwork.LocalPlayer.ActorNumber == requestingPlayer && (Object)(object)ClassRoulettePlugin.Instance != (Object)null)
			{
				MonoBehaviourExtensions.RemovePendingRequest((MonoBehaviour)(object)ClassRoulettePlugin.Instance, readyPlayer, "RPC_RequestSync");
			}
		}

		private static IEnumerator ClassPicks(IGameModeHandler gm)
		{
			EnforceClassRules();
			if ((Object)(object)PlayerManager.instance == (Object)null)
			{
				yield break;
			}
			List<Player> players = (from val in PlayerManager.instance.players
				where (Object)(object)val != (Object)null && (Object)(object)val.data != (Object)null
				orderby val.playerID
				select val).ToList();
			if (!players.Any((Player player) => ClassManager.GetOwnedClass(player) != null))
			{
				yield break;
			}
			yield return WaitForSyncUp();
			foreach (Player p in players)
			{
				string className = ClassManager.GetOwnedClass(p);
				if (className == null)
				{
					continue;
				}
				yield return WaitForSyncUp();
				ClassPickState.Begin(p.playerID, className);
				try
				{
					try
					{
						CardChoiceVisuals instance = CardChoiceVisuals.instance;
						if (instance != null)
						{
							instance.Show(p.playerID, true);
						}
					}
					catch
					{
					}
					yield return GameModeManager.TriggerHook("PlayerPickStart");
					yield return CardChoice.instance.DoPick(1, p.playerID, (PickerType)1);
					yield return (object)new WaitForSecondsRealtime(0.1f);
				}
				finally
				{
					ClassPickState.End();
				}
				yield return GameModeManager.TriggerHook("PlayerPickEnd");
				yield return (object)new WaitForSecondsRealtime(0.1f);
			}
			try
			{
				CardChoiceVisuals instance2 = CardChoiceVisuals.instance;
				if (instance2 != null)
				{
					instance2.Hide();
				}
			}
			catch
			{
			}
			ClassPickState.End();
		}
	}
	public static class EffectUtils
	{
		private static FieldInfo _velField;

		public static bool Mine(Player p)
		{
			if ((Object)(object)p?.data?.view != (Object)null)
			{
				return p.data.view.IsMine;
			}
			return false;
		}

		public static bool Alive(Player p)
		{
			if ((Object)(object)p?.data != (Object)null && !p.data.dead && p.data.isPlaying)
			{
				return Mine(p);
			}
			return false;
		}

		public static Player GetVictim(HitInfo hit, Player owner)
		{
			if (hit == null || (Object)(object)hit.transform == (Object)null)
			{
				return null;
			}
			Player componentInParent = ((Component)hit.transform).GetComponentInParent<Player>();
			if ((Object)(object)componentInParent == (Object)null || (Object)(object)componentInParent == (Object)(object)owner)
			{
				return null;
			}
			if ((Object)(object)owner != (Object)null && componentInParent.teamID == owner.teamID)
			{
				return null;
			}
			return componentInParent;
		}

		public static ProjectileHit GetProjectileHit(GameObject projectile)
		{
			if ((Object)(object)projectile == (Object)null)
			{
				return null;
			}
			return projectile.GetComponentInChildren<ProjectileHit>();
		}

		public static void BonusDamage(Player owner, Player victim, float amount, Color color)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			if (Mine(owner) && !((Object)(object)victim?.data?.healthHandler == (Object)null) && !(amount <= 0f))
			{
				Vector2 val = Vector2.op_Implicit(((Component)victim).transform.position);
				Vector2 val2 = Vector2.op_Implicit(((Component)victim).transform.position - ((Component)owner).transform.position);
				val2 = ((((Vector2)(ref val2)).sqrMagnitude < 0.0001f) ? Vector2.up : ((Vector2)(ref val2)).normalized);
				victim.data.healthHandler.DoDamage(val2 * amount, val, color, (GameObject)null, owner, false, true, false);
			}
		}

		public static void Poison(Player owner, Player victim, float totalDamage, float time, Color color)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			if (Mine(owner) && !((Object)(object)victim?.data?.healthHandler == (Object)null))
			{
				victim.data.healthHandler.TakeDamageOverTime(Vector2.up * totalDamage, Vector2.op_Implicit(((Component)victim).transform.position), time, 0.5f, color, (GameObject)null, owner, true);
			}
		}

		public static void HealSelf(Player owner, HealthHandler health, float amount)
		{
			if (Mine(owner) && !((Object)(object)health == (Object)null))
			{
				health.Heal(amount);
			}
		}

		public static void PushSelf(Player owner, HealthHandler health, Vector2 force)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			if (Mine(owner) && !((Object)(object)health == (Object)null))
			{
				health.CallTakeForce(force, (ForceMode2D)1, false, true, 0.1f);
			}
		}

		public static void RadialBurst(Player owner, Vector2 center, float radius, float damage, float knockback, Color color, bool falloff = true)
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: 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_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			if (!Mine(owner) || (Object)(object)PlayerManager.instance == (Object)null)
			{
				return;
			}
			foreach (Player player in PlayerManager.instance.players)
			{
				if ((Object)(object)player == (Object)null || (Object)(object)player == (Object)(object)owner || player.teamID == owner.teamID || (Object)(object)player.data == (Object)null || player.data.dead || !player.data.isPlaying)
				{
					continue;
				}
				Vector2 val = Vector2.op_Implicit(((Component)player).transform.position);
				float num = Vector2.Distance(center, val);
				if (num > radius)
				{
					continue;
				}
				float num2 = (falloff ? Mathf.Clamp01(1f - num / radius) : 1f);
				Vector2 val2 = val - center;
				Vector2 val3;
				if (!(((Vector2)(ref val2)).sqrMagnitude < 0.0001f))
				{
					val2 = val - center;
					val3 = ((Vector2)(ref val2)).normalized;
				}
				else
				{
					val3 = Vector2.up;
				}
				Vector2 val4 = val3;
				HealthHandler healthHandler = player.data.healthHandler;
				if (!((Object)(object)healthHandler == (Object)null))
				{
					if (damage > 0f)
					{
						healthHandler.DoDamage(val4 * (damage * num2), val, color, (GameObject)null, owner, false, true, false);
					}
					if (knockback > 0f)
					{
						healthHandler.CallTakeForce(val4 * (knockback * num2), (ForceMode2D)1, false, false, 0.1f);
					}
				}
			}
		}

		public static Vector2 Velocity(Player p)
		{
			//IL_0022: 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_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			PlayerVelocity val = p?.data?.playerVel;
			if ((Object)(object)val == (Object)null)
			{
				return Vector2.zero;
			}
			if (_velField == null)
			{
				_velField = typeof(PlayerVelocity).GetField("velocity", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			}
			if (_velField == null)
			{
				return Vector2.zero;
			}
			object value = _velField.GetValue(val);
			if (value is Vector2)
			{
				return (Vector2)value;
			}
			return Vector2.zero;
		}

		public static float NearestEnemyDistance(Player owner)
		{
			//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)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			float num = float.MaxValue;
			foreach (Player item in Enemies(owner))
			{
				float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)owner).transform.position), Vector2.op_Implicit(((Component)item).transform.position));
				if (num2 < num)
				{
					num = num2;
				}
			}
			return num;
		}

		public static Player NearestEnemy(Player owner, float maxDist = float.MaxValue)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			Player result = null;
			float num = maxDist;
			foreach (Player item in Enemies(owner))
			{
				float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)owner).transform.position), Vector2.op_Implicit(((Component)item).transform.position));
				if (num2 <= num)
				{
					num = num2;
					result = item;
				}
			}
			return result;
		}

		public static IEnumerable<Player> Enemies(Player owner)
		{
			if ((Object)(object)owner == (Object)null || (Object)(object)PlayerManager.instance == (Object)null)
			{
				yield break;
			}
			foreach (Player player in PlayerManager.instance.players)
			{
				if (!((Object)(object)player == (Object)null) && !((Object)(object)player == (Object)(object)owner) && player.teamID != owner.teamID && !((Object)(object)player.data == (Object)null) && !player.data.dead && player.data.isPlaying)
				{
					yield return player;
				}
			}
		}

		public static void Knockback(Player owner, Player victim, Vector2 dir, float force)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			if (Mine(owner) && !((Object)(object)victim?.data?.healthHandler == (Object)null) && !(force <= 0f))
			{
				dir = ((((Vector2)(ref dir)).sqrMagnitude < 0.0001f) ? Vector2.up : ((Vector2)(ref dir)).normalized);
				victim.data.healthHandler.CallTakeForce(dir * force, (ForceMode2D)1, false, false, 0.1f);
			}
		}

		public static Player ProjectileOwner(GameObject projectile)
		{
			ProjectileHit projectileHit = GetProjectileHit(projectile);
			if (!((Object)(object)projectileHit != (Object)null))
			{
				return null;
			}
			return projectileHit.ownPlayer;
		}
	}
}
namespace ClassRoulette.Classes.TricksterClass
{
	public class GravityTrapEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			if (!EffectUtils.Mine(((CardEffect)this).player))
			{
				return;
			}
			Vector2 val = hit?.point ?? Vector2.op_Implicit(projectile.transform.position);
			foreach (Player item in EffectUtils.Enemies(((CardEffect)this).player))
			{
				Vector2 val2 = val - Vector2.op_Implicit(((Component)item).transform.position);
				if (((Vector2)(ref val2)).magnitude <= 5f && ((Vector2)(ref val2)).magnitude > 0.1f)
				{
					EffectUtils.Knockback(((CardEffect)this).player, item, ((Vector2)(ref val2)).normalized, 12f);
				}
			}
		}
	}
	public class JinxEffect : CardEffect
	{
		private int shotCount;

		public override void OnShoot(GameObject projectile)
		{
			ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
			if (!((Object)(object)projectileHit == (Object)null))
			{
				switch (new Random(((!((Object)(object)((CardEffect)this).player != (Object)null)) ? 1 : (((CardEffect)this).player.playerID + 1)) * 90001 + shotCount++).Next(0, 3))
				{
				case 0:
					projectileHit.dealDamageMultiplierr *= 1.25f;
					break;
				case 1:
					projectileHit.force *= 1.8f;
					break;
				default:
					projectileHit.stun += 0.25f;
					break;
				}
			}
		}
	}
	[ClassCard("Trickster", CardRole.Entry)]
	public class Trickster : ClassStatCard
	{
		protected override string Name => "Trickster";

		protected override string Text => "Class: TRICKSTER. Your bullets bounce off walls and hit harder each bounce. Bank shots around cover - but straight lines get weaker.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+2"), Cr.Stat("Damage per bounce", "+30%"), Cr.Stat("Damage", "-15%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.reflects += 2;
			gun.dmgMOnBounce *= 1.3f;
			gun.damage = 0.85f;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class Ricochet : ClassStatCard
	{
		protected override string Name => "Ricochet";

		protected override string Text => "More angles to work with.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+2"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.reflects += 2;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class Kinetic : ClassStatCard
	{
		protected override string Name => "Kinetic";

		protected override string Text => "Bounces build power.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage per bounce", "+40%"), Cr.Stat("Speed per bounce", "+20%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.dmgMOnBounce *= 1.4f;
			gun.speedMOnBounce *= 1.2f;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class SmartBounce : ClassStatCard
	{
		protected override string Name => "Homing Bounce";

		protected override string Text => "Bounces seek targets.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Smart bounces", "+2"), Cr.Stat("Damage", "-5%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.smartBounce += 2;
			gun.damage = 0.95f;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class LowGravity : ClassStatCard
	{
		protected override string Name => "Antigravity";

		protected override string Text => "Bend the rules of physics.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet gravity", "-60%"), Cr.Stat("Bounces", "+1"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.gravity = 0.4f;
			gun.reflects++;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class GravityTrap : ClassEffectCard<GravityTrapEffect>
	{
		protected override string Name => "Gravity Trap";

		protected override string Text => "Where your shot lands, space warps and drags nearby enemies toward the spot. Set up your bank shots.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Pull on hit", "yes"), Cr.Stat("Bounces", "+1"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.reflects++;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class Portal : ClassStatCard
	{
		protected override string Name => "Portal Rounds";

		protected override string Text => "Now you see them...";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet portals", "+1"), Cr.Stat("Bounces", "+1"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.bulletPortal++;
			gun.reflects++;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class Jinx : ClassEffectCard<JinxEffect>
	{
		protected override string Name => "Hex";

		protected override string Text => "Every bullet is cursed with a random hex: extra bite, a hard shove, or a stagger.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Random hex", "yes"), Cr.Stat("Random bounces", "+2"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.randomBounces += 2;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class Bouncy : ClassStatCard
	{
		protected override string Name => "Superball";

		protected override string Text => "Keeps its speed on bounce.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+1"), Cr.Stat("Speed per bounce", "+30%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.reflects++;
			gun.speedMOnBounce *= 1.3f;
		}
	}
	[ClassCard("Trickster", CardRole.Pool)]
	public class CurveBall : ClassStatCard
	{
		protected override string Name => "Curve Ball";

		protected override string Text => "Bend it around cover.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+1"), Cr.Stat("Damage per bounce", "+25%"), Cr.Stat("Bullet gravity", "-30%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.reflects++;
			gun.dmgMOnBounce *= 1.25f;
			gun.gravity = 0.7f;
		}
	}
	[ClassCard("Trickster", CardRole.Ultimate)]
	public class Pinball : ClassStatCard
	{
		protected override string Name => "Pinball";

		protected override string Text => "ULTIMATE: +5 bounces and each bounce adds big damage and speed. Fill the room with lethal ricochets.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)8;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+5"), Cr.Stat("Damage per bounce", "+50%"), Cr.Stat("Speed per bounce", "+25%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.reflects += 5;
			gun.dmgMOnBounce *= 1.5f;
			gun.speedMOnBounce *= 1.25f;
		}
	}
}
namespace ClassRoulette.Classes.TankClass
{
	public class RetaliateEffect : CardEffect
	{
		private float ragedUntil;

		public override void OnTakeDamage(Vector2 damage, bool selfDamage)
		{
			if (!selfDamage)
			{
				ragedUntil = Time.time + 3f;
			}
		}

		public override void OnShoot(GameObject projectile)
		{
			if (!(Time.time > ragedUntil))
			{
				ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
				if ((Object)(object)projectileHit != (Object)null)
				{
					projectileHit.dealDamageMultiplierr *= 1.3f;
				}
			}
		}
	}
	public class LastStandEffect : CardEffect
	{
		private float last = -99f;

		public override void OnTakeDamage(Vector2 damage, bool selfDamage)
		{
			if (!selfDamage && !((Object)(object)((CardEffect)this).data == (Object)null) && ((CardEffect)this).data.health / Mathf.Max(1f, ((CardEffect)this).data.maxHealth) < 0.35f && Time.time - last > 8f)
			{
				last = Time.time;
				EffectUtils.HealSelf(((CardEffect)this).player, ((CardEffect)this).health, 25f);
			}
		}
	}
	public class ThornsEffect : CardEffect
	{
		public override void OnTakeDamage(Vector2 damage, bool selfDamage)
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			if (!selfDamage)
			{
				Player val = EffectUtils.NearestEnemy(((CardEffect)this).player, 5f);
				if (!((Object)(object)val == (Object)null))
				{
					float amount = Mathf.Min(20f, ((Vector2)(ref damage)).magnitude * 0.35f);
					EffectUtils.BonusDamage(((CardEffect)this).player, val, amount, new Color(0.5f, 0.8f, 1f));
				}
			}
		}
	}
	public class JuggernautEffect : CardEffect
	{
		public override void OnShoot(GameObject projectile)
		{
			if (!((Object)(object)((CardEffect)this).data == (Object)null))
			{
				float num = 1f - Mathf.Clamp01(((CardEffect)this).data.health / Mathf.Max(1f, ((CardEffect)this).data.maxHealth));
				ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
				if ((Object)(object)projectileHit != (Object)null)
				{
					projectileHit.dealDamageMultiplierr *= 1f + 0.5f * num;
				}
			}
		}
	}
	public class BastionEffect : CardEffect
	{
		private void Update()
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)((CardEffect)this).player == (Object)null) && !((Object)(object)((CardEffect)this).data == (Object)null) && !((CardEffect)this).data.dead && ((CardEffect)this).data.isPlaying && EffectUtils.Mine(((CardEffect)this).player))
			{
				Vector2 val = EffectUtils.Velocity(((CardEffect)this).player);
				if (((Vector2)(ref val)).magnitude < 2f)
				{
					EffectUtils.HealSelf(((CardEffect)this).player, ((CardEffect)this).health, 4f * Time.deltaTime);
				}
			}
		}
	}
	[ClassCard("Tank", CardRole.Entry)]
	public class Tank : ClassEffectCard<RetaliateEffect>
	{
		protected override string Name => "Tank";

		protected override string Text => "Class: TANK. When you take damage you enrage: +30% damage for 3 seconds.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+25%"), Cr.Stat("Movement speed", "-10%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.25f;
			m.movementSpeed = 0.9f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class Beefy : ClassStatCard
	{
		protected override string Name => "Beefy";

		protected override string Text => "Just more of you.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+30%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.3f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class ThickSkin : ClassStatCard
	{
		protected override string Name => "Thick Skin";

		protected override string Text => "Shrug it off.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+20%"), Cr.Stat("Regen", "+2/s"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.2f;
			m.regen += 2f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class Vampiric : ClassStatCard
	{
		protected override string Name => "Vampiric Plating";

		protected override string Text => "Sustain through combat.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Lifesteal", "+20%"), Cr.Stat("Health", "+10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.lifeSteal += 0.2f;
			m.health = 1.1f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class Thorns : ClassEffectCard<ThornsEffect>
	{
		protected override string Name => "Thorns";

		protected override string Text => "When you're hit, the nearest enemy within range takes up to 35% of that damage back. Best when you're brawling up close.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Reflect (close)", "35%"), Cr.Stat("Health", "+15%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.15f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class Juggernaut : ClassEffectCard<JuggernautEffect>
	{
		protected override string Name => "Juggernaut";

		protected override string Text => "The more health you're missing, the harder you hit - up to +50% at death's door.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Comeback damage", "up to +50%"), Cr.Stat("Health", "+15%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.15f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class Sturdy : ClassStatCard
	{
		protected override string Name => "Sturdy";

		protected override string Text => "Planted firmly.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+15%"), Cr.Stat("Block cooldown", "-15%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.15f;
			b.cdMultiplier = 0.85f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class Bastion : ClassEffectCard<BastionEffect>
	{
		protected override string Name => "Bastion";

		protected override string Text => "Dig in: stand still and slowly patch yourself up (4 HP/s). Moving stops the repair.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Repair while still", "4 HP/s"), Cr.Stat("Health", "+10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.1f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class IronHide : ClassStatCard
	{
		protected override string Name => "Iron Hide";

		protected override string Text => "Slow and unstoppable.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+40%"), Cr.Stat("Attack speed", "-10%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.4f;
			gun.attackSpeed = 1.1f;
		}
	}
	[ClassCard("Tank", CardRole.Pool)]
	public class Fortified : ClassStatCard
	{
		protected override string Name => "Fortified";

		protected override string Text => "A wall that shoots back.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+25%"), Cr.Stat("Block cooldown", "-15%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.25f;
			b.cdMultiplier = 0.85f;
		}
	}
	[ClassCard("Tank", CardRole.Ultimate)]
	public class LastStand : ClassEffectCard<LastStandEffect>
	{
		protected override string Name => "Last Stand";

		protected override string Text => "ULTIMATE: When you drop below 35% HP you instantly heal 25 (once every 8s).";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+20%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.health = 1.2f;
		}
	}
}
namespace ClassRoulette.Classes.SprayClass
{
	public class RandomBulletEffect : CardEffect
	{
		private int shotCount;

		public override void OnShoot(GameObject projectile)
		{
			ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
			int num = new Random(((!((Object)(object)((CardEffect)this).player != (Object)null)) ? 1 : (((CardEffect)this).player.playerID + 1)) * 100000 + shotCount++).Next(0, 5);
			if (!((Object)(object)projectileHit == (Object)null))
			{
				switch (num)
				{
				case 0:
					projectileHit.damage *= 1.3f;
					break;
				case 1:
					projectileHit.force *= 1.7f;
					break;
				case 2:
					projectileHit.stun += 0.2f;
					break;
				case 3:
					projectileHit.movementSlow += 0.35f;
					break;
				default:
					projectileHit.dealDamageMultiplierr *= 1.15f;
					break;
				}
			}
		}
	}
	public class VentEffect : CardEffect
	{
		public override void OnReloadDone(int bulletsReloaded)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			if (EffectUtils.Mine(((CardEffect)this).player) && !((Object)(object)((CardEffect)this).player == (Object)null))
			{
				EffectUtils.RadialBurst(((CardEffect)this).player, Vector2.op_Implicit(((Component)((CardEffect)this).player).transform.position), 3.5f, 10f, 20f, new Color(1f, 0.8f, 0.2f));
			}
		}
	}
	public class OverdriveEffect : CardEffect
	{
		private float baseAttackSpeed = -1f;

		private float lastShot;

		private int heat;

		public override IEnumerator OnBattleStart(IGameModeHandler h)
		{
			baseAttackSpeed = ((CardEffect)this).gun.attackSpeed;
			heat = 0;
			yield break;
		}

		public override void OnShoot(GameObject projectile)
		{
			if (baseAttackSpeed < 0f)
			{
				baseAttackSpeed = ((CardEffect)this).gun.attackSpeed;
			}
			heat = ((Time.time - lastShot < 0.6f) ? Mathf.Min(heat + 1, 20) : 0);
			lastShot = Time.time;
			((CardEffect)this).gun.attackSpeed = baseAttackSpeed * (1f - 0.02f * (float)heat);
		}

		private void Cool()
		{
			if (baseAttackSpeed > 0f)
			{
				((CardEffect)this).gun.attackSpeed = baseAttackSpeed;
			}
			heat = 0;
		}

		public override IEnumerator OnPointEnd(IGameModeHandler h)
		{
			Cool();
			yield break;
		}

		public override IEnumerator OnRoundEnd(IGameModeHandler h)
		{
			Cool();
			yield break;
		}

		protected override void OnDestroy()
		{
			Cool();
			((CardEffect)this).OnDestroy();
		}

		private void Update()
		{
			if (baseAttackSpeed > 0f && heat != 0 && Time.time - lastShot > 0.8f)
			{
				heat = 0;
				((CardEffect)this).gun.attackSpeed = baseAttackSpeed;
			}
		}
	}
	[ClassCard("Spray", CardRole.Entry)]
	public class Sprayer : ClassEffectCard<RandomBulletEffect>
	{
		protected override string Name => "Spray";

		protected override string Text => "Class: SPRAY. Every bullet rolls a random effect (bonus damage, knockback, stun, or slow).";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+15%"), Cr.Stat("Damage", "-10%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.85f;
			gun.damage = 0.9f;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class Rapidfire : ClassStatCard
	{
		protected override string Name => "Rapidfire";

		protected override string Text => "Hold the trigger.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+25%"), Cr.Stat("Damage", "-5%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.75f;
			gun.damage = 0.95f;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class Scattershot : ClassStatCard
	{
		protected override string Name => "Scattershot";

		protected override string Text => "More lead in the air.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+2"), Cr.Stat("Damage", "-25%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.numberOfProjectiles += 2;
			gun.damage = 0.75f;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class DrumMag : ClassStatCard
	{
		protected override string Name => "Drum Mag";

		protected override string Text => "Reload less, fire more.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Ammo", "+4"), Cr.Stat("Reload time", "-15%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.ammo += 4;
			gun.reloadTime = 0.85f;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class Bursty : ClassStatCard
	{
		protected override string Name => "Bursty";

		protected override string Text => "Three-round bursts.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bursts", "+2"), Cr.Stat("Damage", "-10%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.bursts += 2;
			gun.timeBetweenBullets = 0.08f;
			gun.damage = 0.9f;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class LightRounds : ClassStatCard
	{
		protected override string Name => "Light Rounds";

		protected override string Text => "Speed over weight.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+15%"), Cr.Stat("Bullet speed", "+15%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.85f;
			gun.projectileSpeed = 1.15f;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class OverheatVent : ClassEffectCard<VentEffect>
	{
		protected override string Name => "Overheat Vent";

		protected override string Text => "Reloading vents scalding gas, blasting anyone crowding you (10 AoE, point-blank).";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Vent blast", "on reload"), Cr.Stat("Reload time", "-10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.reloadTime = 0.9f;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class Adrenaline : ClassStatCard
	{
		protected override string Name => "Adrenaline";

		protected override string Text => "Faster on the draw.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+12%"), Cr.Stat("Movement speed", "+10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.88f;
			m.movementSpeed = 1.1f;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class HotBarrel : ClassStatCard
	{
		protected override string Name => "Hot Barrel";

		protected override string Text => "It only gets hotter.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+20%"), Cr.Stat("Ammo", "+3"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.8f;
			gun.ammo += 3;
		}
	}
	[ClassCard("Spray", CardRole.Pool)]
	public class Sidearm : ClassStatCard
	{
		protected override string Name => "Sidearm";

		protected override string Text => "Never let up.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+10%"), Cr.Stat("Projectiles", "+1"), Cr.Stat("Damage", "-12%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.9f;
			gun.numberOfProjectiles++;
			gun.damage = 0.88f;
		}
	}
	[ClassCard("Spray", CardRole.Ultimate)]
	public class Overdrive : ClassEffectCard<OverdriveEffect>
	{
		protected override string Name => "Overdrive";

		protected override string Text => "ULTIMATE: Sustained fire heats your gun, ramping fire rate up to +40%. Stop firing and it cools down.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)1;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Ammo", "+3"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.ammo += 3;
		}
	}
}
namespace ClassRoulette.Classes.ShieldClass
{
	public class ShieldbearerEffect : CardEffect
	{
		private bool empowered;

		public override void OnBlock(BlockTriggerType t)
		{
			empowered = true;
		}

		public override void OnShoot(GameObject projectile)
		{
			if (empowered)
			{
				empowered = false;
				ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
				if ((Object)(object)projectileHit != (Object)null)
				{
					projectileHit.dealDamageMultiplierr *= 1.6f;
					projectileHit.force *= 1.5f;
				}
			}
		}
	}
	public class RiposteEffect : CardEffect
	{
		public override void OnBlockProjectile(GameObject projectile, Vector3 forward, Vector3 hitPosition)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			Player val = EffectUtils.ProjectileOwner(projectile);
			if (!((Object)(object)val == (Object)null) && !((Object)(object)val == (Object)(object)((CardEffect)this).player) && val.teamID != ((CardEffect)this).player.teamID)
			{
				EffectUtils.BonusDamage(((CardEffect)this).player, val, 22f, Color.cyan);
			}
		}
	}
	public class ThornguardEffect : CardEffect
	{
		public override void OnBlock(BlockTriggerType t)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			EffectUtils.RadialBurst(((CardEffect)this).player, Vector2.op_Implicit(((Component)((CardEffect)this).player).transform.position), 5.5f, 6f, 28f, Color.cyan);
		}
	}
	public class GuardianPulseEffect : CardEffect
	{
		public override void OnBlock(BlockTriggerType t)
		{
			EffectUtils.HealSelf(((CardEffect)this).player, ((CardEffect)this).health, 8f);
		}
	}
	public class OvershieldEffect : CardEffect
	{
		public override void OnBlockRecharge()
		{
			EffectUtils.HealSelf(((CardEffect)this).player, ((CardEffect)this).health, 5f);
		}
	}
	public class RivalGuardEffect : CardEffect
	{
		private bool primed;

		public override void OnBlock(BlockTriggerType t)
		{
			primed = true;
		}

		public override void OnShoot(GameObject projectile)
		{
			if (primed)
			{
				primed = false;
				ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
				if ((Object)(object)projectileHit != (Object)null)
				{
					projectileHit.dealDamageMultiplierr *= 2.2f;
					projectileHit.unblockable = true;
				}
			}
		}
	}
	public class PerfectGuardEffect : CardEffect
	{
		private float last = -99f;

		public override void OnBlock(BlockTriggerType t)
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			if (!(Time.time - last < 4f))
			{
				last = Time.time;
				EffectUtils.RadialBurst(((CardEffect)this).player, Vector2.op_Implicit(((Component)((CardEffect)this).player).transform.position), 6f, 18f, 30f, Color.cyan);
			}
		}
	}
	[ClassCard("Shield", CardRole.Entry)]
	public class Shieldbearer : ClassEffectCard<ShieldbearerEffect>
	{
		protected override string Name => "Shieldbearer";

		protected override string Text => "Class: SHIELD. A successful block empowers your next shot (+damage & knockback). Everything you do keys off the block.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block cooldown", "-15%", positive: false));

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			block.cdMultiplier = 0.85f;
		}
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class Riposte : ClassEffectCard<RiposteEffect>
	{
		protected override string Name => "Riposte";

		protected override string Text => "Block a shot and lash 22 damage straight back at the shooter. Don't fire into a raised shield.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block reflect", "22 dmg"), Cr.Stat("Block cooldown", "-10%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block block)
		{
			block.cdMultiplier = 0.9f;
		}
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class Thornguard : ClassEffectCard<ThornguardEffect>
	{
		protected override string Name => "Thornguard";

		protected override string Text => "Every block bursts a shockwave that shoves attackers back. Great for kicking rushers off you.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block shockwave", "knockback"), Cr.Stat("Blocks", "+1"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block block)
		{
			block.additionalBlocks++;
		}
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class GuardianPulse : ClassEffectCard<GuardianPulseEffect>
	{
		protected override string Name => "Guardian Pulse";

		protected override string Text => "Each block mends 8 HP. Time your guards and you'll never stop healing.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block heal", "8 HP"));
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class Overshield : ClassEffectCard<OvershieldEffect>
	{
		protected override string Name => "Overshield";

		protected override string Text => "Whenever your shield recharges, bank 5 HP. Patient blocking keeps you topped up.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Recharge heal", "5 HP"), Cr.Stat("Block cooldown", "-10%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block block)
		{
			block.cdMultiplier = 0.9f;
		}
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class RivalGuard : ClassEffectCard<RivalGuardEffect>
	{
		protected override string Name => "Rival Guard";

		protected override string Text => "A block loads your next shot into a piercing counter-strike (+120% dmg). Bait it and wait it out.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Counter shot", "+120% dmg"));
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class Bulwark : ClassStatCard
	{
		protected override string Name => "Bulwark";

		protected override string Text => "Stand firm - an extra shield and a faster recharge.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Blocks", "+1"), Cr.Stat("Block cooldown", "-15%", positive: false));

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			block.additionalBlocks++;
			block.cdMultiplier = 0.85f;
		}
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class Aegis : ClassStatCard
	{
		protected override string Name => "Aegis";

		protected override string Text => "A shield that mends - more health and healing on every guard.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+20%"), Cr.Stat("Block healing", "+10"));

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			statModifiers.health = 1.2f;
			block.healing += 10f;
		}
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class QuickGuard : ClassStatCard
	{
		protected override string Name => "Quick Guard";

		protected override string Text => "Blink and block - your shield comes back fast.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block cooldown", "-30%", positive: false));

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			block.cdMultiplier = 0.7f;
		}
	}
	[ClassCard("Shield", CardRole.Pool)]
	public class Counterweight : ClassStatCard
	{
		protected override string Name => "Counterweight";

		protected override string Text => "Your blocks physically shove attackers back on contact.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block knockback", "+high"), Cr.Stat("Blocks", "+1"));

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			block.forceToAdd += 6000f;
			block.forceToAddUp += 2000f;
			block.additionalBlocks++;
		}
	}
	[ClassCard("Shield", CardRole.Ultimate)]
	public class PerfectGuard : ClassEffectCard<PerfectGuardEffect>
	{
		protected override string Name => "Perfect Guard";

		protected override string Text => "ULTIMATE: Blocking unleashes a shockwave that damages and knocks back nearby enemies (4s cooldown).";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)2;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Shockwave", "18 dmg"), Cr.Stat("Block cooldown", "-10%", positive: false));

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			block.cdMultiplier = 0.9f;
		}
	}
}
namespace ClassRoulette.Classes.PoisonClass
{
	public class PoisonEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player);
			if (!((Object)(object)victim == (Object)null))
			{
				EffectUtils.Poison(((CardEffect)this).player, victim, 4f, 3f, new Color(0.4f, 1f, 0f));
			}
		}
	}
	public class VirulenceEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player);
			if (!((Object)(object)victim == (Object)null))
			{
				EffectUtils.Poison(((CardEffect)this).player, victim, 9f, 4f, new Color(0.3f, 0.9f, 0f));
			}
		}
	}
	public class ContagionEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player);
			if ((Object)(object)victim == (Object)null)
			{
				return;
			}
			EffectUtils.Poison(((CardEffect)this).player, victim, 4f, 3f, new Color(0.4f, 1f, 0f));
			Player val = null;
			float num = 4f;
			foreach (Player item in EffectUtils.Enemies(((CardEffect)this).player))
			{
				if (!((Object)(object)item == (Object)(object)victim))
				{
					float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)item).transform.position), Vector2.op_Implicit(((Component)victim).transform.position));
					if (num2 <= num)
					{
						num = num2;
						val = item;
					}
				}
			}
			if ((Object)(object)val != (Object)null)
			{
				EffectUtils.Poison(((CardEffect)this).player, val, 3f, 3f, new Color(0.4f, 1f, 0f));
			}
		}
	}
	public class LingeringCloudEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			if (EffectUtils.Mine(((CardEffect)this).player))
			{
				Vector2 pos = hit?.point ?? Vector2.op_Implicit(projectile.transform.position);
				((MonoBehaviour)this).StartCoroutine(Cloud(pos));
			}
		}

		private IEnumerator Cloud(Vector2 pos)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < 5; i++)
			{
				if (!EffectUtils.Alive(((CardEffect)this).player))
				{
					break;
				}
				foreach (Player item in EffectUtils.Enemies(((CardEffect)this).player))
				{
					if (Vector2.Distance(Vector2.op_Implicit(((Component)item).transform.position), pos) <= 3f)
					{
						EffectUtils.Poison(((CardEffect)this).player, item, 2f, 1f, new Color(0.4f, 1f, 0f));
					}
				}
				yield return (object)new WaitForSeconds(0.5f);
			}
		}
	}
	public class NeurotoxinEffect : CardEffect
	{
		public override void OnShoot(GameObject projectile)
		{
			ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
			if (!((Object)(object)projectileHit == (Object)null))
			{
				projectileHit.stun += 0.15f;
				projectileHit.movementSlow += 0.3f;
			}
		}
	}
	[ClassCard("Poison", CardRole.Entry)]
	public class Poison : ClassEffectCard<PoisonEffect>
	{
		protected override string Name => "Poison";

		protected override string Text => "Class: POISON. Your hits apply stacking poison (4 damage over 3s). Let it tick - but they can out-heal a single stack.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+10%"), Cr.Stat("Damage", "-15%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.9f;
			gun.damage = 0.85f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class Venom : ClassStatCard
	{
		protected override string Name => "Venom";

		protected override string Text => "More darts, more poison.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+15%"), Cr.Stat("Damage", "-5%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.85f;
			gun.damage = 0.95f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class Corrosion : ClassStatCard
	{
		protected override string Name => "Corrosion";

		protected override string Text => "Weaken your foes.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Slow on hit", "+35%"), Cr.Stat("Attack speed", "+5%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.slow += 0.35f;
			gun.attackSpeed = 0.95f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class Contagion : ClassEffectCard<ContagionEffect>
	{
		protected override string Name => "Contagion";

		protected override string Text => "Your poison leaps from the target to the nearest enemy beside them. Punishes grouped-up foes.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Spreads poison", "yes"), Cr.Stat("Attack speed", "+8%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.92f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class Sickly : ClassStatCard
	{
		protected override string Name => "Sickly";

		protected override string Text => "Death by a thousand ticks.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+12%"), Cr.Stat("Bullet speed", "+10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.88f;
			gun.projectileSpeed = 1.1f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class LingeringCloud : ClassEffectCard<LingeringCloudEffect>
	{
		protected override string Name => "Lingering Cloud";

		protected override string Text => "Hits leave a gas cloud that keeps poisoning anyone standing in it for a few seconds.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Gas cloud", "yes"), Cr.Stat("Damage", "+8%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.damage = 1.08f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class Festering : ClassStatCard
	{
		protected override string Name => "Festering";

		protected override string Text => "It only gets worse.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Ammo", "+3"), Cr.Stat("Attack speed", "+8%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.ammo += 3;
			gun.attackSpeed = 0.92f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class Neurotoxin : ClassEffectCard<NeurotoxinEffect>
	{
		protected override string Name => "Neurotoxin";

		protected override string Text => "Your darts jangle the nerves: a brief stagger and heavy slow on every hit.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Stagger + slow", "yes"), Cr.Stat("Damage", "+8%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.damage = 1.08f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class Antibody : ClassStatCard
	{
		protected override string Name => "Antibody";

		protected override string Text => "Immune to your own toxins.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Regen", "+3/s"), Cr.Stat("Health", "+10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.regen += 3f;
			m.health = 1.1f;
		}
	}
	[ClassCard("Poison", CardRole.Pool)]
	public class Miasma : ClassStatCard
	{
		protected override string Name => "Miasma";

		protected override string Text => "Fill the air with rot.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+1"), Cr.Stat("Slow on hit", "+25%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.numberOfProjectiles++;
			gun.slow += 0.25f;
		}
	}
	[ClassCard("Poison", CardRole.Ultimate)]
	public class Virulence : ClassEffectCard<VirulenceEffect>
	{
		protected override string Name => "Virulence";

		protected override string Text => "ULTIMATE: Your poison becomes deadly - 9 damage over 4s per hit, and it still stacks.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)5;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+8%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.attackSpeed = 0.92f;
		}
	}
}
namespace ClassRoulette.Classes.PiercingClass
{
	public class PenetratorEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player);
			if (!((Object)(object)victim == (Object)null))
			{
				float num = Vector2.Distance(Vector2.op_Implicit(((Component)((CardEffect)this).player).transform.position), Vector2.op_Implicit(((Component)victim).transform.position));
				float amount = Mathf.Min(12f, num * 0.6f);
				EffectUtils.BonusDamage(((CardEffect)this).player, victim, amount, new Color(0.6f, 0.9f, 1f));
			}
		}
	}
	public class MomentumRoundEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player);
			if (!((Object)(object)victim == (Object)null))
			{
				float num = Vector2.Distance(Vector2.op_Implicit(((Component)((CardEffect)this).player).transform.position), Vector2.op_Implicit(((Component)victim).transform.position));
				if (!(num < 5f))
				{
					float amount = Mathf.Min(16f, (num - 5f) * 1.1f);
					EffectUtils.BonusDamage(((CardEffect)this).player, victim, amount, new Color(0.6f, 0.9f, 1f));
				}
			}
		}
	}
	public class ExitWoundEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player);
			if (!((Object)(object)victim == (Object)null))
			{
				EffectUtils.Poison(((CardEffect)this).player, victim, 5f, 2.5f, new Color(0.6f, 0.9f, 1f));
			}
		}
	}
	public class ArmorShredEffect : CardEffect
	{
		private readonly Dictionary<Player, int> stacks = new Dictionary<Player, int>();

		private readonly Dictionary<Player, float> lastHit = new Dictionary<Player, float>();

		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player);
			if (!((Object)(object)victim == (Object)null))
			{
				lastHit.TryGetValue(victim, out var value);
				if (Time.time - value > 3f)
				{
					stacks[victim] = 0;
				}
				lastHit[victim] = Time.time;
				stacks.TryGetValue(victim, out var value2);
				value2 = Mathf.Min(value2 + 1, 6);
				stacks[victim] = value2;
				EffectUtils.BonusDamage(((CardEffect)this).player, victim, (float)value2 * 1.5f, new Color(0.6f, 0.9f, 1f));
			}
		}

		public override IEnumerator OnRoundStart(IGameModeHandler gm)
		{
			stacks.Clear();
			lastHit.Clear();
			yield break;
		}
	}
	public class RailShotEffect : CardEffect
	{
		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player);
			if (!((Object)(object)victim?.data == (Object)null))
			{
				float amount = victim.data.health * 0.12f;
				EffectUtils.BonusDamage(((CardEffect)this).player, victim, amount, new Color(0.6f, 0.9f, 1f));
			}
		}
	}
	[ClassCard("Piercing", CardRole.Entry)]
	public class Piercing : ClassEffectCard<PenetratorEffect>
	{
		protected override string Name => "Piercer";

		protected override string Text => "Class: PIERCING. Your bullets punch through walls and cover, and the farther they travel to hit, the more they hurt. Cover won't save them - movement will.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Pierces walls", "yes"), Cr.Stat("Bullet speed", "+15%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.ignoreWalls = true;
			gun.projectileSpeed = 1.15f;
		}
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class MomentumRound : ClassEffectCard<MomentumRoundEffect>
	{
		protected override string Name => "Momentum Round";

		protected override string Text => "Long piercing shots gain up to +16 damage the farther they fly.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Long range", "+up to 16 dmg"), Cr.Stat("Bullet speed", "+10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.projectileSpeed = 1.1f;
		}
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class ExitWound : ClassEffectCard<ExitWoundEffect>
	{
		protected override string Name => "Exit Wound";

		protected override string Text => "Every bullet that connects leaves a bleeding wound (5 over 2.5s).";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bleed", "5 over 2.5s"), Cr.Stat("Pierces walls", "yes"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.ignoreWalls = true;
		}
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class ArmorShred : ClassEffectCard<ArmorShredEffect>
	{
		protected override string Name => "Armor Shred";

		protected override string Text => "The more you hit one enemy, the more your shots dig in. Break contact to reset it.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Stacking", "+1.5 dmg / hit"));
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class ArmorPierce : ClassStatCard
	{
		protected override string Name => "Armor Pierce";

		protected override string Text => "Rounds that shave a slice of health straight off the target.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("% health damage", "+6%"), Cr.Stat("Pierces walls", "yes"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.percentageDamage += 0.06f;
			gun.ignoreWalls = true;
		}
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class Railgun : ClassStatCard
	{
		protected override string Name => "Railgun";

		protected override string Text => "Fast and flat - hyper-velocity rounds that ignore cover.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet speed", "+40%"), Cr.Stat("Pierces walls", "yes"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.projectileSpeed = 1.4f;
			gun.ignoreWalls = true;
		}
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class Bypass : ClassStatCard
	{
		protected override string Name => "Bypass";

		protected override string Text => "Rounds that shrug off shields entirely - but slow to fire.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Unblockable", "yes"), Cr.Stat("Attack speed", "-20%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.unblockable = true;
			gun.attackSpeed = 1.2f;
		}
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class Puncture : ClassStatCard
	{
		protected override string Name => "Puncture";

		protected override string Text => "More rounds threading through the same gap in cover.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+1"), Cr.Stat("Pierces walls", "yes"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.numberOfProjectiles++;
			gun.ignoreWalls = true;
		}
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class TungstenCore : ClassStatCard
	{
		protected override string Name => "Tungsten Core";

		protected override string Text => "Dense, heavy slugs - bigger and harder-hitting.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+18%"), Cr.Stat("Bullet size", "+20%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.damage = 1.18f;
			gun.projectileSize = 1.2f;
		}
	}
	[ClassCard("Piercing", CardRole.Pool)]
	public class Overpenetrate : ClassStatCard
	{
		protected override string Name => "Overpenetrate";

		protected override string Text => "Keeps its punch far downrange, straight through anything in the way.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage over distance", "+30%"), Cr.Stat("Pierces walls", "yes"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.damageAfterDistanceMultiplier = 1.3f;
			gun.ignoreWalls = true;
		}
	}
	[ClassCard("Piercing", CardRole.Ultimate)]
	public class RailShot : ClassEffectCard<RailShotEffect>
	{
		protected override string Name => "Rail Shot";

		protected override string Text => "ULTIMATE: Shots ignore walls AND blocks, and carve 12% of the target's current health. Land the shot - it can still be dodged.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("% current HP", "12%"), Cr.Stat("Unblockable + walls", "yes"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			gun.unblockable = true;
			gun.ignoreWalls = true;
		}
	}
}
namespace ClassRoulette.Classes.MovementClass
{
	public class MomentumEffect : CardEffect
	{
		private float lastDash = -99f;

		private readonly Dictionary<Player, float> lastRam = new Dictionary<Player, float>();

		protected virtual float DashForce => 9f;

		protected virtual float DashCooldown => 1.2f;

		protected virtual float RamThreshold => 15f;

		protected virtual float RamScale => 1.2f;

		protected virtual float RamMax => 20f;

		public override void OnJump()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			if (!(Time.time - lastDash < DashCooldown))
			{
				lastDash = Time.time;
				Vector3 val = (((Object)(object)((CardEffect)this).data != (Object)null) ? ((CardEffect)this).data.aimDirection : Vector3.right);
				Vector2 val2 = default(Vector2);
				((Vector2)(ref val2))..ctor(val.x, val.y * 0.35f);
				EffectUtils.PushSelf(((CardEffect)this).player, ((CardEffect)this).health, ((Vector2)(ref val2)).normalized * DashForce * 1000f);
			}
		}

		private void Update()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: 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_013d: Unknown result type (might be due to invalid IL or missing references)
			if (!EffectUtils.Mine(((CardEffect)this).player) || (Object)(object)((CardEffect)this).data == (Object)null || ((CardEffect)this).data.dead)
			{
				return;
			}
			Vector2 val = EffectUtils.Velocity(((CardEffect)this).player);
			float magnitude = ((Vector2)(ref val)).magnitude;
			if (magnitude < RamThreshold)
			{
				return;
			}
			foreach (Player item in EffectUtils.Enemies(((CardEffect)this).player))
			{
				if (!(Vector2.Distance(Vector2.op_Implicit(((Component)((CardEffect)this).player).transform.position), Vector2.op_Implicit(((Component)item).transform.position)) > 2.4f) && (!lastRam.TryGetValue(item, out var value) || !(Time.time - value < 0.6f)))
				{
					lastRam[item] = Time.time;
					float amount = Mathf.Min(RamMax, (magnitude - RamThreshold) * RamScale + 6f);
					Vector2 dir = Vector2.op_Implicit(((Component)item).transform.position - ((Component)((CardEffect)this).player).transform.position);
					EffectUtils.BonusDamage(((CardEffect)this).player, item, amount, new Color(1f, 0.8f, 0.2f));
					EffectUtils.Knockback(((CardEffect)this).player, item, dir, 4000f);
				}
			}
		}
	}
	public class BlinkEffect : MomentumEffect
	{
		protected override float DashForce => 15f;

		protected override float DashCooldown => 0.7f;

		protected override float RamScale => 1.6f;

		protected override float RamMax => 28f;
	}
	public class MomentumSlamEffect : CardEffect
	{
		public override void OnTouchGround(float timeSinceGrounded, Vector3 position, Vector3 groundNormal, Transform groundTransform)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: 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_0042: Unknown result type (might be due to invalid IL or missing references)
			if (!(EffectUtils.Velocity(((CardEffect)this).player).y > -8f))
			{
				EffectUtils.RadialBurst(((CardEffect)this).player, Vector2.op_Implicit(position), 4.5f, 10f, 22f, new Color(1f, 0.8f, 0.2f));
			}
		}
	}
	public class WallKickEffect : CardEffect
	{
		public override void OnTouchWall(float timeSinceLastGrab, Vector3 position, Vector3 wallNormal)
		{
			if ((Object)(object)((CardEffect)this).data != (Object)null)
			{
				((CardEffect)this).data.currentJumps = 0;
			}
		}
	}
	public class SkirmisherEffect : CardEffect
	{
		private float lastJump = -99f;

		public override void OnJump()
		{
			lastJump = Time.time;
		}

		public override void OnShoot(GameObject projectile)
		{
			if (!(Time.time - lastJump > 0.6f))
			{
				ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
				if ((Object)(object)projectileHit != (Object)null)
				{
					projectileHit.dealDamageMultiplierr *= 1.3f;
				}
			}
		}
	}
	[ClassCard("Movement", CardRole.Entry)]
	public class Movement : ClassEffectCard<MomentumEffect>
	{
		protected override string Name => "Runner";

		protected override string Text => "Class: MOVEMENT. Jump to dash in your aim direction, and ram enemies at high speed for heavy contact damage + knockback. Commit your charges wisely.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Move speed", "+15%"), Cr.Stat("Ram damage", "on"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.movementSpeed = 1.15f;
		}
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class Sprint : ClassStatCard
	{
		protected override string Name => "Sprint";

		protected override string Text => "Pure footspeed - and faster means harder rams.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Move speed", "+25%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.movementSpeed = 1.25f;
		}
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class Bounder : ClassStatCard
	{
		protected override string Name => "Bounder";

		protected override string Text => "An extra jump to chain dashes and stay airborne.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Jumps", "+1"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.numberOfJumps++;
		}
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class Featherfall : ClassStatCard
	{
		protected override string Name => "Featherfall";

		protected override string Text => "Float like a leaf - low gravity and long hang time.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Gravity", "-30%", positive: false), Cr.Stat("Jumps", "+1"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.gravity = 0.7f;
			m.numberOfJumps++;
		}
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class Evasion : ClassStatCard
	{
		protected override string Name => "Evasion";

		protected override string Text => "Small and slippery - quick feet, tiny target.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Move speed", "+18%"), Cr.Stat("Size", "-15%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.movementSpeed = 1.18f;
			m.sizeMultiplier = 0.85f;
		}
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class MomentumSlam : ClassEffectCard<MomentumSlamEffect>
	{
		protected override string Name => "Momentum Slam";

		protected override string Text => "Crash down from a fall to burst a shockwave that damages and flings enemies.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Slam", "10 dmg + knockback"));
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class WallKick : ClassEffectCard<WallKickEffect>
	{
		protected override string Name => "Wall Kick";

		protected override string Text => "Touching a wall refreshes your jumps - bounce off cover forever.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Wall touch", "refresh jumps"));
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class Skirmisher : ClassEffectCard<SkirmisherEffect>
	{
		protected override string Name => "Skirmisher";

		protected override string Text => "Shots fired right after a jump hit +30% harder. Dash in, fire, dash out.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Post-jump shot", "+30% dmg"), Cr.Stat("Move speed", "+10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.movementSpeed = 1.1f;
		}
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class BatteringCharge : ClassStatCard
	{
		protected override string Name => "Battering Charge";

		protected override string Text => "Big speed for the biggest rams - lower your guard to fuel the charge.";

		protected override Rarity CardRarity => Cr.Uncommon;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Move speed", "+30%"), Cr.Stat("Health", "-10%", positive: false));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.movementSpeed = 1.3f;
			m.health = 0.9f;
		}
	}
	[ClassCard("Movement", CardRole.Pool)]
	public class Nimble : ClassStatCard
	{
		protected override string Name => "Fleetfoot";

		protected override string Text => "Light on your feet - a bit more speed and an extra hop.";

		protected override Rarity CardRarity => Cr.Common;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Move speed", "+12%"), Cr.Stat("Jumps", "+1"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.movementSpeed = 1.12f;
			m.numberOfJumps++;
		}
	}
	[ClassCard("Movement", CardRole.Ultimate)]
	public class Blink : ClassEffectCard<BlinkEffect>
	{
		protected override string Name => "Blink";

		protected override string Text => "ULTIMATE: Your dash becomes a long-range blink on a short cooldown, and your rams hit even harder. Cross the map in an instant.";

		protected override Rarity CardRarity => Cr.Rare;

		protected override CardThemeColorType Color => (CardThemeColorType)7;

		protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Blink", "long range"), Cr.Stat("Move speed", "+10%"));

		public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b)
		{
			m.movementSpeed = 1.1f;
		}
	}
}
namespace ClassRoulette.Classes.MarksmanClass
{
	public class VelocityEdgeEffect : CardEffect
	{
		public override void OnShoot(GameObject projectile)
		{
			ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
			if (!((Object)(object)projectileHit == (Object)null) && !((Object)(object)((CardEffect)this).gun == (Object)null))
			{
				float num = Mathf.Max(0f, ((CardEffect)this).gun.projectileSpeed - 1f);
				float num2 = Mathf.Min(1.2f, num * 0.6f);
				projectileHit.dealDamageMultiplierr *= 1f + num2;
			}
		}
	}
	public class CalledShotEffect : CardEffect
	{
		private int hits;

		private bool primed;

		public override void OnShoot(GameObject projectile)
		{
			//IL_0033: 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)
			if (primed)
			{
				primed = false;
				ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile);
				if ((Object)(object)projectileHit != (Object)null)
				{
					projectileHit.dealDamageMultiplierr *= 1.9f;
					projectileHit.projectileColor = Color.yellow;
				}
			}
		}

		public override void OnBulletHit(GameObject projectile, HitInfo hit)
		{
			if ((Object)(object)EffectUtils.GetVictim(hit, ((CardEffect)this).player) != (Object)null)
			{
				hits++;
				if (hits >= 4)
				{
					hits = 0;
					primed = true;
				}
			}
			else if (hit != null && (Object)(object)hit.transform != (Object)null)
			{
				hits = 0;
			}
		}
	}
	public class CheapSho