Decompiled source of DopeBoys v0.10.0

plugins\DopeBoys.dll

Decompiled 4 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using DopeBoys.Cards;
using DopeBoys.Extensions;
using DopeBoys.MonoBehaviours;
using DopeBoys.RoundsEffects;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModdingUtils.Extensions;
using ModdingUtils.MonoBehaviours;
using ModdingUtils.RoundsEffects;
using UnboundLib;
using UnboundLib.Cards;
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: AssemblyCompany("DopeBoys")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+667c53de368bb3cdfffb36dc6d79d383edb0d1b7")]
[assembly: AssemblyProduct("DopeBoys")]
[assembly: AssemblyTitle("DopeBoys")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace DopeBoys
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.phalex.rounds.DopeBoys", "DopeBoys", "0.9.0")]
	[BepInProcess("Rounds.exe")]
	public class DopeBoys : BaseUnityPlugin
	{
		private const string ModId = "com.phalex.rounds.DopeBoys";

		private const string ModName = "DopeBoys";

		public const string Version = "0.9.0";

		public const string ModInitials = "DB";

		public static DopeBoys instance { get; private set; }

		private void Awake()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			new Harmony("com.phalex.rounds.DopeBoys").PatchAll();
		}

		private void Start()
		{
			instance = this;
			CustomCard.BuildCard<StinkMaster>();
			CustomCard.BuildCard<WiggleWiggle>();
			CustomCard.BuildCard<SamTurret>();
			CustomCard.BuildCard<Smoot>();
			CustomCard.BuildCard<HeadHunter>();
			CustomCard.BuildCard<TouchTips>();
		}
	}
}
namespace DopeBoys.MonoBehaviours
{
	public class TouchTipsEffect : MonoBehaviour
	{
		private CharacterData data;

		private Player player;

		private readonly float range = 1.75f;

		private void Awake()
		{
		}

		private void Start()
		{
			data = ((Component)this).GetComponentInParent<CharacterData>();
			player = data.player;
		}

		private void Update()
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: 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_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			if (!PlayerStatus.PlayerAliveAndSimulated(player))
			{
				return;
			}
			foreach (Player item in PlayerManager.instance.players.Where((Player player) => PlayerStatus.PlayerAliveAndSimulated(player) && player.playerID != this.player.playerID).ToList())
			{
				Vector2 val = Vector2.op_Implicit(((Component)item).transform.position - ((Component)player).transform.position);
				if (((Vector2)(ref val)).magnitude <= range)
				{
					item.data.playerVel.AddForce(val * 25f * (float)ExtensionMethods.GetFieldValue((object)player.data.playerVel, "mass") * player.data.stats.GetAdditionalData().touchtips, (ForceMode2D)1);
					player.data.playerVel.AddForce(val * 7f * (float)ExtensionMethods.GetFieldValue((object)player.data.playerVel, "mass") * player.data.stats.GetAdditionalData().touchtips, (ForceMode2D)1);
				}
			}
		}

		public void OnDestroy()
		{
		}

		public void Destroy()
		{
			Object.Destroy((Object)(object)this);
		}
	}
}
namespace DopeBoys.RoundsEffects
{
	internal class HeadHunterEffect : HitEffect
	{
		public int CardAmount { get; set; }

		public int Heads { get; set; }

		public Player Owner { get; set; }

