Decompiled source of FayCards v1.0.0

FayCards.dll

Decompiled 6 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using Microsoft.CodeAnalysis;
using ModsPlus;
using RarityLib.Utils;
using UnboundLib.Cards;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Fay Cards")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Fay Cards")]
[assembly: AssemblyTitle("Fay Cards")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

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

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

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("rpy.fayding.rounds.FayCards", "Fay Cards", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class Main : BaseUnityPlugin
{
	public const string ModInitials = "Fay Cards";

	private void Start()
	{
		CustomCard.BuildCard<Bigger>();
		CustomCard.BuildCard<FAST>();
		CustomCard.BuildCard<Bouncy>();
		CustomCard.BuildCard<Bursty>();
	}
}
public class Bigger : SimpleCard
{
	public override CardDetails Details
	{
		get
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_006e: 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)
			//IL_0076: Expected O, but got Unknown
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			CardDetails val = new CardDetails();
			val.Title = "Bigger";
			val.Description = "More health, more damage, BIGGER!";
			val.ModName = "Fay Cards";
			val.Rarity = RarityUtils.GetRarity("Common");
			val.Theme = (CardThemeColorType)3;
			val.Stats = (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = "200%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Damage",
					amount = "120.0%",
					simepleAmount = (SimpleAmount)0
				}
			};
			return val;
		}
	}

	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
	{
		Gun gun2 = gun;
		CharacterStatModifiers statModifiers2 = statModifiers;
		Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>
		{
			{
				"Damage",
				delegate(float val)
				{
					gun2.damage = val;
				}
			},
			{
				"Health",
				delegate(float val)
				{
					statModifiers2.health = val;
				}
			},
			{
				"Reload Time",
				delegate(float val)
				{
					gun2.reloadTime = val;
				}
			},
			{
				"Ammunition",
				delegate(float val)
				{
					gun2.ammo = (int)val;
				}
			},
			{
				"Projectile Count",
				delegate(float val)
				{
					gun2.numberOfProjectiles = Mathf.Max(1, (int)val);
				}
			},
			{
				"Bursts",
				delegate(float val)
				{
					gun2.bursts = (int)val;
				}
			},
			{
				"Time Between Bullets",
				delegate(float val)
				{
					gun2.timeBetweenBullets = val;
				}
			},
			{
				"ATKSPD",
				delegate(float val)
				{
					gun2.attackSpeed = val;
				}
			},
			{
				"Bounces",
				delegate(float val)
				{
					gun2.reflects = (int)val;
				}
			},
			{
				"Bullet Speed",
				delegate(float val)
				{
					gun2.projectileSpeed = val;
				}
			}
		};
		dictionary["Health"](2f);
		dictionary["Damage"](1.2f);
	}
}
public class FAST : SimpleCard
{
	public override CardDetails Details
	{
		get
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_006e: 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)
			//IL_0076: Expected O, but got Unknown
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			CardDetails val = new CardDetails();
			val.Title = "F A S T";
			val.Description = "Gotta go fast!";
			val.ModName = "Fay Cards";
			val.Rarity = RarityUtils.GetRarity("Common");
			val.Theme = (CardThemeColorType)3;
			val.Stats = (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "ATKSPD",
					amount = "150.0%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Health",
					amount = "80.0%",
					simepleAmount = (SimpleAmount)0
				}
			};
			return val;
		}
	}

	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
	{
		Gun gun2 = gun;
		CharacterStatModifiers statModifiers2 = statModifiers;
		Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>
		{
			{
				"Damage",
				delegate(float val)
				{
					gun2.damage = val;
				}
			},
			{
				"Health",
				delegate(float val)
				{
					statModifiers2.health = val;
				}
			},
			{
				"Reload Time",
				delegate(float val)
				{
					gun2.reloadTime = val;
				}
			},
			{
				"Ammunition",
				delegate(float val)
				{
					gun2.ammo = (int)val;
				}
			},
			{
				"Projectile Count",
				delegate(float val)
				{
					gun2.numberOfProjectiles = Mathf.Max(1, (int)val);
				}
			},
			{
				"Bursts",
				delegate(float val)
				{
					gun2.bursts = (int)val;
				}
			},
			{
				"Time Between Bullets",
				delegate(float val)
				{
					gun2.timeBetweenBullets = val;
				}
			},
			{
				"ATKSPD",
				delegate(float val)
				{
					gun2.attackSpeed = val;
				}
			},
			{
				"Bounces",
				delegate(float val)
				{
					gun2.reflects = (int)val;
				}
			},
			{
				"Bullet Speed",
				delegate(float val)
				{
					gun2.projectileSpeed = val;
				}
			}
		};
		dictionary["ATKSPD"](1.5f);
		dictionary["Health"](0.8f);
	}
}
public class Bouncy : SimpleCard
{
	public override CardDetails Details
	{
		get
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_006e: 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)
			//IL_0076: Expected O, but got Unknown
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			CardDetails val = new CardDetails();
			val.Title = "Bouncy";
			val.Description = "Bouncy bullets!";
			val.ModName = "Fay Cards";
			val.Rarity = RarityUtils.GetRarity("Common");
			val.Theme = (CardThemeColorType)3;
			val.Stats = (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Bounces",
					amount = "+2",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Damage",
					amount = "80.0%",
					simepleAmount = (SimpleAmount)0
				}
			};
			return val;
		}
	}

	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
	{
		Gun gun2 = gun;
		CharacterStatModifiers statModifiers2 = statModifiers;
		Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>
		{
			{
				"Damage",
				delegate(float val)
				{
					gun2.damage = val;
				}
			},
			{
				"Health",
				delegate(float val)
				{
					statModifiers2.health = val;
				}
			},
			{
				"Reload Time",
				delegate(float val)
				{
					gun2.reloadTime = val;
				}
			},
			{
				"Ammunition",
				delegate(float val)
				{
					gun2.ammo = (int)val;
				}
			},
			{
				"Projectile Count",
				delegate(float val)
				{
					gun2.numberOfProjectiles = Mathf.Max(1, (int)val);
				}
			},
			{
				"Bursts",
				delegate(float val)
				{
					gun2.bursts = (int)val;
				}
			},
			{
				"Time Between Bullets",
				delegate(float val)
				{
					gun2.timeBetweenBullets = val;
				}
			},
			{
				"ATKSPD",
				delegate(float val)
				{
					gun2.attackSpeed = val;
				}
			},
			{
				"Bounces",
				delegate(float val)
				{
					gun2.reflects = (int)val;
				}
			},
			{
				"Bullet Speed",
				delegate(float val)
				{
					gun2.projectileSpeed = val;
				}
			}
		};
		dictionary["Bounces"](2f);
		dictionary["Damage"](0.8f);
	}
}
public class Bursty : SimpleCard
{
	public override CardDetails Details
	{
		get
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_006e: 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)
			//IL_0076: Expected O, but got Unknown
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			CardDetails val = new CardDetails();
			val.Title = "Bursty";
			val.Description = "Shoots in bursts!";
			val.ModName = "Fay Cards";
			val.Rarity = RarityUtils.GetRarity("Common");
			val.Theme = (CardThemeColorType)3;
			val.Stats = (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Bursts",
					amount = "+1",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Time Between Bullets",
					amount = "+1.5",
					simepleAmount = (SimpleAmount)0
				}
			};
			return val;
		}
	}

	public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
	{
		Gun gun2 = gun;
		CharacterStatModifiers statModifiers2 = statModifiers;
		Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>
		{
			{
				"Damage",
				delegate(float val)
				{
					gun2.damage = val;
				}
			},
			{
				"Health",
				delegate(float val)
				{
					statModifiers2.health = val;
				}
			},
			{
				"Reload Time",
				delegate(float val)
				{
					gun2.reloadTime = val;
				}
			},
			{
				"Ammunition",
				delegate(float val)
				{
					gun2.ammo = (int)val;
				}
			},
			{
				"Projectile Count",
				delegate(float val)
				{
					gun2.numberOfProjectiles = Mathf.Max(1, (int)val);
				}
			},
			{
				"Bursts",
				delegate(float val)
				{
					gun2.bursts = (int)val;
				}
			},
			{
				"Time Between Bullets",
				delegate(float val)
				{
					gun2.timeBetweenBullets = val;
				}
			},
			{
				"ATKSPD",
				delegate(float val)
				{
					gun2.attackSpeed = val;
				}
			},
			{
				"Bounces",
				delegate(float val)
				{
					gun2.reflects = (int)val;
				}
			},
			{
				"Bullet Speed",
				delegate(float val)
				{
					gun2.projectileSpeed = val;
				}
			}
		};
		dictionary["Bursts"](1f);
		dictionary["Time Between Bullets"](1.5f);
	}
}