Decompiled source of BallisticCards v1.0.0

BallisticCards.dll

Decompiled 14 hours ago
using System;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using UnboundLib.Cards;
using UnityEngine;
using UnityEngine.UI;

[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace BallisticCards;

[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.weiga.rounds.ballisticcards", "Ballistic Cards", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class Plugin : BaseUnityPlugin
{
	public const string ModId = "com.weiga.rounds.ballisticcards";

	public const string ModName = "Ballistic Cards";

	public const string ModInitials = "BC";

	private void Start()
	{
		CustomCard.BuildCard<QuickDraw>();
		CustomCard.BuildCard<HeavyRounds>();
		CustomCard.BuildCard<SpringLegs>();
		CustomCard.BuildCard<ThickSkin>();
		CustomCard.BuildCard<RubberBullets>();
		CustomCard.BuildCard<Broccoli>();
		CustomCard.BuildCard<BigBoned>();
		CustomCard.BuildCard<SlowBurn>();
		CustomCard.BuildCard<Fortress>();
		CustomCard.BuildCard<SecondWind>();
		CustomCard.BuildCard<HotLoad>();
		CustomCard.BuildCard<Railgun>();
		CustomCard.BuildCard<Executioner>();
		CustomCard.BuildCard<Overcharge>();
		CustomCard.BuildCard<SkyRunner>();
		CustomCard.BuildCard<Tailwind>();
	}
}
internal static class Art
{
	public static GameObject Make(string name)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Expected O, but got Unknown
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Expected O, but got Unknown
		//IL_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Expected O, but got Unknown
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		Texture2D val = new Texture2D(2, 2);
		using (Stream stream = typeof(Art).Assembly.GetManifestResourceStream("BallisticCards.Art." + name + ".png"))
		{
			using MemoryStream memoryStream = new MemoryStream();
			stream.CopyTo(memoryStream);
			ImageConversion.LoadImage(val, memoryStream.ToArray());
		}
		GameObject val2 = new GameObject("BC_Art_" + name, new Type[1] { typeof(RectTransform) });
		Object.DontDestroyOnLoad((Object)(object)val2);
		RectTransform val3 = (RectTransform)val2.transform;
		val3.anchorMin = Vector2.zero;
		val3.anchorMax = Vector2.one;
		val3.offsetMin = Vector2.zero;
		val3.offsetMax = Vector2.zero;
		Image val4 = val2.AddComponent<Image>();
		val4.sprite = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
		val4.preserveAspect = true;
		((Graphic)val4).raycastTarget = false;
		return val2;
	}

	public static CardInfoStat Stat(bool positive, string stat, string amount)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		CardInfoStat val = new CardInfoStat();
		val.positive = positive;
		val.stat = stat;
		val.amount = amount;
		val.simepleAmount = (SimpleAmount)0;
		return val;
	}
}
public class QuickDraw : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		gun.attackSpeed = 0.75f;
		gun.reloadTime = 0.8f;
	}

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

	protected override string GetTitle()
	{
		return "Quick Draw";
	}

	protected override string GetDescription()
	{
		return "Fire first, aim later.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("quick");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Attack speed", "+33%"),
			Art.Stat(positive: true, "Reload time", "-20%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class HeavyRounds : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		gun.damage = 1.5f;
		gun.projectileSpeed = 0.75f;
	}

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

	protected override string GetTitle()
	{
		return "Heavy Rounds";
	}

	protected override string GetDescription()
	{
		return "Slow, but they land hard.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("heavy");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Damage", "+50%"),
			Art.Stat(positive: false, "Bullet speed", "-25%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class SpringLegs : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		statModifiers.numberOfJumps = 1;
		statModifiers.jump = 1.2f;
	}

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

	protected override string GetTitle()
	{
		return "Spring Legs";
	}

	protected override string GetDescription()
	{
		return "Jump again in mid-air.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("spring");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Jumps", "+1"),
			Art.Stat(positive: true, "Jump height", "+20%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class ThickSkin : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		statModifiers.health = 1.5f;
		statModifiers.movementSpeed = 0.9f;
	}

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

	protected override string GetTitle()
	{
		return "Thick Skin";
	}

	protected override string GetDescription()
	{
		return "More to hit, harder to drop.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("skin");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Health", "+50%"),
			Art.Stat(positive: false, "Movement speed", "-10%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class RubberBullets : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		gun.reflects = 2;
		gun.damage = 0.85f;
	}

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

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

	protected override string GetDescription()
	{
		return "Bullets bounce off walls.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("rubber");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Bounces", "+2"),
			Art.Stat(positive: false, "Damage", "-15%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class Broccoli : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		statModifiers.regen = 2f;
	}

	public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
	{
		data.maxHealth += 10f;
	}

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

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

	protected override string GetDescription()
	{
		return "Eat your greens.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("broccoli");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Regeneration", "+2"),
			Art.Stat(positive: true, "Health", "+10")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class BigBoned : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		statModifiers.health = 1.5f;
		statModifiers.sizeMultiplier = 1.25f;
	}

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

	protected override string GetTitle()
	{
		return "Big Boned";
	}

	protected override string GetDescription()
	{
		return "More of you to love. And to hit.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("bigboned");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Health", "+50%"),
			Art.Stat(positive: false, "Size", "+25%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class SlowBurn : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
	{
		statModifiers.secondsToTakeDamageOver = 3f;
		statModifiers.regen = 10f;
		block.cdMultiplier = 1.25f;
	}

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

	protected override string GetTitle()
	{
		return "Slow Burn";
	}

	protected override string GetDescription()
	{
		return "Damage is taken over time while you heal.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("decay");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[3]
		{
			Art.Stat(positive: true, "Decay", "+3s"),
			Art.Stat(positive: true, "Regeneration", "+10"),
			Art.Stat(positive: false, "Block cooldown", "+25%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class Fortress : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		statModifiers.health = 2f;
		statModifiers.movementSpeed = 0.8f;
	}

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

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

	protected override string GetDescription()
	{
		return "Hard to move, harder to break.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("fortress");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Health", "+100%"),
			Art.Stat(positive: false, "Movement speed", "-20%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class SecondWind : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		statModifiers.respawns = 1;
		statModifiers.health = 1.1f;
		gun.reloadTime = 1.25f;
	}

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

	protected override string GetTitle()
	{
		return "Second Wind";
	}

	protected override string GetDescription()
	{
		return "Come back once after dying.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("secondwind");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[3]
		{
			Art.Stat(positive: true, "Resurrection", "+1"),
			Art.Stat(positive: true, "Health", "+10%"),
			Art.Stat(positive: false, "Reload speed", "-20%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class HotLoad : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		gun.projectileSpeed = 1.5f;
	}

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

	protected override string GetTitle()
	{
		return "Hot Load";
	}

	protected override string GetDescription()
	{
		return "Extra powder, extra speed.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("hotload");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[1] { Art.Stat(positive: true, "Bullet speed", "+50%") };
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class Railgun : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		gun.projectileSpeed = 3f;
		gun.damage = 1.25f;
		gun.attackSpeed = 1.3f;
	}

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

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

	protected override string GetDescription()
	{
		return "Charge the coils. Hit before they see it.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("railgun");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[3]
		{
			Art.Stat(positive: true, "Bullet speed", "+200%"),
			Art.Stat(positive: true, "Damage", "+25%"),
			Art.Stat(positive: false, "Attack speed", "-23%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class Executioner : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		gun.damage = 2f;
		gun.attackSpeed = 1.4f;
	}

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

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

	protected override string GetDescription()
	{
		return "Every shot is meant to finish it.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("executioner");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Damage", "+100%"),
			Art.Stat(positive: false, "Attack speed", "-29%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class LightningBullet : MonoBehaviour
{
	private const int Bolts = 6;

	private const int Points = 8;

	private const float Length = 3.5f;

	private const float Jitter = 0.4f;

	private const float CoreSize = 2.2f;

	private const float ZapRange = 4f;

	private const float ZapEvery = 0.25f;

	private const float ZapFraction = 0.1f;

	private static GameObject template;

	private static Material mat;

	private static Sprite glow;

	private LineRenderer[] lines;

	private Vector3[,] shape = new Vector3[6, 8];

	private float timer;

	private float zapTimer;

	private float zapFlash;

	private ProjectileHit hit;

	private Player zapTarget;

	public static GameObject Template
	{
		get
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			if ((Object)(object)template == (Object)null)
			{
				template = new GameObject("BC_LightningBullet", new Type[1] { typeof(LightningBullet) });
				Object.DontDestroyOnLoad((Object)(object)template);
			}
			return template;
		}
	}

	private void Start()
	{
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Expected O, but got Unknown
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_0162: Unknown result type (might be due to invalid IL or missing references)
		//IL_0197: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0219: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)((Component)this).transform.parent == (Object)null))
		{
			if ((Object)(object)mat == (Object)null)
			{
				mat = new Material(Shader.Find("Sprites/Default"));
			}
			if ((Object)(object)glow == (Object)null)
			{
				glow = MakeGlow();
			}
			Renderer componentInChildren = ((Component)((Component)this).transform.parent).GetComponentInChildren<Renderer>();
			int sortingLayerID = (((Object)(object)componentInChildren != (Object)null) ? componentInChildren.sortingLayerID : 0);
			int num = (((Object)(object)componentInChildren != (Object)null) ? (componentInChildren.sortingOrder + 1) : 100);
			int layer = (((Object)(object)componentInChildren != (Object)null) ? ((Component)componentInChildren).gameObject.layer : ((Component)((Component)this).transform.parent).gameObject.layer);
			hit = ((Component)this).GetComponentInParent<ProjectileHit>();
			SpriteRenderer val = new GameObject("Core").AddComponent<SpriteRenderer>();
			((Component)val).gameObject.layer = layer;
			((Component)val).transform.SetParent(((Component)this).transform, false);
			Vector3 lossyScale = ((Component)this).transform.lossyScale;
			((Component)val).transform.localScale = new Vector3(2.2f / Mathf.Max(lossyScale.x, 0.001f), 2.2f / Mathf.Max(lossyScale.y, 0.001f), 1f);
			val.sprite = glow;
			val.color = new Color(0.85f, 0.65f, 1f, 1f);
			((Renderer)val).sortingLayerID = sortingLayerID;
			((Renderer)val).sortingOrder = num + 1;
			lines = (LineRenderer[])(object)new LineRenderer[6];
			for (int i = 0; i < 6; i++)
			{
				LineRenderer val2 = new GameObject("Bolt").AddComponent<LineRenderer>();
				((Component)val2).gameObject.layer = layer;
				((Component)val2).transform.SetParent(((Component)this).transform, false);
				((Renderer)val2).material = mat;
				val2.useWorldSpace = true;
				val2.positionCount = 8;
				val2.startWidth = 0.28f;
				val2.endWidth = 0.04f;
				val2.startColor = Color.white;
				val2.endColor = new Color(0.6f, 0.3f, 1f, 0f);
				((Renderer)val2).sortingLayerID = sortingLayerID;
				((Renderer)val2).sortingOrder = num;
				lines[i] = val2;
			}
		}
	}

	private void Update()
	{
		//IL_010a: Unknown result type (might be due to invalid IL or missing references)
		//IL_010f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_0137: Unknown result type (might be due to invalid IL or missing references)
		//IL_013c: 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_01af: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: 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_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_01fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Unknown result type (might be due to invalid IL or missing references)
		//IL_020f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0211: Unknown result type (might be due to invalid IL or missing references)
		//IL_0215: Unknown result type (might be due to invalid IL or missing references)
		//IL_021a: Unknown result type (might be due to invalid IL or missing references)
		//IL_021c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
		if (lines == null)
		{
			return;
		}
		Zap();
		timer -= Time.deltaTime;
		if (timer <= 0f)
		{
			timer = 0.04f;
			Vector3 val = default(Vector3);
			Vector3 val2 = default(Vector3);
			for (int i = 0; i < 6; i++)
			{
				float num = Random.value * (float)Math.PI * 2f;
				((Vector3)(ref val))..ctor(Mathf.Cos(num), Mathf.Sin(num), 0f);
				((Vector3)(ref val2))..ctor(0f - val.y, val.x, 0f);
				float num2 = 3.5f * Random.Range(0.5f, 1f);
				for (int j = 0; j < 8; j++)
				{
					ref Vector3 reference = ref shape[i, j];
					reference = val * (num2 * (float)j / 7f) + ((j == 0) ? Vector3.zero : (val2 * Random.Range(-0.4f, 0.4f)));
				}
			}
		}
		Vector3 position = ((Component)this).transform.position;
		for (int k = 0; k < 6; k++)
		{
			for (int l = 0; l < 8; l++)
			{
				lines[k].SetPosition(l, position + shape[k, l]);
			}
		}
		if (zapFlash > 0f && (Object)(object)zapTarget != (Object)null)
		{
			zapFlash -= Time.deltaTime;
			Vector3 position2 = ((Component)zapTarget).transform.position;
			position2.z = position.z;
			Vector3 val3 = Vector3.Cross(position2 - position, Vector3.forward);
			Vector3 normalized = ((Vector3)(ref val3)).normalized;
			for (int m = 0; m < 8; m++)
			{
				float num3 = (float)m / 7f;
				Vector3 val4 = ((m == 0 || m == 7) ? Vector3.zero : (normalized * Random.Range(-0.4f, 0.4f)));
				lines[0].SetPosition(m, Vector3.Lerp(position, position2, num3) + val4);
			}
		}
	}

	private void Zap()
	{
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_0134: Unknown result type (might be due to invalid IL or missing references)
		//IL_0139: Unknown result type (might be due to invalid IL or missing references)
		//IL_0163: Unknown result type (might be due to invalid IL or missing references)
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: Unknown result type (might be due to invalid IL or missing references)
		//IL_0177: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
		zapTimer -= Time.deltaTime;
		if (zapTimer > 0f)
		{
			return;
		}
		zapTimer = 0.25f;
		if ((Object)(object)hit == (Object)null || (Object)(object)hit.ownPlayer == (Object)null || !hit.ownPlayer.data.view.IsMine)
		{
			return;
		}
		Player ownPlayer = hit.ownPlayer;
		Player val = null;
		float num = 4f;
		foreach (Player player in PlayerManager.instance.players)
		{
			if (!((Object)(object)player == (Object)null) && !player.data.dead && player.teamID != ownPlayer.teamID)
			{
				float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)player).transform.position), Vector2.op_Implicit(((Component)this).transform.position));
				if (num2 < num)
				{
					num = num2;
					val = player;
				}
			}
		}
		if (!((Object)(object)val == (Object)null))
		{
			Vector2 val2 = Vector2.op_Implicit(((Component)val).transform.position - ((Component)this).transform.position);
			Vector2 normalized = ((Vector2)(ref val2)).normalized;
			float num3 = Mathf.Max(5f, hit.damage * 0.1f);
			((Damagable)val.data.healthHandler).CallTakeDamage(normalized * num3, Vector2.op_Implicit(((Component)val).transform.position), (GameObject)null, ownPlayer, true);
			zapTarget = val;
			zapFlash = 0.12f;
		}
	}

	private static Sprite MakeGlow()
	{
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Expected O, but got Unknown
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		Texture2D val = new Texture2D(64, 64);
		for (int i = 0; i < 64; i++)
		{
			for (int j = 0; j < 64; j++)
			{
				float num = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(32f, 32f)) / 32f;
				val.SetPixel(j, i, new Color(1f, 1f, 1f, Mathf.Pow(Mathf.Clamp01(1f - num), 2f)));
			}
		}
		val.Apply();
		return Sprite.Create(val, new Rect(0f, 0f, 64f, 64f), new Vector2(0.5f, 0.5f), 64f);
	}
}
public class Overcharge : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Expected O, but got Unknown
		gun.damage = 2.5f;
		statModifiers.health = 0.7f;
		gun.projectileColor = new Color(0.75f, 0.45f, 1f, 1f);
		ObjectsToSpawn[] array = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1];
		ObjectsToSpawn val = new ObjectsToSpawn();
		val.AddToProjectile = LightningBullet.Template;
		array[0] = val;
		gun.objectsToSpawn = array;
	}

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

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

	protected override string GetDescription()
	{
		return "Bullets crackle with lightning that zaps nearby enemies.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("overcharge");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[3]
		{
			Art.Stat(positive: true, "Damage", "+150%"),
			Art.Stat(positive: true, "Lightning zap", "10% dmg"),
			Art.Stat(positive: false, "Health", "-30%")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class SkyRunner : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		statModifiers.movementSpeed = 1.1f;
		statModifiers.numberOfJumps = 2;
	}

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

	protected override string GetTitle()
	{
		return "Sky Runner";
	}

	protected override string GetDescription()
	{
		return "Never touch the ground for long.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("skyrunner");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[2]
		{
			Art.Stat(positive: true, "Movement speed", "+10%"),
			Art.Stat(positive: true, "Jumps", "+2")
		};
	}

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

	public override string GetModName()
	{
		return "BC";
	}
}
public class Tailwind : CustomCard
{
	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
	{
		statModifiers.movementSpeed = 1.5f;
		statModifiers.gravity = 0.75f;
		statModifiers.health = 0.9f;
	}

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

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

	protected override string GetDescription()
	{
		return "Run faster and float a little longer.";
	}

	protected override GameObject GetCardArt()
	{
		return Art.Make("tailwind");
	}

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

	protected override CardInfoStat[] GetStats()
	{
		return (CardInfoStat[])(object)new CardInfoStat[3]
		{
			Art.Stat(positive: true, "Movement speed", "+50%"),
			Art.Stat(positive: true, "Gravity", "-25%"),
			Art.Stat(positive: false, "Health", "-10%")
		};
	}

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

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