using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using CPCCommissions.Extensions; using CPCCore; using CPCCore.Extensions; using CPCCore.Utilities; using CardChoiceSpawnUniqueCardPatch.CustomCategories; using CardThemeLib; using ClassesManagerReborn; using HarmonyLib; using Jotunn.Utils; using Microsoft.CodeAnalysis; using ModdingUtils.Utils; using Photon.Pun; using RarityLib.Utils; using Sonigon; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnboundLib.Utils; 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(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace CPCCommissions { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Poppycars.CPCCommissions.Id", "ChaosPoppycarsCardsCommissions", "1.0.2")] [BepInProcess("Rounds.exe")] public class ChaosPoppycarsCardsCommissions : BaseUnityPlugin { public static class CPCCardCategories { } [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ChaosPoppycarsCardsCommissions <>4__this; private List.Enumerator <>s__1; private Player 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>s__1 = PlayerManager.instance.players.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; 5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const string ModId = "com.Poppycars.CPCCommissions.Id"; private const string ModName = "ChaosPoppycarsCardsCommissions"; public const string Version = "1.0.2"; public const string ModInitials = "CPCCommissions"; internal static List plugins; public static AssetBundle Bundle; public static ChaosPoppycarsCardsCommissions Instance { get; private set; } private void Awake() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown Instance = this; Bundle = AssetUtils.LoadAssetBundleFromResources("cpccommissions", typeof(ChaosPoppycarsCardsCommissions).Assembly); Harmony val = new Harmony("com.Poppycars.CPCCommissions.Id"); val.PatchAll(); } private void Start() { plugins = (List)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); ChaosPoppycarsCardsCore.RegisterCards(typeof(ChaosPoppycarsCardsCommissions).Assembly, Bundle); GameModeManager.AddHook("GameStart", (Func)GameStart); ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)this, 60, (Action)delegate { CardManager.cards.Values.ToList().ForEach(delegate(Card card) { AddMod(card); }); }); } private void AddMod(Card card) { string text = "__Rarity-" + ((object)(Rarity)(ref card.cardInfo.rarity)).ToString(); CardCategory val = CustomCardCategories.instance.CardCategory(text); CardCategory[] categories = CollectionExtensions.AddToArray(card.cardInfo.categories, val); card.cardInfo.categories = categories; } [IteratorStateMachine(typeof(d__13))] private IEnumerator GameStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this, gm = gm }; } } } namespace CPCCommissions.Cards { internal class WhynackGunCards : ClassHandler { [CompilerGenerated] private sealed class d__2 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public WhynackGunCards <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Debug.Log((object)("Regestering: " + name)); break; case 1: <>1__state = -1; break; } if (!Object.op_Implicit((Object)(object)WhynackWithAGun.Card)) { <>2__current = null; <>1__state = 1; return true; } ClassesRegistry.Register(WhynackWithAGun.Card, (CardType)33, 2); ClassesRegistry.Register(WhynackGunLaunch.Card, (CardType)48, WhynackWithAGun.Card, 0); ClassesRegistry.Register(WhynacksAcceleration.Card, (CardType)48, WhynackWithAGun.Card, 0); ClassesRegistry.Register(WhynacksGravityBullet.Card, (CardType)48, WhynackWithAGun.Card, 0); ClassesRegistry.Register(WhynackWantedHoming.Card, (CardType)48, WhynackWithAGun.Card, 0); ClassesRegistry.Register(WhynackWithADice.Card, (CardType)48, WhynackWithAGun.Card, 1); ClassesRegistry.Register(WhynackWithAUkelele.Card, (CardType)48, WhynackWithAGun.Card, 1); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__3 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public WhynackGunCards <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__3(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal static string name = "Gunack"; internal static List plugins; [IteratorStateMachine(typeof(d__2))] public override IEnumerator Init() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__3))] public override IEnumerator PostInit() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__3(0) { <>4__this = this }; } } internal class WhynackGunLaunch : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.reloadTimeAdd = -0.1f; gun.attackSpeed = 0.95f; CPCDebug.Log((object)("[CPCCommissions][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) { CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStats); additionalData.upwardsKnockback -= 3f; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCommissions", ((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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCommissions", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Whynacks Pest Control"; } protected override string GetDescription() { return "Down to the ground where you belong"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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) return RarityUtils.GetRarity("Uncommon"); } 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 = "Downwards Knockback", amount = "+300%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+5%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-0.1s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Whynot Block Red", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class WhynacksAcceleration : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.projectileSpeed = 0.85f; CPCDebug.Log((object)("[CPCCommissions][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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCommissions", ((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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCommissions", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Whynacks Acceleration"; } protected override string GetDescription() { return "It goes faster and grows too"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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) return RarityUtils.GetRarity("Rare"); } 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 = "Bullet Speed", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Whynot Block Red", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class WhynacksGravityBullet : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.reloadTimeAdd = -0.1f; gun.attackSpeed = 0.95f; CPCDebug.Log((object)("[CPCCommissions][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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCommissions", ((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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCommissions", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Whynacks Gravityinator"; } protected override string GetDescription() { return "You shall stay where i say"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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) return RarityUtils.GetRarity("Rare"); } 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 = "Attack Speed", amount = "+5%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-0.1s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Whynot Block Red", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class WhynackWantedHoming : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.25f; gun.projectileSpeed = 0.1f; gun.gravity = 0f; CPCDebug.Log((object)("[CPCCommissions][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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCommissions", ((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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCommissions", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Whynacks Homing"; } protected override string GetDescription() { return "It shall track you down"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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) return RarityUtils.GetRarity("Rare"); } 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 = "Damage", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "-80%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Gravity", amount = "No", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Whynot Block Red", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class WhynackWithADice : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.2f; gun.reloadTimeAdd = -0.1f; gun.attackSpeed = 0.95f; CPCDebug.Log((object)("[CPCCommissions][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) { characterStats.GetAdditionalDataCPCCom().rngDmg = true; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCommissions", ((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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCommissions", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Whynack With A Dice"; } protected override string GetDescription() { return "Your bullets deal damage to a random person when you hit someone"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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) return RarityUtils.GetRarity("Exotic"); } 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 = "Damage", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+5%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-0.1s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Whynot Block Red", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class WhynackWithAGun : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.4f; gun.reloadTimeAdd = -0.275f; gun.attackSpeed = 0.9f; CPCDebug.Log((object)("[CPCCommissions][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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCommissions", ((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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCommissions", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Whynack With A Gun"; } protected override string GetDescription() { return "Just one more shot"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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) return RarityUtils.GetRarity("Rare"); } 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 = "Damage", amount = "+40%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-0.275s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Whynot Block Red", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class WhynackWithAUkelele : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.1f; gun.attackSpeed = 0.95f; CPCDebug.Log((object)("[CPCCommissions][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) { characterStats.GetAdditionalDataCPCCom().splitDmg = true; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCommissions", ((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) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCommissions", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Whynack With A Ukulele"; } protected override string GetDescription() { return "Your bullets deal partial damage to a random opponent when you hit someone"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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) return RarityUtils.GetRarity("Exotic"); } 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 = "Damage", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+5%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Whynot Block Red", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } } namespace CPCCommissions.Patches { [Serializable] [HarmonyPatch(typeof(ProjectileHit), "Hit")] internal class ProjectileHitPatchHit { private static bool Prefix(ProjectileHit __instance, ref HitInfo hit, ref Player ___ownPlayer, ref float ___damage, bool forceCall = false) { //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)hit.collider).GetComponent() != (Object)null && ___ownPlayer.data.stats.GetAdditionalDataCPCCom().splitDmg && (__instance.view.IsMine || !__instance.sendCollisions)) { List list = new List(); foreach (Player player in PlayerManager.instance.players) { if (PlayerStatus.PlayerAliveAndSimulated(player) && player.teamID != ___ownPlayer.teamID) { list.Add(player); } } int index = Random.Range(0, list.Count); Player val = list[index]; if (!((Component)((Component)hit.collider).GetComponent()).GetComponent().IsBlocking()) { ((Damagable)val.data.healthHandler).CallTakeDamage(Vector2.up * ___damage * 0.25f, hit.point, (GameObject)null, ___ownPlayer, true); ___damage *= 0.75f; } } if ((Object)(object)((Component)hit.collider).GetComponent() != (Object)null && ___ownPlayer.data.stats.GetAdditionalDataCPCCom().rngDmg) { if (__instance.view.IsMine || !__instance.sendCollisions) { List list2 = new List(); foreach (Player player2 in PlayerManager.instance.players) { if (PlayerStatus.PlayerAliveAndSimulated(player2)) { list2.Add(player2); } } int index2 = Random.Range(0, list2.Count); Player val2 = list2[index2]; if (!((Component)((Component)hit.collider).GetComponent()).GetComponent().IsBlocking()) { __instance.view.RPC("RPCA_DoHit", (RpcTarget)0, new object[6] { hit.point, hit.normal, Vector2.op_Implicit(__instance.move.velocity), val2.data.view.ViewID, -1, val2.data.block.IsBlocking() }); return false; } } return true; } return true; } } } namespace CPCCommissions.MonoBehaviours { public class Accelerate : MonoBehaviour { private MoveTransform move; private RayCastTrail rayCast; private TrailRenderer componentInChildren; private float sizeChange = 0.5f; private void Start() { move = ((Component)this).GetComponentInParent(); rayCast = ((Component)this).GetComponentInParent(); componentInChildren = ((Component)rayCast).gameObject.GetComponentInChildren(false); } private void FixedUpdate() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) MoveTransform obj = move; obj.velocity += move.velocity * 1.05f * TimeHandler.fixedDeltaTime; RayCastTrail obj2 = rayCast; obj2.size += Mathf.Pow(sizeChange, 0.85f) * TimeHandler.fixedDeltaTime; if ((Object)(object)componentInChildren != (Object)null) { TrailRenderer obj3 = componentInChildren; obj3.widthMultiplier += (1f + sizeChange / 55f) * TimeHandler.fixedDeltaTime; } } } public class WhynackHoming : MonoBehaviour { [Header("Sound")] public SoundEvent soundHomingFound; private bool soundHomingCanPlay = true; [Header("Settings")] public float amount = 1f; public float scalingDrag = 1f; public float drag = 1f; public float spread = 1f; private MoveTransform move; private bool isOn; public RotSpring rot1; public RotSpring rot2; private FlickerEvent[] flicks; private PhotonView view; private void Start() { move = ((Component)this).GetComponentInParent(); flicks = ((Component)this).GetComponentsInChildren(); view = ((Component)this).GetComponentInParent(); ((Component)this).GetComponentInParent().active = true; } private void Update() { //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) amount = 1.5f; scalingDrag = 1f; drag = 5f; spread = 2f; Player val = null; float num = float.PositiveInfinity; for (int i = 0; i < PlayerManager.instance.players.Count; i++) { if (!PlayerManager.instance.players[i].data.dead && PlayerManager.instance.players[i].teamID != ((Component)this).GetComponentInParent().spawner.teamID) { float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), PlayerManager.instance.players[i].data.playerVel.position); if (PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)this).transform.position), PlayerManager.instance.players[i]).canSee && num2 < num) { num = num2; val = PlayerManager.instance.players[i]; } } } if (Object.op_Implicit((Object)(object)val)) { Vector3 val2 = ((Component)val).transform.position + ((Component)this).transform.right * move.selectedSpread * Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) * spread; float num3 = Vector3.Angle(((Component)this).transform.root.forward, val2 - ((Component)this).transform.position); if (num3 < 100f) { MoveTransform obj = move; obj.velocity -= move.velocity * num3 * TimeHandler.deltaTime * scalingDrag; MoveTransform obj2 = move; obj2.velocity += Vector3.ClampMagnitude(val2 - ((Component)this).transform.position, 1f) * TimeHandler.deltaTime * ((Vector3)(ref move.localForce)).magnitude * 2f * amount; move.velocity.z = 0f; if (!isOn) { MoveTransform obj3 = move; obj3.simulateGravity++; if (soundHomingCanPlay) { soundHomingCanPlay = false; SoundManager.Instance.PlayAtPosition(soundHomingFound, SoundManager.Instance.GetTransform(), ((Component)this).transform); } } isOn = true; for (int j = 0; j < flicks.Length; j++) { flicks[j].isOn = true; } rot1.target = 5f; rot2.target = -5f; } else { if (isOn) { MoveTransform obj4 = move; obj4.simulateGravity--; soundHomingCanPlay = true; } isOn = false; for (int k = 0; k < flicks.Length; k++) { flicks[k].isOn = false; } rot1.target = 50f; rot2.target = -50f; } } else { if (isOn) { MoveTransform obj5 = move; obj5.simulateGravity--; soundHomingCanPlay = true; } isOn = false; for (int l = 0; l < flicks.Length; l++) { flicks[l].isOn = false; } rot1.target = 50f; rot2.target = -50f; } } } internal class WhynackPullMono : MonoBehaviour { private Player player; private Vector2 center = new Vector2(0f, 0f); private float strength = 1f; public void Start() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); if ((Object)(object)player != (Object)null) { strength = player.data.maxHealth / 250f; float num = ((Component)this).GetComponent().spawner.data.weaponHandler.gun.damage * 2f; center = Vector2.op_Implicit(((Component)this).gameObject.transform.position); Object.Destroy((Object)(object)((Component)this).gameObject, num); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } public void Update() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player != (Object)null)) { return; } if (PlayerStatus.PlayerAliveAndSimulated(player)) { Vector2 val = Vector2.op_Implicit(((Component)player).gameObject.transform.position); Vector2 val2 = center - val; if (Vector2.Distance(center, val) >= 1f) { ExtensionMethods.SetFieldValue((object)((Component)player).GetComponent(), "velocity", (object)((Vector2)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponent(), "velocity") + val2 * 1f / (Vector2.Distance(center, val) / 1.5f) * strength)); } else { ExtensionMethods.SetFieldValue((object)((Component)player).GetComponent(), "velocity", (object)((Vector2)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponent(), "velocity") + val2 * strength)); } if (Vector2.Distance(center, val) <= 6f) { player.data.sinceGrounded = 0f; } } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } public void Remove() { } } } namespace CPCCommissions.Extensions { [Serializable] public class CharacterStatModifiersAdditionalDataCPCCom { public bool rngDmg; public bool splitDmg; public CharacterStatModifiersAdditionalDataCPCCom() { rngDmg = false; splitDmg = false; } } public static class CharacterStatModifiersExtension { public static readonly ConditionalWeakTable data = new ConditionalWeakTable(); public static CharacterStatModifiersAdditionalDataCPCCom GetAdditionalDataCPCCom(this CharacterStatModifiers statModifiers) { return data.GetOrCreateValue(statModifiers); } public static void AddData(this CharacterStatModifiers statModifiers, CharacterStatModifiersAdditionalDataCPCCom value) { try { data.Add(statModifiers, value); } catch (Exception) { } } } [HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")] internal class CharacterStatModifiersPatchResetStats { private static void Prefix(CharacterStatModifiers __instance) { __instance.GetAdditionalDataCPCCom().rngDmg = false; __instance.GetAdditionalDataCPCCom().splitDmg = false; } } }