Decompiled source of ChaosPoppycarsCardsComplex v1.0.0
ChaosPoppycarsCardsComplex.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using CPCComplex.Cards; using CPCComplex.MonoBehaviours; using CPCCore; using CPCCore.Extensions; using CPCCore.MonoBehaviours; using CPCCore.Utilities; using CardChoiceSpawnUniqueCardPatch.CustomCategories; using CardThemeLib; using ClassesManagerReborn; using HarmonyLib; using InControl; using Jotunn.Utils; using Microsoft.CodeAnalysis; using ModdingUtils.Extensions; using ModdingUtils.GameModes; using ModdingUtils.MonoBehaviours; using ModdingUtils.Utils; using Nullmanager; using Photon.Pun; using Photon.Realtime; using PlayerActionsHelper; using PlayerActionsHelper.Extensions; using RWF; using RWF.UI; using RarityLib.Utils; using SimulationChamber; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnboundLib.Utils; using UnityEngine; using WillsWackyManagers.Utils; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class CursorGun : MonoBehaviour { private Player player; private Gun gun; private float cd = 0f; public SimulatedGun[] savedGuns = (SimulatedGun[])(object)new SimulatedGun[1]; public static GameObject _stopRecursionObj; public static GameObject StopRecursionObj { get { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if ((Object)(object)_stopRecursionObj == (Object)null) { _stopRecursionObj = new GameObject("A_StopRecursion", new Type[1] { typeof(StopRecursion) }); Object.DontDestroyOnLoad((Object)(object)_stopRecursionObj); } return _stopRecursionObj; } } public static ObjectsToSpawn[] StopRecursionSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { new ObjectsToSpawn { AddToProjectile = StopRecursionObj } }; public void Start() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent<Player>(); gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); if ((Object)(object)savedGuns[0] == (Object)null) { savedGuns[0] = new GameObject("Cursor_One").AddComponent<SimulatedGun>(); } } public void OnShootProjectileAction(GameObject obj) { //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) if (obj.GetComponentsInChildren<StopRecursion>().Length == 0) { SimulatedGun val = savedGuns[0]; val.CopyGunStatsExceptActions(gun); val.CopyAttackAction(gun); val.CopyShootProjectileAction(gun); ((Gun)val).ShootPojectileAction = (Action<GameObject>)Delegate.Remove(((Gun)val).ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); ((Gun)val).numberOfProjectiles = 1; ((Gun)val).bursts = 0; ((Gun)val).damage = ((Gun)val).damage * 0.5f; ((Gun)val).objectsToSpawn = ((Gun)val).objectsToSpawn.Concat(StopRecursionSpawn).ToArray(); if ((player.data.view.IsMine || PhotonNetwork.OfflineMode) && cd <= 0f) { cd += 0.15f; val.SimulatedAttack(player.playerID, new Vector3(MainCam.instance.cam.ScreenToWorldPoint(Input.mousePosition).x, MainCam.instance.cam.ScreenToWorldPoint(Input.mousePosition).y, 0f), new Vector3(player.data.input.aimDirection.x, player.data.input.aimDirection.y, 0f), 1f, 1f, (Transform)null, false); } } } public void Update() { if (cd >= 0f) { cd -= TimeHandler.deltaTime; } } public void OnDestroy() { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); Object.Destroy((Object)(object)savedGuns[0]); } } namespace ChaosPoppycarsCards.Extensions { public static class PlayerStatus { public static List<Player> GetEnemyPlayers(Player player) { List<Player> list = new List<Player>(); foreach (Player player2 in PlayerManager.instance.players) { if (player2.teamID != player.teamID) { list.Add(player2); } } return list; } public static List<Player> GetOtherPlayers(Player player) { List<Player> list = new List<Player>(); foreach (Player player2 in PlayerManager.instance.players) { if (player2.playerID != player.playerID) { list.Add(player2); } } return list; } public static bool PlayerAlive(Player player) { return !player.data.dead; } public static bool PlayerSimulated(Player player) { return (bool)Traverse.Create((object)player.data.playerVel).Field("simulated").GetValue(); } public static bool PlayerAliveAndSimulated(Player player) { return PlayerAlive(player) && PlayerSimulated(player); } public static int GetNumberOfEnemyPlayers(Player player) { int num = 0; foreach (Player player2 in PlayerManager.instance.players) { if (player2.teamID != player.teamID) { num++; } } return num; } } } namespace CPCComplex { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Poppycars.CPCComplex.Id", "ChaosPoppycarsCardsComplex", "1.0.0")] [BepInProcess("Rounds.exe")] public class ChaosPoppycarsCardsComplex : BaseUnityPlugin { public static class CPCCardCategories { public static CardCategory GeeseCategory = CustomCardCategories.instance.CardCategory("GeeseCategory"); } [CompilerGenerated] private sealed class <GameStart>d__13 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ChaosPoppycarsCardsComplex <>4__this; private List<Player>.Enumerator <>s__1; private Player <player>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GameStart>d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <player>5__2 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; RarityUtils.SetCardRarityModifier(KnifeGoose.Card, 0.5f); RarityUtils.SetCardRarityModifier(GoldGoose.Card, 0.01f); <>s__1 = PlayerManager.instance.players.GetEnumerator(); try { while (<>s__1.MoveNext()) { <player>5__2 = <>s__1.Current; <player>5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const string ModId = "com.Poppycars.CPCComplex.Id"; private const string ModName = "ChaosPoppycarsCardsComplex"; public const string Version = "1.0.0"; public const string ModInitials = "CPCComplex"; internal static List<BaseUnityPlugin> plugins; public static AssetBundle Bundle; public static ChaosPoppycarsCardsComplex Instance { get; private set; } private void Awake() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0079: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a0: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00c6: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown Bundle = AssetUtils.LoadAssetBundleFromResources("cpccomplex", typeof(ChaosPoppycarsCardsComplex).Assembly); RarityUtils.AddRarity("Geese", 1f, Color32.op_Implicit(new Color32((byte)172, (byte)172, (byte)172, byte.MaxValue)), Color32.op_Implicit(new Color32((byte)60, (byte)60, (byte)60, byte.MaxValue))); PlayerActionManager.RegisterPlayerAction(new ActionInfo("Dash", (BindingSource)new MouseBindingSource((Mouse)3), (BindingSource)new DeviceBindingSource((InputControlType)18))); PlayerActionManager.RegisterPlayerAction(new ActionInfo("BlockMoveSwitch", (BindingSource)new KeyBindingSource((Key[])(object)new Key[1] { (Key)53 }), (BindingSource)new DeviceBindingSource((InputControlType)13))); PlayerActionManager.RegisterPlayerAction(new ActionInfo("BlockPhaseAction", (BindingSource)new KeyBindingSource((Key[])(object)new Key[1] { (Key)57 }), (BindingSource)new DeviceBindingSource((InputControlType)5))); Harmony val = new Harmony("com.Poppycars.CPCComplex.Id"); val.PatchAll(); GameObject val2 = Bundle.LoadAsset<GameObject>("ModCards"); CardHolder component = val2.GetComponent<CardHolder>(); component.RegisterCards(); } private void Start() { plugins = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); Instance = this; GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)GameStart); ChaosPoppycarsCardsCore.RegisterCards(typeof(ChaosPoppycarsCardsComplex).Assembly, Bundle); Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player player, CardInfo cardinfo) => !((object)(Rarity)(ref cardinfo.rarity)).Equals((object?)RarityUtils.GetRarity("Geese")) || PlayerManager.instance.players.Any((Player p) => player.teamID != p.teamID && p.data.currentCards.Contains(GeeseSwarm.Card)))); ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)this, 60, (Action)delegate { CardManager.cards.Values.ToList().ForEach(delegate(Card card) { AddMod(card); }); }); } private void AddMod(Card card) { string text = "__Rarity-" + ((object)(Rarity)(ref card.cardInfo.rarity)).ToString(); CardCategory val = CustomCardCategories.instance.CardCategory(text); CardCategory[] categories = CollectionExtensions.AddToArray<CardCategory>(card.cardInfo.categories, val); card.cardInfo.categories = categories; } [IteratorStateMachine(typeof(<GameStart>d__13))] private IEnumerator GameStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GameStart>d__13(0) { <>4__this = this, gm = gm }; } } } namespace CPCComplex.MonoBehaviours { public class TriggerWin : MonoBehaviour { [CompilerGenerated] private sealed class <Win>d__4 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public TriggerWin <>4__this; private RoundEndHandler <instance>5__1; private int <winnerId>5__2; private List<string> <choices>5__3; private string <hostName>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Win>d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <instance>5__1 = null; <choices>5__3 = null; <hostName>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <instance>5__1 = RoundEndHandler.instance; <winnerId>5__2 = <>4__this.playerId; UIHandler.instance.DisplayScreenText(PlayerManager.instance.GetColorFromTeam(<winnerId>5__2).winText, <>4__this.victoryText, 0.5f); <>2__current = (object)new WaitForSeconds(3.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <instance>5__1.waitingForHost = true; PlayerManager.instance.RevivePlayers(); ExtensionMethods.InvokeMethod((object)PlayerManager.instance, "SetPlayersVisible", new object[1] { false }); if (PhotonNetwork.IsMasterClient || PhotonNetwork.OfflineMode) { <choices>5__3 = new List<string> { "CONTINUE", "REMATCH", "EXIT" }; PopUpMenu.instance.Open(<choices>5__3, (Action<string>)<instance>5__1.OnGameOverChoose); <choices>5__3 = null; } else { <hostName>5__4 = PhotonNetwork.CurrentRoom.Players.Values.First((Player p) => p.IsMasterClient).NickName; UIHandler.instance.ShowJoinGameText("WAITING FOR " + <hostName>5__4, PlayerSkinBank.GetPlayerSkinColors(1).winText); <hostName>5__4 = null; } MapManager.instance.LoadNextLevel(false, false); break; case 2: <>1__state = -1; break; } if (<instance>5__1.waitingForHost) { <>2__current = null; <>1__state = 2; return true; } UIHandler.instance.HideJoinGameText(); 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 string victoryText = ""; private int playerId = 0; public void WinText(string text) { victoryText = text; } public void WinnerId(int id) { playerId = id; } [IteratorStateMachine(typeof(<Win>d__4))] public IEnumerator Win(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Win>d__4(0) { <>4__this = this, gm = gm }; } } public class BlockBullets : MonoBehaviour { private Block block; private Player player; private Gun gun; private float cd = 0f; private PhotonView photonView; private GameObject test; public SimulatedGun[] savedGuns = (SimulatedGun[])(object)new SimulatedGun[1]; public void OnDestroy() { Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); Object.Destroy((Object)(object)savedGuns[0]); } private void OnBlock(BlockTriggerType trigger) { //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) if (cd <= 0f) { test = Object.Instantiate<GameObject>(ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("TestObj")); test.AddComponent<Destroyer>(); SimulatedGun BlockGun = savedGuns[0]; BlockGun.CopyGunStatsExceptActions(gun); BlockGun.CopyAttackAction(gun); BlockGun.CopyShootProjectileAction(gun); ((Gun)BlockGun).objectsToSpawn = ((Gun)BlockGun).objectsToSpawn.Concat(StopRecursionMono.StopRecursionSpawn).ToArray(); ((Gun)BlockGun).bursts = 3; ((Gun)BlockGun).numberOfProjectiles = 1; ((Gun)BlockGun).timeBetweenBullets = 0.15f; SimulatedGun obj = BlockGun; ((Gun)obj).damage = ((Gun)obj).damage / 2.5f; Vector3 temp = ((Component)player).transform.position; Vector3 aim = new Vector3(player.data.input.aimDirection.x, player.data.input.aimDirection.y, 0f); test.transform.position = temp; Vector3 val = Camera.main.ScreenToWorldPoint(Input.mousePosition) - test.transform.position; float num = Mathf.Atan2(val.y, val.x) * 57.29578f - 45f; test.transform.rotation = Quaternion.AngleAxis(num, Vector3.forward); test.GetComponent<SpriteRenderer>().color = player.GetTeamColors().color; if (player.data.view.IsMine) { photonView.RPC("SyncDir", (RpcTarget)1, new object[1] { num }); } ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 1.5f, (Action)delegate { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) BlockGun.SimulatedAttack(player.playerID, temp, aim, 1f, 1f, (Transform)null, false); }); cd += 1.5f; } } public void Start() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) photonView = ((Component)this).GetComponent<PhotonView>(); player = ((Component)this).gameObject.GetComponent<Player>(); gun = player.data.weaponHandler.gun; block = ((Component)player).GetComponent<Block>(); if ((Object)(object)savedGuns[0] == (Object)null) { savedGuns[0] = new GameObject("BlockBullets").AddComponent<SimulatedGun>(); } Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); } public void Update() { if (cd > 0f) { cd -= TimeHandler.deltaTime; } } [PunRPC] public void SyncDir(float angle) { //IL_001d: 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) if ((Object)(object)test != (Object)null) { test.transform.rotation = Quaternion.AngleAxis(angle, Vector3.forward); } } } internal class CelesteDash : MonoBehaviour { private Player player; private PlayerActions playerActions; private int dashesLeft = 1; private int dashesMax = 1; private float cd; public Vector2 Speed; public void Awake() { player = ((Component)this).GetComponentInParent<Player>(); playerActions = player.data.playerActions; cd = 0f; } public void Update() { //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) dashesMax = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).dashes; if (cd > 0f) { cd -= TimeHandler.deltaTime; } if (player.data.isGrounded && player.data.view.IsMine && playerActions != null && !PlayerActionsExtension.ActionIsPressed(playerActions, "Dash")) { dashesLeft = dashesMax; } if (playerActions != null && PlayerActionsExtension.ActionIsPressed(playerActions, "Dash") && dashesLeft > 0 && player.data.view.IsMine && cd <= 0f) { float num = 57.29578f * Mathf.Atan2(player.data.input.direction.y, player.data.input.direction.x); if (num > -25f && num <= 25f) { Speed = new Vector2(1f, 0f); } else if (num > 25f && num <= 75f) { Speed = new Vector2(0.75f, 0.75f); } else if (num > 75f && num <= 125f) { Speed = new Vector2(0f, 1f); } else if (num > 125f && num <= 170f) { Speed = new Vector2(-0.75f, 0.75f); } else if (num > 170f) { Speed = new Vector2(-1f, 0f); } else if (num <= -170f) { Speed = new Vector2(-1f, 0f); } else if (num > -170f && num <= -125f) { Speed = new Vector2(-0.75f, -0.75f); } else if (num > -125f && num <= -75f) { Speed = new Vector2(0f, -1f); } else { Speed = new Vector2(0.75f, -0.75f); } ExtensionMethods.SetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity", (object)(Speed * 125f)); dashesLeft--; cd = 0.3f; ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 2, (Action)delegate { ExtensionMethods.GetOrAddComponent<CelesteGrav>(((Component)player).gameObject, false); }); } } } internal class CelesteGrav : ReversibleEffect { private float duration = 0f; private int timesJumped = 0; public override void OnStart() { base.player = ((Component)this).GetComponentInParent<Player>(); base.gravityModifier.gravityForce_mult = 0f; timesJumped = 0; if (duration <= 0f) { ((ReversibleEffect)this).ApplyModifiers(); } duration = 0.15f; PlayerJump jump = base.data.jump; jump.JumpAction = (Action)Delegate.Combine(jump.JumpAction, new Action(OnJump)); ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } private void OnJump() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0055: Unknown result type (might be due to invalid IL or missing references) if (timesJumped <= 0) { Vector2 val = (Vector2)ExtensionMethods.GetFieldValue((object)((Component)base.player).GetComponent<PlayerVelocity>(), "velocity"); ExtensionMethods.SetFieldValue((object)((Component)base.player).GetComponent<PlayerVelocity>(), "velocity", (object)new Vector2(val.x * 5f, val.y * 2.5f)); timesJumped++; } } public override void OnUpdate() { if (!(duration <= 0f)) { duration -= TimeHandler.deltaTime; return; } ((ReversibleEffect)this).ClearModifiers(true); timesJumped = 0; base.player.data.sinceGrounded = 0f; Object.Destroy((Object)(object)this); } public override void OnOnDestroy() { PlayerJump jump = base.data.jump; jump.JumpAction = (Action)Delegate.Remove(jump.JumpAction, new Action(OnJump)); ((ReversibleEffect)this).ClearModifiers(true); } public override void OnOnDisable() { duration = 0f; ((ReversibleEffect)this).ClearModifiers(true); } } public class Destroyer : MonoBehaviour { public void Start() { Object.Destroy((Object)(object)((Component)this).gameObject, 3f); } } internal class HealthBounce : BounceEffect { public Player player; public CharacterStatModifiers characterStatModifiers; public void Start() { InterfaceGameModeHooksManager.instance.RegisterHooks((object)this); player = ((Component)this).GetComponentInParent<ProjectileHit>().ownPlayer; characterStatModifiers = ((Component)player).GetComponentInParent<CharacterStatModifiers>(); } private void Awake() { ((Component)this).gameObject.AddComponent<BounceTrigger>(); } public override void DoBounce(HitInfo hit) { CPCDebug.Log((object)"[CPCComplex][Test] Bullet Has hit"); CharacterData data = player.data; data.maxHealth += 1f; CharacterData data2 = player.data; data2.health += 1f; CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStatModifiers); additionalData.HealthBouncesBounced += 1f; CPCDebug.Log((object)string.Format("[{0}][Test] {1} max hp", "CPCComplex", player.data.maxHealth)); CPCDebug.Log((object)string.Format("[{0}][Test] {1} hp", "CPCComplex", player.data.health)); } public void OnGameStart() { Object.Destroy((Object)(object)this); } public void OnDestroy() { InterfaceGameModeHooksManager.instance.RemoveHooks((object)this); } } internal class HealthBounceMono : MonoBehaviour, IRoundEndHookHandler { public Player player; public CharacterStatModifiers characterStatModifiers; public void Start() { InterfaceGameModeHooksManager.instance.RegisterHooks((object)this); player = ((Component)this).GetComponentInParent<Player>(); characterStatModifiers = ((Component)this).GetComponentInParent<CharacterStatModifiers>(); } public void OnRoundEnd() { CharacterData data = player.data; data.maxHealth -= CharacterStatModifiersExtension.GetAdditionalData(characterStatModifiers).HealthBouncesBounced; CPCDebug.Log((object)"[CPCComplex][Test] Round Ended"); CharacterStatModifiersExtension.GetAdditionalData(characterStatModifiers).HealthBouncesBounced = 0f; } public void OnGameStart() { Object.Destroy((Object)(object)this); } public void OnDestroy() { InterfaceGameModeHooksManager.instance.RemoveHooks((object)this); } } public class LaserBehaviour : MonoBehaviour { public SpriteRenderer sprite; public float damage; public Player player; public bool unExecuted = false; public bool col = true; public float speed = 1.5f; private void Start() { //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) //IL_0033: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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) Color[] array = (Color[])(object)new Color[6] { new Color(0.75f, 0f, 0f), new Color(0f, 0.75f, 0f), new Color(0f, 0f, 0.75f), new Color(0.75f, 0.7f, 0f), new Color(0f, 0.75f, 0.75f), new Color(0.75f, 0f, 0.75f) }; sprite.color = array[Random.Range(0, 6)]; } private void Update() { //IL_0017: 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_0047: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) ((Component)this).gameObject.transform.localScale = new Vector3(((Component)this).gameObject.transform.localScale.x, ((Component)this).gameObject.transform.localScale.y + 0.01f, ((Component)this).gameObject.transform.localScale.z); if (!unExecuted) { unExecuted = true; ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, speed, (Action)delegate { //IL_0028: 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_0053: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)this).gameObject != (Object)null) { ((Component)this).gameObject.transform.localScale = new Vector3(((Component)this).gameObject.transform.localScale.x, (float)Screen.height + 18f, ((Component)this).gameObject.transform.localScale.z); Object.Destroy((Object)(object)((Component)this).gameObject, speed); } }); } Collider2D[] array = null; if (col) { array = Physics2D.OverlapBoxAll(Vector2.op_Implicit(((Component)this).gameObject.transform.position), Vector2.op_Implicit(((Component)this).gameObject.transform.localScale), 0f, LayerMask.GetMask(new string[1] { "Player" })); } if (array == null) { return; } Collider2D[] array2 = array; foreach (Collider2D val in array2) { if ((Object)(object)((Component)val).gameObject.GetComponent<Player>() != (Object)null && ((Component)val).gameObject.GetComponent<Player>().playerID == player.playerID) { Player component = ((Component)val).gameObject.GetComponent<Player>(); if (component.data.view.IsMine) { col = false; ((Damagable)((Component)component).GetComponent<HealthHandler>()).CallTakeDamage(new Vector2(0f, damage), Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true); sprite.color = new Color(sprite.color.r, sprite.color.g, sprite.color.b, 0.25f); PhotonView component2 = ((Component)component).GetComponent<PhotonView>(); ExtensionMethods.GetOrAddComponent<RPCMono>(((Component)component).gameObject, false); component2.RPC("RPCASyncBlockThingy", (RpcTarget)0, new object[1] { component.playerID }); } } } } } public class LaserController : MonoBehaviour, IPointStartHookHandler { public float damage = 0f; public Player player; public float timeBetweenLasers = 0.75f; public float timer = 0f; public float laserSpeed = 1.5f; public float timer2 = 6f; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); InterfaceGameModeHooksManager.instance.RegisterHooks((object)this); } public void OnPointStart() { laserSpeed = 1.5f; timeBetweenLasers = 0.75f; timer2 = 6f; } private void Update() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) if (!player.data.view.IsMine) { return; } if (timer <= 0f && PlayerStatus.PlayerAliveAndSimulated(player)) { timer = timeBetweenLasers + Random.Range(-0.25f, 0.25f); GameObject val = Object.Instantiate<GameObject>(ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("LaserObj"), Vector2.op_Implicit(new Vector2(Random.Range(Camera.main.ViewportToWorldPoint(new Vector3(0f, 0f, 0f)).x, Camera.main.ViewportToWorldPoint(Vector2.op_Implicit(Vector2.right)).x), Camera.main.ViewportToWorldPoint(Vector2.op_Implicit(Vector2.up)).y)), ((Component)this).transform.rotation); LaserBehaviour component = val.GetComponent<LaserBehaviour>(); if (damage != 0f) { component.damage = damage; } else { component.damage = player.data.maxHealth * 0.33f; } component.player = player; component.speed = laserSpeed; } timer -= TimeHandler.deltaTime; if (timer2 <= 0f && PlayerStatus.PlayerAliveAndSimulated(player)) { if (laserSpeed > 0.25f) { laserSpeed -= 0.05f; } if (timeBetweenLasers > 0.1875f) { timeBetweenLasers -= 0.0375f; } timer2 = 4f; } timer2 -= TimeHandler.deltaTime; } } public class RainbowLeaf : MonoBehaviour, IGameStartHookHandler, IPointStartHookHandler { private CharacterStatModifiers characterStatModifiers; private Player player; public void Start() { InterfaceGameModeHooksManager.instance.RegisterHooks((object)this); player = ((Component)this).GetComponentInParent<Player>(); characterStatModifiers = ((Component)this).GetComponentInParent<CharacterStatModifiers>(); } public void OnPointStart() { CharacterData data = player.data; data.maxHealth += 25f; CharacterData data2 = player.data; data2.health += 25f; CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStatModifiers); additionalData.RainbowLeafHealth += 25f; CPCDebug.Log((object)string.Format("[{0}]{1}", "CPCComplex", CharacterStatModifiersExtension.GetAdditionalData(characterStatModifiers).RainbowLeafHealth)); } public void OnGameStart() { CharacterStatModifiersExtension.GetAdditionalData(characterStatModifiers).RainbowLeafHealth = 0f; Object.Destroy((Object)(object)this); } public void OnDestroy() { InterfaceGameModeHooksManager.instance.RemoveHooks((object)this); } } public class RPCMono : MonoBehaviour { [PunRPC] public void RPCASyncBlockThingy(int playerID) { Player playerWithID = PlayerManager.instance.GetPlayerWithID(playerID); playerWithID.data.block.counter = -0.25f; } } internal class ScreenWarpMono : MonoBehaviour, IPointStartHookHandler { private Player player; private int warpsLeft = 5; private float cd; private bool warping = false; private Vector2 pos; private OutOfBoundsHandler handler; public void Awake() { player = ((Component)this).GetComponentInParent<Player>(); cd = 0f; } public void OnPointStart() { warpsLeft = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).maxWarps; } public void Start() { //IL_0028: 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) OutOfBoundsHandler[] array = Object.FindObjectsOfType<OutOfBoundsHandler>(); OutOfBoundsHandler[] array2 = array; foreach (OutOfBoundsHandler val in array2) { if (((CharacterData)Traverse.Create((object)val).Field("data").GetValue()).player.playerID == ((CharacterData)Traverse.Create((object)player).Field("data").GetValue()).player.playerID) { handler = val; return; } } warpsLeft = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).maxWarps; } public void Update() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)handler != (Object)null) { pos = Vector2.op_Implicit(OutOfBoundsHandlerExtensions.BoundsPointFromWorldPosition(handler, ((Component)player.data).transform.position)); } else { OutOfBoundsHandler[] array = Object.FindObjectsOfType<OutOfBoundsHandler>(); OutOfBoundsHandler[] array2 = array; foreach (OutOfBoundsHandler val in array2) { if (((CharacterData)Traverse.Create((object)val).Field("data").GetValue()).player.playerID == ((CharacterData)Traverse.Create((object)player).Field("data").GetValue()).player.playerID) { handler = val; } } } if (!warping && (Object)(object)player != (Object)null && PlayerStatus.PlayerAliveAndSimulated(player)) { WarpX(Vector2.op_Implicit(pos)); WarpY(Vector2.op_Implicit(pos)); } if (cd >= 0f) { cd -= TimeHandler.deltaTime; } } public void OnEnable() { warpsLeft = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).maxWarps; } private void WarpX(Vector3 pos) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_0099: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0140: 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) if (!(cd <= 0f)) { return; } bool flag = false; if ((double)pos.x >= 0.99 || (double)pos.x <= 0.01) { flag = true; pos.x = 1f - pos.x; } if (!flag) { warping = false; } if (!((Object)(object)handler != (Object)null && flag) || warping || warpsLeft <= 0 || Object.op_Implicit((Object)(object)Physics2D.OverlapCircle(Vector2.op_Implicit(OutOfBoundsHandlerExtensions.WorldPositionFromBoundsPoint(handler, pos)), 0.15f, LayerMask.op_Implicit((LayerMask)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponentInParent<CharacterData>(), "groundMask"))))) { return; } if (!warping) { ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 0.1f, (Action)delegate { warping = false; warpsLeft--; }); } warping = true; ((Component)player).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(3); cd = 0.1f; ExtensionMethods.SetXPosition(((Component)player).transform, OutOfBoundsHandlerExtensions.WorldPositionFromBoundsPoint(handler, pos).x); } private void WarpY(Vector3 pos) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_0099: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) if (!(cd <= 0f)) { return; } bool flag = false; if ((double)pos.y >= 0.989 || (double)pos.y <= 0.011) { flag = true; pos.y = 1f - pos.y; } if (!flag) { warping = false; } if (!((Object)(object)handler != (Object)null && flag) || warping || warpsLeft <= 0 || Object.op_Implicit((Object)(object)Physics2D.OverlapCircle(Vector2.op_Implicit(OutOfBoundsHandlerExtensions.WorldPositionFromBoundsPoint(handler, pos)), 0.15f))) { return; } if (!warping) { ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 0.1f, (Action)delegate { warping = false; warpsLeft--; }); } warping = true; ((Component)player).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(3); cd = 0.1f; ExtensionMethods.SetYPosition(((Component)player).transform, OutOfBoundsHandlerExtensions.WorldPositionFromBoundsPoint(handler, pos).y); } } public class SentryGunMono : MonoBehaviour, IPointEndHookHandler { private Block block; private Player player; private Gun gun; private GameObject test; private Vector3 temp; private Vector3 aim; private int ammo = 3; private float cd = 0f; private PhotonView photonView; public SimulatedGun[] savedGuns = (SimulatedGun[])(object)new SimulatedGun[1]; public void OnDestroy() { InterfaceGameModeHooksManager.instance.RemoveHooks((object)this); Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); Gun obj2 = gun; obj2.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj2.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); Object.Destroy((Object)(object)test); Object.Destroy((Object)(object)savedGuns[0]); } private void OnBlock(BlockTriggerType trigger) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)test == (Object)null) { test = Object.Instantiate<GameObject>(ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("TestObj")); } temp = ((Component)player).transform.position; aim = new Vector3(player.data.input.aimDirection.x, player.data.input.aimDirection.y, 0f); test.transform.position = temp; test.GetComponent<SpriteRenderer>().color = player.GetTeamColors().color; ammo = gun.gunAmmo.maxAmmo * 2; } public void OnShootProjectileAction(GameObject obj) { if (obj.GetComponentsInChildren<StopRecursion>().Length != 0) { return; } SimulatedGun Sentry = savedGuns[0]; Sentry.CopyGunStatsExceptActions(gun); Sentry.CopyAttackAction(gun); Sentry.CopyShootProjectileAction(gun); SimulatedGun obj2 = Sentry; ((Gun)obj2).ShootPojectileAction = (Action<GameObject>)Delegate.Remove(((Gun)obj2).ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); ((Gun)Sentry).objectsToSpawn = ((Gun)Sentry).objectsToSpawn.Concat(StopRecursionMono.StopRecursionSpawn).ToArray(); ((Gun)Sentry).bursts = 0; ((Gun)Sentry).damage = gun.damage / 2f; ((Gun)Sentry).numberOfProjectiles = 1; ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 2, (Action)delegate { //IL_005b: 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) if ((Object)(object)test != (Object)null && ammo > 0 && cd <= 0f) { Sentry.SimulatedAttack(player.playerID, temp, aim, 1f, 1f, (Transform)null, false); ammo--; cd += 0.1f; } }); } public void OnPointEnd() { CPCDebug.Log((object)"[CPCComplex][Test] Round Ended"); if ((Object)(object)test != (Object)null) { Object.Destroy((Object)(object)test); } } public void Start() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) InterfaceGameModeHooksManager.instance.RegisterHooks((object)this); photonView = ((Component)this).GetComponent<PhotonView>(); player = ((Component)this).gameObject.GetComponent<Player>(); gun = player.data.weaponHandler.gun; block = ((Component)player).GetComponent<Block>(); if ((Object)(object)savedGuns[0] == (Object)null) { savedGuns[0] = new GameObject("BlockBullets").AddComponent<SimulatedGun>(); } Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); Gun obj2 = gun; obj2.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj2.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); } public void Update() { //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_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00c7: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)test != (Object)null && player.data.view.IsMine) { Vector3 val = Camera.main.ScreenToWorldPoint(Input.mousePosition) - test.transform.position; float num = Mathf.Atan2(val.y, val.x) * 57.29578f - 45f; test.transform.rotation = Quaternion.AngleAxis(num, Vector3.forward); aim = new Vector3(val.x, val.y, 0f); photonView.RPC("SyncDir", (RpcTarget)1, new object[2] { num, val }); } if (cd > 0f) { cd -= TimeHandler.deltaTime; } } [PunRPC] public void SyncDir(float angle, Vector3 Direction) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) test.transform.rotation = Quaternion.AngleAxis(angle, Vector3.forward); aim = new Vector3(Direction.x, Direction.y, 0f); } } internal class ShadowCloakMono : MonoBehaviour { private Player player; private PlayerActions playerActions; private float countDown = 0f; private bool called = false; public void Awake() { player = ((Component)this).GetComponentInParent<Player>(); playerActions = player.data.playerActions; countDown = 0f; called = false; } public void Start() { } public void Update() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) if (playerActions != null && PlayerActionsExtension.ActionIsPressed(playerActions, "BlockPhaseAction") && countDown <= 3f) { ((Behaviour)((Component)player).GetComponentInParent<PlayerCollision>()).enabled = false; if (Object.op_Implicit((Object)(object)Physics2D.OverlapCircle(Vector2.op_Implicit(((Component)player.data).transform.position), 0.05f, LayerMask.op_Implicit((LayerMask)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponentInParent<CharacterData>(), "groundMask"))))) { countDown += TimeHandler.deltaTime; } } if ((playerActions != null && !PlayerActionsExtension.ActionIsPressed(playerActions, "BlockPhaseAction")) || countDown >= 3f) { if (!((Behaviour)((Component)player).GetComponentInParent<PlayerCollision>()).enabled) { ExtensionMethods.SetFieldValue((object)((Component)player).GetComponentInParent<PlayerCollision>(), "lastPos", (object)new Vector2(((Component)player.data).transform.position.x, ((Component)player.data).transform.position.y)); ((Behaviour)((Component)player).GetComponentInParent<PlayerCollision>()).enabled = true; } if (Object.op_Implicit((Object)(object)Physics2D.OverlapCircle(Vector2.op_Implicit(((Component)player.data).transform.position), 0.05f, LayerMask.op_Implicit((LayerMask)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponentInParent<CharacterData>(), "groundMask"))))) { ((Component)player).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(5); ((Behaviour)((Component)player).GetComponentInParent<PlayerCollision>()).enabled = false; ExtensionMethods.SetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity", (object)((Vector2)ExtensionMethods.GetFieldValue((object)((Component)player).GetComponent<PlayerVelocity>(), "velocity") + new Vector2(0f, 25f))); } } if (countDown >= 3f && !called) { ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 4.5f, (Action)delegate { countDown = 0f; called = false; }); called = true; } } public void OnDisable() { countDown = 0f; called = false; } public void OnEnable() { ((Behaviour)((Component)player).GetComponentInParent<PlayerCollision>()).enabled = true; } } public class SimulatedGunTest : MonoBehaviour { private Player player; private Gun gun; public SimulatedGun[] savedGuns = (SimulatedGun[])(object)new SimulatedGun[1]; public static GameObject _stopRecursionObj; public static GameObject StopRecursionObj { get { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if ((Object)(object)_stopRecursionObj == (Object)null) { _stopRecursionObj = new GameObject("A_StopRecursion", new Type[1] { typeof(StopRecursion) }); Object.DontDestroyOnLoad((Object)(object)_stopRecursionObj); } return _stopRecursionObj; } } public static ObjectsToSpawn[] StopRecursionSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { new ObjectsToSpawn { AddToProjectile = StopRecursionObj } }; public void Start() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent<Player>(); gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); if ((Object)(object)savedGuns[0] == (Object)null) { savedGuns[0] = new GameObject("OPPOSITE-Gun").AddComponent<SimulatedGun>(); } } public void OnShootProjectileAction(GameObject obj) { if (obj.GetComponentsInChildren<StopRecursion>().Length != 0) { return; } SimulatedGun oppositeGun = savedGuns[0]; oppositeGun.CopyGunStatsExceptActions(gun); oppositeGun.CopyAttackAction(gun); oppositeGun.CopyShootProjectileAction(gun); SimulatedGun obj2 = oppositeGun; ((Gun)obj2).ShootPojectileAction = (Action<GameObject>)Delegate.Remove(((Gun)obj2).ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); ((Gun)oppositeGun).numberOfProjectiles = 1; ((Gun)oppositeGun).bursts = 0; ((Gun)oppositeGun).objectsToSpawn = ((Gun)oppositeGun).objectsToSpawn.Concat(StopRecursionSpawn).ToArray(); if (player.data.view.IsMine || PhotonNetwork.OfflineMode) { ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 15, (Action)delegate { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) oppositeGun.SimulatedAttack(player.playerID, new Vector3(((Component)gun).transform.position.x + 2f * (player.data.input.aimDirection.x * -1f), ((Component)gun).transform.position.y - 0.5f * player.data.input.aimDirection.y, 0f), new Vector3(player.data.input.aimDirection.x * -1f, player.data.input.aimDirection.y, 0f), 1f, 1f, (Transform)null, false); }); } } public void OnDestroy() { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); Object.Destroy((Object)(object)savedGuns[0]); } } } namespace CPCComplex.Cards { internal class BlockPusher : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.attackSpeed = 1.5f; CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CooldownBlock orAddComponent = ExtensionMethods.GetOrAddComponent<CooldownBlock>(((Component)player).gameObject, false); CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStats); additionalData.blockMoveStrength += 1f; CharacterStatModifiersExtension.GetAdditionalData(characterStats).blockMover = true; CharacterStatModifiersExtension.GetAdditionalData(characterStats).blockPush = true; gun.reflects = 0; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CooldownBlock orAddComponent = ExtensionMethods.GetOrAddComponent<CooldownBlock>(((Component)player).gameObject, false); Object.Destroy((Object)(object)orAddComponent); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Block Mover"; } protected override string GetDescription() { return "Your bullets now move objects, press R (left dpad on controller) to switch the direction they move [Each move has a 3 second cooldown]"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_BlockPusher"); } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("Divine"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Block Moving Strength", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Bounces", amount = "Reset", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Attack Speed", amount = "-50%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } public override string GetModName() { return "CPC"; } } internal class BlockSentryGun : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.cdMultiplier = 1.25f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BlockBullets orAddComponent = ExtensionMethods.GetOrAddComponent<BlockBullets>(((Component)player).gameObject, false); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BlockBullets orAddComponent = ExtensionMethods.GetOrAddComponent<BlockBullets>(((Component)player).gameObject, false); Object.Destroy((Object)(object)orAddComponent); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Delayed Sentry"; } protected override string GetDescription() { return "When you block you place a sentry gun that fires 3 bullets 1.5 seconds after you place it [1.5 second placement cooldown]"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_BlockSentryGun"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+25%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "CPC"; } } internal class BouncyBombs : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.reflects = 2; gun.speedMOnBounce = 1.05f; gun.attackSpeed = 1.5f; CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ObjectsToSpawn item = ((GameObject)Resources.Load("0 cards/Mayhem")).GetComponent<Gun>().objectsToSpawn[0]; List<ObjectsToSpawn> list = gun.objectsToSpawn.ToList(); list.Add(item); gun.objectsToSpawn = list.ToArray(); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Bouncy Bombs"; } protected override string GetDescription() { return "Your bullets turn into bouncy bombs"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_BouncyBombs"); } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("Exotic"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bounces", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed On Bounce", amount = "+5%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Attack Speed", amount = "-50%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } public override string GetModName() { return "CPC"; } } internal class LegendaryJackpot : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[2] { CustomCardCategories.instance.CardCategory("CardManipulation"), RerollManager.instance.NoFlip }; CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 10, (Action)delegate { CardInfo randomCardWithCondition = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)LegendCondition, 1000); Cards.instance.AddCardToPlayer(player, randomCardWithCondition, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition, (float?)3f); }); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } private bool LegendCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return card.rarity == RarityUtils.GetRarity("Legendary") && card.cardName != "Peptide" && !card.categories.Intersect(ScareJackpot.noLotteryCategories).Any(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Legendary Jackpot"; } protected override string GetDescription() { return "gives you a random <#b2b200>Legendary</color> card"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_LegendaryJackpot"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Legendary", amount = "+1", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)8; } public override string GetModName() { return "CPC"; } } internal class Nullgendary : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[2] { CustomCardCategories.instance.CardCategory("CardManipulation"), RerollManager.instance.NoFlip }; CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 10, (Action)delegate { CardInfo randomCardWithCondition = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)LegendCondition, 1000); Cards.instance.AddCardToPlayer(player, randomCardWithCondition, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition, (float?)3f); }); CharacterStatModifiersExtension.AjustNulls(characterStats, 30); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Ancient distill power"; } protected override string GetDescription() { return "gives you a random <#b2b200>Legendary</color> card at the price of a lot of nulls"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_AncientDistillPower"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Legendary", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Nulls", amount = "+30", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)8; } public override string GetModName() { return "CPC"; } private bool LegendCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return card.rarity == RarityUtils.GetRarity("Legendary") && card.cardName != "Peptide" && !card.categories.Intersect(ScareJackpot.noLotteryCategories).Any(); } } internal class RoyalGifting : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[3] { RerollManager.instance.NoFlip, CurseManager.instance.curseSpawnerCategory, CustomCardCategories.instance.CardCategory("CardManipulation") }; CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 10, (Action)delegate { CardInfo randomCardWithCondition = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)RareCondition, 1000); CardInfo randomCardWithCondition2 = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)UncommonCondition, 1000); CardInfo randomCardWithCondition3 = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)CommonCondition, 1000); CardInfo randomCardWithCondition4 = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)CommonCondition, 1000); Cards.instance.AddCardToPlayer(player, randomCardWithCondition, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition, (float?)3f); Cards.instance.AddCardToPlayer(player, randomCardWithCondition2, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition2, (float?)3f); Cards.instance.AddCardToPlayer(player, randomCardWithCondition3, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition3, (float?)3f); Cards.instance.AddCardToPlayer(player, randomCardWithCondition4, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition4, (float?)3f); CurseManager.instance.CursePlayer(player, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(player, curse, (float?)3f); }); CurseManager.instance.CursePlayer(player, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(player, curse, (float?)3f); }); CurseManager.instance.CursePlayer(player, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(player, curse, (float?)3f); }); }); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } private bool ScarceCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return card.rarity == RarityUtils.GetRarity("Exotic") && !card.categories.Intersect(ScareJackpot.noLotteryCategories).Any(); } private bool RareCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 return (int)card.rarity == 2 && card.cardName != "Distill" && card.cardName != "Genie" && !card.categories.Intersect(ScareJackpot.noLotteryCategories).Any(); } private bool UncommonCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 return (int)card.rarity == 1 && card.cardName != "Copy" && !card.categories.Intersect(ScareJackpot.noLotteryCategories).Any(); } private bool CommonCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return (int)card.rarity == 0 && !card.categories.Intersect(ScareJackpot.noLotteryCategories).Any(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Royal Gifting"; } protected override string GetDescription() { return "gives you 2 commons, 1 uncommon, 1 rare, and 3 curses"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_RoyalGifitng"); } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("Legendary"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Rare", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Uncommon", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Commons", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Curses", amount = "+3", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)8; } public override string GetModName() { return "CPC"; } } internal class ScareJackpot : CustomCard { public static CardCategory[] noLotteryCategories = (CardCategory[])(object)new CardCategory[2] { CustomCardCategories.instance.CardCategory("CardManipulation"), CustomCardCategories.instance.CardCategory("NoRandom") }; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[2] { CustomCardCategories.instance.CardCategory("CardManipulation"), RerollManager.instance.NoFlip }; CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsComplex.Instance, 10, (Action)delegate { CardInfo randomCardWithCondition = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)ScarceCondition, 1000); Cards.instance.AddCardToPlayer(player, randomCardWithCondition, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition, (float?)3f); }); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Exotic Jackpot"; } protected override string GetDescription() { return "gives you a random <#0A32FF>Exotic</color> card"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_ScarceJackpot"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Exotic", amount = "+1", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)8; } public override string GetModName() { return "CPC"; } private bool ScarceCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return card.rarity == RarityUtils.GetRarity("Exotic") && card.cardName != "Peptide" && !card.categories.Intersect(noLotteryCategories).Any(); } } internal class CelesteDashCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CelesteDash orAddComponent = ExtensionMethods.GetOrAddComponent<CelesteDash>(((Component)player).gameObject, false); CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStats); additionalData.dashes++; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CelesteDash orAddComponent = ExtensionMethods.GetOrAddComponent<CelesteDash>(((Component)player).gameObject, false); Object.Destroy((Object)(object)orAddComponent); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Celeste Dash"; } protected override string GetDescription() { return "Press the middle mouse button (right bumper on controller) to dash! (recharges when you touch the ground)"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_CelesteDash"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Dashes", amount = "+1", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "CPC"; } } internal class CursorFearCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStats); additionalData.cursorFear += 10f; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Cursor Fear"; } protected override string GetDescription() { return "You hate the cursor and always move away from it"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsComplex.Bundle.LoadAsset<GameObject>("C_CursorFear"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "CPC"; } } internal class CursorLoveCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCComplex][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(characterStats); additionalData.cursorFear -= 10f; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCComplex", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravi