Decompiled source of sdnuor v1.0.0

sdnuor.dll

Decompiled a day ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using UnboundLib;
using UnboundLib.Cards;
using UnityEngine;
using sdnuor.Cards;
using sdnuor.MonoBehaviours;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("sdnuor")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("sdnuor - Custom cards mod for ROUNDS")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("sdnuor")]
[assembly: AssemblyTitle("sdnuor")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace sdnuor
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.yourname.rounds.sdnuor", "sdnuor", "1.0.0")]
	[BepInProcess("Rounds.exe")]
	public class sdnuor : BaseUnityPlugin
	{
		private const string ModId = "com.yourname.rounds.sdnuor";

		private const string ModName = "sdnuor";

		public const string Version = "1.0.0";

		public const string ModInitials = "SD";

		public static sdnuor 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.yourname.rounds.sdnuor").PatchAll();
		}

		private void Start()
		{
			CustomCard.BuildCard<SmolBulletCard>();
			CustomCard.BuildCard<RangerCard>();
			CustomCard.BuildCard<RecklessRampageCard>();
			CustomCard.BuildCard<RunCard>();
			CustomCard.BuildCard<UnpowerCard>();
			CustomCard.BuildCard<DamagingFieldCard>();
			CustomCard.BuildCard<BoomerangCard>();
		}
	}
}
namespace sdnuor.MonoBehaviours
{
	public class BoomerangEffect : MonoBehaviour
	{
		private Player player;

		private Gun gun;

		private bool initialized;

		public static Dictionary<Player, BoomerangEffect> instances = new Dictionary<Player, BoomerangEffect>();

		public void Initialize(Player player, Gun gun)
		{
			this.player = player;
			this.gun = gun;
			if (!initialized)
			{
				instances[player] = this;
				initialized = true;
			}
			if ((Object)(object)gun != (Object)null)
			{
				gun.reflects = Mathf.Max(gun.reflects, 1);
			}
		}

		private void OnDestroy()
		{
			if ((Object)(object)player != (Object)null && instances.ContainsKey(player))
			{
				instances.Remove(player);
			}
		}

		public Player GetPlayer()
		{
			return player;
		}
	}
	public class BoomerangBullet : MonoBehaviour
	{
		public Player owner;

		public Vector3 startPosition;

		private bool hasReturned;

		private float travelDistance;

		private float maxDistance = 25f;

		private Vector3 lastPosition;

		private MoveTransform moveTransform;

		private void Start()
		{
			//IL_0007: 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)
			lastPosition = ((Component)this).transform.position;
			moveTransform = ((Component)this).GetComponent<MoveTransform>();
			ProjectileHit component = ((Component)this).GetComponent<ProjectileHit>();
			if ((Object)(object)component != (Object)null)
			{
				component.destroyOnBlock = false;
			}
		}

		private void Update()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			if (!hasReturned && !((Object)(object)owner == (Object)null))
			{
				travelDistance += Vector3.Distance(((Component)this).transform.position, lastPosition);
				lastPosition = ((Component)this).transform.position;
				if (travelDistance >= maxDistance)
				{
					TurnAround();
				}
			}
		}

