using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using CardModThree.Cards;
using CardModThree.MonoBehaviors;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModdingUtils.Utils;
using UnboundLib;
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("CardModThree")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+953dedb5eefd6d7a04d324111a20338425f042ff")]
[assembly: AssemblyProduct("CardModThree")]
[assembly: AssemblyTitle("CardModThree")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace CardModThree
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.nopoke.rounds.testthree", "Nopokes Cards", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class CardModThree : BaseUnityPlugin
{
private const string ModId = "com.nopoke.rounds.testthree";
private const string ModName = "Nopokes Cards";
public const string Version = "1.0.0";
public const string ModInitials = "NPC";
public const bool Debug = true;
public static CardModThree instance { get; private set; }
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("com.nopoke.rounds.testthree");
val.PatchAll();
}
private void Start()
{
CustomCard.BuildCard<EvasiveManeuver>();
CustomCard.BuildCard<Origin>();
CustomCard.BuildCard<Power>();
CustomCard.BuildCard<GreatGrowth>();
CustomCard.BuildCard<RandomStats>();
CustomCard.BuildCard<Dragon>();
instance = this;
}
}
public static class Lib
{
public static Random Random = new Random(625967025);
public static void Log(string log)
{
bool flag = true;
Debug.Log((object)("[NPC]" + log));
}
public static string GetRandomString(ushort length)
{
char[] array = new char[length];
for (int i = 0; i < length; i++)
{
array[i] = (char)(Random.Next() % 256);
}
return new string(array);
}
}
}
namespace CardModThree.MonoBehaviors
{
internal class Growth : MonoBehaviour
{
private readonly float scale = 1.0005f;
private Player player;
private CharacterStatModifiers charStats;
private CharacterData charData;
private Gun gun;
private ushort multCycle;
private bool happened;
private float multiplier;
private void Awake()
{
player = ((Component)this).gameObject.GetComponent<Player>();
charStats = ((Component)this).gameObject.GetComponent<CharacterStatModifiers>();
charData = ((Component)this).gameObject.GetComponent<CharacterData>();
gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
multCycle = 0;
happened = false;
multiplier = 1f;
}
private void Update()
{
if (PlayerStatus.PlayerAliveAndSimulated(player))
{
multCycle++;
multiplier *= scale;
Gun obj = gun;
obj.attackSpeed /= scale;
CharacterStatModifiers obj2 = charStats;
obj2.movementSpeed *= scale;
CharacterData obj3 = charData;
obj3.health *= scale;
CharacterData obj4 = charData;
obj4.maxHealth *= scale;
if ((multCycle > 2500 || multCycle == 1) && multCycle > 1)
{
multCycle = 0;
}
happened = true;
}
else if (happened)
{
Gun obj5 = gun;
obj5.attackSpeedMultiplier *= multiplier;
CharacterStatModifiers obj6 = charStats;
obj6.movementSpeed /= multiplier;
CharacterData obj7 = charData;
obj7.maxHealth /= multiplier;
multiplier = 1f;
happened = false;
}
}
}
}
namespace CardModThree.Cards
{
internal class Dragon : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
object[] array = new object[3] { gun, statModifiers, block };
object[] array2 = array;
foreach (object obj in array2)
{
Type type = obj.GetType();
FieldInfo[] fields = type.GetFields();
foreach (FieldInfo fieldInfo in fields)
{
object value = fieldInfo.GetValue(obj);
if (value != null)
{
if (fieldInfo.FieldType == typeof(float))
{
fieldInfo.SetValue(obj, 1f);
bool flag = true;
Debug.Log((object)$"{type.Name}: {fieldInfo.Name}: {value}");
}
else if (fieldInfo.FieldType == typeof(int))
{
fieldInfo.SetValue(obj, 1);
}
}
}
}
Lib.Log("[Card] " + ((CustomCard)this).GetTitle() + " has been setup.");
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
object[] array = new object[6] { gun, gunAmmo, health, gravity, block, characterStats };
object[] array2 = array;
foreach (object obj in array2)
{
Type type = obj.GetType();
FieldInfo[] fields = type.GetFields();
foreach (FieldInfo fieldInfo in fields)
{
object value = fieldInfo.GetValue(obj);
if (value == null)
{
continue;
}
try
{
if (fieldInfo.FieldType == typeof(float))
{
float num = (float)value;
fieldInfo.SetValue(obj, (float)Math.Pow(num, 1.5));
bool flag = true;
Debug.Log((object)$"{type.Name}: {fieldInfo.Name}: {value}");
}
else if (fieldInfo.FieldType == typeof(int))
{
int num2 = (int)value;
fieldInfo.SetValue(obj, (int)Math.Pow(num2, 1.5));
bool flag2 = true;
Debug.Log((object)$"{type.Name}: {fieldInfo.Name}: {value}");
}
}
catch
{
}
}
}
if (characterStats.sizeMultiplier > 50f)
{
characterStats.sizeMultiplier = 50f;
}
Lib.Log($"[Card] {((CustomCard)this).GetTitle()} has been added to player {player.playerID}.");
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Lib.Log($"[Card] {((CustomCard)this).GetTitle()} has been removed from player {player.playerID}.");
}
protected override string GetTitle()
{
return "Dragon";
}
protected override string GetDescription()
{
return "<3";
}
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)2;
}
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_0015: 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)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: 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_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Inspiration",
amount = "A lot of",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Dimensions",
amount = "Many",
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)4;
}
public override string GetModName()
{
return "NPC";
}
}
internal class EvasiveManeuver : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
block.forceToAdd = 25f;
block.cdAdd = -0.25f;
block.additionalBlocks = 2;
statModifiers.health = 1.67f;
bool flag = true;
Debug.Log((object)("[NPC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
bool flag = true;
Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "NPC", ((CustomCard)this).GetTitle(), player.playerID));
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
bool flag = true;
Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "NPC", ((CustomCard)this).GetTitle(), player.playerID));
}
protected override string GetTitle()
{
return "Evasive Maneuver";
}
protected override string GetDescription()
{
return "HAHAHAHAH F*ck you NO\nI am not giving you a descriptuion";
}
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)0;
}
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_0015: 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)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: 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_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: 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_0078: 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_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = false,
stat = "Block Cooldown",
amount = "-0.25s",
simepleAmount = (SimpleAmount)5
},
new CardInfoStat
{
positive = true,
stat = "Fun",
amount = "Lots of ",
simepleAmount = (SimpleAmount)3
},
new CardInfoStat
{
positive = true,
stat = "Flight",
amount = "Some",
simepleAmount = (SimpleAmount)2
}
};
}
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 "NPC";
}
}
internal class GreatGrowth : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.damageAfterDistanceMultiplier = 2f;
Lib.Log("[NPC][Card] " + ((CustomCard)this).GetTitle() + " has been setup.");
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
ExtensionMethods.GetOrAddComponent<Growth>(((Component)player).gameObject, false);
Lib.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "NPC", ((CustomCard)this).GetTitle(), player.playerID));
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Lib.Log(string.Format("[{0}][Card] {1} has been removed from player {2}.", "NPC", ((CustomCard)this).GetTitle(), player.playerID));
}
protected override string GetTitle()
{
return "Unlimited Growth";
}
protected override string GetDescription()
{
return "You have encountered the power to grow at rates never seen before.\nWill it be a curse or a blessing?";
}
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_0015: 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)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: 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_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: 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_0078: 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_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Expected O, but got Unknown
//IL_008d: 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_0099: 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_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[4]
{
new CardInfoStat
{
positive = true,
stat = "Growth",
amount = "Unlimited",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Speed (per frame)",
amount = "100.1%",
simepleAmount = (SimpleAmount)1
},
new CardInfoStat
{
positive = true,
stat = "Max Health (per frame)",
amount = "100.1%",
simepleAmount = (SimpleAmount)1
},
new CardInfoStat
{
positive = true,
stat = "Attach Cooldown (per frame)",
amount = "99.9%",
simepleAmount = (SimpleAmount)1
}
};
}
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 "NPC";
}
}
internal class Origin : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.attackSpeedMultiplier = 10f;
statModifiers.attackSpeedMultiplier = 10f;
statModifiers.respawns = 2;
statModifiers.secondsToTakeDamageOver = 15f;
statModifiers.health = 0.001f;
statModifiers.sizeMultiplier = 30f;
block.autoBlock = true;
block.cdMultiplier = 0f;
Lib.Log("[NPC][Card] " + ((CustomCard)this).GetTitle() + " has been setup.");
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.damage *= 50f;
gunAmmo.maxAmmo++;
block.cdAdd -= 2f;
bool flag = true;
Lib.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "NPC", ((CustomCard)this).GetTitle(), player.playerID));
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
bool flag = true;
Lib.Log(string.Format("[{0}][Card] {1} has been removed from player {2}.", "NPC", ((CustomCard)this).GetTitle(), player.playerID));
}
protected override string GetTitle()
{
return "Origin";
}
protected override string GetDescription()
{
return "Not quite the origin of it all...\n\nStill feels... Close...\n";
}
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)2;
}
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_0015: 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)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "power",
amount = "So much",
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)8;
}
public override string GetModName()
{
return "NPC";
}
}
internal class Power : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
bool flag = true;
Debug.Log((object)("[NPC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
object[] array = new object[7] { gun, gunAmmo, data, health, gravity, block, characterStats };
object[] array2 = array;
foreach (object obj in array2)
{
Type type = obj.GetType();
FieldInfo[] fields = type.GetFields();
foreach (FieldInfo fieldInfo in fields)
{
try
{
object value = fieldInfo.GetValue(obj);
if (value == null)
{
continue;
}
if (fieldInfo.FieldType == typeof(float))
{
float num = (float)value;
if (Math.Abs(num) > 0.01f)
{
fieldInfo.SetValue(obj, num * 3f);
}
bool flag = true;
Debug.Log((object)$"{type.Name}: {fieldInfo.Name}: {value}");
}
else if (fieldInfo.FieldType == typeof(int))
{
int num2 = (int)value;
if (Math.Abs((long)num2) > 0)
{
fieldInfo.SetValue(obj, num2 * 3);
}
bool flag2 = true;
Debug.Log((object)$"{type.Name}: {fieldInfo.Name}: {value}");
}
}
catch
{
}
}
}
if (characterStats.sizeMultiplier > 50f)
{
characterStats.sizeMultiplier = 50f;
}
bool flag3 = true;
Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "NPC", ((CustomCard)this).GetTitle(), player.playerID));
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Lib.Log(string.Format("[{0}][Card] {1} has been removed from player {2}.", "NPC", ((CustomCard)this).GetTitle(), player.playerID));
}
protected override string GetTitle()
{
return "Power";
}
protected override string GetDescription()
{
return "Who knew one man could have all that power";
}
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_0015: 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)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "All Stats",
amount = "3x",
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)3;
}
public override string GetModName()
{
return "NPC";
}
}
internal class RandomStats : CustomCard
{
internal bool green;
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
cardInfo.cardDestription = Lib.GetRandomString((ushort)(Lib.Random.Next(32) + 1));
cardInfo.colorTheme = (CardThemeColorType)Lib.Random.Next(8);
green = Lib.Random.Next() > 4;
Lib.Log("[Card] " + ((CustomCard)this).GetTitle() + " has been setup.");
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
object[] array = new object[6] { gun, gunAmmo, health, gravity, block, characterStats };
object[] array2 = array;
foreach (object obj in array2)
{
Type type = obj.GetType();
FieldInfo[] fields = type.GetFields();
foreach (FieldInfo fieldInfo in fields)
{
try
{
object value = fieldInfo.GetValue(obj);
if (value == null)
{
continue;
}
if (fieldInfo.FieldType == typeof(float))
{
float num = (float)value;
if (Math.Abs(num) > 0.01f)
{
fieldInfo.SetValue(obj, num * (float)Lib.Random.NextDouble() * 10f);
}
bool flag = true;
Debug.Log((object)$"{type.Name}: {fieldInfo.Name}: {value}");
}
else if (fieldInfo.FieldType == typeof(int))
{
int num2 = (int)value;
if (Math.Abs(num2) > 0)
{
fieldInfo.SetValue(obj, num2 * (int)(Lib.Random.NextDouble() * 10.0));
}
bool flag2 = true;
Debug.Log((object)$"{type.Name}: {fieldInfo.Name}: {value}");
}
}
catch
{
}
}
}
Lib.Log($"[Card] {((CustomCard)this).GetTitle()} has been added to player {player.playerID}.");
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Lib.Log($"[Card] {((CustomCard)this).GetTitle()} has been removed from player {player.playerID}.");
}
protected override string GetTitle()
{
return "RNG";
}
protected override string GetDescription()
{
return Lib.GetRandomString((ushort)((int)(Lib.Random.NextDouble() * 10.0) + 1));
}
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)0;
}
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_001a: 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_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = green,
stat = "All Stats",
amount = "Random",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
return (CardThemeColorType)Lib.Random.Next(8);
}
public override string GetModName()
{
return "NPC";
}
}
internal class Template : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Lib.Log("[Card] " + ((CustomCard)this).GetTitle() + " has been setup.");
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Lib.Log($"[Card] {((CustomCard)this).GetTitle()} has been added to player {player.playerID}.");
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Lib.Log($"[Card] {((CustomCard)this).GetTitle()} has been removed from player {player.playerID}.");
}
protected override string GetTitle()
{
return "CardName";
}
protected override string GetDescription()
{
return "CardDescription";
}
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)0;
}
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_0015: 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)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Effect",
amount = "No",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
//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 "NPC";
}
}
}