		public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer)
		{
			Player damagedPlayer2 = damagedPlayer;
			if ((Object)(object)this == (Object)null)
			{
				return;
			}
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)DopeBoys.instance, 2, (Action)delegate
			{
				if (damagedPlayer2.data.dead)
				{
					HeadHunterReversibleEffect orAddComponent = ExtensionMethods.GetOrAddComponent<HeadHunterReversibleEffect>(((Component)Owner).gameObject, false);
					orAddComponent.heads++;
					Debug.Log((object)string.Format("[{0}] head acquired by {1} num heads {2}", "DB", Owner.playerID, orAddComponent.heads++));
				}
			});
		}
	}
	internal class HeadHunterReversibleEffect : ReversibleEffect
	{
		private readonly float value = 65f;

		private readonly float valueStepAmount = 10f;

		private readonly float gunDmgMultiplier = 0.5f;

		private readonly float saturation = 100f;

		private readonly float hue = 356f;

		private Color color;

		public int heads;

		public ReversibleColorEffect colorEffect;

		private ColorFlash colorFlash;

		private readonly float colorFlashDur = 0.1f;

		private readonly int colorFlashNumFlashes = 1;

		public override void OnAwake()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			colorEffect = ((Component)base.player).gameObject.AddComponent<ReversibleColorEffect>();
			((ColorEffect)colorEffect).SetColor(color);
		}

		public override void OnUpdate()
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			GunStatModifier gunStatModifier = base.gunStatModifier;
			gunStatModifier.bulletDamageMultiplier_mult += gunDmgMultiplier * (float)heads + 1f * base.player.data.stats.GetAdditionalData().headhunter + 1f;
			Debug.Log((object)string.Format("[{0}] updating headhunter {1} {2} num heads {3}", "DB", color, base.gunStatModifier.bulletDamageMultiplier_mult, heads));
		}

		public override void OnOnDestroy()
		{
			((ReversibleEffect)this).OnOnDestroy();
			((ColorEffect)colorEffect).Destroy();
		}
	}
	internal class SmootEffect : HitEffect
	{
		public int CardAmount { get; set; }

		public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer)
		{
			//IL_0047: 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_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)this == (Object)null) && CardAmount != 0)
			{
				Debug.Log((object)string.Format("[{0}] smooting player {1} x {2} times ", "DB", damagedPlayer.playerID, CardAmount));
				damagedPlayer.data.movement.Move(-damage * 1.2f * (float)CardAmount + Vector2.up * 0.2f * (float)CardAmount);
			}
		}
	}
	internal class WiggleWiggleEffect : HitEffect
	{
		public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer)
		{
			//IL_0016: 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)
			if (!((Object)(object)this == (Object)null))
			{
				ExtensionMethods.GetOrAddComponent<WiggleWiggleReversibleEffect>(((Component)damagedPlayer).gameObject, false).damage = damage;
			}
		}
	}
	internal class WiggleWiggleReversibleEffect : ReversibleEffect
	{
		private readonly Color color = Color.magenta;

		public float duration;

		public Vector2 damage;

		public ReversibleColorEffect colorEffect;

		public override void OnAwake()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			duration = base.stats.GetAdditionalData().wiggle * 2f;
			colorEffect = ((Component)base.player).gameObject.AddComponent<ReversibleColorEffect>();
			((ColorEffect)colorEffect).SetColor(color);
		}

		public override void OnUpdate()
		{
			//IL_0037: 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_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: 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_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			duration -= TimeHandler.deltaTime;
			if (duration <= 0f)
			{
				((ReversibleEffect)this).Destroy();
			}
			Player player = base.player;
			player.data.playerVel.AddForce(damage * 4f * (float)ExtensionMethods.GetFieldValue((object)base.player.data.playerVel, "mass"), (ForceMode2D)1);
			player.data.playerVel.AddForce(-damage * 4f * (float)ExtensionMethods.GetFieldValue((object)base.player.data.playerVel, "mass"), (ForceMode2D)1);
			player.data.playerVel.AddForce(damage * 4f * (float)ExtensionMethods.GetFieldValue((object)base.player.data.playerVel, "mass"), (ForceMode2D)1);
			player.data.playerVel.AddForce(-damage * 4f * (float)ExtensionMethods.GetFieldValue((object)base.player.data.playerVel, "mass"), (ForceMode2D)1);
			player.data.playerVel.AddForce(damage * 4f * (float)ExtensionMethods.GetFieldValue((object)base.player.data.playerVel, "mass"), (ForceMode2D)1);
			player.data.playerVel.AddForce(-damage * 4f * (float)ExtensionMethods.GetFieldValue((object)base.player.data.playerVel, "mass"), (ForceMode2D)1);
			player.data.playerVel.AddForce(damage * 4f * (float)ExtensionMethods.GetFieldValue((object)base.player.data.playerVel, "mass"), (ForceMode2D)1);
			player.data.playerVel.AddForce(-damage * 4f * (float)ExtensionMethods.GetFieldValue((object)base.player.data.playerVel, "mass"), (ForceMode2D)1);
		}

		public override void OnOnDestroy()
		{
			((ReversibleEffect)this).OnOnDestroy();
			((ColorEffect)colorEffect).Destroy();
		}
	}
}
namespace DopeBoys.Extensions
{
	[Serializable]
	public class CharacterDataAdditionalData
	{
		public OutOfBoundsHandler outOfBoundsHandler;

		public CharacterDataAdditionalData()
		{
			outOfBoundsHandler = null;
		}
	}
	public static class CharacterDataExtension
	{
		public static readonly ConditionalWeakTable<CharacterData, CharacterDataAdditionalData> data = new ConditionalWeakTable<CharacterData, CharacterDataAdditionalData>();

		public static CharacterDataAdditionalData GetAdditionalData(this CharacterData characterData)
		{
			return data.GetOrCreateValue(characterData);
		}

