Decompiled source of PotatoCards v0.1.30
PotatoCards.dll
Decompiled 2 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 BepInEx; using BepInEx.Logging; using ClassesManagerReborn; using ClassesManagerReborn.Util; using Microsoft.CodeAnalysis; using ModdingUtils.MonoBehaviours; using ModdingUtils.Utils; using PotatoCards.Cards; using PotatoCards.Hooks; using PotatoCards.Managers; using UnboundLib.Cards; using UnboundLib.GameModes; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PotatoCards")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+559edc41737fbf5e6934e053be6d65c6bafb0b89")] [assembly: AssemblyProduct("PotatoCards")] [assembly: AssemblyTitle("PotatoCards")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace PotatoCards { internal static class CardManager { private static readonly ManualLogSource Logger = Logger.CreateLogSource("CardManager"); internal static void RegisterCards(ManualLogSource logger) { logger.LogInfo((object)"Registering PotatoCards..."); int registered = 0; int failed = 0; RegisterCard<TheNoob>(logger, ref registered, ref failed); RegisterCard<SKRT>(logger, ref registered, ref failed); RegisterCard<BetterBuckshot>(logger, ref registered, ref failed); RegisterCard<HealthPack>(logger, ref registered, ref failed); RegisterCard<FastFingers>(logger, ref registered, ref failed); RegisterCard<SpeedReload>(logger, ref registered, ref failed); RegisterCard<Deadeye>(logger, ref registered, ref failed); RegisterCard<ADHD>(logger, ref registered, ref failed); RegisterCard<Recoil>(logger, ref registered, ref failed); RegisterCard<Reflexes>(logger, ref registered, ref failed); RegisterCard<SpeedStrength>(logger, ref registered, ref failed); RegisterCard<StrengthSpeed>(logger, ref registered, ref failed); RegisterCard<Specs>(logger, ref registered, ref failed); RegisterCard<UnmovableObject>(logger, ref registered, ref failed); RegisterCard<MosquitoBites>(logger, ref registered, ref failed); RegisterCard<UltimateTank>(logger, ref registered, ref failed); RegisterCard<HeavyHitter>(logger, ref registered, ref failed); RegisterCard<PiercingShot>(logger, ref registered, ref failed); RegisterCard<StickyBullets>(logger, ref registered, ref failed); RegisterCard<BouncingBetty>(logger, ref registered, ref failed); RegisterCard<AerodynamicBullets>(logger, ref registered, ref failed); RegisterCard<DeusExMachina>(logger, ref registered, ref failed); RegisterCard<DevilsContract>(logger, ref registered, ref failed); RegisterCard<Thief>(logger, ref registered, ref failed); RegisterCard<Amnesia>(logger, ref registered, ref failed); RegisterCard<TrueMayhem>(logger, ref registered, ref failed); RegisterCard<Slowmode>(logger, ref registered, ref failed); RegisterCard<BetterNotMiss>(logger, ref registered, ref failed); RegisterCard<LEBRONNNN>(logger, ref registered, ref failed); RegisterCard<BiggerBullet>(logger, ref registered, ref failed); RegisterCard<GAMBLING>(logger, ref registered, ref failed); RegisterCard<GambitCard>(logger, ref registered, ref failed); RegisterCard<UltimateDisc>(logger, ref registered, ref failed); RegisterCard<MinigunCard>(logger, ref registered, ref failed); RegisterCard<Toto>(logger, ref registered, ref failed); RegisterCard<Purist>(logger, ref registered, ref failed); RegisterCard<Reroll>(logger, ref registered, ref failed); RegisterCard<VoidAmulet>(logger, ref registered, ref failed); RegisterCard<Refactor>(logger, ref registered, ref failed); RegisterCard<DiceRoll>(logger, ref registered, ref failed); RegisterCard<ByAThread>(logger, ref registered, ref failed); RegisterCard<FiftyFifty>(logger, ref registered, ref failed); RegisterCard<Hitman>(logger, ref registered, ref failed); RegisterCard<Rebound>(logger, ref registered, ref failed); RegisterCard<Reshuffle>(logger, ref registered, ref failed); RegisterCard<PerfectlyBalanced>(logger, ref registered, ref failed); RegisterCard<Adrenaline>(logger, ref registered, ref failed); RegisterCard<GetParried>(logger, ref registered, ref failed); RegisterCard<Tequila>(logger, ref registered, ref failed); RegisterCard<HotFeet>(logger, ref registered, ref failed); RegisterCard<Boomerang>(logger, ref registered, ref failed); RegisterCard<DyingWill>(logger, ref registered, ref failed); RegisterCard<BlockBuild>(logger, ref registered, ref failed); RegisterCard<Kaboom>(logger, ref registered, ref failed); RegisterCard<Sacrifice>(logger, ref registered, ref failed); RegisterCard<FeatherweightBullets>(logger, ref registered, ref failed); RegisterCard<Stoneface>(logger, ref registered, ref failed); RegisterCard<DraconicBlood>(logger, ref registered, ref failed); RegisterCard<DraconicScales>(logger, ref registered, ref failed); RegisterCard<DraconicWings>(logger, ref registered, ref failed); RegisterCard<Laser>(logger, ref registered, ref failed); RegisterCard<DiesIrae>(logger, ref registered, ref failed); RegisterCard<BlackholeBullets>(logger, ref registered, ref failed); RegisterCard<Bide>(logger, ref registered, ref failed); RegisterCard<BlackPlague>(logger, ref registered, ref failed); RegisterCard<Soulbind>(logger, ref registered, ref failed); RegisterCard<Chaos>(logger, ref registered, ref failed); RegisterCard<Bazooka>(logger, ref registered, ref failed); RegisterCard<Sword>(logger, ref registered, ref failed); RegisterCard<Shrink>(logger, ref registered, ref failed); RegisterCard<Phantom>(logger, ref registered, ref failed); RegisterCard<LetsGoGambling>(logger, ref registered, ref failed); RegisterCard<Cyborg>(logger, ref registered, ref failed); RegisterCard<Risk>(logger, ref registered, ref failed); RegisterCard<Portal>(logger, ref registered, ref failed); RegisterCard<Rougelike>(logger, ref registered, ref failed); RegisterCard<ShaperShots>(logger, ref registered, ref failed); RegisterCard<Slowpoke>(logger, ref registered, ref failed); RegisterCard<Snorlax>(logger, ref registered, ref failed); RegisterCard<Trackstar>(logger, ref registered, ref failed); RegisterCard<Blockload>(logger, ref registered, ref failed); RegisterCard<Rampage>(logger, ref registered, ref failed); RegisterCard<RadiationPoisoning>(logger, ref registered, ref failed); RegisterCard<StringShot>(logger, ref registered, ref failed); RegisterCard<BouncyCastle>(logger, ref registered, ref failed); RegisterCard<Jetpack>(logger, ref registered, ref failed); RegisterCard<Abra>(logger, ref registered, ref failed); RegisterCard<OnePunchMan>(logger, ref registered, ref failed); RegisterCard<TeamPlayer>(logger, ref registered, ref failed); RegisterCard<Hellscape>(logger, ref registered, ref failed); RegisterCard<Pocketwatch>(logger, ref registered, ref failed); RegisterCard<Doppleganger>(logger, ref registered, ref failed); RegisterCard<Jolteon>(logger, ref registered, ref failed); RegisterCard<Dragonite>(logger, ref registered, ref failed); RegisterCard<Hittmonlee>(logger, ref registered, ref failed); RegisterCard<Electrode>(logger, ref registered, ref failed); RegisterCard<Kabutops>(logger, ref registered, ref failed); RegisterCard<Muk>(logger, ref registered, ref failed); logger.LogInfo((object)$"Card registration complete: {registered} successful, {failed} failed."); } private static void RegisterCard<T>(ManualLogSource logger, ref int registered, ref int failed) where T : CustomCard { try { CustomCard.BuildCard<T>(); logger.LogDebug((object)("Successfully registered card: " + typeof(T).Name)); registered++; } catch (Exception arg) { logger.LogError((object)$"Failed to register card {typeof(T).Name}: {arg}"); failed++; } } } [BepInPlugin("com.modpotato.rounds.PotatoCards", "Potato Cards", "0.1.30")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { private void Awake() { RegisterCards(); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Potato Cards v" + VersionInfo.FullVersion + " loaded successfully")); } private void RegisterCards() { CardManager.RegisterCards(((BaseUnityPlugin)this).Logger); } } public static class VersionInfo { public const string ModId = "com.modpotato.rounds.PotatoCards"; public const string ModName = "Potato Cards"; public const string Version = "0.1.30"; public static string FullVersion => "0.1.30"; public static string ManifestVersion => "0.1.30"; } } namespace PotatoCards.Managers { public static class CardFilters { public static readonly HashSet<string> UnsafeCardNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "Devil's Contract", "Dice Roll", "Refactor", "Rougelike", "GAMBLING!", "Reroll", "Risk", "50/50", "Rebound", "Hitman", "Let's Go Gambling", "Thief", "Doppleganger" }; public static string[] SafeCardNames => (from c in Cards.all.Where(IsSafe) select c.cardName).ToArray(); public static bool IsSafe(CardInfo card) { if ((Object)(object)card != (Object)null) { return !UnsafeCardNames.Contains(card.cardName); } return false; } } } namespace PotatoCards.Hooks { public abstract class CardEffect : MonoBehaviour { [CompilerGenerated] private sealed class <OnRoundEnd>d__48 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnRoundEnd>d__48(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(); } } [CompilerGenerated] private sealed class <OnRoundEndInternal>d__41 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public CardEffect <>4__this; public IGameModeHandler h; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnRoundEndInternal>d__41(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { int num = <>1__state; CardEffect cardEffect = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = cardEffect.OnRoundEnd(h); <>1__state = 1; return true; case 1: <>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(); } } [CompilerGenerated] private sealed class <OnRoundStart>d__47 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnRoundStart>d__47(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(); } } [CompilerGenerated] private sealed class <OnRoundStartInternal>d__40 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public CardEffect <>4__this; public IGameModeHandler h; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnRoundStartInternal>d__40(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { int num = <>1__state; CardEffect cardEffect = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = cardEffect.OnRoundStart(h); <>1__state = 1; return true; case 1: <>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(); } } protected Player player { get; private set; } protected Gun gun { get; private set; } protected GunAmmo gunAmmo { get; private set; } protected CharacterData data { get; private set; } protected HealthHandler health { get; private set; } protected Gravity gravity { get; private set; } protected Block block { get; private set; } protected CharacterStatModifiers characterStats { get; private set; } public virtual void Initialize(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { this.player = player; this.gun = gun; this.gunAmmo = gunAmmo; this.data = data; this.health = health; this.gravity = gravity; this.block = block; this.characterStats = characterStats; } protected virtual void Start() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootInternal)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj2.BlockAction, new Action<BlockTriggerType>(OnBlockInternal)); Block obj3 = block; obj3.BlockRechargeAction = (Action)Delegate.Combine(obj3.BlockRechargeAction, new Action(OnBlockRechargeInternal)); } if ((Object)(object)characterStats != (Object)null) { CharacterStatModifiers obj4 = characterStats; obj4.DealtDamageAction = (Action<Vector2, bool>)Delegate.Combine(obj4.DealtDamageAction, new Action<Vector2, bool>(OnDealtDamageInternal)); CharacterStatModifiers obj5 = characterStats; obj5.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Combine(obj5.WasDealtDamageAction, new Action<Vector2, bool>(OnTakeDamageInternal)); } GameModeManager.AddHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)OnRoundStartInternal); GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)OnRoundEndInternal); } protected virtual void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootInternal)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj2.BlockAction, new Action<BlockTriggerType>(OnBlockInternal)); Block obj3 = block; obj3.BlockRechargeAction = (Action)Delegate.Remove(obj3.BlockRechargeAction, new Action(OnBlockRechargeInternal)); } if ((Object)(object)characterStats != (Object)null) { CharacterStatModifiers obj4 = characterStats; obj4.DealtDamageAction = (Action<Vector2, bool>)Delegate.Remove(obj4.DealtDamageAction, new Action<Vector2, bool>(OnDealtDamageInternal)); CharacterStatModifiers obj5 = characterStats; obj5.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Remove(obj5.WasDealtDamageAction, new Action<Vector2, bool>(OnTakeDamageInternal)); } GameModeManager.RemoveHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)OnRoundStartInternal); GameModeManager.RemoveHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)OnRoundEndInternal); } private void OnShootInternal(GameObject projectile) { OnShoot(projectile); } private void OnBlockInternal(BlockTriggerType t) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) OnBlock(t); } private void OnBlockRechargeInternal() { OnBlockRecharge(); } private void OnDealtDamageInternal(Vector2 dmg, bool self) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) OnDealtDamage(dmg, self); } private void OnTakeDamageInternal(Vector2 dmg, bool self) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) OnTakeDamage(dmg, self); } [IteratorStateMachine(typeof(<OnRoundStartInternal>d__40))] private IEnumerator OnRoundStartInternal(IGameModeHandler h) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnRoundStartInternal>d__40(0) { <>4__this = this, h = h }; } [IteratorStateMachine(typeof(<OnRoundEndInternal>d__41))] private IEnumerator OnRoundEndInternal(IGameModeHandler h) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnRoundEndInternal>d__41(0) { <>4__this = this, h = h }; } public virtual void OnShoot(GameObject projectile) { } public virtual void OnBlock(BlockTriggerType t) { } public virtual void OnBlockRecharge() { } public virtual void OnDealtDamage(Vector2 damage, bool selfDamage) { } public virtual void OnTakeDamage(Vector2 damage, bool selfDamage) { } [IteratorStateMachine(typeof(<OnRoundStart>d__47))] public virtual IEnumerator OnRoundStart(IGameModeHandler _) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnRoundStart>d__47(0); } [IteratorStateMachine(typeof(<OnRoundEnd>d__48))] public virtual IEnumerator OnRoundEnd(IGameModeHandler _) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnRoundEnd>d__48(0); } } public class PlayerHook : CardEffect { protected virtual void Awake() { Player componentInParent = ((Component)this).GetComponentInParent<Player>(); if (!((Object)(object)componentInParent == (Object)null)) { CharacterData val = componentInParent.data; Gun val2 = val.weaponHandler?.gun; GunAmmo val3 = (((Object)(object)val2 != (Object)null) ? ((Component)val2).GetComponentInChildren<GunAmmo>() : null); HealthHandler healthHandler = val.healthHandler; Gravity componentInChildren = ((Component)componentInParent).GetComponentInChildren<Gravity>(); Block val4 = val.block; CharacterStatModifiers stats = val.stats; Initialize(componentInParent, val2, val3, val, healthHandler, componentInChildren, val4, stats); } } } } namespace PotatoCards.Classes { public class DraconicClass : ClassHandler { [CompilerGenerated] private sealed class <Init>d__1 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; 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() { if (<>1__state != 0) { return false; } <>1__state = -1; Debug.Log("Registering CMR class: " + name); 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 = "Dragon"; [IteratorStateMachine(typeof(<Init>d__1))] public override IEnumerator Init() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Init>d__1(0); } } public class PuristClass : ClassHandler { [CompilerGenerated] private sealed class <Init>d__1 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; 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("Registering CMR class: " + name); break; case 1: <>1__state = -1; break; } if (!Object.op_Implicit((Object)(object)Purist.Card)) { <>2__current = null; <>1__state = 1; return true; } ClassesRegistry.Register(Purist.Card, (CardType)1, 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(); } } internal static string name = "Purist"; [IteratorStateMachine(typeof(<Init>d__1))] public override IEnumerator Init() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Init>d__1(0); } } } namespace PotatoCards.Cards { public class Abra : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Abra"; cardInfo.cardDestription = "Block teleports: forward twice, back once"; cardInfo.rarity = (Rarity)1; cardInfo.allowMultiple = false; } protected override string GetTitle() { return "Abra"; } protected override string GetDescription() { return "Block teleports: forward twice, back once"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)8; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent<AbraEffect>().Initialize(player, gun, gunAmmo, data, health, gravity, block, characterStats); } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Block Teleport", amount = "Forward x2, Back x1", simepleAmount = (SimpleAmount)2 } }; } } public class AbraEffect : CardEffect { [CompilerGenerated] private sealed class <TeleportSequence>d__2 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AbraEffect <>4__this; private int <i>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <TeleportSequence>d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; AbraEffect abraEffect = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; _ = ((Component)abraEffect.player).transform.position; <i>5__2 = 0; break; case 1: <>1__state = -1; <i>5__2++; break; } if (<i>5__2 < 2) { Vector3 position = ((Component)abraEffect.player).transform.position + Vector3.right * 5f; ((Component)abraEffect.player).transform.position = position; <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 1; return true; } Vector3 position2 = ((Component)abraEffect.player).transform.position - Vector3.right * 5f; ((Component)abraEffect.player).transform.position = position2; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float TeleportDistance = 5f; public override void OnBlock(BlockTriggerType blockTriggerType) { ((MonoBehaviour)this).StartCoroutine(TeleportSequence()); } [IteratorStateMachine(typeof(<TeleportSequence>d__2))] private IEnumerator TeleportSequence() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <TeleportSequence>d__2(0) { <>4__this = this }; } } public class ADHD : PotatoCardBase { private class ADHDMono : MonoBehaviour { [CompilerGenerated] private sealed class <RemoveDazzleAfterDelay>d__7 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public ADHDMono <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <RemoveDazzleAfterDelay>d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown int num = <>1__state; ADHDMono aDHDMono = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; aDHDMono.RemoveDazzle(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Player player; private Vector3 lastPosition; private float stillTimer; private bool isDazzled; private void Awake() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent<Player>(); lastPosition = ((Component)player).transform.position; } private void Update() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (player.data.dead) { return; } if (Vector3.Distance(((Component)player).transform.position, lastPosition) < 0.01f) { stillTimer += Time.deltaTime; if (stillTimer >= 2f && !isDazzled) { ApplyDazzle(); } } else { stillTimer = 0f; if (isDazzled) { RemoveDazzle(); } } lastPosition = ((Component)player).transform.position; } private void ApplyDazzle() { isDazzled = true; player.data.stats.slow = 0.5f; player.data.stats.slowSlow = 0.5f; player.data.stats.fastSlow = 0.5f; ((MonoBehaviour)this).StartCoroutine(RemoveDazzleAfterDelay(2f)); } [IteratorStateMachine(typeof(<RemoveDazzleAfterDelay>d__7))] private IEnumerator RemoveDazzleAfterDelay(float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <RemoveDazzleAfterDelay>d__7(0) { <>4__this = this, delay = delay }; } private void RemoveDazzle() { isDazzled = false; player.data.stats.slow = 0f; player.data.stats.slowSlow = 0f; player.data.stats.fastSlow = 0f; } } private const float StillTimeThreshold = 2f; private const float DazzleDuration = 2f; private const float SpeedBuff = 1.4f; private float stillTimer; private bool isDazzled; private Player player; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "ADHD"; cardInfo.cardDestription = "Stay moving or get dazzled!"; cardInfo.rarity = (Rarity)1; cardInfo.allowMultiple = false; statModifiers.movementSpeed = 1.4f; } protected override string GetTitle() { return "ADHD"; } protected override string GetDescription() { return "Stay moving or get dazzled!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+40%", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Dazzle Effect", amount = "When still", simepleAmount = (SimpleAmount)1 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { this.player = player; ((Component)player).gameObject.AddComponent<ADHDMono>(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent<ADHDMono>()); } } public class Adrenaline : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Adrenaline"; cardInfo.cardDestription = "The lower your health, the faster you become"; cardInfo.rarity = (Rarity)2; cardInfo.allowMultiple = false; } protected override string GetTitle() { return "Adrenaline"; } protected override string GetDescription() { return "The lower your health, the faster you become"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Speed when low HP", amount = "Scales with damage", simepleAmount = (SimpleAmount)3 } }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent<AdrenalineEffect>().Initialize(player, gun, gunAmmo, data, health, gravity, block, characterStats); } } public class AdrenalineEffect : CardEffect { private ReversibleEffect currentEffect; private void Update() { if (!((Object)(object)base.player == (Object)null) && !base.player.data.dead) { float num = base.player.data.health / base.data.maxHealth; float num2 = 1f - num; float multiplier = 1f + num2 * 2f; if ((Object)(object)currentEffect != (Object)null) { Object.Destroy((Object)(object)currentEffect); } if (num2 > 0.1f) { currentEffect = (ReversibleEffect)(object)((Component)base.player).gameObject.AddComponent<AdrenalineBoost>(); (currentEffect as AdrenalineBoost).SetMultiplier(multiplier); } } } protected override void OnDestroy() { base.OnDestroy(); if ((Object)(object)currentEffect != (Object)null) { Object.Destroy((Object)(object)currentEffect); } } } public class AdrenalineBoost : ReversibleEffect { private float multiplier = 1f; public void SetMultiplier(float mult) { multiplier = mult; } public override void OnStart() { base.characterStatModifiersModifier.movementSpeed_mult = multiplier; base.gunStatModifier.attackSpeed_mult = multiplier; base.gunAmmoStatModifier.reloadTimeMultiplier_mult = 1f / multiplier; } } public class AerodynamicBullets : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Aerodynamic Bullets"; cardInfo.cardDestription = "Bullets maintain velocity better, but start slower."; cardInfo.rarity = (Rarity)0; cardInfo.allowMultiple = true; gun.drag = -0.5f; gun.projectileSpeed = 0.9f; } protected override string GetTitle() { return "Aerodynamic Bullets"; } protected override string GetDescription() { return "Bullets maintain velocity better, but start slower."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Drag", amount = "-50%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = false, stat = "Bullet Speed", amount = "-10%", simepleAmount = (SimpleAmount)1 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } } public class Amnesia : PotatoCardBase { private const int CardsToForget = 3; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers stats, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Amnesia"; cardInfo.cardDestription = "Forget your recent powers."; cardInfo.rarity = (Rarity)0; cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo ammo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers stats) { List<CardInfo> list = player.data.currentCards.ToList(); int num = 0; int num2 = list.Count - 2; while (num2 >= 0 && num < 3) { CardInfo val = list[num2]; if (!(val.cardName == "Amnesia") && player.data.currentCards.Remove(val)) { num++; } num2--; } } protected override string GetTitle() { return "Amnesia"; } protected override string GetDescription() { return "Lose your last three cards."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Cards Lost", amount = "3", simepleAmount = (SimpleAmount)3 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } } public class Bazooka : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Bazooka"; cardInfo.cardDestription = "Slow but devastating explosive rounds"; cardInfo.rarity = (Rarity)2; cardInfo.allowMultiple = false; gun.attackSpeed = 2.7f; gun.reloadTimeAdd = 2.5f; gun.damage = 4f; gun.explodeNearEnemyRange = 5f; gun.projectileSpeed = 0.6f; gun.gravity = 1.5f; } protected override string GetTitle() { return "Bazooka"; } protected override string GetDescription() { return "Slow but devastating explosive rounds"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Damage", amount = "+300%", simepleAmount = (SimpleAmount)4 }, new CardInfoStat { positive = true, stat = "Explosion", amount = "On impact", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Attack Speed", amount = "-170%", simepleAmount = (SimpleAmount)4 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+2.5s", simepleAmount = (SimpleAmount)3 } }; } } public class BetterBuckshot : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Better Buckshot"; cardInfo.cardDestription = "More shots per trigger pull"; cardInfo.rarity = (Rarity)1; cardInfo.allowMultiple = true; gun.numberOfProjectiles = 4; gun.ammo = 5; gun.damage = 0.7f; } protected override string GetTitle() { return "Better Buckshot"; } protected override string GetDescription() { return "More shots per trigger pull"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bullets", amount = "+4", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+5", simepleAmount = (SimpleAmount)2 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-30%", simepleAmount = (SimpleAmount)1 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } } public class BetterNotMiss : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers stats, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Better not miss"; cardInfo.cardDestription = "Hard-hitting but extremely slow shots."; cardInfo.rarity = (Rarity)2; cardInfo.allowMultiple = true; gun.projectileSpeed *= 3.5f; gun.damage *= 1.9f; gun.attackSpeed *= 3.2f; gun.reloadTime += 0.1f; block.cooldown *= 5f; } protected override string GetTitle() { return "Better not miss"; } protected override string GetDescription() { return "+250% bullet speed, +90% damage, much slower fire"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[5] { new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+250%", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+90%", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Attack Speed", amount = "-220%", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+0.1s", simepleAmount = (SimpleAmount)2 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+400%", simepleAmount = (SimpleAmount)4 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } } public class Bide : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Bide"; cardInfo.cardDestription = "Activate to store damage taken, then explode with accumulated power"; cardInfo.rarity = (Rarity)2; cardInfo.allowMultiple = false; } protected override string GetTitle() { return "Bide"; } protected override string GetDescription() { return "Activate to store damage taken, then explode with accumulated power"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage Storage", amount = "Stores damage taken", simepleAmount = (SimpleAmount)4 }, new CardInfoStat { positive = true, stat = "Explosion", amount = "Medium radius", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Requires Activation", amount = "Ability button", simepleAmount = (SimpleAmount)1 } }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent<BideEffect>().Initialize(player, gun, gunAmmo, data, health, gravity, block, characterStats); } } public class BideEffect : CardEffect { [CompilerGenerated] private sealed class <AnimateDamageEffect>d__13 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject effect; private float <duration>5__2; private float <elapsedTime>5__3; private Vector3 <startPos>5__4; private Vector3 <endPos>5__5; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AnimateDamageEffect>d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003c: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <duration>5__2 = 1f; <elapsedTime>5__3 = 0f; <startPos>5__4 = effect.transform.position; <endPos>5__5 = <startPos>5__4 + Vector3.up * 2f; break; case 1: <>1__state = -1; break; } if (<elapsedTime>5__3 < <duration>5__2) { <elapsedTime>5__3 += Time.deltaTime; float num = <elapsedTime>5__3 / <duration>5__2; effect.transform.position = Vector3.Lerp(<startPos>5__4, <endPos>5__5, num); Renderer component = effect.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { Color color = component.material.color; color.a = 1f - num; component.material.color = color; } <>2__current = null; <>1__state = 1; return true; } Object.Destroy((Object)(object)effect); 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 <AnimateExplosion>d__16 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject explosion; private float <duration>5__2; private float <elapsedTime>5__3; private Vector3 <startScale>5__4; private Vector3 <endScale>5__5; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AnimateExplosion>d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //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) //IL_0047: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <duration>5__2 = 1f; <elapsedTime>5__3 = 0f; <startScale>5__4 = Vector3.zero; <endScale>5__5 = explosion.transform.localScale; break; case 1: <>1__state = -1; break; } if (<elapsedTime>5__3 < <duration>5__2) { <elapsedTime>5__3 += Time.deltaTime; float num = <elapsedTime>5__3 / <duration>5__2; explosion.transform.localScale = Vector3.Lerp(<startScale>5__4, <endScale>5__5, num); Renderer component = explosion.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { Color color = component.material.color; color.a = 0.7f * (1f - num); component.material.color = color; } <>2__current = null; <>1__state = 1; return true; } Object.Destroy((Object)(object)explosion); 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 <AnimateGlow>d__11 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BideEffect <>4__this; private float <elapsedTime>5__2; private Vector3 <originalScale>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AnimateGlow>d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; BideEffect bideEffect = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <elapsedTime>5__2 = 0f; <originalScale>5__3 = bideEffect.glowEffect.transform.localScale; break; case 1: <>1__state = -1; break; } if (bideEffect.isActive && (Object)(object)bideEffect.glowEffect != (Object)null) { <elapsedTime>5__2 += Time.deltaTime; float num2 = 1f + 0.3f * Mathf.Sin(<elapsedTime>5__2 * 4f); bideEffect.glowEffect.transform.localScale = <originalScale>5__3 * num2; Renderer component = bideEffect.glowEffect.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { float num3 = Mathf.Min(1f, bideEffect.storedDamage / 100f); Color color = Color.Lerp(new Color(1f, 0.8f, 0f, 0.5f), new Color(1f, 0.2f, 0f, 0.8f), num3); component.material.color = color; } <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private bool isActive; private float storedDamage; private float bideDuration = 5f; private float bideTimer; private GameObject glowEffect; private float explosionRadius = 8f; private bool hasExploded; public override void OnTakeDamage(Vector2 damage, bool selfDamage) { if (isActive && !selfDamage) { float magnitude = ((Vector2)(ref damage)).magnitude; storedDamage += magnitude; CreateDamageStorageEffect(magnitude); } } private void Update() { if (!isActive && Input.GetKeyDown((KeyCode)113)) { ActivateBide(); } if (isActive) { bideTimer -= Time.deltaTime; if (bideTimer <= 0f && !hasExploded) { ExplodeWithStoredDamage(); } } } private void ActivateBide() { if (!isActive) { isActive = true; hasExploded = false; storedDamage = 0f; bideTimer = bideDuration; CreateGlowEffect(); Debug.Log($"Bide activated for {bideDuration} seconds!"); } } private void CreateGlowEffect() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) glowEffect = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)glowEffect).name = "BideGlow"; glowEffect.transform.SetParent(((Component)this).transform); glowEffect.transform.localPosition = Vector3.zero; glowEffect.transform.localScale = Vector3.one * 3f; Renderer component = glowEffect.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { Material val = new Material(Shader.Find("Standard")); val.color = new Color(1f, 0.8f, 0f, 0.5f); val.SetFloat("_Mode", 3f); val.SetInt("_SrcBlend", 5); val.SetInt("_DstBlend", 10); val.SetInt("_ZWrite", 0); val.DisableKeyword("_ALPHATEST_ON"); val.EnableKeyword("_ALPHABLEND_ON"); val.DisableKeyword("_ALPHAPREMULTIPLY_ON"); val.renderQueue = 3000; component.material = val; } Collider component2 = glowEffect.GetComponent<Collider>(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); } ((MonoBehaviour)this).StartCoroutine(AnimateGlow()); } [IteratorStateMachine(typeof(<AnimateGlow>d__11))] private IEnumerator AnimateGlow() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <AnimateGlow>d__11(0) { <>4__this = this }; } private void CreateDamageStorageEffect(float damageAmount) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_0037: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.position = ((Component)this).transform.position + Vector3.up * 2f; val.transform.localScale = Vector3.one * 0.5f; Renderer component = val.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { Material val2 = new Material(Shader.Find("Standard")); val2.color = new Color(1f, 0f, 0f, 0.8f); component.material = val2; } Collider component2 = val.GetComponent<Collider>(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); } ((MonoBehaviour)this).StartCoroutine(AnimateDamageEffect(val)); } [IteratorStateMachine(typeof(<AnimateDamageEffect>d__13))] private IEnumerator AnimateDamageEffect(GameObject effect) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <AnimateDamageEffect>d__13(0) { effect = effect }; } private void ExplodeWithStoredDamage() { if (!hasExploded) { hasExploded = true; isActive = false; if ((Object)(object)glowEffect != (Object)null) { Object.Destroy((Object)(object)glowEffect); } CreateExplosionEffect(); DealExplosionDamage(); Debug.Log($"Bide explosion! Stored damage: {storedDamage}"); } } private void CreateExplosionEffect() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.position = ((Component)this).transform.position; val.transform.localScale = Vector3.one * explosionRadius * 2f; Renderer component = val.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { Material val2 = new Material(Shader.Find("Standard")); val2.color = new Color(1f, 0.5f, 0f, 0.7f); val2.SetFloat("_Mode", 3f); val2.SetInt("_SrcBlend", 5); val2.SetInt("_DstBlend", 10); val2.SetInt("_ZWrite", 0); val2.DisableKeyword("_ALPHATEST_ON"); val2.EnableKeyword("_ALPHABLEND_ON"); val2.DisableKeyword("_ALPHAPREMULTIPLY_ON"); val2.renderQueue = 3000; component.material = val2; } Collider component2 = val.GetComponent<Collider>(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); } ((MonoBehaviour)this).StartCoroutine(AnimateExplosion(val)); } [IteratorStateMachine(typeof(<AnimateExplosion>d__16))] private IEnumerator AnimateExplosion(GameObject explosion) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <AnimateExplosion>d__16(0) { explosion = explosion }; } private void DealExplosionDamage() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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_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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) Player[] array = Object.FindObjectsOfType<Player>(); Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); Player[] array2 = array; foreach (Player val2 in array2) { if ((Object)(object)val2 == (Object)null || val2.data.dead) { continue; } float num = Vector2.Distance(Vector2.op_Implicit(((Component)val2).transform.position), val); if (num <= explosionRadius) { float num2 = Mathf.Max(20f, storedDamage * 0.8f); float num3 = 1f - num / explosionRadius; float num4 = num2 * num3; HealthHandler component = ((Component)val2).GetComponent<HealthHandler>(); if ((Object)(object)component != (Object)null) { Vector2 val3 = Vector2.up * num4; ((Damagable)component).TakeDamage(val3, Vector2.zero, ((Component)base.player).gameObject, (Player)null, true, false); } } } } protected override void OnDestroy() { base.OnDestroy(); if ((Object)(object)glowEffect != (Object)null) { Object.Destroy((Object)(object)glowEffect); } } } public class BiggerBullet : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers stats, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Bigger Bullet"; cardInfo.cardDestription = "Supersize your shots."; cardInfo.rarity = (Rarity)0; cardInfo.allowMultiple = true; gun.projectileSize *= 1.5f; gun.damage *= 1.1f; gun.projectileSpeed *= 0.9f; } protected override string GetTitle() { return "Bigger Bullet"; } protected override string GetDescription() { return "+50% bullet size, slight dmg up but slower"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bullet Size", amount = "+50%", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+10%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = false, stat = "Bullet Speed", amount = "-10%", simepleAmount = (SimpleAmount)1 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } } public class BlackholeBullets : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "Blackhole Bullets"; cardInfo.cardDestription = "Your bullets create gravitational fields that pull enemies inward"; cardInfo.rarity = (Rarity)2; cardInfo.allowMultiple = true; gun.damage = 0.85f; gun.projectileSpeed = 0.7f; } protected override string GetTitle() { return "Blackhole Bullets"; } protected override string GetDescription() { return "Your bullets create gravitational fields that pull enemies inward"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Gravitational Pull", amount = "Pulls enemies", simepleAmount = (SimpleAmount)4 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-15%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = false, stat = "Bullet Speed", amount = "-30%", simepleAmount = (SimpleAmount)1 } }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent<BlackholeBulletsEffect>().Initialize(player, gun, gunAmmo, data, health, gravity, block, characterStats); } } public class BlackholeBulletsEffect : MonoBehaviour { private Player player; private Gun gun; public void Initialize(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { this.player = player; this.gun = gun; } private void Start() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); } } private void OnShoot(GameObject projectile) { if (!((Object)(object)projectile == (Object)null)) { projectile.AddComponent<BlackholeGravity>().Initialize(player); } } } public class BlackholeGravity : MonoBehaviour { [CompilerGenerated] private sealed class <RotateBlackhole>d__12 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject visual; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <RotateBlackhole>d__12(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; break; case 1: <>1__state = -1; break; } if ((Object)(object)visual != (Object)null) { visual.transform.Rotate(0f, 0f, 90f * Time.deltaTime); <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Player shooter; private float pullRadius = 5f; private float pullForce = 15f; private HashSet<Player> playersInRange = new HashSet<Player>(); private HashSet<Rigidbody2D> rigidbodiesInRange = new HashSet<Rigidbody2D>(); public void Initialize(Player shooter) { this.shooter = shooter; CircleCollider2D obj = ((Component)this).gameObject.AddComponent<CircleCollider2D>(); obj.radius = pullRadius; ((Collider2D)obj).isTrigger = true; CreateBlackholeEffect(); } private void FixedUpdate() { ApplyGravitationalPull(); } private void OnTriggerEnter2D(Collider2D other) { Player componentInParent = ((Component)other).GetComponentInParent<Player>(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)shooter) { playersInRange.Add(componentInParent); } Rigidbody2D component = ((Component)other).GetComponent<Rigidbody2D>(); if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).gameObject != (Object)(object)((Component)this).gameObject) { rigidbodiesInRange.Add(component); } } private void OnTriggerExit2D(Collider2D other) { Player componentInParent = ((Component)other).GetComponentInParent<Player>(); if ((Object)(object)componentInParent != (Object)null) { playersInRange.Remove(componentInParent); } Rigidbody2D component = ((Component)other).GetComponent<Rigidbody2D>(); if ((Object)(object)component != (Object)null) { rigidbodiesInRange.Remove(component); } } private void ApplyGravitationalPull() { //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_0010: 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_00a7: Unknown result type (might be due to invalid IL or missing references) Vector2 blackholePosition = Vector2.op_Implicit(((Component)this).transform.position); foreach (Player item in playersInRange) { if ((Object)(object)item != (Object)null && !item.data.dead) { Rigidbody2D component = ((Component)item).GetComponent<Rigidbody2D>(); if ((Object)(object)component != (Object)null) { ApplyPullForce(component, blackholePosition); } } } foreach (Rigidbody2D item2 in rigidbodiesInRange) { if ((Object)(object)item2 != (Object)null && (Object)(object)((Component)item2).gameObject != (Object)(object)((Component)this).gameObject) { ApplyPullForce(item2, blackholePosition); } } } private void ApplyPullForce(Rigidbody2D rb, Vector2 blackholePosition) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) Player componentInParent = ((Component)rb).GetComponentInParent<Player>(); if (!((Object)(object)componentInParent != (Object)null) || !((Object)(object)componentInParent == (Object)(object)shooter)) { Vector2 val = blackholePosition - rb.position; float magnitude = ((Vector2)(ref val)).magnitude; if (magnitude > 0.1f) { val = ((Vector2)(ref val)).normalized; float num = Mathf.Max(magnitude, 1f); float num2 = pullForce / (num * num); rb.AddForce(val * num2, (ForceMode2D)0); } } } private void CreateBlackholeEffect() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_018f: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; val.transform.localScale = Vector3.one * (pullRadius * 0.8f); Renderer component = val.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { Material val2 = new Material(Shader.Find("Standard")); val2.color = new Color(0.2f, 0f, 0.4f, 0.6f); val2.SetFloat("_Mode", 3f); val2.SetInt("_SrcBlend", 5); val2.SetInt("_DstBlend", 10); val2.SetInt("_ZWrite", 0); val2.DisableKeyword("_ALPHATEST_ON"); val2.EnableKeyword("_ALPHABLEND_ON"); val2.DisableKeyword("_ALPHAPREMULTIPLY_ON"); val2.renderQueue = 3000; component.material = val2; } Collider component2 = val.GetComponent<Collider>(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); } GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); obj.transform.SetParent(val.transform); obj.transform.localPosition = Vector3.zero; obj.transform.localScale = Vector3.one * 0.3f; Renderer component3 = obj.GetComponent<Renderer>(); if ((Object)(object)component3 != (Object)null) { Material val3 = new Material(Shader.Find("Standard")); val3.color = new Color(0f, 0f, 0f, 0.9f); val3.SetFloat("_Mode", 3f); val3.SetInt("_SrcBlend", 5); val3.SetInt("_DstBlend", 10); val3.SetInt("_ZWrite", 0); val3.DisableKeyword("_ALPHATEST_ON"); val3.EnableKeyword("_ALPHABLEND_ON"); val3.DisableKeyword("_ALPHAPREMULTIPLY_ON"); val3.renderQueue = 3001; component3.material = val3; } Collider component4 = obj.GetComponent<Collider>(); if ((Object)(object)component4 != (Object)null) { Object.Destroy((Object)(object)component4); } ((MonoBehaviour)this).StartCoroutine(RotateBlackhole(val)); } [IteratorStateMachine(typeof(<RotateBlackhole>d__12))] private IEnumerator RotateBlackhole(GameObject visual) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <RotateBlackhole>d__12(0) { visual = visual }; } private void OnDestroy() { playersInRange.Clear(); rigidbodiesInRange.Clear(); } } public class BlackPlague : PotatoCardBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) cardInfo.cardName = "The Black Plague"; cardInfo.cardDestription = "Your bullets infect enemies with a parasitic plague"; cardInfo.rarity = (Rarity)2; cardInfo.allowMultiple = false; gun.damage = 0.9f; } protected override string GetTitle() { return "The Black Plague"; } protected override string GetDescription() { return "Your bullets infect enemies with a parasitic plague"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Plague Effect", amount = "Parasitic DOT", simepleAmount = (SimpleAmount)4 }, new CardInfoStat { positive = false, stat = "Direct Damage", amount = "-10%", simepleAmount = (SimpleAmount)1 } }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent<BlackPlagueEffect>().Initialize(player, gun, gunAmmo, data, health, gravity, block, characterStats); } } public class BlackPlagueEffect : CardEffect { private float originalBulletDamage; protected override void Start() { base.Start(); if ((Object)(object)base.gun != (Object)null) { originalBulletDamage = base.gun.damage * 55f; } } public override void OnDealtDamage(Vector2 damage, bool selfDamage) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (selfDamage) { return; } Player[] array = Object.FindObjectsOfType<Player>(); foreach (Player val in array) { if ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)base.player && !val.data.dead && Vector2.Distance(Vector2.op_Implicit(((Component)base.player).transform.position), Vector2.op_Implicit(((Component)val).transform.position)) <= 20f) { ApplyPlagueEffect(val, ((Vector2)(ref damage)).magnitude); break; } } } private void ApplyPlagueEffect(Player target, float originalDamage) { PlagueInfection component = ((Component)target).GetComponent<PlagueInfection>(); if ((Object)(object)component != (Object)null) { component.RefreshPlague(originalDamage); } else { ((Component)target).gameObject.AddComponent<PlagueInfection>().Initialize(originalDamage, base.player); } } } public class PlagueInfection : MonoBehaviour { [CompilerGenerated] private sealed class <AnimateDamageTick>d__15 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject effect; private float <duration>5__2; private float <elapsedTime>5__3; private Vector3 <startPos>5__4; private Vector3 <endPos>5__5; private Vector3 <startScale>5__6; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AnimateDamageTick>d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003c: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <duration>5__2 = 0.8f; <elapsedTime>5__3 = 0f; <startPos>5__4 = effect.transform.position; <endPos>5__5 = <startPos>5__4 + Vector3.up * 1.5f; <startScale>5__6 = effect.transform.localScale; break; case 1: <>1__state = -1; break; } if (<elapsedTime>5__3 < <duration>5__2) { <elapsedTime>5__3 += Time.deltaTime; float num = <elapsedTime>5__3 / <duration>5__2; effect.transform.position = Vector3.Lerp(<startPos>5__4, <endPos>5__5, num); effect.transform.localScale = Vector3.Lerp(<startScale>5__6, <startScale>5__6 * 0.1f, num); Renderer component = effect.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { Color color = component.material.color; color.a = 1f - num; component.material.color = color; } <>2__current = null; <>1__state = 1; return true; } Object.Destroy((Object)(object)effect); 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 seal