		public void TurnAround()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: 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)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: 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_00b5: Unknown result type (might be due to invalid IL or missing references)
			if (hasReturned)
			{
				return;
			}
			hasReturned = true;
			if ((Object)(object)moveTransform != (Object)null && (Object)(object)owner != (Object)null)
			{
				Vector3 val = ((Component)owner).transform.position - ((Component)this).transform.position;
				Vector3 normalized = ((Vector3)(ref val)).normalized;
				float num = ((Vector3)(ref moveTransform.velocity)).magnitude;
				if (num < 10f)
				{
					num = 50f;
				}
				moveTransform.velocity = normalized * num;
				float num2 = Mathf.Atan2(normalized.y, normalized.x) * 57.29578f;
				((Component)this).transform.rotation = Quaternion.Euler(0f, 0f, num2);
			}
		}
	}
	[HarmonyPatch(typeof(Gun), "Shoot")]
	internal class BoomerangShootPatch
	{
		private static void Postfix(Gun __instance)
		{
			Player player = __instance.player;
			if (!((Object)(object)player == (Object)null))
			{
				BoomerangEffect.instances.ContainsKey(player);
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileInit), "Init")]
	internal class BoomerangProjectileInitPatch
	{
		private static void Postfix(ProjectileInit __instance)
		{
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			SpawnedAttack component = ((Component)__instance).GetComponent<SpawnedAttack>();
			if (!((Object)(object)component == (Object)null))
			{
				Player spawner = component.spawner;
				if (!((Object)(object)spawner == (Object)null) && BoomerangEffect.instances.TryGetValue(spawner, out var _))
				{
					BoomerangBullet orAddComponent = ExtensionMethods.GetOrAddComponent<BoomerangBullet>(((Component)__instance).gameObject, false);
					orAddComponent.owner = spawner;
					orAddComponent.startPosition = ((Component)spawner).transform.position;
				}
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileHit), "Hit")]
	internal class BoomerangHitPatch
	{
		private static void Postfix(ProjectileHit __instance, HitInfo hit)
		{
			if (hit != null)
			{
				BoomerangBullet component = ((Component)__instance).GetComponent<BoomerangBullet>();
				if ((Object)(object)component != (Object)null)
				{
					component.TurnAround();
				}
			}
		}
	}
	public class DamagingFieldEffect : MonoBehaviour
	{
		private Player player;

		private Block block;

		private bool initialized;

		private List<GameObject> activeFields = new List<GameObject>();

		public void Initialize(Player player, Block block)
		{
			this.player = player;
			this.block = block;
			if ((Object)(object)block != (Object)null && !initialized)
			{
				block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
				initialized = true;
			}
		}

		private void OnDestroy()
		{
			if ((Object)(object)block != (Object)null && initialized)
			{
				Block obj = block;
				obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
			}
			foreach (GameObject activeField in activeFields)
			{
				if ((Object)(object)activeField != (Object)null)
				{
					Object.Destroy((Object)(object)activeField);
				}
			}
			activeFields.Clear();
		}

		private void OnBlock(BlockTriggerType triggerType)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			CreateDamageField(((Component)player).transform.position);
		}

		private void CreateDamageField(Vector3 position)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("DamagingField");
			val.transform.position = position;
			SpriteRenderer obj = val.AddComponent<SpriteRenderer>();
			obj.sprite = CreateCircleSprite();
			obj.color = new Color(1f, 0.2f, 0.2f, 0.4f);
			val.transform.localScale = Vector3.one * 8f;
			DamageFieldZone damageFieldZone = val.AddComponent<DamageFieldZone>();
			damageFieldZone.owner = player;
			damageFieldZone.damagePerSecond = 20f;
			damageFieldZone.fieldRadius = 4f;
			val.AddComponent<FieldPulse>();
			activeFields.Add(val);
		}

		private Sprite CreateCircleSprite()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: 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_0081: Unknown result type (might be due to invalid IL or missing references)
			int num = 64;
			Texture2D val = new Texture2D(num, num);
			float num2 = (float)num / 2f;
			float num3 = (float)num / 2f;
			float num4 = (float)num / 2f - 2f;
			for (int i = 0; i < num; i++)
			{
				for (int j = 0; j < num; j++)
				{
					float num5 = (float)j - num2;
					float num6 = (float)i - num3;
					float num7 = Mathf.Sqrt(num5 * num5 + num6 * num6);
					if (num7 <= num4)
					{
						float num8 = 1f - num7 / num4 * 0.5f;
						val.SetPixel(j, i, new Color(1f, 1f, 1f, num8));
					}
					else
					{
						val.SetPixel(j, i, Color.clear);
					}
				}
			}
			val.Apply();
			return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f));
		}

		public void ClearFields()
		{
			foreach (GameObject activeField in activeFields)
			{
				if ((Object)(object)activeField != (Object)null)
				{
					Object.Destroy((Object)(object)activeField);
				}
			}
			activeFields.Clear();
		}
	}
	public class DamageFieldZone : MonoBehaviour
	{
		public Player owner;

		public float damagePerSecond = 20f;

		public float fieldRadius = 4f;

		private float damageTimer;

		private const float DAMAGE_INTERVAL = 0.25f;

		private void Update()
		{
			damageTimer += Time.deltaTime;
			if (damageTimer >= 0.25f)
			{
				damageTimer = 0f;
				DamageEnemiesInField();
			}
		}

		private void DamageEnemiesInField()
		{
			//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_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_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)owner == (Object)null)
			{
				return;
			}
			foreach (Player player in PlayerManager.instance.players)
			{
				if (!((Object)(object)player == (Object)(object)owner) && !player.data.dead && Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)player).transform.position)) <= fieldRadius)
				{
					HealthHandler healthHandler = player.data.healthHandler;
					if ((Object)(object)healthHandler != (Object)null)
					{
						float num = damagePerSecond * 0.25f;
						Vector3 val = ((Component)player).transform.position - ((Component)this).transform.position;
						Vector2 val2 = Vector2.op_Implicit(((Vector3)(ref val)).normalized);
						((Damagable)healthHandler).TakeDamage(val2 * num, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, owner, false, false, (DamageSource)0);
					}
				}
			}
		}
	}
	public class FieldPulse : MonoBehaviour
	{
		private float baseScale = 8f;

		private float pulseAmount = 0.5f;

		private float pulseSpeed = 2f;

		private void Update()
		{
			//IL_001f: 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)
			float num = Mathf.Sin(Time.time * pulseSpeed) * pulseAmount;
			((Component)this).transform.localScale = Vector3.one * (baseScale + num);
		}
	}
	public class RangerEffect : MonoBehaviour
	{
		private Player player;

		private Gun gun;

		private bool initialized;

		public static Dictionary<Player, RangerEffect> instances = new Dictionary<Player, RangerEffect>();

		public void Initialize(Player player)
		{
			this.player = player;
			Holding component = ((Component)player).GetComponent<Holding>();
			object obj;
			if (component == null)
			{
				obj = null;
			}
			else
			{
				Holdable holdable = component.holdable;
				obj = ((holdable != null) ? ((Component)holdable).GetComponent<Gun>() : null);
			}
			gun = (Gun)obj;
			if (!initialized)
			{
				instances[player] = this;
				initialized = true;
			}
		}

		private void OnDestroy()
		{
			if ((Object)(object)player != (Object)null && instances.ContainsKey(player))
			{
				instances.Remove(player);
			}
		}

		public void OnHitEnemy()
		{
			//IL_0054: 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_006a: 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)
			if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null))
			{
				HealthHandler healthHandler = player.data.healthHandler;
				if ((Object)(object)healthHandler != (Object)null)
				{
					float num = player.data.health * 2f;
					((Damagable)healthHandler).TakeDamage(Vector2.up * num, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, (Player)null, false, false, (DamageSource)0);
				}
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileHit), "Hit")]
	internal class RangerHitPatch
	{
		private static void Postfix(ProjectileHit __instance, HitInfo hit)
		{
			if (hit == null || (Object)(object)hit.transform == (Object)null)
			{
				return;
			}
			Player component = ((Component)hit.transform).GetComponent<Player>();
			if ((Object)(object)component == (Object)null)
			{
				return;
			}
			SpawnedAttack componentInParent = ((Component)__instance).GetComponentInParent<SpawnedAttack>();
			if (!((Object)(object)componentInParent == (Object)null))
			{
				Player spawner = componentInParent.spawner;
				if (!((Object)(object)spawner == (Object)null) && RangerEffect.instances.TryGetValue(spawner, out var value) && (Object)(object)component != (Object)(object)spawner)
				{
					value.OnHitEnemy();
				}
			}
		}
	}
	public class RunEffect : MonoBehaviour
	{
		private Player player;

		private CharacterStatModifiers stats;

		private bool speedBoosted;

		private const float SPEED_BOOST = 1.6f;

		public void Initialize(Player player)
		{
			this.player = player;
			stats = player.data.stats;
		}

		private void Update()
		{
			//IL_003a: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)player == (Object)null || (Object)(object)stats == (Object)null)
			{
				return;
			}
			Player val = FindClosestEnemy();
			if ((Object)(object)val == (Object)null)
			{
				RemoveSpeedBoost();
				return;
			}
			Vector3 val2 = ((Component)val).transform.position - ((Component)player).transform.position;
			Vector2 val3 = Vector2.op_Implicit(((Vector3)(ref val2)).normalized);
			Vector2 playerVelocity = GetPlayerVelocity();
			if (Vector2.Dot(((Vector2)(ref playerVelocity)).normalized, val3) < -0.3f && ((Vector2)(ref playerVelocity)).magnitude > 0.5f)
			{
				ApplySpeedBoost();
			}
			else
			{
				RemoveSpeedBoost();
			}
		}

		private Player FindClosestEnemy()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			Player result = null;
			float num = float.MaxValue;
			foreach (Player player in PlayerManager.instance.players)
			{
				if (!((Object)(object)player == (Object)(object)this.player) && !player.data.dead)
				{
					float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)this.player).transform.position), Vector2.op_Implicit(((Component)player).transform.position));
					if (num2 < num)
					{
						num = num2;
						result = player;
					}
				}
			}
			return result;
		}

		private Vector2 GetPlayerVelocity()
		{
			//IL_0026: 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)
			PlayerVelocity component = ((Component)player).GetComponent<PlayerVelocity>();
			if ((Object)(object)component != (Object)null)
			{
				return (Vector2)ExtensionMethods.GetFieldValue((object)component, "velocity");
			}
			return Vector2.zero;
		}

		private void ApplySpeedBoost()
		{
			if (!speedBoosted)
			{
				CharacterStatModifiers obj = stats;
				obj.movementSpeed *= 1.6f;
				speedBoosted = true;
			}
		}

		private void RemoveSpeedBoost()
		{
			if (speedBoosted)
			{
				CharacterStatModifiers obj = stats;
				obj.movementSpeed /= 1.6f;
				speedBoosted = false;
			}
		}

		private void OnDisable()
		{
			RemoveSpeedBoost();
		}

		private void OnDestroy()
		{
			RemoveSpeedBoost();
		}
	}
	public class UnpowerEffect : MonoBehaviour
	{
		private Player player;

		private Gun gun;

		private Block block;

		private bool initialized;

		private bool unpowerActive;

		private float originalDamage;

		private float originalSpeed;

		public void Initialize(Player player, Gun gun, Block block)
		{
			this.player = player;
			this.gun = gun;
			this.block = block;
			if ((Object)(object)block != (Object)null && !initialized)
			{
				block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
				initialized = true;
			}
			if ((Object)(object)gun != (Object)null)
			{
				gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
			}
		}

		private void OnDestroy()
		{
			if ((Object)(object)block != (Object)null && initialized)
			{
				Block obj = block;
				obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
			}
			if ((Object)(object)gun != (Object)null)
			{
				Gun obj2 = gun;
				obj2.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj2.ShootPojectileAction, new Action<GameObject>(OnShoot));
			}
			if (unpowerActive && (Object)(object)gun != (Object)null)
			{
				ResetGunStats();
			}
		}

		private void OnBlock(BlockTriggerType triggerType)
		{
			if (!unpowerActive && (Object)(object)gun != (Object)null)
			{
				originalDamage = gun.damage;
				originalSpeed = gun.projectileSpeed;
				Gun obj = gun;
				obj.damage *= 0.9f;
				Gun obj2 = gun;
				obj2.projectileSpeed *= 11f;
				unpowerActive = true;
			}
		}

		private void OnShoot(GameObject projectile)
		{
			if (unpowerActive)
			{
				ResetGunStats();
				unpowerActive = false;
			}
		}

		private void ResetGunStats()
		{
			if ((Object)(object)gun != (Object)null)
			{
				gun.damage = originalDamage;
				gun.projectileSpeed = originalSpeed;
			}
		}
	}
}
namespace sdnuor.Cards
{
	public class BoomerangCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.reflects = 1;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			ExtensionMethods.GetOrAddComponent<BoomerangEffect>(((Component)player).gameObject, false).Initialize(player, gun);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			BoomerangEffect component = ((Component)player).gameObject.GetComponent<BoomerangEffect>();
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
		}

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

		protected override string GetDescription()
		{
			return "Bullets pierce enemies and come back to you.";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		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 = "Pierce",
					amount = "Yes",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Boomerang",
					amount = "Returns",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "SD";
		}
	}
	public class DamagingFieldCard : 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)
		{
			ExtensionMethods.GetOrAddComponent<DamagingFieldEffect>(((Component)player).gameObject, false).Initialize(player, block);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			DamagingFieldEffect component = ((Component)player).gameObject.GetComponent<DamagingFieldEffect>();
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
		}

		protected override string GetTitle()
		{
			return "Damaging Field";
		}

		protected override string GetDescription()
		{
			return "Block to create a damage zone that lasts the entire round.";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		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 = "Damage Field",
					amount = "On Block",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Field Duration",
					amount = "Entire Round",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "SD";
		}
	}
	public class RangerCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			statModifiers.health = 3f;
			block.cdMultiplier = 0.5f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			ExtensionMethods.GetOrAddComponent<RangerEffect>(((Component)player).gameObject, false).Initialize(player);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			RangerEffect component = ((Component)player).gameObject.GetComponent<RangerEffect>();
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
		}

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

		protected override string GetDescription()
		{
			return "Tanky, but hitting enemies hurts you too.";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		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
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = "+200%",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Self Damage on Hit",
					amount = "-200% HP",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Block Cooldown",
					amount = "-50%",
					simepleAmount = (SimpleAmount)6
				}
			};
		}

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

		public override string GetModName()
		{
			return "SD";
		}
	}
	public class RecklessRampageCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.damage = 0f;
			gun.attackSpeed = 0.4f;
			gun.reloadTimeAdd = -0.5f;
		}

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

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

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

		protected override string GetDescription()
		{
			return "Spray and pray... with zero damage.";
		}

		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
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = false,
					stat = "Damage",
					amount = "-100%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Attack Speed",
					amount = "+150%",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Reload Speed",
					amount = "-0.5s",
					simepleAmount = (SimpleAmount)1
				}
			};
		}

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

		public override string GetModName()
		{
			return "SD";
		}
	}
	public class RunCard : 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)
		{
			ExtensionMethods.GetOrAddComponent<RunEffect>(((Component)player).gameObject, false).Initialize(player);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			RunEffect component = ((Component)player).gameObject.GetComponent<RunEffect>();
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
		}

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

		protected override string GetDescription()
		{
			return "Faster when fleeing from danger.";
		}

		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 = "Move Speed (fleeing)",
					amount = "+60%",
					simepleAmount = (SimpleAmount)3
				}
			};
		}

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

		public override string GetModName()
		{
			return "SD";
		}
	}
	public class SmolBulletCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.projectileSize = 0.5f;
			gun.reloadTime = 0.5f;
		}

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

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

		protected override string GetTitle()
		{
			return "Smol Bullet";
		}

		protected override string GetDescription()
		{
			return "Tiny but quick to reload.";
		}

		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 = "Bullet Size",
					amount = "-50%",
					simepleAmount = (SimpleAmount)6
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Reload Time",
					amount = "-50%",
					simepleAmount = (SimpleAmount)6
				}
			};
		}

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

		public override string GetModName()
		{
			return "SD";
		}
	}
	public class UnpowerCard : 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)
		{
			ExtensionMethods.GetOrAddComponent<UnpowerEffect>(((Component)player).gameObject, false).Initialize(player, gun, block);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			UnpowerEffect component = ((Component)player).gameObject.GetComponent<UnpowerEffect>();
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
		}

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

		protected override string GetDescription()
		{
			return "Block to make your next shot weaker but lightning fast.";
		}

		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
			//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 = false,
					stat = "Next Bullet Damage",
					amount = "-10%",
					simepleAmount = (SimpleAmount)5
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Next Bullet Speed",
					amount = "+1000%",
					simepleAmount = (SimpleAmount)4
				}
			};
		}

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

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