Decompiled source of Tycers Secret Cards v0.5.1

TSC.dll

Decompiled 2 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 System.Security;
using System.Security.Permissions;
using BepInEx;
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using HarmonyLib;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.MonoBehaviours;
using ModdingUtils.Utils;
using Photon.Pun;
using UnboundLib;
using UnboundLib.Cards;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
public class TrailBulletsCode : MonoBehaviour
{
	private GameObject bullet;

	private TrailRenderer t;

	private EdgeCollider2D e;

	private void Awake()
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Expected O, but got Unknown
		t = ((Component)this).GetComponent<TrailRenderer>();
		GameObject val = new GameObject("TrailCollider", new Type[1] { typeof(EdgeCollider2D) });
		e = val.GetComponent<EdgeCollider2D>();
	}

	private void Update()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_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)
		((Component)e).gameObject.transform.position = Vector2.op_Implicit(Vector2.zero);
		List<Vector2> list = new List<Vector2>();
		for (int i = 0; i < t.positionCount; i++)
		{
			list.Add(Vector2.op_Implicit(t.GetPosition(i)));
		}
		e.points = list.ToArray();
	}

	private void Start()
	{
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)((Component)this).GetComponentInParent<SpawnedAttack>() != (Object)null)
		{
			bullet = ((Component)((Component)this).GetComponentInParent<SpawnedAttack>()).gameObject;
			t.startColor = bullet.GetComponent<SpawnedAttack>().spawner.GetTeamColors().color;
			t.endColor = t.startColor;
		}
	}

	private void OnDestroy()
	{
		Object.Destroy((Object)(object)((Component)e).gameObject);
	}
}
public class CardHolder : MonoBehaviour
{
	public List<GameObject> Cards;

	public List<GameObject> HiddenCards;