		public static void AddData(this CharacterData characterData, CharacterDataAdditionalData value)
		{
			try
			{
				data.Add(characterData, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(typeof(OutOfBoundsHandler), "Start")]
	internal class OutOfBoundsHandlerPatchStart
	{
		private static void Postfix(OutOfBoundsHandler __instance)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			if (!((Object)(object)CharacterDataExtension.GetAdditionalData((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).outOfBoundsHandler == (Object)null))
			{
				return;
			}
			OutOfBoundsHandler[] array = Object.FindObjectsOfType<OutOfBoundsHandler>();
			foreach (OutOfBoundsHandler val in array)
			{
				if (((CharacterData)Traverse.Create((object)val).Field("data").GetValue()).player.playerID == ((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).player.playerID)
				{
					CharacterDataExtension.GetAdditionalData((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).outOfBoundsHandler = val;
					break;
				}
			}
		}
	}
	[Serializable]
	public class CharacterStatModifiersAdditionalData
	{
		public float wiggle;

		public float headhunter;

		public float touchtips;

		public CharacterStatModifiersAdditionalData()
		{
			wiggle = 0f;
			headhunter = 0f;
			touchtips = 0f;
		}
	}
	public static class CharacterStatModifiersExtension
	{
		public static readonly ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData> data = new ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData>();

		public static CharacterStatModifiersAdditionalData GetAdditionalData(this CharacterStatModifiers characterstats)
		{
			return data.GetOrCreateValue(characterstats);
		}

		public static void AddData(this CharacterStatModifiers characterstats, CharacterStatModifiersAdditionalData value)
		{
			try
			{
				data.Add(characterstats, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")]
	internal class CharacterStatModifiersPatchResetStats
	{
		private static void Prefix(CharacterStatModifiers __instance)
		{
			__instance.GetAdditionalData().wiggle = 0f;
			__instance.GetAdditionalData().headhunter = 0f;
		}
	}
	public static class PlayerStatus
	{
		public static bool PlayerAlive(Player player)
		{
			return !player.data.dead;
		}

		public static bool PlayerSimulated(Player player)
		{
			return (bool)Traverse.Create((object)player.data.playerVel).Field("simulated").GetValue();
		}

		public static bool PlayerAliveAndSimulated(Player player)
		{
			if (PlayerAlive(player))
			{
				return PlayerSimulated(player);
			}
			return false;
		}

		public static int GetNumberOfEnemyPlayers(Player player)
		{
			int num = 0;
			foreach (Player player2 in PlayerManager.instance.players)
			{
				if (player2.teamID != player.teamID)
				{
					num++;
				}
			}
			return num;
		}

		public static List<Player> GetEnemyPlayers(Player player)
		{
			List<Player> list = new List<Player>();
			foreach (Player player2 in PlayerManager.instance.players)
			{
				if (player2.teamID != player.teamID)
				{
					list.Add(player2);
				}
			}
			return list;
		}

		public static List<Player> GetOtherPlayers(Player player)
		{
			List<Player> list = new List<Player>();
			foreach (Player player2 in PlayerManager.instance.players)
			{
				if (player2.playerID != player.playerID)
				{
					list.Add(player2);
				}
			}
			return list;
		}
	}
	public static class PlayerVelocityExtension
	{
		public static void AddForce(this PlayerVelocity playerVelocity, Vector2 force, ForceMode2D forceMode)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0046: 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)
			force = (((int)forceMode != 0) ? (force * 1f) : (force * 0.02f));
			ExtensionMethods.SetFieldValue((object)playerVelocity, "velocity", (object)((Vector2)ExtensionMethods.GetFieldValue((object)playerVelocity, "velocity") + force / (float)ExtensionMethods.GetFieldValue((object)playerVelocity, "mass")));
		}
	}
}
namespace DopeBoys.Cards
{
	internal class CinnamonBreath
	{
	}
	internal class EvasiveManeuvers : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			block.forceToAdd = -10f;
			statModifiers.health = 1.2f;
			block.cdAdd = 0.25f;
			Debug.Log((object)("[DB][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		protected override string GetTitle()
		{
			return "Evasive Maneuvers";
		}

		protected override string GetDescription()
		{
			return "CardDescription";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = "+20%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Block Cooldown",
					amount = "+0.25s",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "DB";
		}
	}
	internal class HeadHunter : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			((Component)player).gameObject.AddComponent<HeadHunterEffect>();
			ExtensionMethods.GetOrAddComponent<HeadHunterReversibleEffect>(((Component)player).gameObject, false);
			characterStats.GetAdditionalData().headhunter += 1f;
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			characterStats.GetAdditionalData().headhunter -= 1f;
		}

		protected override string GetTitle()
		{
			return "Head Hunter";
		}

		protected override string GetDescription()
		{
			return "Are you Colm O'Driscoll?";
		}

		protected override GameObject GetCardArt()
		{
			return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/HeadHunter.png");
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "DMG per Kill",
					amount = "+50%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Resets every Round",
					amount = "",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "DB";
		}
	}
	internal class SamTurret : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			statModifiers.movementSpeed = 0.2f;
			gun.ammo = 15;
			gun.attackSpeedMultiplier = 0.75f;
			block.additionalBlocks = 3;
			statModifiers.jump = 0.5f;
			statModifiers.gravity = 1.5f;
			Debug.Log((object)("[DB][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		protected override string GetTitle()
		{
			return "SAM Turret";
		}

		protected override string GetDescription()
		{
			return "Iced out like SAM so they call me a Berg";
		}

		protected override GameObject GetCardArt()
		{
			return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/SamTurret1.png");
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Expected O, but got Unknown
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: 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_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Expected O, but got Unknown
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[6]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Ammo",
					amount = "+15",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Blocks",
					amount = "+3",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "ATK Speed",
					amount = "-25%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Move Speed",
					amount = "-80%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Gravity",
					amount = "+50%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Jump Height",
					amount = "-50%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "DB";
		}
	}
	internal class Smoot : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			statModifiers.attackSpeedMultiplier = 0.75f;
			Debug.Log((object)("[DB][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			((Component)player).gameObject.AddComponent<SmootEffect>().CardAmount++;
			gun.projectileColor = Color.magenta;
			Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			((Component)player).gameObject.GetComponentInChildren<SmootEffect>().CardAmount--;
			Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		protected override string GetTitle()
		{
			return "Smoot Bullets";
		}

		protected override string GetDescription()
		{
			return "Targets are attracted to you when hit";
		}

		protected override GameObject GetCardArt()
		{
			return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/Smoot.png");
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "ATK Speed",
					amount = "+25%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "DB";
		}
	}
	internal class StinkMaster : CustomCard
	{
		public static GameObject toxicObj;

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			block.forceToAdd = -8f;
			statModifiers.health = 1.2f;
			block.cdAdd = 0.25f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			toxicObj = ((GameObject)Resources.Load("0 cards/Toxic cloud")).GetComponent<Gun>().objectsToSpawn[0].effect;
			List<GameObject> objectsToSpawn = new List<GameObject> { toxicObj, toxicObj, toxicObj };
			block.objectsToSpawn = objectsToSpawn;
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			if (block.objectsToSpawn.Contains(toxicObj))
			{
				block.objectsToSpawn.Remove(toxicObj);
			}
			else
			{
				Debug.LogWarning((object)"No Toxic Objects Found even though Stink Master was removed");
			}
		}

		protected override string GetTitle()
		{
			return "Stink Master";
		}

		protected override string GetDescription()
		{
			return "Hello I'm stinkmaster!\nAdds a noxious cloud to your block";
		}

		protected override GameObject GetCardArt()
		{
			return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/StinkMaster2.png");
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Block Cooldown",
					amount = "+0.25s",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = "+20%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "DB";
		}
	}
	internal class Template : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			Debug.Log((object)("[DB][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

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

		protected override string GetDescription()
		{
			return "CardDescription";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Effect",
					amount = "No",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "DB";
		}
	}
	internal class TouchTips : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			statModifiers.health = 1.2f;
			Debug.Log((object)("[DB][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			ExtensionMethods.GetOrAddComponent<TouchTipsEffect>(((Component)player).gameObject, false);
			characterStats.GetAdditionalData().touchtips += 1f;
			Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
		}

		protected override string GetTitle()
		{
			return "Touch Tips";
		}

		protected override string GetDescription()
		{
			return "Touch another player and you both go flying";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = "+20%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "DB";
		}
	}
	internal class WiggleWiggle : CustomCard
	{
		public const float CD_TIME_SEC = 4f;

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.attackSpeedMultiplier = 1.25f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			((Component)player).gameObject.AddComponent<WiggleWiggleEffect>();
			characterStats.GetAdditionalData().wiggle += 1f;
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			characterStats.GetAdditionalData().wiggle -= 1f;
		}

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

		protected override string GetDescription()
		{
			return "<color=#FC0FC0>WWPL</color>\n Make your opponent <color=#FC0FC0>wiggle</color> when you hit them";
		}

		protected override GameObject GetCardArt()
		{
			return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/WiggleWiggle.png");
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = false,
					stat = "ATK SPD",
					amount = "-25%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

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