using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using ModdingUtils.Utils;
using ModsPlus;
using RarityLib.Utils;
using UnboundLib.Cards;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Maniacal")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Maniacal")]
[assembly: AssemblyTitle("Maniacal")]
[assembly: AssemblyVersion("1.0.0.0")]
public static class CardRegistry
{
private static Dictionary<Type, CardInfo> storedCardInfo = new Dictionary<Type, CardInfo>();
public static void RegisterCard<T>(bool hidden = false) where T : CustomCard
{
CustomCard.BuildCard<T>((Action<CardInfo>)delegate(CardInfo c)
{
StoreCard<T>(c);
if (hidden)
{
Cards.instance.AddHiddenCard(c);
}
});
}
private static void StoreCard<T>(CardInfo card) where T : CustomCard
{
storedCardInfo.Add(typeof(T), card);
}
public static CardInfo GetCard<T>() where T : CustomCard
{
if (storedCardInfo.TryGetValue(typeof(T), out var value))
{
return value;
}
return null;
}
public static CardInfo GetCard(Type T)
{
if (storedCardInfo.TryGetValue(T, out var value))
{
return value;
}
return null;
}
}
public class DangerBoy : 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_002d: 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_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: 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_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Expected O, but got Unknown
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: 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_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_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Expected O, but got Unknown
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: 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)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "Danger Boy";
val.Description = "Mama cant tell me NOTHIN";
val.ModName = "Maniacal";
val.Rarity = RarityUtils.GetRarity("Exotic");
val.Theme = (CardThemeColorType)0;
val.Art = DeckSmithUtil.Instance.GetArtFromUrl("https://i.ibb.co/yWGrgTX/Danger-Boy-CA.png");
val.Stats = (CardInfoStat[])(object)new CardInfoStat[4]
{
new CardInfoStat
{
positive = true,
stat = "Bursts",
amount = "+3",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Time Between Bullets",
amount = "-0.5 seconds",
simepleAmount = (SimpleAmount)6
},
new CardInfoStat
{
positive = true,
stat = "Ammunition",
amount = "+9",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Damage",
amount = "-31%",
simepleAmount = (SimpleAmount)5
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>();
dictionary.Add("damage", delegate(float val)
{
gun.damage = val;
});
dictionary.Add("health", delegate(float val)
{
statModifiers.health = val;
});
dictionary.Add("reload", delegate(float val)
{
gun.reloadTime = val;
});
dictionary.Add("ammo", delegate(float val)
{
gun.ammo = (int)val;
});
dictionary.Add("projectiles", delegate(float val)
{
gun.numberOfProjectiles = Mathf.Max(1, (int)val);
});
dictionary.Add("bursts", delegate(float val)
{
gun.bursts = (int)val;
});
dictionary.Add("timeBetweenBullets", delegate(float val)
{
gun.timeBetweenBullets = val;
});
dictionary.Add("attackSpeed", delegate(float val)
{
gun.attackSpeed = val;
});
dictionary.Add("bounces", delegate(float val)
{
gun.reflects = (int)val;
});
dictionary.Add("bulletSpeed", delegate(float val)
{
gun.projectileSpeed = val;
});
dictionary["bursts"](3f);
dictionary["timeBetweenBullets"](-0.5f);
dictionary["ammo"](9f);
dictionary["damage"](0.7f);
}
}
public class GameFace : 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_002d: 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_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: 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_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Expected O, but got Unknown
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: 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_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_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "Game Face";
val.Description = "Can't tell if he means business or wants my number";
val.ModName = "Maniacal";
val.Rarity = RarityUtils.GetRarity("Uncommon");
val.Theme = (CardThemeColorType)4;
val.Art = DeckSmithUtil.Instance.GetArtFromUrl("https://i.ibb.co/G2TDhPV/Ken-Smolder.png");
val.Stats = (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Health",
amount = "+50%",
simepleAmount = (SimpleAmount)2
},
new CardInfoStat
{
positive = true,
stat = "Bounces",
amount = "+2",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Reload Time",
amount = "-40%",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>();
dictionary.Add("damage", delegate(float val)
{
gun.damage = val;
});
dictionary.Add("health", delegate(float val)
{
statModifiers.health = val;
});
dictionary.Add("reload", delegate(float val)
{
gun.reloadTime = val;
});
dictionary.Add("ammo", delegate(float val)
{
gun.ammo = (int)val;
});
dictionary.Add("projectiles", delegate(float val)
{
gun.numberOfProjectiles = Mathf.Max(1, (int)val);
});
dictionary.Add("bursts", delegate(float val)
{
gun.bursts = (int)val;
});
dictionary.Add("timeBetweenBullets", delegate(float val)
{
gun.timeBetweenBullets = val;
});
dictionary.Add("attackSpeed", delegate(float val)
{
gun.attackSpeed = val;
});
dictionary.Add("bounces", delegate(float val)
{
gun.reflects = (int)val;
});
dictionary.Add("bulletSpeed", delegate(float val)
{
gun.projectileSpeed = val;
});
dictionary["health"](1.5f);
dictionary["bounces"](2f);
dictionary["reload"](0.6f);
}
}
public class GoldDigging : 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_002d: 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_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: 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_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Expected O, but got Unknown
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: 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_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_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Expected O, but got Unknown
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: 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)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "Gold Digging";
val.Description = "It's honest work... I guess";
val.ModName = "Maniacal";
val.Rarity = RarityUtils.GetRarity("Epic");
val.Theme = (CardThemeColorType)5;
val.Art = DeckSmithUtil.Instance.GetArtFromUrl("https://i.ibb.co/yQwJFv2/Gold-Digger-CA.png");
val.Stats = (CardInfoStat[])(object)new CardInfoStat[4]
{
new CardInfoStat
{
positive = true,
stat = "Bounces",
amount = "+15",
simepleAmount = (SimpleAmount)4
},
new CardInfoStat
{
positive = false,
stat = "Damage",
amount = "-85%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Projectiles",
amount = "+1",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Bullet Speed",
amount = "-60%",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>();
dictionary.Add("damage", delegate(float val)
{
gun.damage = val;
});
dictionary.Add("health", delegate(float val)
{
statModifiers.health = val;
});
dictionary.Add("reload", delegate(float val)
{
gun.reloadTime = val;
});
dictionary.Add("ammo", delegate(float val)
{
gun.ammo = (int)val;
});
dictionary.Add("projectiles", delegate(float val)
{
gun.numberOfProjectiles = Mathf.Max(1, (int)val);
});
dictionary.Add("bursts", delegate(float val)
{
gun.bursts = (int)val;
});
dictionary.Add("timeBetweenBullets", delegate(float val)
{
gun.timeBetweenBullets = val;
});
dictionary.Add("attackSpeed", delegate(float val)
{
gun.attackSpeed = val;
});
dictionary.Add("bounces", delegate(float val)
{
gun.reflects = (int)val;
});
dictionary.Add("bulletSpeed", delegate(float val)
{
gun.projectileSpeed = val;
});
dictionary["bounces"](15f);
dictionary["damage"](0.15f);
dictionary["projectiles"](1f);
dictionary["bulletSpeed"](0.4f);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.maniacal.rounds.mod", "Maniacal", "1.0.4")]
[BepInProcess("Rounds.exe")]
public class ManiacalPlugin : BaseUnityPlugin
{
private const string ModId = "com.maniacal.rounds.mod";
private const string ModName = "Maniacal";
private const string ModVersion = "1.0.4";
private const string CompatabilityModName = "Maniacal";
private void Awake()
{
CardRegistry.RegisterCard<TheDog>(hidden: false);
CardRegistry.RegisterCard<GameFace>(hidden: false);
CardRegistry.RegisterCard<GoldDigging>(hidden: false);
CardRegistry.RegisterCard<SafeBoy>(hidden: false);
CardRegistry.RegisterCard<DangerBoy>(hidden: false);
}
private void Start()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.maniacal.rounds.mod").PatchAll();
}
}
public class SafeBoy : 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_002d: 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_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: 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_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Expected O, but got Unknown
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "Safe Boy";
val.Description = "Mama said safety first!";
val.ModName = "Maniacal";
val.Rarity = RarityUtils.GetRarity("Exotic");
val.Theme = (CardThemeColorType)2;
val.Art = DeckSmithUtil.Instance.GetArtFromUrl("https://i.ibb.co/yQvWxMV/Safe-Boy-CA.png");
val.Stats = (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Health",
amount = "+250%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Damage",
amount = "-20%",
simepleAmount = (SimpleAmount)5
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>();
dictionary.Add("damage", delegate(float val)
{
gun.damage = val;
});
dictionary.Add("health", delegate(float val)
{
statModifiers.health = val;
});
dictionary.Add("reload", delegate(float val)
{
gun.reloadTime = val;
});
dictionary.Add("ammo", delegate(float val)
{
gun.ammo = (int)val;
});
dictionary.Add("projectiles", delegate(float val)
{
gun.numberOfProjectiles = Mathf.Max(1, (int)val);
});
dictionary.Add("bursts", delegate(float val)
{
gun.bursts = (int)val;
});
dictionary.Add("timeBetweenBullets", delegate(float val)
{
gun.timeBetweenBullets = val;
});
dictionary.Add("attackSpeed", delegate(float val)
{
gun.attackSpeed = val;
});
dictionary.Add("bounces", delegate(float val)
{
gun.reflects = (int)val;
});
dictionary.Add("bulletSpeed", delegate(float val)
{
gun.projectileSpeed = val;
});
dictionary["health"](3.5f);
dictionary["damage"](0.8f);
}
}
public class TheDog : 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_002d: 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_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: 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_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Expected O, but got Unknown
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: 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_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_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Expected O, but got Unknown
//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "The Dog";
val.Description = "He's very fast...";
val.ModName = "Maniacal";
val.Rarity = RarityUtils.GetRarity("Uncommon");
val.Theme = (CardThemeColorType)0;
val.Art = DeckSmithUtil.Instance.GetArtFromUrl("https://i.ibb.co/rxJt6Xb/The-Dog-CA.png");
val.Stats = (CardInfoStat[])(object)new CardInfoStat[4]
{
new CardInfoStat
{
positive = true,
stat = "Bullet Speed",
amount = "+900%",
simepleAmount = (SimpleAmount)4
},
new CardInfoStat
{
positive = true,
stat = "Bursts",
amount = "+3",
simepleAmount = (SimpleAmount)2
},
new CardInfoStat
{
positive = true,
stat = "Time Between Bullets",
amount = "+0.3 seconds",
simepleAmount = (SimpleAmount)9
},
new CardInfoStat
{
positive = false,
stat = "Damage",
amount = "-60%",
simepleAmount = (SimpleAmount)6
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>();
dictionary.Add("damage", delegate(float val)
{
gun.damage = val;
});
dictionary.Add("health", delegate(float val)
{
statModifiers.health = val;
});
dictionary.Add("reload", delegate(float val)
{
gun.reloadTime = val;
});
dictionary.Add("ammo", delegate(float val)
{
gun.ammo = (int)val;
});
dictionary.Add("projectiles", delegate(float val)
{
gun.numberOfProjectiles = Mathf.Max(1, (int)val);
});
dictionary.Add("bursts", delegate(float val)
{
gun.bursts = (int)val;
});
dictionary.Add("timeBetweenBullets", delegate(float val)
{
gun.timeBetweenBullets = val;
});
dictionary.Add("attackSpeed", delegate(float val)
{
gun.attackSpeed = val;
});
dictionary.Add("bounces", delegate(float val)
{
gun.reflects = (int)val;
});
dictionary.Add("bulletSpeed", delegate(float val)
{
gun.projectileSpeed = val;
});
dictionary["bulletSpeed"](10f);
dictionary["bursts"](3f);
dictionary["timeBetweenBullets"](0.3f);
dictionary["damage"](0.4f);
}
}