using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; using Microsoft.CodeAnalysis; using RoundsModcah.Cards; 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("RoundsModcah")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+c8ddf19e9765b30a436ad9fdc19c1b8c405a68e1")] [assembly: AssemblyProduct("RoundsModcah")] [assembly: AssemblyTitle("RoundsModcah")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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 RoundsModcah { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.first.rounds.RoundsModCah", "Rounds Modcah", "1.0.0")] [BepInProcess("Rounds.exe")] public class RoundsModcah : BaseUnityPlugin { private const string ModId = "com.first.rounds.RoundsModCah"; private const string ModName = "Rounds Modcah"; public const string Version = "1.0.0"; public const string ModInitials = "RM"; public static RoundsModcah 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.first.rounds.RoundsModCah"); val.PatchAll(); } private void Start() { instance = this; CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); } } } namespace RoundsModcah.Cards { internal class Brute : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 0.8f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); float maxHealth = data.maxHealth; float num = maxHealth + 200f; base.statModifiers.health = num / 100f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); float maxHealth = data.maxHealth; float num = maxHealth - 200f; base.statModifiers.health = num / 100f; } protected override string GetTitle() { return "Brute"; } protected override string GetDescription() { return "Big Guy huh"; } 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 = "Health", amount = "+200 Flat HP", 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 "RM"; } } internal class Cat : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); block.additionalBlocks = 1; block.cdMultiplier = 0.9f; statModifiers.movementSpeed = 1.5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((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) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Cat"; } protected override string GetDescription() { return "+1 Block, +50% Movement Speed."; } 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 return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Block", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+50%", 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 "RM"; } } internal class DeadSpace : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][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) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); DeadSpaceMarker component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Dead Space"; } protected override string GetDescription() { return "Kills from your bullets cannot be revived."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { 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 Revive", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } public override string GetModName() { return "RM"; } } public class DeadSpaceMarker : MonoBehaviour { } [HarmonyPatch(typeof(HealthHandler), "DoDamage")] internal class DeadSpace_DoDamagePatch { private static void Prefix(HealthHandler __instance, Vector2 damage, Player damagingPlayer, bool lethal) { if ((Object)(object)damagingPlayer == (Object)null || !lethal) { return; } DeadSpaceMarker component = ((Component)damagingPlayer).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { CharacterData component2 = ((Component)__instance).GetComponent(); if (!((Object)(object)component2 == (Object)null) && !component2.dead && component2.health - ((Vector2)(ref damage)).magnitude < 0f) { component2.stats.remainingRespawns = 0; } } } } internal class EvasiveManeuvers : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); block.forceToAdd = -10f; statModifiers.health = 1.2f; block.cdAdd = 0.25f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((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) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Evasive Maneuvers"; } protected override string GetDescription() { return "Jump backwards when you block."; } 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 return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+0.25s", 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 "RM"; } } internal class GetEm : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); cardInfo.allowMultiple = false; gun.damage = 1.15f; statModifiers.movementSpeed = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); gunAmmo.maxAmmo += 20; ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); TeleportBlockEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Get Em"; } protected override string GetDescription() { return "Blocking teleports you to the nearest enemy. +20 Ammo, +15% Damage, -15% Movement Speed."; } 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 = true, stat = "Ammo", amount = "+20", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movement Speed", amount = "-15%", 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 "RM"; } } public class TeleportBlockEffect : MonoBehaviour { private Player _player; private Block _block; private void Start() { _player = ((Component)this).GetComponent(); if ((Object)(object)_player == (Object)null) { Debug.LogError((object)"[RoundsModcah] TeleportBlockEffect could not find Player."); return; } _block = _player.data.block; if ((Object)(object)_block == (Object)null) { Debug.LogError((object)"[RoundsModcah] TeleportBlockEffect could not find Block."); return; } Block block = _block; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, new Action(OnBlock)); } private void OnBlock(BlockTriggerType trigger) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_player == (Object)null) && !_player.data.dead) { Player val = FindClosestEnemy(); if (!((Object)(object)val == (Object)null)) { ((Component)_player).transform.position = ((Component)val).transform.position; } } } private Player FindClosestEnemy() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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) Player result = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player == (Object)(object)_player) && !player.data.dead && player.teamID != _player.teamID) { float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)_player).transform.position), Vector2.op_Implicit(((Component)player).transform.position)); if (num2 < num) { num = num2; result = player; } } } return result; } private void OnDestroy() { if ((Object)(object)_block != (Object)null) { Block block = _block; block.BlockAction = (Action)Delegate.Remove(block.BlockAction, new Action(OnBlock)); } } } internal class OhYeah : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); gun.attackSpeed = 0.4f; statModifiers.movementSpeed = 0.4f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); gunAmmo.maxAmmo += 50; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Oh Yeah;"; } protected override string GetDescription() { return "+50 Ammo, +150% Attack Speed, -60% Movement Speed."; } 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 = true, stat = "Ammo", amount = "+50", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+150%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movement Speed", amount = "-60%", 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 "RM"; } } internal class OverPowered : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); gun.attackSpeed = 0.2857143f; gun.damage = 0.5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); gunAmmo.maxAmmo += 10; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Over Powered"; } protected override string GetDescription() { return "+10 Bullets, +250% Attack Speed, -50% Damage."; } 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 = true, stat = "Bullets", amount = "+10", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+250%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-50%", 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 "RM"; } } internal class PoopParty : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); gun.damage = 0.05f; gun.projectileColor = new Color(0.55f, 0.35f, 0.15f); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); gunAmmo.maxAmmo += 60; PoopPartyEffect poopPartyEffect = ((Component)player).gameObject.AddComponent(); poopPartyEffect.Setup(gun); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); PoopPartyEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Poop Party"; } protected override string GetDescription() { return "+60 Bullets, -95% Damage. +200% Attack Speed while standing still. Brown bullets."; } 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 = true, stat = "Bullets", amount = "+60", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-95%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed (Standing Still)", amount = "+200%", 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 "RM"; } } public class PoopPartyEffect : MonoBehaviour { private Gun _gun; private Rigidbody2D _rb; private const float StillnessThreshold = 0.1f; private const float BoostedAttackSpeed = 1f / 3f; private const float NormalAttackSpeed = 1f; public void Setup(Gun gun) { _gun = gun; _rb = ((Component)gun).GetComponentInParent(); if ((Object)(object)_rb == (Object)null) { Debug.LogWarning((object)"[RM][PoopParty] Could not find Rigidbody2D on player."); } } private void Update() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_gun == (Object)null) && !((Object)(object)_rb == (Object)null)) { Vector2 velocity = _rb.velocity; float magnitude = ((Vector2)(ref velocity)).magnitude; _gun.attackSpeed = ((magnitude <= 0.1f) ? (1f / 3f) : 1f); } } } internal class RedditorsBurden : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.health = 2.5f; statModifiers.movementSpeed = 0.4f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((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) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Redditor's Burden"; } protected override string GetDescription() { return "+150% Health, -60% Movement Speed."; } 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 return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+150%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movement Speed", amount = "-60%", 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 "RM"; } } internal class SugarRushPill : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); SugarRushEffect sugarRushEffect = ((Component)player).gameObject.AddComponent(); sugarRushEffect.Setup(block, characterStats); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), player.playerID)); SugarRushEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Sugar Rush Pill"; } protected override string GetDescription() { return "-15% Movement Speed. Blocking grants +400% Movement Speed, decaying over 10s. 15s cooldown."; } 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 return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Movement Speed", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block Speed Boost", amount = "+400%", 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 "RM"; } } public class SugarRushEffect : MonoBehaviour { private Block _block; private CharacterStatModifiers _statModifiers; private const float BoostAmount = 4f; private const float DecayDuration = 10f; private const float Cooldown = 15f; private float _cooldownRemaining = 0f; private float _decayTimeRemaining = 0f; private float _lastAppliedBoost = 0f; public void Setup(Block block, CharacterStatModifiers statModifiers) { _block = block; _statModifiers = statModifiers; if ((Object)(object)_block != (Object)null) { Block block2 = _block; block2.BlockAction = (Action)Delegate.Combine(block2.BlockAction, new Action(OnBlock)); } } private void OnBlock(BlockTriggerType trigger) { if (!(_cooldownRemaining > 0f)) { _decayTimeRemaining = 10f; _cooldownRemaining = 15f; } } private void Update() { if (_cooldownRemaining > 0f) { _cooldownRemaining -= Time.deltaTime; } float num = 0f; if (_decayTimeRemaining > 0f) { _decayTimeRemaining -= Time.deltaTime; float num2 = Mathf.Clamp01(_decayTimeRemaining / 10f); num = 4f * num2; } CharacterStatModifiers statModifiers = _statModifiers; statModifiers.movementSpeed -= _lastAppliedBoost; CharacterStatModifiers statModifiers2 = _statModifiers; statModifiers2.movementSpeed += num; _lastAppliedBoost = num; } private void OnDestroy() { if ((Object)(object)_block != (Object)null) { Block block = _block; block.BlockAction = (Action)Delegate.Remove(block.BlockAction, new Action(OnBlock)); } if ((Object)(object)_statModifiers != (Object)null) { CharacterStatModifiers statModifiers = _statModifiers; statModifiers.movementSpeed -= _lastAppliedBoost; } } } internal class Template : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { Debug.Log((object)("[RM][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) { Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "RM", ((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) { Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "RM", ((CustomCard)this).GetTitle(), 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 "RM"; } } }