	internal void RegisterCards()
	{
		foreach (GameObject card in Cards)
		{
			CustomCard.RegisterUnityCard(card, main.modInitials, card.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
		}
		foreach (GameObject hiddenCard in HiddenCards)
		{
		}
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.Poppycars.TSC.Id", "TycersSecretCards", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class main : BaseUnityPlugin
{
	internal static string modInitials = "TSC";

	internal static AssetBundle assets;

	public static main Instance { get; private set; }

	private void Awake()
	{
		assets = AssetUtils.LoadAssetBundleFromResources("tscbundle", typeof(main).Assembly);
		assets.LoadAsset<GameObject>("ModCards").GetComponent<CardHolder>().RegisterCards();
	}

	private void Start()
	{
		Instance = this;
	}
}
namespace TSC.MonoBehaviours
{
	internal class AustraliaMono : MonoBehaviour
	{
		private Player player;

		private AudioClip[] clip = (AudioClip[])(object)new AudioClip[1];

		public void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			CollectionExtensions.AddItem<AudioClip>((IEnumerable<AudioClip>)clip, main.assets.LoadAsset<AudioClip>("Australia_Sound"));
		}

		public void Update()
		{
			if (!player.data.view.IsMine)
			{
				return;
			}
			if (!PlayerStatus.PlayerAliveAndSimulated(player))
			{
				((Component)this).gameObject.SetActive(true);
				((Behaviour)this).enabled = true;
			}
			GameObject[] array = Object.FindObjectsOfType<GameObject>();
			foreach (GameObject val in array)
			{
				if ((Object)(object)val.GetComponent<Image>() != (Object)null)
				{
					val.GetComponent<Image>().sprite = main.assets.LoadAsset<Sprite>("Australia_Flag");
				}
				if ((Object)(object)val.GetComponent<ParticleSystem>() != (Object)null && (Object)(object)val.GetComponent<ParticleSystemRenderer>() == (Object)null)
				{
					val.AddComponent<ParticleSystemRenderer>();
				}
				if ((Object)(object)val.GetComponent<ParticleSystemRenderer>() != (Object)null)
				{
					((Renderer)val.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)main.assets.LoadAsset<Sprite>("Australia_Flag").texture;
				}
				if ((Object)(object)val.GetComponent<TrailRenderer>() != (Object)null)
				{
					((Renderer)val.GetComponent<TrailRenderer>()).material = main.assets.LoadAsset<Material>("AustralianMaterial");
				}
			}
		}
	}
	internal class CenterPullMono : MonoBehaviour
	{
		private Player player;

		public void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			if ((Object)(object)((Component)player).GetComponentInChildren<CenterPushMono>() != (Object)null)
			{
				Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<CenterDamage>(((Component)player).gameObject, false));
				Object.Destroy((Object)(object)((Component)((Component)player).gameObject.GetComponentInChildren<CenterPullMono>()).gameObject);
			}
		}

		public void Update()
		{
			//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_006a: 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_006c: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//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_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((Component)player).GetComponentInChildren<CenterPushMono>() == (Object)null)
			{
				if (PlayerStatus.PlayerAliveAndSimulated(player))
				{
					ExtensionMethods.GetOrAddComponent<CenterDamage>(((Component)player).gameObject, false);
					Vector2 val = default(Vector2);
					((Vector2)(ref val))..ctor(0f, 0f);
					Vector2 val2 = Vector2.op_Implicit(((Component)player).gameObject.transform.position);
					Vector2 val3 = val - val2;
					if (Vector2.Distance(val, val2) >= 1f)
					{
						ExtensionMethods.SetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity", (object)((Vector2)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity") + val3 * 1f / (Vector2.Distance(val, val2) / 1.5f)));
					}
					else
					{
						ExtensionMethods.SetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity", (object)((Vector2)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity") + val3));
					}
					if (Vector2.Distance(val, val2) <= 6f)
					{
						player.data.sinceGrounded = 0f;
					}
				}
			}
			else
			{
				Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<CenterDamage>(((Component)player).gameObject, false));
				Object.Destroy((Object)(object)((Component)((Component)player).gameObject.GetComponentInChildren<CenterPullMono>()).gameObject);
			}
		}

		public void Remove()
		{
			Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<CenterDamage>(((Component)player).gameObject, false));
		}
	}
	internal class CenterDamage : ReversibleEffect
	{
		private Vector2 center = new Vector2(0f, 0f);

		private float duration = 0f;

		public override void OnStart()
		{
			//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)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: 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_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((Component)base.player).GetComponentInChildren<CenterPushMono>() != (Object)null)
			{
				Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<CenterDamage>(((Component)base.player).gameObject, false));
				Object.Destroy((Object)(object)((Component)((Component)base.player).gameObject.GetComponentInChildren<CenterPullMono>()).gameObject);
			}
			if (PlayerStatus.PlayerAliveAndSimulated(base.player))
			{
				base.player = ((Component)this).GetComponentInParent<Player>();
				Vector2 val = Vector2.op_Implicit(((Component)base.player).gameObject.transform.position);
				base.characterDataModifier.maxHealth_mult = 3f;
				base.gunStatModifier.damage_mult = 3f;
				if (Vector2.Distance(center, val) >= 6f)
				{
					base.characterDataModifier.maxHealth_mult = Mathf.Clamp(1.5f * (1f + 1f / Vector2.Distance(center, val)), 1f, 3f);
					base.gunStatModifier.damage_mult = Mathf.Clamp(1.5f * (1f + 1f / Vector2.Distance(center, val)), 1f, 3f);
					duration = 0.5f;
				}
				((ReversibleEffect)this).SetLivesToEffect(int.MaxValue);
				((ReversibleEffect)this).ApplyModifiers();
			}
			else
			{
				Object.Destroy((Object)(object)this);
			}
		}

		public override void OnUpdate()
		{
			if (duration > 0f)
			{
				duration -= Time.deltaTime;
				return;
			}
			((ReversibleEffect)this).ClearModifiers(true);
			Object.Destroy((Object)(object)this);
		}

		public override void OnOnDestroy()
		{
			((ReversibleEffect)this).ClearModifiers(true);
		}

		public override void OnOnDisable()
		{
			((ReversibleEffect)this).ClearModifiers(true);
		}
	}
	internal class CenterPushMono : MonoBehaviour
	{
		private Player player;

		public void Start()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			if ((Object)(object)((Component)player).GetComponentInChildren<CenterPullMono>() != (Object)null)
			{
				Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<FarCenterDamage>(((Component)player).gameObject, false));
				Object.Destroy((Object)(object)((Component)((Component)player).gameObject.GetComponentInChildren<CenterPushMono>()).gameObject);
			}
		}

		public void Update()
		{
			//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_006a: 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_006c: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//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_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((Component)player).GetComponentInChildren<CenterPullMono>() == (Object)null)
			{
				if (PlayerStatus.PlayerAliveAndSimulated(player))
				{
					ExtensionMethods.GetOrAddComponent<FarCenterDamage>(((Component)player).gameObject, false);
					Vector2 val = default(Vector2);
					((Vector2)(ref val))..ctor(0f, 0f);
					Vector2 val2 = Vector2.op_Implicit(((Component)player).gameObject.transform.position);
					Vector2 val3 = val - val2;
					if (Vector2.Distance(val, val2) >= 1f)
					{
						ExtensionMethods.SetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity", (object)((Vector2)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity") - val3 * 1f / (Vector2.Distance(val, val2) / 1.5f)));
					}
					else
					{
						ExtensionMethods.SetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity", (object)((Vector2)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity") - val3));
					}
				}
			}
			else
			{
				Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<FarCenterDamage>(((Component)player).gameObject, false));
				Object.Destroy((Object)(object)((Component)((Component)player).gameObject.GetComponentInChildren<CenterPushMono>()).gameObject);
			}
		}

		public void Remove()
		{
			Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<FarCenterDamage>(((Component)player).gameObject, false));
		}
	}
	internal class FarCenterDamage : ReversibleEffect
	{
		private Vector2 center = new Vector2(0f, 0f);

		private float duration = 0f;

		public override void OnStart()
		{
			//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)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((Component)base.player).GetComponentInChildren<CenterPullMono>() != (Object)null)
			{
				Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<FarCenterDamage>(((Component)base.player).gameObject, false));
				Object.Destroy((Object)(object)((Component)((Component)base.player).gameObject.GetComponentInChildren<CenterPushMono>()).gameObject);
			}
			if (PlayerStatus.PlayerAliveAndSimulated(base.player))
			{
				base.player = ((Component)this).GetComponentInParent<Player>();
				Vector2 val = Vector2.op_Implicit(((Component)base.player).gameObject.transform.position);
				base.characterDataModifier.maxHealth_mult = 4.5f;
				base.gunStatModifier.damage_mult = 4.5f;
				if (Vector2.Distance(center, val) <= 50f)
				{
					base.characterDataModifier.maxHealth_mult = Mathf.Clamp(1.5f * (Vector2.Distance(center, val) / 15f), 1f, 4.5f);
					base.gunStatModifier.damage_mult = Mathf.Clamp(1.5f * (Vector2.Distance(center, val) / 15f), 1f, 4.5f);
				}
				duration = 0.5f;
				((ReversibleEffect)this).SetLivesToEffect(int.MaxValue);
				((ReversibleEffect)this).ApplyModifiers();
			}
			else
			{
				Object.Destroy((Object)(object)this);
			}
		}

		public override void OnUpdate()
		{
			if (duration > 0f)
			{
				duration -= Time.deltaTime;
				return;
			}
			((ReversibleEffect)this).ClearModifiers(true);
			Object.Destroy((Object)(object)this);
		}

		public override void OnOnDestroy()
		{
			((ReversibleEffect)this).ClearModifiers(true);
		}

		public override void OnOnDisable()
		{
			((ReversibleEffect)this).ClearModifiers(true);
		}
	}
}
namespace ChaosPoppycarsCards.Cards
{
	internal class Gambling : CustomCard
	{
		public static CardCategory[] noLotteryCategories = (CardCategory[])(object)new CardCategory[2]
		{
			CustomCardCategories.instance.CardCategory("CardManipulation"),
			CustomCardCategories.instance.CardCategory("NoRandom")
		};

