Decompiled source of ChaosPoppycarsCardsClasses v1.0.0
ChaosPoppycarsCardsClasses.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
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 CPCClasses.MonoBehaviours; using CPCCore; using CPCCore.Extensions; using CPCCore.Utilities; using CardChoiceSpawnUniqueCardPatch.CustomCategories; using CardThemeLib; using ClassesManagerReborn; using ClassesManagerReborn.Util; using HarmonyLib; using Jotunn.Utils; using Microsoft.CodeAnalysis; using ModdingUtils.MonoBehaviours; using ModdingUtils.Utils; using PSA.Extensions; using Photon.Pun; using PlayerTimeScale; using RarityLib.Utils; using UnboundLib; using UnboundLib.Cards; using UnboundLib.Networking; 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 CPCClasses { [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.CPCClasses.Id", "ChaosPoppycarsCardsClasses", "1.0.0")] [BepInProcess("Rounds.exe")] public class ChaosPoppycarsCardsClasses : BaseUnityPlugin { private const string ModId = "com.Poppycars.CPCClasses.Id"; private const string ModName = "ChaosPoppycarsCardsClasses"; public const string Version = "1.0.0"; public const string ModInitials = "CPCClasses"; internal static List<BaseUnityPlugin> plugins; public static AssetBundle Bundle; public static ChaosPoppycarsCardsClasses Instance { get; private set; } private void Awake() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown Bundle = AssetUtils.LoadAssetBundleFromResources("cpcclasses", typeof(ChaosPoppycarsCardsClasses).Assembly); Harmony val = new Harmony("com.Poppycars.CPCClasses.Id"); val.PatchAll(); GameObject val2 = Bundle.LoadAsset<GameObject>("ModCards"); CardHolder component = val2.GetComponent<CardHolder>(); component.RegisterCards(); } private void Start() { plugins = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); Instance = this; ChaosPoppycarsCardsCore.RegisterCards(typeof(ChaosPoppycarsCardsClasses).Assembly, Bundle); 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<CardCategory>(card.cardInfo.categories, val); card.cardInfo.categories = categories; } } } namespace CPCClasses.Patches { [Serializable] [HarmonyPatch(typeof(GeneralInput), "Update")] internal class GeneralInputUpdatePatch { private static void Postfix(GeneralInput __instance) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).forcedMoveEnabled) { if (Mathf.Abs(__instance.direction.x) < 0.5f) { __instance.direction = new Vector3(CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).forcedMove, __instance.direction.y); } else { CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).forcedMove = __instance.direction.x; } } if (Mathf.Abs(__instance.direction.x) > 0.5f) { if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).speedyHands) { ExtensionMethods.GetOrAddComponent<SpeedyHandsMono>(((Component)((Component)((Component)__instance).GetComponent<Player>()).transform).gameObject, false); } if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).triggerFinger) { ExtensionMethods.GetOrAddComponent<TriggerFingerMono>(((Component)((Component)((Component)__instance).GetComponent<Player>()).transform).gameObject, false); } if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).acceleratedRejuvenation) { ExtensionMethods.GetOrAddComponent<AcceleratedRejuvenationMono>(((Component)((Component)((Component)__instance).GetComponent<Player>()).transform).gameObject, false); } if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).boostedBlock) { ExtensionMethods.GetOrAddComponent<BoostedBlockMono>(((Component)((Component)((Component)__instance).GetComponent<Player>()).transform).gameObject, false); } } else { if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).speedyHands) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<SpeedyHandsMono>(((Component)((Component)((Component)__instance).GetComponent<Player>()).transform).gameObject, false)); } if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).triggerFinger) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<TriggerFingerMono>(((Component)((Component)((Component)__instance).GetComponent<Player>()).transform).gameObject, false)); } if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).acceleratedRejuvenation) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<AcceleratedRejuvenationMono>(((Component)((Component)((Component)__instance).GetComponent<Player>()).transform).gameObject, false)); } if (CharacterStatModifiersExtension.GetAdditionalData(((Component)__instance).GetComponent<Player>().data.stats).boostedBlock) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<BoostedBlockMono>(((Component)((Component)((Component)__instance).GetComponent<Player>()).transform).gameObject, false)); } } } } } namespace CPCClasses.MonoBehaviours { [DisallowMultipleComponent] public class CriticalHitBehaviour : MonoBehaviour { private float critMultiplier = 1f; private static bool isCriticalHit; private static bool isDoubleCrit; private int shoots; private float consecutiveCritDamage = 0f; private Gun gun; private Player player; private SpawnedAttack spawnedAttack; private HealthHandler healthHandler; public void Start() { player = ((Component)this).GetComponentInParent<Player>(); gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); healthHandler = player.data.healthHandler; isCriticalHit = false; isDoubleCrit = false; } [UnboundRPC] public static void SyncCriticalHit(bool ISCRIT) { isCriticalHit = ISCRIT; } [UnboundRPC] public static void SyncDoubleCrit(bool ISDOUBLECRIT) { isDoubleCrit = ISDOUBLECRIT; } public void OnShootProjectileAction(GameObject obj) { //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) spawnedAttack = obj.GetComponent<SpawnedAttack>(); if (!Object.op_Implicit((Object)(object)spawnedAttack)) { spawnedAttack = obj.AddComponent<SpawnedAttack>(); } ProjectileHit bullet = obj.GetComponent<ProjectileHit>(); MoveTransform move = obj.GetComponent<MoveTransform>(); if (PhotonNetwork.IsMasterClient) { isCriticalHit = Random.value < GunExtension.GetAdditionalData(gun).criticalHitChance1; if (GunExtension.GetAdditionalData(gun).guranteedCrits) { isCriticalHit = true; critMultiplier = 0f; } NetworkingManager.RPC(typeof(CriticalHitBehaviour), "SyncCriticalHit", new object[1] { isCriticalHit }); if (!GunExtension.GetAdditionalData(gun).guranteedCrits && GunExtension.GetAdditionalData(gun).criticalHitChance1 > 1f) { float num = (GunExtension.GetAdditionalData(gun).criticalHitChance1 - 1f) % 1f; isDoubleCrit = Random.value < num; NetworkingManager.RPC(typeof(CriticalHitBehaviour), "SyncDoubleCrit", new object[1] { isDoubleCrit }); } } if (shoots > 0) { shoots--; } critMultiplier = 0f; if (isCriticalHit) { spawnedAttack.SetColor(GunExtension.GetAdditionalData(gun).CritColor); if ((GunExtension.GetAdditionalData(gun).criticalHitChance1 >= 1.1f) & !GunExtension.GetAdditionalData(gun).guranteedCrits) { int num2 = (int)Math.Round(GunExtension.GetAdditionalData(gun).criticalHitChance1); if (isDoubleCrit) { critMultiplier += (float)num2 + 1f; spawnedAttack.SetColor(GunExtension.GetAdditionalData(gun).DoubleCritColor); } else { critMultiplier += num2; if (GunExtension.GetAdditionalData(gun).consecutiveCrits) { consecutiveCritDamage = 0f; } } } else { critMultiplier = 0f; } RayCastTrail component = obj.GetComponent<RayCastTrail>(); if (GunExtension.GetAdditionalData(gun).CritColor == Color.clear) { component.mask = component.ignoreWallsMask; } bullet.unblockable = GunExtension.GetAdditionalData(gun).unblockableCrits; if (critMultiplier > 1.1f) { if (GunExtension.GetAdditionalData(gun).criticalBulletSpeed > 1f) { MoveTransform obj2 = move; obj2.localForce *= GunExtension.GetAdditionalData(gun).criticalBulletSpeed * critMultiplier; } } else { MoveTransform obj3 = move; obj3.localForce *= GunExtension.GetAdditionalData(gun).criticalBulletSpeed; } if (GunExtension.GetAdditionalData(gun).criticalHitBounces >= 1) { if (gun.reflects <= 0) { RayHitReflect val = obj.gameObject.AddComponent<RayHitReflect>(); if (critMultiplier > 1.1f) { val.reflects += GunExtension.GetAdditionalData(gun).criticalHitBounces * (int)Math.Round(critMultiplier) - 1; val.dmgM += GunExtension.GetAdditionalData(gun).criticalHitDamageOnBounce; } else { val.reflects += GunExtension.GetAdditionalData(gun).criticalHitBounces - 1; val.dmgM += GunExtension.GetAdditionalData(gun).criticalHitDamageOnBounce; } } if (gun.reflects >= 1) { RayHitReflect component2 = obj.gameObject.GetComponent<RayHitReflect>(); if (critMultiplier > 1.1f) { component2.reflects += GunExtension.GetAdditionalData(gun).criticalHitBounces * (int)Math.Round(critMultiplier); component2.dmgM += GunExtension.GetAdditionalData(gun).criticalHitDamageOnBounce; } else { component2.reflects += GunExtension.GetAdditionalData(gun).criticalHitBounces; component2.dmgM += GunExtension.GetAdditionalData(gun).criticalHitDamageOnBounce; } } } } ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsClasses.Instance, 3, (Action)delegate { //IL_0026: 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_0363: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) if (isCriticalHit) { spawnedAttack.SetColor(GunExtension.GetAdditionalData(gun).CritColor); if (isDoubleCrit) { spawnedAttack.SetColor(GunExtension.GetAdditionalData(gun).DoubleCritColor); } } if (isCriticalHit) { if (critMultiplier > 1.1f) { if (GunExtension.GetAdditionalData(gun).criticalHitDamage1 > 0f) { ProjectileHit obj4 = bullet; obj4.damage *= GunExtension.GetAdditionalData(gun).criticalHitDamage1 * critMultiplier; } if (GunExtension.GetAdditionalData(gun).consecutiveCrits) { ProjectileHit obj5 = bullet; obj5.damage += consecutiveCritDamage; } } else { if (GunExtension.GetAdditionalData(gun).criticalHitDamage1 > 0f) { ProjectileHit obj6 = bullet; obj6.damage *= GunExtension.GetAdditionalData(gun).criticalHitDamage1; } if (GunExtension.GetAdditionalData(gun).consecutiveCrits) { ProjectileHit obj7 = bullet; obj7.damage += consecutiveCritDamage; } } if (GunExtension.GetAdditionalData(gun).consecutiveCrits) { consecutiveCritDamage += GunExtension.GetAdditionalData(gun).consecutiveCritsDamage; } if (critMultiplier > 1.1f) { if (GunExtension.GetAdditionalData(gun).CritSlow > 0f) { ProjectileHit obj8 = bullet; obj8.movementSlow += GunExtension.GetAdditionalData(gun).CritSlow * critMultiplier; } if (GunExtension.GetAdditionalData(gun).criticalBulletSpeed > 1f) { MoveTransform obj9 = move; obj9.localForce *= GunExtension.GetAdditionalData(gun).criticalBulletSpeed * critMultiplier; } if (GunExtension.GetAdditionalData(gun).criticalSimulationSpeed > 1f) { typeof(MoveTransform).GetField("simulationSpeed", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetField).SetValue(move, GunExtension.GetAdditionalData(gun).criticalSimulationSpeed * critMultiplier); } } else { ProjectileHit obj10 = bullet; obj10.movementSlow += GunExtension.GetAdditionalData(gun).CritSlow; MoveTransform obj11 = move; obj11.localForce *= GunExtension.GetAdditionalData(gun).criticalBulletSpeed; typeof(MoveTransform).GetField("simulationSpeed", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetField).SetValue(move, GunExtension.GetAdditionalData(gun).criticalSimulationSpeed); } if (GunExtension.GetAdditionalData(gun).criticalHeal > 0f) { healthHandler.Heal(GunExtension.GetAdditionalData(gun).criticalHeal); } if (GunExtension.GetAdditionalData(gun).criticalBlockCDReduction > 0f) { Block block = player.data.block; block.counter += GunExtension.GetAdditionalData(gun).criticalBlockCDReduction; } if (PhotonNetwork.IsMasterClient) { if (!GunExtension.GetAdditionalData(gun).guranteedCrits && GunExtension.GetAdditionalData(gun).BlockingCrits && GunExtension.GetAdditionalData(gun).criticalHitChance1 <= 1f && shoots <= 0) { player.data.block.CallDoBlock(false, true, (BlockTriggerType)0, default(Vector3), true); shoots = 5 + (gun.numberOfProjectiles - 1) + (gun.bursts - 1); } else if (!GunExtension.GetAdditionalData(gun).guranteedCrits && GunExtension.GetAdditionalData(gun).BlockingCrits && isDoubleCrit && shoots <= 0) { player.data.block.CallDoBlock(false, true, (BlockTriggerType)0, default(Vector3), true); shoots = 5 + (gun.numberOfProjectiles - 1) + (gun.bursts - 1); } } } else if (GunExtension.GetAdditionalData(gun).consecutiveCrits) { consecutiveCritDamage = 0f; } }); } public void OnDestroy() { isCriticalHit = false; consecutiveCritDamage = 0f; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); } } public class AcceleratedRejuvenationMono : ReversibleEffect { public override void OnStart() { base.healthHandlerModifier.regen_add = Mathf.Abs(base.player.data.stats.movementSpeed * 3f); ((ReversibleEffect)this).ApplyModifiers(); } public override void OnUpdate() { base.healthHandlerModifier.regen_add = Mathf.Abs(base.player.data.stats.movementSpeed * 3f); ((ReversibleEffect)this).ApplyModifiers(); } public override void OnOnDisable() { ((ReversibleEffect)this).ClearModifiers(true); ((ReversibleEffect)this).Destroy(); } public override void OnOnDestroy() { ((ReversibleEffect)this).ClearModifiers(true); ((ReversibleEffect)this).OnOnDestroy(); } } public class BoostedBlockMono : ReversibleEffect { public override void OnStart() { base.blockModifier.cdMultiplier_mult = Mathf.Clamp(1f / (Mathf.Abs(base.player.data.stats.movementSpeed) / 3f), 0.2f, 1.25f); ((ReversibleEffect)this).ApplyModifiers(); } public override void OnUpdate() { base.blockModifier.cdMultiplier_mult = Mathf.Clamp(1f / (Mathf.Abs(base.player.data.stats.movementSpeed) / 3f), 0.2f, 1.25f); ((ReversibleEffect)this).ApplyModifiers(); } public override void OnOnDisable() { ((ReversibleEffect)this).ClearModifiers(true); ((ReversibleEffect)this).Destroy(); } public override void OnOnDestroy() { ((ReversibleEffect)this).ClearModifiers(true); ((ReversibleEffect)this).OnOnDestroy(); } } public class WarpathMono : MonoBehaviour { private CharacterData data; private Player player; private Block block; private WeaponHandler weaponHandler; private Gun gun; private void Start() { data = ((Component)this).gameObject.GetComponentInParent<CharacterData>(); } private void Update() { if (!Object.op_Implicit((Object)(object)player) && data != null) { player = data.player; block = data.block; weaponHandler = data.weaponHandler; gun = weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); } } private void OnShootProjectileAction(GameObject obj) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) Vector2 val = (Vector2)ExtensionMethods.GetFieldValue((object)data.playerVel, "velocity"); Vector2 val2 = Vector2.op_Implicit(data.input.aimDirection); float num = Vector2.Angle(((Vector2)(ref val)).normalized, ((Vector2)(ref val2)).normalized); float num2 = (90f - num) / 90f; float num3 = ((Vector2)(ref val)).magnitude / 17f; ProjectileHit component = obj.GetComponent<ProjectileHit>(); component.damage *= num3 + num2 * num3; } private void OnDestroy() { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); } } public class SpeedstersGunMono : MonoBehaviour { private CharacterData data; private Player player; private Block block; private WeaponHandler weaponHandler; private Gun gun; private void Start() { data = ((Component)this).gameObject.GetComponentInParent<CharacterData>(); } private void Update() { if (!Object.op_Implicit((Object)(object)player) && data != null) { player = data.player; block = data.block; weaponHandler = data.weaponHandler; gun = weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); } } private void OnShootProjectileAction(GameObject obj) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) MoveTransform move = obj.GetComponentInChildren<MoveTransform>(); Vector2 val = (Vector2)ExtensionMethods.GetFieldValue((object)data.playerVel, "velocity"); ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsClasses.Instance, 1, (Action)delegate { //IL_0008: 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) //IL_0036: Unknown result type (might be due to invalid IL or missing references) MoveTransform obj2 = move; obj2.velocity += Vector2.op_Implicit((Vector2)ExtensionMethods.GetFieldValue((object)data.playerVel, "velocity")); }); } private void OnDestroy() { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); } } public class SpeedyHandsMono : ReversibleEffect { public override void OnStart() { base.gunAmmoStatModifier.reloadTimeMultiplier_mult = 1f / (Mathf.Abs(base.player.data.stats.movementSpeed) / 2f) * 0.3f * 3f; ((ReversibleEffect)this).ApplyModifiers(); } public override void OnUpdate() { base.gunAmmoStatModifier.reloadTimeMultiplier_mult = 1f / (Mathf.Abs(base.player.data.stats.movementSpeed) / 2f) * 0.3f * 3f; ((ReversibleEffect)this).ApplyModifiers(); } public override void OnOnDisable() { ((ReversibleEffect)this).ClearModifiers(true); ((ReversibleEffect)this).Destroy(); } public override void OnOnDestroy() { ((ReversibleEffect)this).ClearModifiers(true); ((ReversibleEffect)this).OnOnDestroy(); } } internal class TimeBombMono : MonoBehaviour { private Player player; private PlayerTimeScale timeScale; public void Start() { player = ((Component)this).GetComponentInParent<Player>(); timeScale = PlayerExtension.ApplyTimeScale(player, 1.75f); } public void OnDestroy() { Object.Destroy((Object)(object)timeScale); } } internal class TimeWarpMono : MonoBehaviour { private Player player; private PlayerTimeScale timeScale; public void Start() { //IL_0045: 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_00a4: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent<Player>(); timeScale = PlayerExtension.ApplyTimeScale(player, 0.75f); ((Component)this).GetComponent<TrailRenderer>().time = 0.25f; ((Component)this).GetComponent<TrailRenderer>().startColor = player.GetTeamColors().color / 2f; ((Component)this).GetComponent<TrailRenderer>().endColor = new Color(player.GetTeamColors().color.r, player.GetTeamColors().color.g, player.GetTeamColors().color.b, 0f); } public void OnDestroy() { Object.Destroy((Object)(object)timeScale); } } public class TriggerFingerMono : ReversibleEffect { public override void OnStart() { base.gunStatModifier.attackSpeed_mult = 1f / (Mathf.Abs(base.player.data.stats.movementSpeed) / 2.5f) * 0.5f * 1.5f; ((ReversibleEffect)this).ApplyModifiers(); } public override void OnUpdate() { base.gunStatModifier.attackSpeed_mult = 1f / (Mathf.Abs(base.player.data.stats.movementSpeed) / 2.5f) * 0.5f * 1.5f; ((ReversibleEffect)this).ApplyModifiers(); } public override void OnOnDisable() { ((ReversibleEffect)this).ClearModifiers(true); ((ReversibleEffect)this).Destroy(); } public override void OnOnDestroy() { ((ReversibleEffect)this).ClearModifiers(true); ((ReversibleEffect)this).OnOnDestroy(); } } internal class StoneSkinEffect : MonoBehaviour { internal Player player; internal Gun gun; internal GunAmmo gunAmmo; internal Gravity gravity; internal HealthHandler health; internal CharacterData data; internal Block block; private Vector2 lastPosition; private float timePass = 0f; private int secondCount = 0; private Vector2 damageAmount = Vector2.right; public float healRatio = 0.1f; private void Start() { data = ((Component)this).GetComponentInParent<CharacterData>(); HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(ResetStuff)); } private void OnDestroy() { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(ResetStuff)); } public void Awake() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).gameObject.GetComponent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); data = ((Component)player).GetComponent<CharacterData>(); health = ((Component)player).GetComponent<HealthHandler>(); gravity = ((Component)player).GetComponent<Gravity>(); block = ((Component)player).GetComponent<Block>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); lastPosition = data.playerVel.position; } private void Update() { //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_0028: 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_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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) if (data.input.direction == Vector3.zero || data.input.direction == Vector3.down || (data.input.direction == Vector3.up && PlayerStatus.PlayerAliveAndSimulated(player))) { timePass += TimeHandler.deltaTime; if (timePass > 0.5f) { player.data.healthHandler.DoDamage(damageAmount * (1.5f + (float)Math.Pow(secondCount, 1.100000023841858)), Vector2.down, Color.grey, (GameObject)null, (Player)null, false, true, true); if (data.health <= 0f) { secondCount = 0; } timePass = 0f; secondCount++; } } else { timePass = 0f; secondCount = 0; } if (data.health <= 0f) { secondCount = 0; timePass = 0f; } } private void ResetStuff() { timePass = 0f; } public void Destroy() { Object.Destroy((Object)(object)this); } } } namespace CPCClasses.Cards { internal class AncientClass : ClassHandler { [CompilerGenerated] private sealed class <Init>d__1 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AncientClass <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Init>d__1(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)CursedTablet.Card) || !Object.op_Implicit((Object)(object)UndeadTome.Card) || !Object.op_Implicit((Object)(object)StoneSkin.Card) || !Object.op_Implicit((Object)(object)ReducingDamage.Card) || !Object.op_Implicit((Object)(object)InvasiveThorns.Card) || !Object.op_Implicit((Object)(object)FleshFragments.Card) || !Object.op_Implicit((Object)(object)ThornFiend.Card)) { <>2__current = null; <>1__state = 1; return true; } ClassesRegistry.Register(CursedTablet.Card, (CardType)1, 0); ClassesRegistry.Register(UndeadTome.Card, (CardType)16, CursedTablet.Card, 0); ClassesRegistry.Register(StoneSkin.Card, (CardType)16, CursedTablet.Card, 0); ClassesRegistry.Register(ReducingDamage.Card, (CardType)16, CursedTablet.Card, 0); ClassesRegistry.Register(InvasiveThorns.Card, (CardType)8, CursedTablet.Card, 2); ClassesRegistry.Register(FleshFragments.Card, (CardType)16, CursedTablet.Card, 0); ClassesRegistry.Register(ThornFiend.Card, (CardType)16, InvasiveThorns.Card, 0); 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 <PostInit>d__2 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AncientClass <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PostInit>d__2(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 = "Ancient"; [IteratorStateMachine(typeof(<Init>d__1))] public override IEnumerator Init() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Init>d__1(0) { <>4__this = this }; } [IteratorStateMachine(typeof(<PostInit>d__2))] public override IEnumerator PostInit() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PostInit>d__2(0) { <>4__this = this }; } } internal class CursedTablet : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 0.75f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCClasses][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}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Ancient tablet"; } protected override string GetDescription() { return "When you get near this tablet it sticks onto your skin, you feel stronger but at what cost"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_CursedTablet"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false); } 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 = false, stat = "Health", amount = "-25%", 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("Ancient Pumpkin Orange", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class FleshFragments : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCClasses][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.damageMult += 0.25f; CharacterStatModifiersExtension.GetAdditionalData(characterStats).damagingBullet = true; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Flesh Fragments"; } protected override string GetDescription() { return "Whenever you get hit you release bits of your flesh as projectiles"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_FleshFragments"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AncientClass.name; } 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 = false, stat = "Damage Taken", amount = "+25%", 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("Ancient Pumpkin Orange", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class InvasiveThorns : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.15f; CPCDebug.Log((object)("[CPCClasses][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.slowThorns += 0.25f; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Slowing Thorns"; } protected override string GetDescription() { return "You grow thorns that slow down anyone who dares damage you"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_InvasiveThorns"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AncientClass.name; } 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 = "Slow Thorns", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", 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("Ancient Pumpkin Orange", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class ReducingDamage : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][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) { CharacterStatModifiersExtension.GetAdditionalData(characterStats).reducingDmg = true; CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStats); additionalData.damageMultMax += 1.5f; CharacterStatModifiersAdditionalData additionalData2 = CharacterStatModifiersExtension.GetAdditionalData(characterStats); additionalData2.reducingDmgAmt += 0.1f; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Reducing Damage"; } protected override string GetDescription() { return "Your bullets now start with more damage <b><color=#FF0000>but every time they hit someone the damage reduces</b></color> (resets on round end)"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_ReducingDamage"); } 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"); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AncientClass.name; } 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 = "Initial Damage Multiplier", amount = "+150%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reducing Damage", amount = "+10%", 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("Ancient Pumpkin Orange", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class StoneSkin : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCClasses][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) { if (CharacterStatModifiersExtension.GetAdditionalData(characterStats).damageReductionFlat < 0.5f) { CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStats); additionalData.damageReductionFlat += 0.5f; } ((Component)player).gameObject.AddComponent<StoneSkinEffect>(); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((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) { StoneSkinEffect orAddComponent = ExtensionMethods.GetOrAddComponent<StoneSkinEffect>(((Component)player).gameObject, false); Object.Destroy((Object)(object)orAddComponent); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Stone Skin"; } protected override string GetDescription() { return "Your skin becomes stone, <i>a hard stone</i>, try not to stay still"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_StoneSkin"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AncientClass.name; } 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 = "Damage Reduction", amount = "+50%", 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("Ancient Pumpkin Orange", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class ThornFiend : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 0.85f; statModifiers.health = 0.75f; statModifiers.movementSpeed = 0.75f; gun.reloadTime = 1.25f; gun.attackSpeed = 1.25f; CPCDebug.Log((object)("[CPCClasses][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.slowThorns += 1f; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Freezing Cold Blood"; } protected override string GetDescription() { return "The cold thorns grew all over your body, becoming stronger but slowing you down and making you weaker"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_ThornFiend"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AncientClass.name; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[6] { new CardInfoStat { positive = true, stat = "Slow Thorns", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Attack Cooldown", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movement Speed", amount = "-25%", 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("Ancient Pumpkin Orange", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class UndeadTome : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 3.5f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCClasses][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) { CharacterStatModifiersExtension.GetAdditionalData(characterStats).healDmg = true; CharacterStatModifiersExtension.GetAdditionalData(characterStats).healDmgPercent = 0.5f; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Undead Tome"; } protected override string GetDescription() { return "You become a undead, you can take a lot more hits but <b><color=#FF0000> Healing now hurts you </color></b>"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_UndeadTome"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AncientClass.name; } 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 = "+250%", 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("Ancient Pumpkin Orange", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class AcceleratedRejuvenation : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 1.25f; cardInfo.allowMultiple = false; } 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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); CharacterStatModifiersExtension.GetAdditionalData(characterStats).acceleratedRejuvenation = true; } 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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = SpeedClass.name; } protected override string GetTitle() { return "Accelerated Rejuvenation"; } protected override string GetDescription() { return "Your muscle fibers regenerate more as you move (you have to move for the buff to apply)"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_TriggerFinger"); } 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 return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+25%", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class AirHops : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.numberOfJumps = 5; } 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}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = SpeedClass.name; } protected override string GetTitle() { return "Air Hops"; } protected override string GetDescription() { return "Your fast enough that you can jump mid air a few times"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_AirHop"); } 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 return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Jumps", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class BoostedBlock : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 1.25f; cardInfo.allowMultiple = false; } 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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); CharacterStatModifiersExtension.GetAdditionalData(characterStats).boostedBlock = true; } 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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = SpeedClass.name; } protected override string GetTitle() { return "Boosted Block"; } protected override string GetDescription() { return "Your block now regenerates faster as you move (you have to move for the buff to apply)"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_BoostedBlock"); } 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("Mythical"); } 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 = "Movement Speed", amount = "+25%", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class LegDay : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 2f; cardInfo.allowMultiple = false; } 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}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = SpeedClass.name; } protected override string GetTitle() { return "Leg Day"; } protected override string GetDescription() { return "You trained hard on leg day, you now move faster"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_LegDay"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+100%", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class MomentumShots : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 1.25f; cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); GameObject val = new GameObject("A_Warpath"); val.AddComponent<WarpathMono>(); val.transform.parent = ((Component)player).transform; player.data.stats.objectsAddedToPlayer.Add(val); } 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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = SpeedClass.name; } protected override string GetTitle() { return "Momentum Shots"; } protected override string GetDescription() { return "Your speed adds power into your bullets, they now become stronger if you move in the same direction you shoot them"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_MomentumShots"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+25%", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class NitroBoost : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); gun.damage = 2f; statModifiers.health = 2.5f; statModifiers.lifeSteal = 0.5f; statModifiers.regen = 6f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (CharacterStatModifiersExtension.GetAdditionalData(characterStats).forcedMoveEnabled) { characterStats.movementSpeed *= 4f; } CharacterStatModifiersExtension.GetAdditionalData(characterStats).forcedMoveEnabled = true; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = SpeedClass.name; } protected override string GetTitle() { return "Nitro Boost"; } protected override string GetDescription() { return "Your strong legs give you benefits in all your stats, just be careful of the jet engine"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_NitroBoost"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[6] { new CardInfoStat { positive = true, stat = "Health", amount = "+150%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Life Steal", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Regen", amount = "+6", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Stop", amount = "Cant", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Stop", amount = "Wont", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class SpeedClass : ClassHandler { [CompilerGenerated] private sealed class <Init>d__2 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SpeedClass <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Init>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; plugins = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); Debug.Log((object)("Regestering: " + name)); break; case 1: <>1__state = -1; break; } if (!Object.op_Implicit((Object)(object)SpeedDemon.Card) || !Object.op_Implicit((Object)(object)MomentumShots.Card) || !Object.op_Implicit((Object)(object)SpeedyHands.Card) || !Object.op_Implicit((Object)(object)TriggerFinger.Card) || !Object.op_Implicit((Object)(object)Swifter.Card) || !Object.op_Implicit((Object)(object)Stretches.Card) || !Object.op_Implicit((Object)(object)LegDay.Card) || !Object.op_Implicit((Object)(object)SpeedstersGun.Card) || !Object.op_Implicit((Object)(object)AirHops.Card) || !Object.op_Implicit((Object)(object)NitroBoost.Card) || !Object.op_Implicit((Object)(object)BoostedBlock.Card) || !Object.op_Implicit((Object)(object)AcceleratedRejuvenation.Card)) { <>2__current = null; <>1__state = 1; return true; } ClassesRegistry.Register(SpeedDemon.Card, (CardType)1, 0); ClassesRegistry.Register(MomentumShots.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(SpeedyHands.Card, (CardType)16, SpeedDemon.Card, 0); if (plugins.Exists((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "com.Poppycars.CPCCharacters.Id")) { ClassesRegistry.Register(Cards.instance.GetCardWithObjectName("__CPC__Tricky"), (CardType)16, SpeedDemon.Card, 0); } ClassesRegistry.Register(TriggerFinger.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(Swifter.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(Stretches.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(LegDay.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(SpeedstersGun.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(AirHops.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(NitroBoost.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(BoostedBlock.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(TimeWarp.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(TimeBomb.Card, (CardType)16, SpeedDemon.Card, 0); ClassesRegistry.Register(AcceleratedRejuvenation.Card, (CardType)16, SpeedDemon.Card, 0); 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 <PostInit>d__3 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SpeedClass <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PostInit>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; ClassesRegistry.Get(SpeedyHands.Card).Blacklist(TriggerFinger.Card); ClassesRegistry.Get(TriggerFinger.Card).Blacklist(SpeedyHands.Card); 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 = "Speedrunner"; internal static List<BaseUnityPlugin> plugins; [IteratorStateMachine(typeof(<Init>d__2))] public override IEnumerator Init() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Init>d__2(0) { <>4__this = this }; } [IteratorStateMachine(typeof(<PostInit>d__3))] public override IEnumerator PostInit() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PostInit>d__3(0) { <>4__this = this }; } } internal class SpeedDemon : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 1.5f; statModifiers.health = 0.75f; cardInfo.allowMultiple = false; } 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}.", "CPCClasses", ((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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false); } protected override string GetTitle() { return "Speedrunner"; } protected override string GetDescription() { return "SPEEEEEEEEEED IS KEEEEEEEEY"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_Speedster"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-25%", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class SpeedstersGun : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 1.25f; cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); GameObject val = new GameObject("A_SpeedstersGun"); val.AddComponent<SpeedstersGunMono>(); val.transform.parent = ((Component)player).transform; player.data.stats.objectsAddedToPlayer.Add(val); } 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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = SpeedClass.name; } protected override string GetTitle() { return "Speedsters Gun"; } protected override string GetDescription() { return "You adjusted your gun now your bullets will inherit your momentum"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_SpeedstersGun"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+25%", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class SpeedyHands : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCClasses][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); statModifiers.movementSpeed = 1.25f; cardInfo.allowMultiple = false; } 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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); CharacterStatModifiersExtension.GetAdditionalData(characterStats).speedyHands = true; } 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}.", "CPCClasses", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = SpeedClass.name; } protected override string GetTitle() { return "Speedy Hands"; } protected override string GetDescription() { return "Your hands become faster as you get faster letting you reload quicker (you have to move for the buff to apply)"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsClasses.Bundle.LoadAsset<GameObject>("C_SpeedyHands"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+25%", 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("Evergreen", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class Stretc