		private Random randomNumberGenerator;

		private PhotonView photonView;

		public void Start()
		{
			photonView = ((Component)this).GetComponent<PhotonView>();
			if (PhotonNetwork.IsMasterClient)
			{
				randomNumberGenerator = new Random((int)DateTime.Now.Ticks);
				photonView.RPC("InitializeRandomNumberGenerator", (RpcTarget)1, new object[1] { (int)DateTime.Now.Ticks });
			}
		}

		[PunRPC]
		public void InitializeRandomNumberGenerator(int seed)
		{
			randomNumberGenerator = new Random(seed);
		}

		private void GenerateAndPerformEffect(Gun gun, Player player, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			int num = randomNumberGenerator.Next(1, 21);
			switch (num)
			{
			case 1:
				break;
			case 2:
				break;
			case 3:
				break;
			case 4:
				break;
			case 5:
				break;
			case 6:
				break;
			case 7:
				break;
			case 8:
				break;
			case 9:
				break;
			case 10:
				break;
			case 11:
			{
				CharacterData obj9 = data;
				obj9.maxHealth += 30f;
				break;
			}
			case 12:
			{
				Gun obj8 = gun;
				obj8.damage += 0.27272728f;
				break;
			}
			case 13:
			{
				GunAmmo obj7 = gunAmmo;
				obj7.maxAmmo += 3;
				break;
			}
			case 14:
			{
				Gun obj6 = gun;
				obj6.reflects += 3;
				break;
			}
			case 15:
			{
				Block obj5 = block;
				obj5.cdAdd -= 0.15f;
				break;
			}
			case 16:
			{
				Block obj4 = block;
				obj4.additionalBlocks++;
				break;
			}
			case 17:
			{
				Gun obj3 = gun;
				obj3.bursts += 3;
				gun.timeBetweenBullets = 0.1f;
				break;
			}
			case 18:
			{
				Gun obj2 = gun;
				obj2.percentageDamage += 0.15f;
				break;
			}
			case 19:
			{
				CharacterStatModifiers obj = characterStats;
				obj.numberOfJumps += 5;
				break;
			}
			case 20:
				ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)main.Instance, 10, (Action)delegate
				{
					CardInfo randomCardWithCondition = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)RandomCondition, 1000);
					CardInfo randomCardWithCondition2 = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)RandomCondition, 1000);
					CardInfo randomCardWithCondition3 = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)RandomCondition, 1000);
					Cards.instance.AddCardToPlayer(player, randomCardWithCondition, false, "", 2f, 2f, true);
					CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition, (float?)3f);
					Cards.instance.AddCardToPlayer(player, randomCardWithCondition2, false, "", 2f, 2f, true);
					CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition2, (float?)3f);
					Cards.instance.AddCardToPlayer(player, randomCardWithCondition3, false, "", 2f, 2f, true);
					CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition3, (float?)3f);
				});
				break;
			default:
				Debug.LogError((object)("Unexpected random number value: " + num));
				break;
			}
		}

		private bool RandomCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			return !card.categories.Intersect(noLotteryCategories).Any();
		}

		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.ExecuteAfterFrames((MonoBehaviour)(object)main.Instance, 10, (Action)delegate
			{
				Debug.Log((object)"you gambled");
				GenerateAndPerformEffect(gun, player, gunAmmo, data, health, gravity, block, 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 "Gambling";
		}

		protected override string GetDescription()
		{
			return "LETS GO GAMBLING";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (Rarity)1;
		}

		protected override CardInfoStat[] GetStats()
		{
			//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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					stat = "",
					amount = "<#FFFF00>+???</color>",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					stat = "",
					amount = "<#FFFF00>-???</color>",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

		protected override CardThemeColorType GetTheme()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (CardThemeColorType)7;
		}

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