using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using CardChoiceSpawnUniqueCardPatch.CustomCategories; using CardThemeLib; using ClassesManagerReborn; using ClassesManagerReborn.Util; using CooldownUILib; using HarmonyLib; using Jotunn.Utils; using Microsoft.CodeAnalysis; using ModdingUtils.Extensions; using ModdingUtils.MonoBehaviours; using ModdingUtils.RoundsEffects; using ModdingUtils.Utils; using MrFuntikMod.Cards; using MrFuntikMod.Effects; using MrFuntikMod.Extensions; using MrFuntikMod.MonoBehaviors; using MrFuntikMod.MonoBehaviours; using MrFuntikMod.Patches; using Photon.Pun; using RarityLib.Utils; using Sonigon; using Sonigon.Internal; using SoundImplementation; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnboundLib.Networking; using UnboundLib.Utils; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("MFM")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+24a2a6e0926b9e92788edea0c6331c93da15619c")] [assembly: AssemblyProduct("MFM")] [assembly: AssemblyTitle("MFM")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace MrFuntikMod { internal class Assets { private const string BUNDLE_IS = "isbundle"; private const string BUNDLE_IS_V2 = "isbundlev2"; private const string BUNDLE_DRON = "dron-asset-2"; private const string BUNDLE_MFM = "myasset"; private const string BUNDLE_BFRM = "bfrm"; private static AssetBundle _bundle; private static AssetBundle _bundle2; private static AssetBundle _bundleDron; private static AssetBundle _bundleMFM; private static AssetBundle _bundleBFRM; private static bool _loadAttempted; private static readonly Dictionary _assetCache; private static readonly Dictionary _spriteCache; private static readonly Dictionary _audioCache; public static GameObject StepBackArt => SafeLoadAsset(_bundle, "isbundle", "C_StepBack"); public static GameObject BlackPillArt => SafeLoadAsset(_bundle, "isbundle", "C_BlackPill"); public static GameObject GymBossArt => SafeLoadAsset(_bundle, "isbundle", "C_GymBoss"); public static GameObject TakeAimArt => SafeLoadAsset(_bundle2, "isbundlev2", "C_TakeAim"); public static GameObject AllCardArt => SafeLoadAsset(_bundle2, "isbundlev2", "C_AllCard"); public static GameObject NothingArt => SafeLoadAsset(_bundle2, "isbundlev2", "C_Nothing"); public static GameObject SomethingArt => SafeLoadAsset(_bundle2, "isbundlev2", "C_Something"); public static GameObject ItBecomesAllArt => SafeLoadAsset(_bundle2, "isbundlev2", "C_ItBecomesAll"); public static GameObject FragileStrengthArt => SafeLoadAsset(_bundle2, "isbundlev2", "C_FragileStrength"); public static GameObject KamikazeArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_Kamikaze"); public static GameObject SpeedDemonArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "С_Speed_Demon"); public static GameObject QuickReloadArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_QuickReload"); public static GameObject MinigunArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_Minigun"); public static GameObject PhoenixArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_Phoenix"); public static GameObject TankArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_Tank"); public static GameObject SprayArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_Spray"); public static GameObject FriendlyBounceArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_FriendlyBounce"); public static GameObject JumperArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_Jumper"); public static GameObject HealMeArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_HealMe"); public static GameObject ThornShieldArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_ThornShield"); public static GameObject SmallButToughArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_SmallButTough"); public static GameObject BulletTeleporterArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_BulletTeleporter"); public static GameObject ComeToMeArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_ComeToMe"); public static GameObject AntiradarArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_Antiradar"); public static GameObject RandomTeleportArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "С_RandomTeleport"); public static GameObject DestroyerArt => SafeLoadAsset(_bundleDron, "dron-asset-2", "C_Destroyer"); public static Sprite GunAsset => SafeLoadSprite(_bundleDron, "dron-asset-2", "Minigun-Gun"); public static Sprite RedSquare => SafeLoadSprite(_bundleDron, "dron-asset-2", "RedSquare"); public static GameObject MyBulletPrefab => SafeLoadAsset(_bundleDron, "dron-asset-2", "MyBullet"); public static GameObject CHESS_KNIGHT_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_CHESS_KNIGHT"); public static GameObject Narcissism_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_narcissism"); public static GameObject CHESS_PAWN_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_CHESS_PAWN"); public static GameObject CHESS_ROOK_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_CHESS_ROOK"); public static GameObject CHESS_BISHOP_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_CHESS_BISHOP"); public static GameObject unstable_gun_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_unstable_gun"); public static GameObject NecroCardArt => SafeLoadAsset(_bundleMFM, "myasset", "C_necro_card"); public static GameObject Necro2CardArt => SafeLoadAsset(_bundleMFM, "myasset", "C_necro2_card"); public static GameObject Necro3CardArt => SafeLoadAsset(_bundleMFM, "myasset", "C_necro3_card"); public static GameObject CHESS_QUEEN_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_CHESS_QUEEN"); public static GameObject VampireCastleArt => SafeLoadAsset(_bundleMFM, "myasset", "C_VAMPIRE_CASTLE"); public static GameObject OneShotMan_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_ONESHOT_MAN"); public static GameObject DrillHands_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_DRILL_HANDS"); public static GameObject BounceConverter_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BOUNCE_CONVERTER"); public static GameObject PhenomenalBalance_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_PHENOMENAL_BALANCE"); public static GameObject BalanceBlock_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BALANCE_BLOCK"); public static GameObject BalanceTank_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BALANCE_TANK"); public static GameObject BalanceHitman_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BALANCE_HITMAN"); public static GameObject BalanceBullets_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BALANCE_BULLETS"); public static GameObject BalanceMayhem_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BALANCE_MAYHEM"); public static GameObject BalanceSpeed_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BALANCE_SPEED"); public static GameObject BalanceReload_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BALANCE_RELOAD"); public static GameObject Dominion_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_DOMINION"); public static GameObject AuraBloodRot_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_BLOOD_ROT"); public static GameObject AuraBrokenBurstRot_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_BROKEN_BURST"); public static GameObject AuraColdWater_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_COLD_WATER"); public static GameObject AuraDeathSentence_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_DEATH_SENTENCE"); public static GameObject AuraHeavyHands_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_HEAVY_HANDS"); public static GameObject AuraOverheated_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_OVERHEATED"); public static GameObject AuraSlowSleep_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_SLOW_SLEEP"); public static GameObject AuraSoftRicochet_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_SOFT_RICOCHET"); public static GameObject AuraWeakening_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AURA_WEAKENING"); public static GameObject ThunderCode_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_THUNDER_CORE"); public static GameObject EarthSpears_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_EARTHSPEARS"); public static GameObject Dancer_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_DANCER"); public static GameObject Momentum_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_MOMENTUM"); public static GameObject Aegis_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_AEGIS"); public static GameObject Immunize_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_IMMUNIZE"); public static GameObject Rooted_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_ROOTED"); public static GameObject SonicRiot_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_SONIC_RIOT"); public static GameObject ControlledFire_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_CONTROLLED_FIRE"); public static GameObject Unstoppable_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_UNSTOPPABLE"); public static GameObject SaferyDetonator_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_SAFETY_DETONATOR"); public static GameObject AntiRadar_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_ANTI_RADAR"); public static GameObject Berserker_Art => SafeLoadAsset(_bundleMFM, "myasset", "C_BERSERKER"); public static GameObject ExecutionerArt => SafeLoadAsset(_bundleBFRM, "bfrm", "C_EXECUTIONER"); public static AudioClip DemRes1 => SafeLoadAudioClip(_bundleMFM, "myasset", "dem_res_1"); public static AudioClip DemRes2 => SafeLoadAudioClip(_bundleMFM, "myasset", "dem_rev_2"); public static AudioClip DemRes3 => SafeLoadAudioClip(_bundleMFM, "myasset", "dem_res_3"); public static AudioClip DemRes4 => SafeLoadAudioClip(_bundleMFM, "myasset", "dem_res_4"); public static AudioClip DemRes5 => SafeLoadAudioClip(_bundleMFM, "myasset", "dem_res_pontiff"); static Assets() { _loadAttempted = false; _assetCache = new Dictionary(); _spriteCache = new Dictionary(); _audioCache = new Dictionary(); } public static void PreloadBundles() { LoadBundles(); } private static void LoadBundles() { if (_loadAttempted) { return; } _loadAttempted = true; IEnumerable allLoadedAssetBundles = AssetBundle.GetAllLoadedAssetBundles(); foreach (AssetBundle item in allLoadedAssetBundles) { if (((Object)item).name == "isbundle") { _bundle = item; MrFuntikMod.Log("[MFM][Assets] isbundle already loaded, reusing"); } if (((Object)item).name == "isbundlev2") { _bundle2 = item; MrFuntikMod.Log("[MFM][Assets] isbundlev2 already loaded, reusing"); } if (((Object)item).name == "dron-asset-2") { _bundleDron = item; MrFuntikMod.Log("[MFM][Assets] dron-asset-2 already loaded, reusing"); } if (((Object)item).name == "myasset") { _bundleMFM = item; MrFuntikMod.Log("[MFM][Assets] myasset already loaded, reusing"); } if (((Object)item).name == "bfrm") { _bundleBFRM = item; MrFuntikMod.Log("[MFM][Assets] bfrm already loaded, reusing"); } } if ((Object)(object)_bundle == (Object)null) { try { _bundle = AssetUtils.LoadAssetBundleFromResources("isbundle", typeof(MrFuntikMod).Assembly); } catch (Exception ex) { MrFuntikMod.LogError("[MFM][Assets] FAILED to load isbundle: " + ex.Message); } } if ((Object)(object)_bundle2 == (Object)null) { try { _bundle2 = AssetUtils.LoadAssetBundleFromResources("isbundlev2", typeof(MrFuntikMod).Assembly); } catch (Exception ex2) { MrFuntikMod.LogError("[MFM][Assets] FAILED to load isbundlev2: " + ex2.Message); } } if ((Object)(object)_bundleDron == (Object)null) { try { _bundleDron = AssetUtils.LoadAssetBundleFromResources("dron-asset-2", typeof(MrFuntikMod).Assembly); } catch (Exception ex3) { MrFuntikMod.LogError("[MFM][Assets] FAILED to load dron-asset-2: " + ex3.Message); } } if ((Object)(object)_bundleMFM == (Object)null) { try { _bundleMFM = AssetUtils.LoadAssetBundleFromResources("myasset", typeof(MrFuntikMod).Assembly); } catch (Exception ex4) { MrFuntikMod.LogError("[MFM][Assets] FAILED to load myasset: " + ex4.Message); } } if (!((Object)(object)_bundleBFRM == (Object)null)) { return; } try { _bundleBFRM = AssetUtils.LoadAssetBundleFromResources("bfrm", typeof(MrFuntikMod).Assembly); } catch (Exception ex5) { MrFuntikMod.LogError("[MFM][Assets] FAILED to load bfrm: " + ex5.Message); } } private static GameObject SafeLoadAsset(AssetBundle bundle, string bundleName, string assetName) { LoadBundles(); string key = bundleName + ":" + assetName; if (_assetCache.TryGetValue(key, out GameObject value)) { if ((Object)(object)value != (Object)null) { return value; } _assetCache.Remove(key); } if ((Object)(object)bundle == (Object)null) { return null; } try { GameObject val = bundle.LoadAsset(assetName); if ((Object)(object)val == (Object)null) { MrFuntikMod.LogWarning("[MFM][Assets] Asset '" + assetName + "' not found in '" + bundleName + "'"); } else { _assetCache[key] = val; } return val; } catch (Exception ex) { MrFuntikMod.LogError("[MFM][Assets] Exception loading '" + assetName + "': " + ex.Message); return null; } } private static Sprite SafeLoadSprite(AssetBundle bundle, string bundleName, string assetName) { LoadBundles(); string key = bundleName + ":" + assetName; if (_spriteCache.TryGetValue(key, out Sprite value)) { if ((Object)(object)value != (Object)null) { return value; } _spriteCache.Remove(key); } if ((Object)(object)bundle == (Object)null) { return null; } try { Sprite val = bundle.LoadAsset(assetName); if ((Object)(object)val == (Object)null) { MrFuntikMod.LogWarning("[MFM][Assets] Sprite '" + assetName + "' not found in '" + bundleName + "'"); } else { _spriteCache[key] = val; } return val; } catch (Exception ex) { MrFuntikMod.LogError("[MFM][Assets] Exception loading sprite '" + assetName + "': " + ex.Message); return null; } } private static AudioClip SafeLoadAudioClip(AssetBundle bundle, string bundleName, string assetName) { LoadBundles(); string key = bundleName + ":" + assetName; if (_audioCache.TryGetValue(key, out AudioClip value)) { if ((Object)(object)value != (Object)null) { return value; } _audioCache.Remove(key); } if ((Object)(object)bundle == (Object)null) { return null; } try { AudioClip val = bundle.LoadAsset(assetName); if ((Object)(object)val == (Object)null) { MrFuntikMod.LogWarning("[MFM][Assets] AudioClip '" + assetName + "' not found in '" + bundleName + "'"); } else { _audioCache[key] = val; } return val; } catch (Exception ex) { MrFuntikMod.LogError("[MFM][Assets] Exception loading AudioClip '" + assetName + "': " + ex.Message); return null; } } } internal static class ScreenEdgeBounceHelper { private static ObjectsToSpawn _cached; private static ObjectsToSpawn GetSpawnObject() { if (_cached != null) { return _cached; } try { IEnumerable first = ((ObservableCollection)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToList(); List second = (List)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); _cached = (from c in first.Concat(second) where ((Object)((Component)c).gameObject).name == "TargetBounce" select c).SelectMany((CardInfo c) => ((Component)c).GetComponent().objectsToSpawn).FirstOrDefault((Func)((ObjectsToSpawn o) => (Object)(object)o.AddToProjectile.GetComponent() != (Object)null)); } catch (Exception ex) { MrFuntikMod.LogError("[ScreenEdgeBounceHelper] Failed to get spawn object: " + ex.Message); } return _cached; } public static void Add(Gun gun) { ObjectsToSpawn spawnObject = GetSpawnObject(); if (spawnObject != null) { List list = gun.objectsToSpawn.ToList(); list.Add(spawnObject); gun.objectsToSpawn = list.ToArray(); } } public static void Remove(Gun gun) { ObjectsToSpawn spawnObject = GetSpawnObject(); if (spawnObject != null) { List list = gun.objectsToSpawn.ToList(); if (list.Remove(spawnObject)) { gun.objectsToSpawn = list.ToArray(); } } } } internal class CardCheck : MonoBehaviour { public static readonly string[] AllowedModInitials = new string[4] { "BFRM", "MFM", "IS", "DRON" }; public static int Amount(Player player, string cardName) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.currentCards == null) { return 0; } List currentCards = player.data.currentCards; int num = 0; for (int num2 = currentCards.Count - 1; num2 >= 0; num2--) { if ((Object)(object)currentCards[num2] != (Object)null && currentCards[num2].cardName == cardName) { num++; } } return num; } public static int AmountFromAllowedMods(Player player, string cardName) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.currentCards == null) { return 0; } List currentCards = player.data.currentCards; int num = 0; for (int num2 = currentCards.Count - 1; num2 >= 0; num2--) { CardInfo val = currentCards[num2]; if ((Object)(object)val != (Object)null && val.cardName == cardName && IsFromAllowedMod(val)) { num++; } } return num; } public static bool HasCardFromAllowedMods(Player player, string cardName) { return AmountFromAllowedMods(player, cardName) > 0; } public static bool IsFromAllowedMod(CardInfo card) { if ((Object)(object)card == (Object)null) { return false; } string cardModName = GetCardModName(card); if (string.IsNullOrEmpty(cardModName)) { return false; } for (int i = 0; i < AllowedModInitials.Length; i++) { if (cardModName == AllowedModInitials[i]) { return true; } } return false; } private static string GetCardModName(CardInfo card) { if ((Object)(object)card == (Object)null) { return null; } string cardName = card.cardName; if ((Object)(object)card.sourceCard != (Object)null) { cardName = card.sourceCard.cardName; } try { foreach (KeyValuePair card2 in CardManager.cards) { if ((Object)(object)card2.Value.cardInfo != (Object)null && card2.Value.cardInfo.cardName == cardName) { return card2.Value.category; } } } catch { } return null; } } public static class MapUtils { private static Scene mapScene; private static List mapObjects; public static void DestroyMapObject(GameObject gameObject) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gameObject == (Object)null) { return; } try { if (UpdateMapObjectsList()) { string name = ((Scene)(ref mapScene)).name; Scene scene = gameObject.scene; if (name.Equals(((Scene)(ref scene)).name) && IsValidMapObject(gameObject)) { Object.Destroy((Object)(object)gameObject); } } } catch (Exception ex) { MrFuntikMod.LogError("[MrFuntikMod] DestroyMapObject error: " + ex.Message); } } private static bool UpdateMapObjectsList() { //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) try { if (mapObjects != null) { mapObjects.Clear(); } mapObjects = new List(); if (SceneManager.sceneCount < 2) { return false; } mapScene = SceneManager.GetSceneAt(1); if (!((Scene)(ref mapScene)).IsValid()) { return false; } GameObject[] rootGameObjects = ((Scene)(ref mapScene)).GetRootGameObjects(); if (rootGameObjects.Length == 0) { return false; } GameObject val = rootGameObjects[0]; if ((Object)(object)val == (Object)null) { return false; } Transform[] componentsInChildren = val.GetComponentsInChildren(); Transform[] array = componentsInChildren; foreach (Transform val2 in array) { if (IsValidMapObject(((Component)val2).gameObject)) { mapObjects.Add(((Component)val2).gameObject); } } return true; } catch (Exception ex) { MrFuntikMod.LogError("[MrFuntikMod] UpdateMapObjectsList error: " + ex.Message); return false; } } private static bool IsValidMapObject(GameObject obj) { if ((Object)(object)obj == (Object)null || !obj.activeInHierarchy) { return false; } Collider2D component = obj.GetComponent(); if ((Object)(object)component == (Object)null) { return false; } SpriteRenderer component2 = obj.GetComponent(); if ((Object)(object)component2 == (Object)null) { return false; } SFPolygon component3 = obj.GetComponent(); if ((Object)(object)component3 != (Object)null && !((Behaviour)component3).isActiveAndEnabled) { return false; } return true; } } internal static class ElasticConfig { public const float BASE_MOVE_SPEED_MULT = 1.25f; public const float BASE_BOOST_DURATION = 5f; public const float BASE_BOOST_DAMAGE_MULT = 0.5f; public const float PAIN_FUEL_DURATION_PER_STACK = 2f; public const float RECOUP_HEAL_FRACTION = 0.25f; public const float RECOUP_HEAL_DELAY = 0.5f; public const float REFLEX_DAMAGE_PER_STACK = 0.5f; public const float PRESSURE_DAMAGE_PER_HIT = 0.2f; public const float PRESSURE_DAMAGE_MAX = 2f; public const float CADENCE_RELOAD_PER_HIT = 0.1f; public const float CADENCE_RELOAD_MIN = 0.2f; public const float PARRY_CD_PER_HIT = 0.1f; public const float PARRY_CD_MIN = 0.2f; public const float FRENZY_DURATION_PER_HIT = 1f; public const float FRENZY_BONUS_MAX = 5f; public const float ACCELERATE_SPEED_PER_HIT = 0.1f; public const float ACCELERATE_SPEED_MAX = 1.8f; public const float QUICKEN_ATTACK_SPEED_PER_HIT = 0.1f; public const float QUICKEN_ATTACK_SPEED_MIN = 0.2f; public const float RAPID_BULLET_SPEED_PER_HIT = 0.1f; public const float RAPID_BULLET_SPEED_MAX = 2f; public const float DEVOUR_LIFESTEAL_PER_HIT = 0.1f; public const float DEVOUR_LIFESTEAL_MAX = 1f; public const float FURY_DAMAGE_PER_STACK = 0.25f; public const float HASTE_ATTACK_SPEED_PER_STACK = 0.25f; public const float SURGE_BULLET_SPEED_PER_STACK = 0.5f; public const float ZEN_HP_PER_SECOND = 10f; public const float BLOODRUSH_LIFESTEAL_PER_STACK = 0.25f; public const float TEMPO_RELOAD_PER_STACK = 0.25f; public const float AEGIS_BLOCK_CD_PER_STACK = 0.25f; public const float RUSH_MOVE_SPEED_PER_STACK = 0.25f; public const float TRAIL_TIME = 0.45f; public const float TRAIL_START_WIDTH = 0.04f; public const float TRAIL_MIN_VERTEX = 0.03f; public const float TRAIL_ALPHA_START = 0.5f; public const float TRAIL_FLICKER_SPEED = 4f; public const float TRAIL_FLICKER_PHASE = 1.2f; } public static class PhoenixSurgeHelper { public static bool HasKamikaze(Player player) { if ((Object)(object)player == (Object)null) { return false; } return (Object)(object)((Component)player).gameObject.GetComponent() != (Object)null; } public static void CheckUnlockPhoenixSurge(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (HasKamikaze(player) && blacklistedCategories.Contains(MrFuntikMod.PhoenixSurgeCategory)) { blacklistedCategories.Remove(MrFuntikMod.PhoenixSurgeCategory); } } } public static void CheckLockPhoenixSurge(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!blacklistedCategories.Contains(MrFuntikMod.PhoenixSurgeCategory)) { blacklistedCategories.Add(MrFuntikMod.PhoenixSurgeCategory); } } } } public static class VengefulSparkConfig { public const float DAMAGE_REFLECT_PERCENT = 0.3f; public const float MIN_DAMAGE_THRESHOLD = 3f; public const float COOLDOWN = 0.5f; } public static class ArcFieldHelper { public static bool HasThunderCore(Player player) { if ((Object)(object)player == (Object)null) { return false; } MonoBehaviour[] components = ((Component)player).gameObject.GetComponents(); MonoBehaviour[] array = components; foreach (MonoBehaviour val in array) { if ((Object)(object)val != (Object)null && ((object)val).GetType().Name == "ElectricBulletEffect") { return true; } } return CardCheck.HasCardFromAllowedMods(player, "Thunder Core"); } public static bool HasPlanet(Player player) { if ((Object)(object)player == (Object)null) { return false; } MonoBehaviour[] components = ((Component)player).gameObject.GetComponents(); MonoBehaviour[] array = components; foreach (MonoBehaviour val in array) { if ((Object)(object)val != (Object)null && ((object)val).GetType().Name == "GravityFieldMono") { return true; } } return CardCheck.HasCardFromAllowedMods(player, "Planet"); } public static void CheckUnlockArcField(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; bool flag = HasThunderCore(player); bool flag2 = HasPlanet(player); if (flag && flag2 && blacklistedCategories.Contains(MrFuntikMod.ArcFieldCategory)) { blacklistedCategories.Remove(MrFuntikMod.ArcFieldCategory); } } } public static void CheckLockArcField(Player player, string removingComponent) { if ((Object)(object)player == (Object)null) { return; } List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; bool flag = HasThunderCore(player); bool flag2 = HasPlanet(player); if (removingComponent == "ThunderCore") { int num = CardCheck.AmountFromAllowedMods(player, "Thunder Core"); if (num <= 1) { flag = false; } } if (removingComponent == "Planet") { int num2 = CardCheck.AmountFromAllowedMods(player, "Planet"); if (num2 <= 1) { flag2 = false; } } if ((!flag || !flag2) && !blacklistedCategories.Contains(MrFuntikMod.ArcFieldCategory)) { blacklistedCategories.Add(MrFuntikMod.ArcFieldCategory); } } } public static class GravitySurgeHelper { public static bool HasPlanet(Player player) { if ((Object)(object)player == (Object)null) { return false; } MonoBehaviour[] components = ((Component)player).gameObject.GetComponents(); MonoBehaviour[] array = components; foreach (MonoBehaviour val in array) { if ((Object)(object)val != (Object)null && ((object)val).GetType().Name == "GravityFieldMono") { return true; } } return CardCheck.HasCardFromAllowedMods(player, "Planet"); } public static void CheckUnlockGravitySurge(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (HasPlanet(player) && blacklistedCategories.Contains(MrFuntikMod.GravitySurgeCategory)) { blacklistedCategories.Remove(MrFuntikMod.GravitySurgeCategory); } } } public static void CheckLockGravitySurge(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!blacklistedCategories.Contains(MrFuntikMod.GravitySurgeCategory)) { blacklistedCategories.Add(MrFuntikMod.GravitySurgeCategory); } } } public static void CheckLockGravitySurgeOnStackRemove(Player player, bool isLastStack) { if ((Object)(object)player == (Object)null) { return; } int num = CardCheck.AmountFromAllowedMods(player, "Planet"); if (num <= 1) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!blacklistedCategories.Contains(MrFuntikMod.GravitySurgeCategory)) { blacklistedCategories.Add(MrFuntikMod.GravitySurgeCategory); } } } } public static class ImmunityHelper { private static CardCategory _immunityCategory; private static CardCategory ImmunityCategory { get { if ((Object)(object)_immunityCategory == (Object)null) { _immunityCategory = CustomCardCategories.instance.CardCategory("ImmunityCards"); } return _immunityCategory; } } public static int CountImmunityCards(Player player) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.currentCards == null) { return 0; } int num = 0; foreach (CardInfo currentCard in player.data.currentCards) { if (!((Object)(object)currentCard == (Object)null) && currentCard.categories != null && currentCard.categories.Contains(ImmunityCategory) && CardCheck.IsFromAllowedMod(currentCard)) { num++; } } return num; } public static void CheckUnlockImmunityMaster(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; int num = CountImmunityCards(player) + 1; if (num >= 2 && blacklistedCategories.Contains(MrFuntikMod.ImmunityMasterCategory)) { blacklistedCategories.Remove(MrFuntikMod.ImmunityMasterCategory); } } } public static void CheckLockImmunityMaster(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; int num = CountImmunityCards(player) - 1; if (num < 2 && !blacklistedCategories.Contains(MrFuntikMod.ImmunityMasterCategory)) { blacklistedCategories.Add(MrFuntikMod.ImmunityMasterCategory); } } } } public static class RollbackHelper { public static bool HasBacktrack(Player player) { if ((Object)(object)player == (Object)null) { return false; } return (Object)(object)((Component)player).gameObject.GetComponent() != (Object)null; } public static void CheckUnlockRollback(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (HasBacktrack(player) && blacklistedCategories.Contains(MrFuntikMod.RollbackCategory)) { blacklistedCategories.Remove(MrFuntikMod.RollbackCategory); } } } public static void CheckLockRollback(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; BacktrackMono component = ((Component)player).gameObject.GetComponent(); bool flag = false; if (!blacklistedCategories.Contains(MrFuntikMod.RollbackCategory)) { blacklistedCategories.Add(MrFuntikMod.RollbackCategory); } } } public static void CheckLockRollbackOnStackRemove(Player player, bool isLastStack) { if (!((Object)(object)player == (Object)null) && isLastStack) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!blacklistedCategories.Contains(MrFuntikMod.RollbackCategory)) { blacklistedCategories.Add(MrFuntikMod.RollbackCategory); } } } } public static class ScorchHelper { public static bool HasBlazingTrail(Player player) { if ((Object)(object)player == (Object)null) { return false; } MonoBehaviour[] components = ((Component)player).gameObject.GetComponents(); MonoBehaviour[] array = components; foreach (MonoBehaviour val in array) { if ((Object)(object)val != (Object)null && ((object)val).GetType().Name == "BlazingTrailEffect") { return true; } } return CardCheck.HasCardFromAllowedMods(player, "Blazing Trail"); } public static void CheckUnlockScorch(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (HasBlazingTrail(player) && blacklistedCategories.Contains(MrFuntikMod.ScorchCategory)) { blacklistedCategories.Remove(MrFuntikMod.ScorchCategory); } } } public static void CheckLockScorch(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!blacklistedCategories.Contains(MrFuntikMod.ScorchCategory)) { blacklistedCategories.Add(MrFuntikMod.ScorchCategory); } } } public static void CheckLockScorchOnStackRemove(Player player, bool isLastStack) { if ((Object)(object)player == (Object)null) { return; } int num = CardCheck.AmountFromAllowedMods(player, "Blazing Trail"); if (num <= 1) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!blacklistedCategories.Contains(MrFuntikMod.ScorchCategory)) { blacklistedCategories.Add(MrFuntikMod.ScorchCategory); } } } } [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.MrseFuntik.Rounds.MFM", "MrFuntikMod", "2.7.0")] [BepInProcess("Rounds.exe")] public class MrFuntikMod : BaseUnityPlugin { [CompilerGenerated] private sealed class d__44 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public MrFuntikMod <>4__this; private List.Enumerator <>s__1; private Player 5__2; private GravitySurgeMono 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__44(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; ImmunityAntiRadarCard.ClearCache(); DeathDefyMono.ClearStaticData(); ExecutionerMono.ClearPendingExecutions(); BurnEffectManager.ClearAll(); NothingTimerManager.ClearAll(); OneCutManager.Reset(); <>s__1 = PlayerManager.instance.players.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; 5__3 = ((Component)5__2).GetComponent(); if ((Object)(object)5__3 != (Object)null) { 5__3.ResetState(); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(ImmunityCards)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(ImmunityCards); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(ImmunityMasterCategory)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(ImmunityMasterCategory); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(ArcFieldCategory)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(ArcFieldCategory); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(GravitySurgeCategory)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(GravitySurgeCategory); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(AuraCards)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(AuraCards); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(AuraMasterCategory)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(AuraMasterCategory); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(RollbackCategory)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(RollbackCategory); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(ScorchCategory)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(ScorchCategory); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(PhoenixSurgeCategory)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(PhoenixSurgeCategory); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(ResetCards)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(ResetCards); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(ElasticSubCards)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(ElasticSubCards); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(BloodPactSubCards)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(BloodPactSubCards); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(NecroCard2)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(NecroCard2); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(NecroCard3)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(NecroCard3); } if (!CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Contains(BalanceCard)) { CharacterStatModifiersExtension.GetAdditionalData(5__2.data.stats).blacklistedCategories.Add(BalanceCard); } ((Component)5__2).gameObject.AddComponent(); 5__3 = null; 5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__41 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public MrFuntikMod <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__41(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; NothingTimerManager.ClearAll(); <>4__this.DestroyAll(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__42 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public MrFuntikMod <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__42(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); <>4__this.DestroyAll(); 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.MrseFuntik.Rounds.MFM"; private const string ModName = "MrFuntikMod"; public const string Version = "2.7.0"; public const string ModInitials = "MFM"; public const bool DebugLogs = false; internal static ManualLogSource ModLogger; internal static CardCategory NonBalanceCard; internal static CardCategory BalanceCard; internal static CardCategory NonNecroCard; internal static CardCategory NecroCard2; internal static CardCategory NecroCard3; internal static CardCategory NonImmunityCards; internal static CardCategory ImmunityCards; internal static CardCategory ImmunityMasterCategory; internal static CardCategory AuraMasterCategory; internal static CardCategory ArcFieldCategory; internal static CardCategory GravitySurgeCategory; internal static CardCategory NonAuraCards; internal static CardCategory AuraCards; internal static CardCategory RollbackCategory; internal static CardCategory ScorchCategory; internal static CardCategory PhoenixSurgeCategory; internal static CardCategory ResetCards; internal static CardCategory NonResetCards; internal static CardCategory ElasticSubCards; internal static CardCategory NonElasticCards; internal static CardCategory ElasticClassCategory; internal static CardCategory BloodPactClassCategory; internal static CardCategory BloodPactSubCards; internal static CardCategory NonBloodPactCards; public static List hiddenCards = new List(); private Harmony harmony; public static MrFuntikMod instance { get; private set; } public static void Log(string msg) { bool flag = false; } public static void LogWarning(string msg) { bool flag = false; } public static void LogError(string msg) { bool flag = false; } private void Awake() { //IL_0025: 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_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_0063: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0087: 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_00ba: 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_00d5: Expected O, but got Unknown ModLogger = ((BaseUnityPlugin)this).Logger; RarityUtils.AddRarity("Hidden", 1f, new Color(0.85f, 0.5f, 0.35f), new Color(0.45f, 0.25f, 0.15f)); CardThemeLib.instance.CreateOrGetType("Hidden", new CardThemeColor { bgColor = new Color(0.15f, 0.1f, 0.08f), targetColor = new Color(0.85f, 0.5f, 0.35f) }); RarityUtils.AddRarity("NecroCards", 0.11f, new Color(0.96f, 0.188f, 0.188f), new Color(0.96f, 0.188f, 0.188f)); harmony = new Harmony("com.MrseFuntik.Rounds.MFM"); harmony.PatchAll(); } private void Start() { Assets.PreloadBundles(); AntiSlowExternalModsPatch.ApplyPatches(harmony); NonNecroCard = CustomCardCategories.instance.CardCategory("NonNecroCard"); NecroCard2 = CustomCardCategories.instance.CardCategory("NecroCard2"); NecroCard3 = CustomCardCategories.instance.CardCategory("NecroCard3"); NonBalanceCard = CustomCardCategories.instance.CardCategory("NonBalanceCard"); BalanceCard = CustomCardCategories.instance.CardCategory("BalanceCard"); NonImmunityCards = CustomCardCategories.instance.CardCategory("NonImmunityCards"); ImmunityCards = CustomCardCategories.instance.CardCategory("ImmunityCards"); ImmunityMasterCategory = CustomCardCategories.instance.CardCategory("ImmunityMasterCategory"); AuraMasterCategory = CustomCardCategories.instance.CardCategory("AuraMasterCategory"); ArcFieldCategory = CustomCardCategories.instance.CardCategory("ArcFieldCategory"); GravitySurgeCategory = CustomCardCategories.instance.CardCategory("GravitySurgeCategory"); NonAuraCards = CustomCardCategories.instance.CardCategory("NonAuraCards"); AuraCards = CustomCardCategories.instance.CardCategory("AuraCards"); RollbackCategory = CustomCardCategories.instance.CardCategory("RollbackCategory"); ScorchCategory = CustomCardCategories.instance.CardCategory("ScorchCategory"); PhoenixSurgeCategory = CustomCardCategories.instance.CardCategory("PhoenixSurgeCategory"); ResetCards = CustomCardCategories.instance.CardCategory("ResetCards"); NonResetCards = CustomCardCategories.instance.CardCategory("NonResetCards"); ElasticSubCards = CustomCardCategories.instance.CardCategory("ElasticSubCards"); NonElasticCards = CustomCardCategories.instance.CardCategory("NonElasticCards"); ElasticClassCategory = CustomCardCategories.instance.CardCategory("ElasticClassCategory"); BloodPactClassCategory = CustomCardCategories.instance.CardCategory("BloodPactClassCategory"); BloodPactSubCards = CustomCardCategories.instance.CardCategory("BloodPactSubCards"); NonBloodPactCards = CustomCardCategories.instance.CardCategory("NonBloodPactCards"); instance = this; DeathDefyHandler.RegisterHooks(); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { ArcFieldCard.cardInfoSelf = cardInfo; }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { GravitySurgeCard.cardInfoSelf = cardInfo; }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { BacktrackCard.cardInfoSelf = cardInfo; }); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { ImmunityControlledFireCard.cardInfoSelf = cardInfo; }); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard((Action)delegate(CardInfo cardInfo) { Cards.instance.AddHiddenCard(cardInfo); hiddenCards.Add(cardInfo); }); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); GameModeManager.AddHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => BloodPactOfferingCard.ExtraPicks())); GameModeManager.AddHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => ElasticChargeCard.ExtraPicks())); GameModeManager.AddHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => CalibrateCard.ExtraPicks())); GameModeManager.AddHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => ImmunizeCard.ExtraPicks())); GameModeManager.AddHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => DominionCard.ExtraPicks())); GameModeManager.AddHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => OneCutCard.ExtraPicks())); GameModeManager.AddHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => PhenomenalBalance.ExtraPicks())); GameModeManager.AddHook("GameStart", (Func)GameStart); GameModeManager.AddHook("GameEnd", (Func)ResetEffects); GameModeManager.AddHook("GameStart", (Func)ResetEffects); GameModeManager.AddHook("PointEnd", (Func)ResetPointEffects); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)instance, 1f, (Action)delegate { foreach (Card value in CardManager.cards.Values) { if (!value.cardInfo.categories.Contains(ImmunityCards)) { value.cardInfo.categories = CollectionExtensions.AddToArray(value.cardInfo.categories, NonImmunityCards); } if (!value.cardInfo.categories.Contains(AuraCards)) { value.cardInfo.categories = CollectionExtensions.AddToArray(value.cardInfo.categories, NonAuraCards); } if (!value.cardInfo.categories.Contains(ResetCards)) { value.cardInfo.categories = CollectionExtensions.AddToArray(value.cardInfo.categories, NonResetCards); } if (!value.cardInfo.categories.Contains(ElasticSubCards)) { value.cardInfo.categories = CollectionExtensions.AddToArray(value.cardInfo.categories, NonElasticCards); } if (!value.cardInfo.categories.Contains(BloodPactSubCards)) { value.cardInfo.categories = CollectionExtensions.AddToArray(value.cardInfo.categories, NonBloodPactCards); } if (!value.cardInfo.categories.Contains(NecroCard2) && !value.cardInfo.categories.Contains(NecroCard3)) { value.cardInfo.categories = CollectionExtensions.AddToArray(value.cardInfo.categories, NonNecroCard); } if (!value.cardInfo.categories.Contains(BalanceCard)) { value.cardInfo.categories = CollectionExtensions.AddToArray(value.cardInfo.categories, NonBalanceCard); } } }); } [IteratorStateMachine(typeof(d__41))] private IEnumerator ResetEffects(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__41(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__42))] private IEnumerator ResetPointEffects(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__42(0) { <>4__this = this, gm = gm }; } private void DestroyAll() where T : Object { T[] array = Object.FindObjectsOfType(); for (int num = array.Length - 1; num >= 0; num--) { Object.Destroy((Object)(object)array[num]); } } [IteratorStateMachine(typeof(d__44))] private IEnumerator GameStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__44(0) { <>4__this = this, gm = gm }; } } } namespace MrFuntikMod.Extensions { [Serializable] public class BlockAdditionalData { public float discombobulateRange; public float discombobulateDuration; public float timeOfLastSuccessfulBlock; public BlockAdditionalData() { discombobulateRange = 0f; discombobulateDuration = 0f; timeOfLastSuccessfulBlock = -100f; } } public static class BlockExtension { public static readonly ConditionalWeakTable data = new ConditionalWeakTable(); public static BlockAdditionalData GetAdditionalData(this Block block) { return data.GetOrCreateValue(block); } public static void AddData(this Block block, BlockAdditionalData value) { try { data.Add(block, value); } catch (Exception) { } } } [Serializable] public class CardInfoAdditionalData { public bool isRandom; public bool isClassBlacklistCard; public CardInfoAdditionalData() { isRandom = false; isClassBlacklistCard = false; } } public static class CardInfoExtension { public static readonly ConditionalWeakTable data = new ConditionalWeakTable(); public static CardInfoAdditionalData GetAdditionalData(this CardInfo cardInfo) { return data.GetOrCreateValue(cardInfo); } public static void AddData(this CardInfo cardInfo, CardInfoAdditionalData value) { try { data.Add(cardInfo, value); } catch (Exception) { } } } [Serializable] public class CharacterStatModifiersAdditionalData { public float piercingDamage; public int shuffles; public int oneCutPending; public int calibrateStacks; public int elasticPickStacks; public int bloodPactPickStacks; public CharacterStatModifiersAdditionalData() { piercingDamage = 0f; shuffles = 0; oneCutPending = 0; calibrateStacks = 0; elasticPickStacks = 0; bloodPactPickStacks = 0; } } public static class CharacterStatModifiersExtension { public static readonly ConditionalWeakTable data = new ConditionalWeakTable(); public static CharacterStatModifiersAdditionalData GetAdditionalData(this CharacterStatModifiers characterstats) { return data.GetOrCreateValue(characterstats); } public static void AddData(this CharacterStatModifiers characterstats, CharacterStatModifiersAdditionalData value) { try { data.Add(characterstats, value); } catch (Exception) { } } } [HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")] internal class CharacterStatModifiersPatchResetStats { private static void Prefix(CharacterStatModifiers __instance) { __instance.GetAdditionalData().piercingDamage = 0f; __instance.GetAdditionalData().shuffles = 0; __instance.GetAdditionalData().oneCutPending = 0; } } } namespace MrFuntikMod.RoundsEffects { public class FriendlyFireEffect : DealtDamageEffect { public float multiplier = 1f; public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer = null) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) Player damagedPlayer2 = damagedPlayer; if (!selfDamage && (!((Object)(object)damagedPlayer2 != (Object)null) || damagedPlayer2.teamID != ((Component)this).gameObject.GetComponent().teamID)) { return; } if (damagedPlayer2.data.health - ((Vector2)(ref damage)).magnitude <= 0f) { damagedPlayer2.data.healthHandler.Heal(((Vector2)(ref damage)).magnitude * (1f - multiplier)); return; } ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Unbound.Instance, 2, (Action)delegate { damagedPlayer2.data.healthHandler.Heal(((Vector2)(ref damage)).magnitude * (1f - multiplier)); }); } } } namespace MrFuntikMod.MonoBehaviours { public class RandomTeleportMono : MonoBehaviour { [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public RandomTeleportMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Player player; private Block block; private CharacterData data; private const float TELEPORT_COOLDOWN = 4f; private float cooldownRemaining = 0f; private bool isReady = true; private readonly int maxAttempts = 100; private Action blockAction; private CooldownUI cooldownUI; public void Initialize(Player player, Block block) { //IL_0098: Unknown result type (might be due to invalid IL or missing references) this.player = player; this.block = block; data = player.data; blockAction = OnBlock; this.block.BlockAction = (Action)Delegate.Combine(this.block.BlockAction, blockAction); if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("T", (Color?)new Color(1f, 0.36f, 0.8f)); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__11))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { <>4__this = this, gm = gm }; } private void ResetState() { cooldownRemaining = 0f; isReady = true; CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } public void Cleanup() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } private void OnDestroy() { Cleanup(); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { return; } if (data.dead) { CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } return; } if (!isReady) { cooldownRemaining -= Time.deltaTime; if (cooldownRemaining <= 0f) { cooldownRemaining = 0f; isReady = true; } } if (data.view.IsMine) { UpdateUI(); } } private void UpdateUI() { if (!((Object)(object)cooldownUI == (Object)null)) { if (!isReady && cooldownRemaining > 0f) { cooldownUI.ShowCooldown(cooldownRemaining, 4f); } else { cooldownUI.Hide(); } } } private void OnBlock(BlockTriggerType trigger) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if ((int)trigger > 0 || !isReady || (Object)(object)player == (Object)null || (Object)(object)data == (Object)null || data.dead || (!player.data.view.IsMine && !PhotonNetwork.OfflineMode)) { return; } Vector2? val = FindSafeTeleportPoint(); if (val.HasValue) { isReady = false; cooldownRemaining = 4f; if (PhotonNetwork.OfflineMode) { RPCA_Teleport(player.playerID, val.Value.x, val.Value.y); return; } NetworkingManager.RPC(typeof(RandomTeleportMono), "RPCA_Teleport", new object[3] { player.playerID, val.Value.x, val.Value.y }); } } private Vector2? FindSafeTeleportPoint() { //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) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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) float num = Camera.main.orthographicSize * 0.85f; float num2 = num * Camera.main.aspect * 0.85f; Vector3 position = ((Component)Camera.main).transform.position; Vector2 val = default(Vector2); for (int i = 0; i < maxAttempts; i++) { ((Vector2)(ref val))..ctor(position.x + Random.Range(0f - num2, num2), position.y + Random.Range(0f - num, num)); if (IsPointSafe(val)) { return val; } } return null; } private bool IsPointSafe(Vector2 point) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) float num = 1.2f; Collider2D val = Physics2D.OverlapCircle(point, num, LayerMask.GetMask(new string[2] { "Default", "IgnorePlayer" })); if ((Object)(object)val != (Object)null) { return false; } return true; } private static Player GetPlayerWithID(int playerID) { foreach (Player player in PlayerManager.instance.players) { if (player.playerID == playerID) { return player; } } return null; } [UnboundRPC] public static void RPCA_Teleport(int playerID, float x, float y) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00aa: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) Player playerWithID = GetPlayerWithID(playerID); if (!((Object)(object)playerWithID == (Object)null) && !playerWithID.data.dead) { Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(x, y); Vector3 position = ((Component)playerWithID).transform.position; PlayerCollision component = ((Component)playerWithID).GetComponent(); if ((Object)(object)component != (Object)null) { component.IgnoreWallForFrames(2); } PlayerVelocity playerVel = playerWithID.data.playerVel; if ((Object)(object)playerVel != (Object)null) { ExtensionMethods.SetFieldValue((object)playerVel, "velocity", (object)Vector2.zero); } ((Component)playerWithID).transform.position = Vector2.op_Implicit(val); TeleportPlayerGhostEffect.Create(playerWithID, position); TeleportPathEffect.Create(position, Vector2.op_Implicit(val), new Color(1f, 0.36f, 0.8f, 1f), ((Component)playerWithID).transform.localScale.x, 0.45f, playerWithID); } } } public class FriendlyBulletsDealtDamageEffect : HitEffect { public float multiplier = 1f; public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer = null) { Player component = ((Component)this).GetComponent(); if ((Object)(object)component == (Object)null || (Object)(object)damagedPlayer == (Object)null || (!selfDamage && damagedPlayer.teamID != component.teamID)) { return; } float healAmount = ((Vector2)(ref damage)).magnitude * (1f - multiplier); if (damagedPlayer.data.health - ((Vector2)(ref damage)).magnitude <= 0f) { damagedPlayer.data.healthHandler.Heal(healAmount); return; } Player targetPlayer = damagedPlayer; ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Unbound.Instance, 2, (Action)delegate { if ((Object)(object)targetPlayer != (Object)null && (Object)(object)targetPlayer.data != (Object)null && (Object)(object)targetPlayer.data.healthHandler != (Object)null) { targetPlayer.data.healthHandler.Heal(healAmount); } }); } } } namespace MrFuntikMod.MonoBehaviors { public class ComeToMeMono : MonoBehaviour { [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int targetPlayerID; public ComeToMeMono <>4__this; private Player 5__1; private Vector3 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!IsActiveCombatPlayer(<>4__this.player)) { <>4__this.CancelPendingTeleport(); return false; } 5__1 = GetPlayerWithID(targetPlayerID); if (!IsActiveCombatPlayer(5__1)) { <>4__this.CancelPendingTeleport(); return false; } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; if (!IsActiveCombatPlayer(<>4__this.player)) { <>4__this.CancelPendingTeleport(); return false; } 5__1 = GetPlayerWithID(targetPlayerID); if (!IsActiveCombatPlayer(5__1)) { <>4__this.CancelPendingTeleport(); return false; } 5__2 = ((Component)<>4__this.player).transform.position; if (PhotonNetwork.OfflineMode) { RPCA_TeleportToOwner(<>4__this.player.playerID, targetPlayerID, 5__2.x, 5__2.y); } else { NetworkingManager.RPC(typeof(ComeToMeMono), "RPCA_TeleportToOwner", new object[4] { <>4__this.player.playerID, targetPlayerID, 5__2.x, 5__2.y }); } _ownersCasting.Remove(<>4__this.player.playerID); <>4__this.activeTargetPlayerID = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__17 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ComeToMeMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__16 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ComeToMeMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Player player; private Block block; private CharacterData data; private Action blockAction; private const float TELEPORT_COOLDOWN = 5f; private const float TELEPORT_DELAY = 2f; private float cooldownRemaining = 0f; private bool isReady = true; private int activeTargetPlayerID = -1; private static readonly List _activeRunners = new List(); private static readonly Dictionary _ownerCooldownUntil = new Dictionary(); private static readonly HashSet _ownersCasting = new HashSet(); private static readonly Dictionary _lastTeleportByOwner = new Dictionary(); private CooldownUI cooldownUI; private bool wasDeadLastFrame = false; public void Initialize(Player player, Block block) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) this.player = player; this.block = block; data = player.data; blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("C", (Color?)new Color(0.77f, 0.36f, 1f)); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__16))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__16(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__17))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__17(0) { <>4__this = this, gm = gm }; } private void ResetState() { ((MonoBehaviour)this).StopAllCoroutines(); CleanupEffects(); ClearOwnerCastState(); cooldownRemaining = 0f; isReady = true; activeTargetPlayerID = -1; CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } private void CancelPendingTeleport() { CleanupEffects(); ClearOwnerCastState(); cooldownRemaining = 0f; isReady = true; activeTargetPlayerID = -1; CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } private void ClearOwnerCastState() { if (!((Object)(object)player == (Object)null)) { _ownersCasting.Remove(player.playerID); _ownerCooldownUntil.Remove(player.playerID); } } public static void TrackRunner(GameObject runner) { if ((Object)(object)runner != (Object)null) { _activeRunners.Add(runner); } } public static void CleanupEffects() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown for (int num = _activeRunners.Count - 1; num >= 0; num--) { if ((Object)(object)_activeRunners[num] != (Object)null) { Object.Destroy((Object)(object)_activeRunners[num]); } } _activeRunners.Clear(); if ((Object)(object)PlayerManager.instance == (Object)null) { return; } foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player == (Object)null) { continue; } foreach (Transform item in ((Component)player).transform) { Transform val = item; if ((Object)(object)val != (Object)null && (((Object)val).name == "CircleWavePulse" || ((Object)val).name == "CircleWavePulseRunner")) { Object.Destroy((Object)(object)((Component)val).gameObject); } } } CircleWaveEffect[] array = Object.FindObjectsOfType(); CircleWaveEffect[] array2 = array; foreach (CircleWaveEffect circleWaveEffect in array2) { if ((Object)(object)circleWaveEffect != (Object)null) { Object.Destroy((Object)(object)((Component)circleWaveEffect).gameObject); } } } public void Cleanup() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } private void OnDestroy() { Cleanup(); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { return; } if (data.dead) { if (!wasDeadLastFrame) { ((MonoBehaviour)this).StopAllCoroutines(); CleanupEffects(); wasDeadLastFrame = true; } CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } return; } wasDeadLastFrame = false; if (!isReady) { cooldownRemaining -= Time.deltaTime; if (cooldownRemaining <= 0f) { cooldownRemaining = 0f; isReady = true; } } if (data.view.IsMine) { UpdateUI(); } } private void UpdateUI() { if (!((Object)(object)cooldownUI == (Object)null)) { if (!isReady && cooldownRemaining > 0f) { cooldownUI.ShowCooldown(cooldownRemaining, 5f); } else { cooldownUI.Hide(); } } } private void OnBlock(BlockTriggerType trigger) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 if ((int)trigger > 0 || !isReady || !IsActiveCombatPlayer(player) || (!data.view.IsMine && !PhotonNetwork.OfflineMode) || IsOwnerBusy(player.playerID)) { return; } Player val = FindClosestEnemy(); if (IsActiveCombatPlayer(val)) { isReady = false; cooldownRemaining = 5f; activeTargetPlayerID = val.playerID; _ownersCasting.Add(player.playerID); _ownerCooldownUntil[player.playerID] = Time.time + 5f; if (PhotonNetwork.OfflineMode) { RPCA_ShowWarningEffects(player.playerID, val.playerID); } else { NetworkingManager.RPC(typeof(ComeToMeMono), "RPCA_ShowWarningEffects", new object[2] { player.playerID, val.playerID }); } ((MonoBehaviour)this).StartCoroutine(DelayedTeleport(val.playerID)); } } private static bool IsOwnerBusy(int playerID) { if (_ownersCasting.Contains(playerID)) { return true; } if (_ownerCooldownUntil.TryGetValue(playerID, out var value)) { if (Time.time < value) { return true; } _ownerCooldownUntil.Remove(playerID); } return false; } [UnboundRPC] public static void RPCA_ShowWarningEffects(int ownerPlayerID, int targetPlayerID) { //IL_003d: 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_0068: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) Player playerWithID = GetPlayerWithID(ownerPlayerID); Player playerWithID2 = GetPlayerWithID(targetPlayerID); if (IsActiveCombatPlayer(playerWithID) && IsActiveCombatPlayer(playerWithID2)) { float x = ((Component)playerWithID2).transform.localScale.x; float x2 = ((Component)playerWithID).transform.localScale.x; Transform transform = ((Component)playerWithID2).transform; float startRadius = 2f * x; Color white = Color.white; GameObject runner = CircleWaveEffect.CreatePulsingEffect(transform, default(Vector3), 2f, 3, 0.5f, startRadius, 0.2f, white); TrackRunner(runner); Transform transform2 = ((Component)playerWithID).transform; startRadius = 2f * x2; white = Color.white; GameObject runner2 = CircleWaveEffect.CreatePulsingEffect(transform2, default(Vector3), 2f, 3, 0.5f, 0.2f, startRadius, white); TrackRunner(runner2); } } [IteratorStateMachine(typeof(d__31))] private IEnumerator DelayedTeleport(int targetPlayerID) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { <>4__this = this, targetPlayerID = targetPlayerID }; } private Player FindClosestEnemy() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_0085: Unknown result type (might be due to invalid IL or missing references) Player result = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)(object)this.player) && IsActiveCombatPlayer(player) && player.teamID != this.player.teamID) { float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)this.player).transform.position), Vector2.op_Implicit(((Component)player).transform.position)); if (num2 < num) { num = num2; result = player; } } } return result; } private static Player GetPlayerWithID(int playerID) { foreach (Player player in PlayerManager.instance.players) { if (player.playerID == playerID) { return player; } } return null; } private static bool IsActiveCombatPlayer(Player target) { if ((Object)(object)target == (Object)null || (Object)(object)target.data == (Object)null) { return false; } if (!((Component)target).gameObject.activeInHierarchy) { return false; } if (!target.data.isPlaying || target.data.dead) { return false; } HealthHandler healthHandler = target.data.healthHandler; if ((Object)(object)healthHandler == (Object)null || healthHandler.isRespawning) { return false; } return true; } [UnboundRPC] public static void RPCA_TeleportToOwner(int ownerPlayerID, int targetPlayerID, float ownerX, float ownerY) { //IL_0068: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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) //IL_0139: 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 (_lastTeleportByOwner.TryGetValue(ownerPlayerID, out var value) && Time.time - value < 0.25f) { return; } _lastTeleportByOwner[ownerPlayerID] = Time.time; Player playerWithID = GetPlayerWithID(targetPlayerID); if (IsActiveCombatPlayer(playerWithID)) { Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(ownerX, ownerY); Vector3 position = ((Component)playerWithID).transform.position; PlayerCollision component = ((Component)playerWithID).GetComponent(); if ((Object)(object)component != (Object)null) { component.IgnoreWallForFrames(2); } PlayerVelocity playerVel = playerWithID.data.playerVel; if ((Object)(object)playerVel != (Object)null) { ExtensionMethods.SetFieldValue((object)playerVel, "velocity", (object)Vector2.zero); } ((Component)playerWithID).transform.position = Vector2.op_Implicit(val); float x = ((Component)playerWithID).transform.localScale.x; TeleportPlayerGhostEffect.Create(playerWithID, position); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.77f, 0.36f, 1f, 1f); TeleportPathEffect.Create(position, Vector2.op_Implicit(val), val2, x, 0.45f, playerWithID); TrackRunner(CircleWaveEffect.CreateEffect(Vector2.op_Implicit(val), 0.6f, 2f * x, 0f, val2, ((Component)playerWithID).transform)); } } } public class CircleWaveEffect : MonoBehaviour { private class PulseRunner : MonoBehaviour { [CompilerGenerated] private sealed class d__1 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Transform owner; public Vector3 worldPos; public float totalDur; public int count; public float pulseDur; public float startRad; public float endRad; public Color color; public PulseRunner <>4__this; private float 5__1; private int 5__2; private Player 5__3; private GameObject 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = totalDur / (float)count; 5__2 = 0; break; case 1: <>1__state = -1; 5__2++; break; } if (5__2 < count) { if ((Object)(object)owner != (Object)null) { 5__3 = ((Component)owner).GetComponent(); if ((Object)(object)5__3 != (Object)null && 5__3.data.dead) { Object.Destroy((Object)(object)((Component)<>4__this).gameObject); return false; } 5__3 = null; } if ((Object)(object)owner != (Object)null) { 5__4 = new GameObject("CircleWavePulse"); 5__4.transform.SetParent(owner, true); 5__4.transform.localPosition = Vector3.zero; <>4__this.SetupEffect(5__4, pulseDur, startRad, endRad, color, owner); 5__4 = null; } else { CreateEffect(worldPos, pulseDur, startRad, endRad, color); } <>2__current = (object)new WaitForSeconds(5__1); <>1__state = 1; return true; } Object.Destroy((Object)(object)((Component)<>4__this).gameObject); 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(); } } public void StartPulsing(Transform owner, Vector3 worldPos, float totalDur, int count, float pulseDur, float startRad, float endRad, Color color) { //IL_0004: 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) ((MonoBehaviour)this).StartCoroutine(RunPulses(owner, worldPos, totalDur, count, pulseDur, startRad, endRad, color)); } [IteratorStateMachine(typeof(d__1))] private IEnumerator RunPulses(Transform owner, Vector3 worldPos, float totalDur, int count, float pulseDur, float startRad, float endRad, Color color) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1(0) { <>4__this = this, owner = owner, worldPos = worldPos, totalDur = totalDur, count = count, pulseDur = pulseDur, startRad = startRad, endRad = endRad, color = color }; } private void SetupEffect(GameObject go, float dur, float startRad, float endRad, Color color, Transform owner) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00cf: Unknown result type (might be due to invalid IL or missing references) LineRenderer val = go.AddComponent(); ((Renderer)val).material = new Material(Shader.Find("Sprites/Default")); val.startColor = color; val.endColor = color; float startWidth = (val.endWidth = 0.2f); val.startWidth = startWidth; val.useWorldSpace = false; int num2 = 64; val.positionCount = num2 + 1; Vector3[] array = (Vector3[])(object)new Vector3[num2 + 1]; for (int i = 0; i <= num2; i++) { float num3 = (float)i / (float)num2 * MathF.PI * 2f; array[i] = new Vector3(Mathf.Cos(num3) * startRad, Mathf.Sin(num3) * startRad, 0f); } val.SetPositions(array); CircleWaveEffect circleWaveEffect = go.AddComponent(); circleWaveEffect.Setup(val, num2, dur, startRad, endRad, color, owner); } } private LineRenderer lineRenderer; private int segments; private float elapsed = 0f; private float duration = 0.5f; private float startRadius = 0f; private float endRadius = 3f; private Color startColor = Color.white; private Transform owner; public void Setup(LineRenderer lr, int segs, float dur = 0.5f, float startRad = 0f, float endRad = 3f, Color color = default(Color), Transform owner = null) { //IL_0027: 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_0031: 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_0039: 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) lineRenderer = lr; segments = segs; duration = dur; startRadius = startRad; endRadius = endRad; startColor = ((color == default(Color)) ? Color.white : color); this.owner = owner; } private void Update() { //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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) if ((Object)(object)owner != (Object)null) { Player component = ((Component)owner).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.data != (Object)null && component.data.dead) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } } elapsed += Time.deltaTime; if (elapsed > duration) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = startRadius + elapsed / duration * (endRadius - startRadius); Vector3[] array = (Vector3[])(object)new Vector3[segments + 1]; for (int i = 0; i <= segments; i++) { float num2 = (float)i / (float)segments * MathF.PI * 2f; float num3 = Mathf.Cos(num2) * num; float num4 = Mathf.Sin(num2) * num; array[i] = new Vector3(num3, num4, 0f); } lineRenderer.SetPositions(array); float num5 = 1f - elapsed / duration; Color endColor = default(Color); ((Color)(ref endColor))..ctor(startColor.r, startColor.g, startColor.b, num5); lineRenderer.startColor = endColor; lineRenderer.endColor = endColor; } public static GameObject CreateEffect(Vector3 position, float duration = 0.5f, float startRadius = 0f, float endRadius = 3f, Color color = default(Color), Transform owner = null) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: 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_0035: Expected O, but got Unknown //IL_0036: 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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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) GameObject val = new GameObject("CircleWaveEffect"); val.transform.position = position; LineRenderer val2 = val.AddComponent(); ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); Color color2 = (val2.endColor = (val2.startColor = ((color == default(Color)) ? Color.white : color))); val2.startWidth = 0.2f; val2.endWidth = 0.2f; val2.useWorldSpace = false; int num = 64; Vector3[] array = (Vector3[])(object)new Vector3[num + 1]; for (int i = 0; i <= num; i++) { float num2 = (float)i / (float)num * MathF.PI * 2f; float num3 = Mathf.Cos(num2) * startRadius; float num4 = Mathf.Sin(num2) * startRadius; array[i] = new Vector3(num3, num4, 0f); } val2.positionCount = num + 1; val2.SetPositions(array); CircleWaveEffect circleWaveEffect = val.AddComponent(); circleWaveEffect.Setup(val2, num, duration, startRadius, endRadius, color2, owner); return val; } public static GameObject CreatePulsingEffect(Transform owner = null, Vector3 position = default(Vector3), float totalDuration = 2f, int pulseCount = 3, float pulseDuration = 0.5f, float startRadius = 0.2f, float endRadius = 3.5f, Color color = default(Color)) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0015: 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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("CircleWavePulseRunner"); PulseRunner pulseRunner = val.AddComponent(); pulseRunner.StartPulsing(owner, position, totalDuration, pulseCount, pulseDuration, startRadius, endRadius, (color == default(Color)) ? Color.white : color); return val; } } public class HealMeMono : MonoBehaviour { internal Player player; internal Gun gun; internal GunAmmo gunAmmo; internal Gravity gravity; internal HealthHandler healthHandler; internal CharacterData data; internal Block block; private readonly float updateDelay = 0.1f; private float startTime; public int numcheck; public bool active; private void Start() { data = ((Component)this).GetComponentInParent(); HealthHandler val = data.healthHandler; val.reviveAction = (Action)Delegate.Combine(val.reviveAction, new Action(ResetTimer)); } private void OnDestroy() { HealthHandler val = data.healthHandler; val.reviveAction = (Action)Delegate.Combine(val.reviveAction, new Action(ResetTimer)); } public void Destroy() { Object.Destroy((Object)(object)this); } public void Awake() { player = ((Component)this).gameObject.GetComponent(); gun = ((Component)((Component)player).GetComponent().holdable).GetComponent(); data = ((Component)player).GetComponent(); healthHandler = ((Component)player).GetComponent(); gravity = ((Component)player).GetComponent(); block = ((Component)player).GetComponent(); gunAmmo = ((Component)gun).GetComponentInChildren(); numcheck = 0; } private void Update() { if (!(Time.time >= startTime + updateDelay)) { return; } ResetTimer(); for (int i = 0; i <= player.data.currentCards.Count - 1; i++) { if (player.data.currentCards[i].cardName == "Heal me") { numcheck++; } } if (numcheck > 0) { ResetTimer(); if (player.data.health < player.data.maxHealth && !active) { active = true; ((Component)((Component)player).transform).gameObject.AddComponent(); } } } private void ResetTimer() { startTime = Time.time; numcheck = 0; } } public class HealMeRegenMono : ReversibleEffect { private readonly Color color = Color.blue; private ReversibleColorEffect colorEffect; private HealMeMono effect; private readonly float updateDelay = 0.1f; private float startTime; public override void OnOnEnable() { } public override void OnStart() { HealthHandler healthHandler = base.player.data.healthHandler; healthHandler.regeneration += 20f; effect = ((Component)base.player).GetComponent(); ResetTimer(); } public override void OnUpdate() { if (Time.time >= startTime + updateDelay) { ResetTimer(); if (base.player.data.health >= base.player.data.maxHealth) { ((ReversibleEffect)this).Destroy(); } if (((Component)this).GetComponent().data.dead || ((Component)this).GetComponent().data.health <= 0f || !((Component)((Component)this).GetComponent()).gameObject.activeInHierarchy) { ResetTimer(); ((ReversibleEffect)this).Destroy(); } } } public override void OnOnDisable() { } public override void OnOnDestroy() { effect.active = false; if (base.player.data.healthHandler.regeneration >= 20f) { HealthHandler healthHandler = base.player.data.healthHandler; healthHandler.regeneration -= 20f; } } private void ResetTimer() { startTime = Time.time; } } public class KamikazeMono : MonoBehaviour { private class KamikazeSpawner : MonoBehaviour { private void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) ((Component)this).gameObject.transform.localScale = new Vector3(1f, 1f, 1f); ((Component)this).gameObject.AddComponent().seconds = 1f; LineEffect component = ((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent(); if ((Object)(object)component != (Object)null) { ExtensionMethods.SetFieldValue((object)component, "inited", (object)false); typeof(LineEffect).InvokeMember("Init", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, component, new object[0]); component.radius = 9f; ExtensionMethods.SetFieldValue((object)component, "startWidth", (object)7.6f); component.Play(); } } } private bool hasDied = false; private readonly float maxDistance = 15f; private readonly float updateDelay = 0.1f; private readonly float effectCooldown = 0f; public Block block; public Player player; public CharacterData data; public Gun gun; private Action basic; private static GameObject kamikazevisual; private float startTime; private float timeOfLastEffect; private bool canTrigger; private bool hasTriggered; private int numcheck; public static GameObject kamikazeVisual { get { //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0177: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)kamikazevisual != (Object)null) { return kamikazevisual; } IEnumerable first = ((ObservableCollection)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToList(); List second = (List)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); CardInfo val = first.Concat(second).FirstOrDefault((Func)((CardInfo card) => card.cardName.ToLower() == "overpower")); if ((Object)(object)val == (Object)null) { MrFuntikMod.LogError("[Kamikaze] Could not find Overpower card for visual effect!"); return null; } CharacterStatModifiers component = ((Component)val).GetComponent(); object obj; if (component == null) { obj = null; } else { GameObject addObjectToPlayer = component.AddObjectToPlayer; obj = ((addObjectToPlayer != null) ? addObjectToPlayer.GetComponent() : null); } SpawnObjects val2 = (SpawnObjects)obj; if ((Object)(object)val2 == (Object)null || val2.objectToSpawn == null || val2.objectToSpawn.Length == 0) { MrFuntikMod.LogError("[Kamikaze] Could not get SpawnObjects from Overpower card!"); return null; } kamikazevisual = Object.Instantiate(val2.objectToSpawn[0], new Vector3(0f, 100000f, 0f), Quaternion.identity); ((Object)kamikazevisual).name = "E_Kamikaze"; Object.DontDestroyOnLoad((Object)(object)kamikazevisual); ParticleSystem[] componentsInChildren = kamikazevisual.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main = componentsInChildren[i].main; ((MainModule)(ref main)).startSize = MinMaxCurve.op_Implicit(0.5f); ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(15f); ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(2f); ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(new Color(1f, 0.3f, 0f, 1f)); } LineEffect component2 = ((Component)kamikazevisual.transform.GetChild(1)).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.colorOverTime.colorKeys = (GradientColorKey[])(object)new GradientColorKey[1] { new GradientColorKey(new Color(1f, 0.4f, 0f, 1f), 0.3f) }; component2.offsetMultiplier = 0f; component2.playOnAwake = true; } if (kamikazevisual.transform.childCount > 2) { Object.Destroy((Object)(object)((Component)kamikazevisual.transform.GetChild(2)).gameObject); } FollowPlayer component3 = kamikazevisual.GetComponent(); if ((Object)(object)component3 != (Object)null) { Object.Destroy((Object)(object)component3); } DelayEvent component4 = kamikazevisual.GetComponent(); if ((Object)(object)component4 != (Object)null) { Object.Destroy((Object)(object)component4); } Explosion component5 = kamikazevisual.GetComponent(); if ((Object)(object)component5 != (Object)null) { component5.hitPlayerAction = null; Object.DestroyImmediate((Object)(object)component5); } Explosion_Overpower component6 = kamikazevisual.GetComponent(); if ((Object)(object)component6 != (Object)null) { Object.DestroyImmediate((Object)(object)component6); } RemoveAfterSeconds component7 = kamikazevisual.GetComponent(); if ((Object)(object)component7 != (Object)null) { Object.Destroy((Object)(object)component7); } kamikazevisual.AddComponent(); return kamikazevisual; } } private void Start() { player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); gun = ((Component)this).GetComponent(); ResetEffectTimer(); ResetTimer(); canTrigger = true; hasTriggered = false; basic = block.BlockAction; } public void OnDestroy() { if ((Object)(object)data != (Object)null && data.dead && !hasDied) { hasDied = true; OnPlayerDeath(); } if ((Object)(object)block != (Object)null) { block.BlockAction = basic; } } private void OnPlayerDeath() { TriggerKamikazeEffect(); } private void TriggerKamikazeEffect() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { return; } Object.Instantiate(kamikazeVisual, ((Component)player).transform.position, Quaternion.identity); Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); Player[] array = PlayerManager.instance.players.ToArray(); for (int i = 0; i < array.Length; i++) { if (array[i].teamID == player.teamID) { continue; } float num = Vector2.Distance(val, Vector2.op_Implicit(((Component)array[i]).transform.position)); bool canSee = PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)player).transform.position), array[i]).canSee; if (num < maxDistance && canSee) { HealthHandler component = ((Component)array[i]).GetComponent(); if ((Object)(object)component != (Object)null && canTrigger) { ((Damagable)component).TakeDamage(200f * Vector2.down, Vector2.op_Implicit(((Component)array[i]).transform.position), ((Component)player.data.weaponHandler).gameObject, player, true, false); Vector3 val2 = ((Component)array[i]).transform.position - Vector2.op_Implicit(val); component.TakeForce(Vector2.op_Implicit(((Vector3)(ref val2)).normalized * 12000f), (ForceMode2D)1, true, false, 0.8f); hasTriggered = true; } } } } public void Destroy() { Object.Destroy((Object)(object)this); } private void Update() { if (!(Time.time >= startTime + updateDelay)) { return; } numcheck = 0; for (int i = 0; i < player.data.currentCards.Count; i++) { if (player.data.currentCards[i].cardName == "Kamikaze") { numcheck++; } } if (numcheck > 0) { ResetTimer(); if (Time.time >= timeOfLastEffect + effectCooldown) { canTrigger = true; } else { canTrigger = false; } } else { Object.Destroy((Object)(object)this); } } private void ResetTimer() { startTime = Time.time; } private void ResetEffectTimer() { timeOfLastEffect = Time.time; } } public class VengefulSparkEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__15 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Vector3 position; public Vector3 direction; public float damage; public int attackerPlayerID; public VengefulSparkEffect <>4__this; private Player 5__1; private PlayerManager 5__2; private Gun 5__3; private bool 5__4; private List.Enumerator <>s__5; private Player

5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; <>s__5 = default(List.Enumerator);

5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = null; 5__2 = PlayerManager.instance; if ((Object)(object)5__2 != (Object)null && 5__2.players != null) { <>s__5 = 5__2.players.GetEnumerator(); try { while (<>s__5.MoveNext()) {

5__6 = <>s__5.Current; if ((Object)(object)

5__6 != (Object)null &&

5__6.playerID == attackerPlayerID) { 5__1 =

5__6; break; }

5__6 = null; } } finally { ((IDisposable)<>s__5).Dispose(); } <>s__5 = default(List.Enumerator); } if ((Object)(object)5__1 == (Object)null) { return false; } if ((Object)(object)5__1 == (Object)null) { return false; } 5__3 = 5__1.data?.weaponHandler?.gun; if ((Object)(object)5__3 == (Object)null) { return false; } 5__4 = <>4__this.SetupSparkGunFromAttacker(5__3); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; if (!5__4 || (Object)(object)<>4__this.sparkGun == (Object)null || <>4__this.sparkGun.projectiles == null || <>4__this.sparkGun.projectiles.Length == 0) { return false; } <>4__this.ShootBullet(position, direction, damage); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Player player; private float lastShootTime = -999f; private bool hasCard = false; public bool hasHealBonus = false; private GameObject sparkGunObject; private Gun sparkGun; private void Awake() { player = ((Component)this).GetComponent(); } private void OnDestroy() { CleanupSparkGun(); } public void Initialize() { hasCard = true; hasHealBonus = true; } private bool SetupSparkGunFromAttacker(Gun attackerGun) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown if ((Object)(object)attackerGun == (Object)null) { return false; } CleanupSparkGun(); try { Holding component = ((Component)player).GetComponent(); if ((Object)(object)component == (Object)null || (Object)(object)component.holdable == (Object)null) { return false; } Gun component2 = ((Component)component.holdable).GetComponent(); GameObject val = ((component2 != null) ? ((Component)component2).gameObject : null); if ((Object)(object)val == (Object)null) { return false; } sparkGunObject = Object.Instantiate(val, new Vector3(500f, 500f, -100f), Quaternion.identity); Object.DontDestroyOnLoad((Object)(object)sparkGunObject); foreach (Transform item in sparkGunObject.transform) { Transform val2 = item; Renderer[] componentsInChildren = ((Component)val2).GetComponentsInChildren(); Renderer[] array = componentsInChildren; foreach (Renderer val3 in array) { val3.enabled = false; } } sparkGun = sparkGunObject.GetComponent(); if ((Object)(object)sparkGun == (Object)null) { CleanupSparkGun(); return false; } CopyAllGunStats(attackerGun, sparkGun); sparkGun.player = player; sparkGun.attackID = player.playerID; sparkGun.numberOfProjectiles = 1; sparkGun.bursts = 0; sparkGun.timeBetweenBullets = 0f; sparkGun.spread = 0f; sparkGun.multiplySpread = 0f; sparkGun.evenSpread = 0f; sparkGun.recoil = 0f; sparkGun.bodyRecoil = 0f; sparkGun.shake = 0f; sparkGun.attackSpeed = 0.1f; sparkGun.attackSpeedMultiplier = 1f; sparkGun.dontAllowAutoFire = true; ((Weapon)sparkGun).sinceAttack = 10f; sparkGun.isProjectileGun = true; sparkGun.gravity = 0f; sparkGun.projectiles = attackerGun.projectiles; ObjectsToSpawn[] collection = (ObjectsToSpawn[])(((object)attackerGun.objectsToSpawn) ?? ((object)new ObjectsToSpawn[0])); List list = new List(collection); list.Add(VengefulSparkMarker.CreateObjectsToSpawn()); sparkGun.objectsToSpawn = list.ToArray(); sparkGun.ShootPojectileAction = null; return true; } catch (Exception ex) { MrFuntikMod.LogError("[VengefulSpark] Failed to setup spark gun: " + ex.Message); CleanupSparkGun(); return false; } } private void CleanupSparkGun() { if ((Object)(object)sparkGunObject != (Object)null) { Object.Destroy((Object)(object)sparkGunObject); sparkGunObject = null; sparkGun = null; } } public void OnDamageReceived(Vector2 damage, Player attacker, GameObject damagingWeapon) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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) if (CanShootSpark(damage, attacker, damagingWeapon)) { float num = ((Vector2)(ref damage)).magnitude * 0.3f; if (player.data.view.IsMine) { Vector3 position = ((Component)this).transform.position; Vector3 position2 = ((Component)attacker).transform.position; Vector3 val = position2 - position; Vector3 normalized = ((Vector3)(ref val)).normalized; player.data.view.RPC("RPC_FireSpark", (RpcTarget)0, new object[4] { position, normalized, num, attacker.playerID }); lastShootTime = Time.time; } } } private bool CanShootSpark(Vector2 damage, Player attacker, GameObject damagingWeapon) { if (!hasCard) { return false; } if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return false; } if (!player.data.isPlaying || player.data.dead) { return false; } if (((Vector2)(ref damage)).magnitude < 3f) { return false; } if ((Object)(object)attacker == (Object)null || (Object)(object)attacker == (Object)(object)player) { return false; } if (Time.time - lastShootTime < 0.5f) { return false; } if ((Object)(object)damagingWeapon != (Object)null && VengefulSparkMarker.HasMarker(damagingWeapon)) { return false; } return true; } [PunRPC] public void RPC_FireSpark(Vector3 position, Vector3 direction, float damage, int attackerPlayerID) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: 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) //IL_000d: Unknown result type (might be due to invalid IL or missing references) SpawnSparkParticles(position, direction); ((MonoBehaviour)this).StartCoroutine(FireSparkCoroutine(position, direction, damage, attackerPlayerID)); } private void SpawnSparkParticles(Vector3 position, Vector3 direction) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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) //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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown GameObject val = new GameObject("VengefulSparkBurst"); val.transform.position = position; ParticleSystem val2 = val.AddComponent(); MainModule main = val2.main; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.2f, 0.5f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(6f, 14f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.05f, 0.12f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 0.85f, 0.1f, 1f), new Color(1f, 0.4f, 0f, 1f)); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).maxParticles = 40; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(0.2f); ((MainModule)(ref main)).loop = false; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).enabled = true; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ((EmissionModule)(ref emission)).SetBursts((Burst[])(object)new Burst[1] { new Burst(0f, (short)30, (short)40) }); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).enabled = true; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)4; ((ShapeModule)(ref shape)).angle = 25f; ((ShapeModule)(ref shape)).radius = 0.1f; val.transform.rotation = Quaternion.LookRotation(direction); ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(1f, 0.9f, 0.3f), 0f), new GradientColorKey(new Color(1f, 0.3f, 0f), 0.5f), new GradientColorKey(new Color(0.5f, 0.1f, 0f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.6f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); ParticleSystemRenderer component = val.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 100; ((Renderer)component).material = new Material(Shader.Find("Sprites/Default")); val2.Play(); Object.Destroy((Object)(object)val, 1f); } [IteratorStateMachine(typeof(d__15))] private IEnumerator FireSparkCoroutine(Vector3 position, Vector3 direction, float damage, int attackerPlayerID) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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_0016: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0) { <>4__this = this, position = position, direction = direction, damage = damage, attackerPlayerID = attackerPlayerID }; } private void ShootBullet(Vector3 position, Vector3 direction, float damage) { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)sparkGun == (Object)null || sparkGun.projectiles == null || sparkGun.projectiles.Length == 0) { return; } bool flag = false; try { flag = (bool)typeof(Gun).InvokeMember("CheckIsMine", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, sparkGun, new object[0]); } catch { flag = player.data.view.IsMine; } if (!flag) { return; } try { GameObject objectToSpawn = sparkGun.projectiles[0].objectToSpawn; if ((Object)(object)objectToSpawn == (Object)null) { return; } Quaternion val = Quaternion.LookRotation(direction); GameObject val2 = PhotonNetwork.Instantiate(((Object)objectToSpawn.gameObject).name, position, val, (byte)0, (object[])null); if ((Object)(object)val2 == (Object)null) { return; } float num = Random.Range(0f, 1f); int num2 = 1; float num3 = sparkGun.damage * 55f; float num4 = ((num3 > 0f) ? (damage / num3) : 0f); if (PhotonNetwork.OfflineMode) { sparkGun.BulletInit(val2, num2, num4, num, false); return; } PhotonView component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { player.data.view.RPC("RPCA_InitBullet", (RpcTarget)0, new object[4] { component.ViewID, num2, num4, num }); } } catch (Exception ex) { MrFuntikMod.LogError("[VengefulSpark] Failed to shoot bullet: " + ex.Message); } } [PunRPC] public void RPCA_InitBullet(int bulletViewID, int numProj, float damageMultiplier, float seed) { try { PhotonView val = PhotonView.Find(bulletViewID); if (!((Object)(object)val == (Object)null)) { GameObject gameObject = ((Component)val).gameObject; if (!((Object)(object)gameObject == (Object)null) && (Object)(object)sparkGun != (Object)null) { sparkGun.BulletInit(gameObject, numProj, damageMultiplier, seed, false); } } } catch (Exception ex) { MrFuntikMod.LogError("[VengefulSpark] Failed to init bullet: " + ex.Message); } } public void OnRoundStart() { lastShootTime = -999f; CleanupSparkGun(); } private static void CopyAllGunStats(Gun from, Gun to) { //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)from == (Object)null) && !((Object)(object)to == (Object)null)) { to.damage = from.damage; to.damageAfterDistanceMultiplier = from.damageAfterDistanceMultiplier; to.bulletDamageMultiplier = from.bulletDamageMultiplier; to.projectileSpeed = from.projectileSpeed; to.projectielSimulatonSpeed = from.projectielSimulatonSpeed; to.gravity = from.gravity; to.drag = from.drag; to.dragMinSpeed = from.dragMinSpeed; to.spread = from.spread; to.evenSpread = from.evenSpread; to.multiplySpread = from.multiplySpread; to.size = from.size; to.knockback = from.knockback; to.projectileSize = from.projectileSize; to.projectileColor = from.projectileColor; to.numberOfProjectiles = from.numberOfProjectiles; to.bursts = from.bursts; to.timeBetweenBullets = from.timeBetweenBullets; to.reflects = from.reflects; to.smartBounce = from.smartBounce; to.bulletPortal = from.bulletPortal; to.randomBounces = from.randomBounces; to.destroyBulletAfter = from.destroyBulletAfter; to.slow = from.slow; to.percentageDamage = from.percentageDamage; to.speedMOnBounce = from.speedMOnBounce; to.dmgMOnBounce = from.dmgMOnBounce; to.objectsToSpawn = from.objectsToSpawn; to.projectiles = from.projectiles; to.attackID = from.attackID; to.player = from.player; to.isProjectileGun = from.isProjectileGun; to.ignoreWalls = from.ignoreWalls; to.unblockable = from.unblockable; to.recoil = from.recoil; to.recoilMuiltiplier = from.recoilMuiltiplier; to.bodyRecoil = from.bodyRecoil; to.shake = from.shake; to.attackSpeed = from.attackSpeed; to.attackSpeedMultiplier = from.attackSpeedMultiplier; to.hitMovementMultiplier = from.hitMovementMultiplier; to.waveMovement = from.waveMovement; to.teleport = from.teleport; to.spawnSkelletonSquare = from.spawnSkelletonSquare; to.explodeNearEnemyRange = from.explodeNearEnemyRange; to.explodeNearEnemyDamage = from.explodeNearEnemyDamage; to.cos = from.cos; to.chargeSpeedTo = from.chargeSpeedTo; to.chargeSpreadTo = from.chargeSpreadTo; to.chargeEvenSpreadTo = from.chargeEvenSpreadTo; to.chargeNumberOfProjectilesTo = from.chargeNumberOfProjectilesTo; to.chargeRecoilTo = from.chargeRecoilTo; to.chargeDamageMultiplier = from.chargeDamageMultiplier; to.currentCharge = from.currentCharge; to.dontAllowAutoFire = from.dontAllowAutoFire; to.forceSpecificAttackSpeed = from.forceSpecificAttackSpeed; to.lockGunToDefault = from.lockGunToDefault; to.overheatMultiplier = from.overheatMultiplier; to.useCharge = from.useCharge; } } } public class VengefulSparkMarker : MonoBehaviour { private static GameObject _markerPrefab; public static ObjectsToSpawn CreateObjectsToSpawn() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown return new ObjectsToSpawn { AddToProjectile = GetMarkerPrefab() }; } public static GameObject GetMarkerPrefab() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown if ((Object)(object)_markerPrefab == (Object)null) { _markerPrefab = new GameObject("VengefulSpark_Marker"); _markerPrefab.AddComponent(); ((Object)_markerPrefab).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)_markerPrefab); } return _markerPrefab; } public static bool HasMarker(GameObject obj) { if ((Object)(object)obj == (Object)null) { return false; } if ((Object)(object)obj.GetComponent() != (Object)null) { return true; } if ((Object)(object)obj.GetComponentInChildren() != (Object)null) { return true; } if ((Object)(object)obj.GetComponentInParent() != (Object)null) { return true; } Transform root = obj.transform.root; if ((Object)(object)root != (Object)null && (Object)(object)((Component)root).GetComponentInChildren() != (Object)null) { return true; } return false; } } } namespace MrFuntikMod.Patches { [HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")] public class AegisShieldPatch_RPCA_DoHit { public static bool Prefix(ProjectileHit __instance, Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID, int colliderID, ref bool wasBlocked) { if (viewID == -1) { return true; } PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); if ((Object)(object)photonView == (Object)null) { return true; } Player component = ((Component)photonView).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if ((Object)(object)component.data == (Object)null || component.data.dead) { return true; } if ((Object)(object)component.data.healthHandler == (Object)null || component.data.healthHandler.isRespawning) { return true; } if (!AegisShieldMono.IsShieldActiveForPlayer(component)) { return true; } wasBlocked = true; return true; } } [HarmonyPatch(typeof(HealthHandler), "DoDamage")] public class AegisShieldPatch_DoDamage { public static bool Prefix(HealthHandler __instance, ref Vector2 damage, Vector2 position, Color blinkColor, GameObject damagingWeapon, Player damagingPlayer, bool healthRemoval, bool lethal, bool ignoreBlock) { if ((Object)(object)__instance == (Object)null) { return true; } Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if ((Object)(object)component.data == (Object)null || component.data.dead) { return true; } if (__instance.isRespawning) { return true; } if (!AegisShieldMono.IsShieldActiveForPlayer(component)) { return true; } return false; } } [HarmonyPatch(typeof(HealthHandler), "CallTakeDamage")] public class AegisShieldPatch_CallTakeDamage { public static bool Prefix(HealthHandler __instance, Vector2 damage, Vector2 position, GameObject damagingWeapon, Player damagingPlayer, bool lethal) { //IL_000a: 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) if ((Object)(object)__instance == (Object)null || damage == Vector2.zero) { return true; } Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if ((Object)(object)component.data == (Object)null || component.data.dead) { return true; } if (__instance.isRespawning) { return true; } if (!AegisShieldMono.IsShieldActiveForPlayer(component)) { return true; } return false; } } [HarmonyPatch(typeof(HealthHandler), "TakeDamage", new Type[] { typeof(Vector2), typeof(Vector2), typeof(Color), typeof(GameObject), typeof(Player), typeof(bool), typeof(bool) })] public class AegisShieldPatch_TakeDamage { public static bool Prefix(HealthHandler __instance, Vector2 damage, Vector2 position, Color dmgColor, GameObject damagingWeapon, Player damagingPlayer, bool lethal, bool ignoreBlock) { //IL_000a: 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) if ((Object)(object)__instance == (Object)null || damage == Vector2.zero) { return true; } Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if ((Object)(object)component.data == (Object)null || component.data.dead) { return true; } if (__instance.isRespawning) { return true; } if (!AegisShieldMono.IsShieldActiveForPlayer(component)) { return true; } return false; } } [HarmonyPatch(typeof(HealthHandler), "RPCA_SendTakeDamage")] public class AegisShieldPatch_RPCA_SendTakeDamage { public static bool Prefix(HealthHandler __instance, ref Vector2 damage, Vector2 position, bool lethal, int playerID) { if ((Object)(object)__instance == (Object)null) { return true; } Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if ((Object)(object)component.data == (Object)null || component.data.dead) { return true; } if (__instance.isRespawning) { return true; } if (!AegisShieldMono.IsShieldActiveForPlayer(component)) { return true; } return false; } } [HarmonyPatch(typeof(HealthHandler), "TakeForce")] public class AegisShieldPatch_TakeForce { public static bool Prefix(HealthHandler __instance, ref Vector2 force, ForceMode2D forceMode, bool forceIgnoreMass, bool ignoreBlock, float setFlying) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)null || force == Vector2.zero) { return true; } Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if ((Object)(object)component.data == (Object)null || component.data.dead) { return true; } if (__instance.isRespawning) { return true; } if (!AegisShieldMono.IsShieldActiveForPlayer(component)) { return true; } if (AntiKnockbackHelper.IsCalledFromOutOfBounds()) { return true; } return false; } } [HarmonyPatch(typeof(HealthHandler), "RPCA_SendTakeForce")] public class AegisShieldPatch_RPCA_SendTakeForce { public static bool Prefix(HealthHandler __instance, Vector2 force, int forceMode, bool forceIgnoreMass, bool ignoreBlock, float setFlying) { //IL_000a: 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) if ((Object)(object)__instance == (Object)null || force == Vector2.zero) { return true; } Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if ((Object)(object)component.data == (Object)null || component.data.dead) { return true; } if (__instance.isRespawning) { return true; } if (!AegisShieldMono.IsShieldActiveForPlayer(component)) { return true; } if (AntiKnockbackHelper.IsCalledFromOutOfBounds()) { return true; } return false; } } [HarmonyPatch(typeof(HealthHandler), "Heal")] public class HealEffectPatch { [HarmonyPrefix] private static void Prefix(HealthHandler __instance, ref float healAmount) { WeakenedHealMono component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && component.GetStacks() > 0) { float healMultiplier = component.GetHealMultiplier(); healAmount *= healMultiplier; } } } [HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")] [HarmonyPriority(800)] public class DancerDodgePatch { public static bool Prefix(ProjectileHit __instance, Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID, int colliderID, bool wasBlocked) { if (wasBlocked) { return true; } if (viewID == -1) { return true; } PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); if ((Object)(object)photonView == (Object)null) { return true; } HealthHandler component = ((Component)photonView).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if (component.isRespawning) { return true; } Player component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 == (Object)null) { return true; } if ((Object)(object)component2.data == (Object)null || component2.data.dead) { return true; } Block component3 = ((Component)component).GetComponent(); if ((Object)(object)component3 != (Object)null && component3.IsBlocking()) { return true; } DancerMono component4 = ((Component)component2).GetComponent(); if ((Object)(object)component4 == (Object)null) { return true; } if (!__instance.view.IsMine) { return true; } Debug.Log((object)"[MFM] TryDodge."); if (component4.TryDodge()) { NetworkingManager.RPC(typeof(DancerDodgePatch), "RPC_ShowDodgeEffect", new object[1] { component2.playerID }); return false; } return true; } [UnboundRPC] public static void RPC_ShowDodgeEffect(int playerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { DancerMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.ShowMissText(); } } } } public class DeathDefyHandler { [CompilerGenerated] private sealed class d__1 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; private List.Enumerator <>s__1; private Player 5__2; private CharacterData 5__3; private DeathDefyMono 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>s__1 = PlayerManager.instance.players.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if ((Object)(object)5__2 == (Object)null) { continue; } 5__3 = ((Component)5__2).GetComponent(); if ((Object)(object)5__3 == (Object)null) { continue; } 5__4 = ((Component)5__2).GetComponent(); if (!((Object)(object)5__4 == (Object)null) && 5__3.view.IsMine) { if (5__4.TryRollReviveOnBattleStart()) { NetworkingManager.RPC(typeof(DeathDefyHandler), "RPC_AddRespawn", new object[1] { 5__2.playerID }); } 5__3 = null; 5__4 = null; 5__2 = null; } } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__2 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; private List.Enumerator <>s__1; private Player 5__2; private DeathDefyMono 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>s__1 = PlayerManager.instance.players.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if (!((Object)(object)5__2 == (Object)null)) { 5__3 = ((Component)5__2).GetComponent(); if (!((Object)(object)5__3 == (Object)null)) { 5__3.ClearTempRespawns(); 5__3 = null; 5__2 = null; } } } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); 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(); } } public static void RegisterHooks() { GameModeManager.AddHook("BattleStart", (Func)OnBattleStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } [IteratorStateMachine(typeof(d__1))] private static IEnumerator OnBattleStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1(0) { gm = gm }; } [IteratorStateMachine(typeof(d__2))] private static IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0) { gm = gm }; } [UnboundRPC] public static void RPC_AddRespawn(int playerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { DeathDefyMono component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.AddTempRespawn(); } } } [UnboundRPC] public static void RPC_ShowText(int playerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { DeathDefyMono component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.ShowReviveText(); } } } } [HarmonyPatch(typeof(HealthHandler), "RPCA_Die_Phoenix")] public class DeathDefyPhoenixPatch { public static void Postfix(HealthHandler __instance) { Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return; } CharacterData component2 = ((Component)__instance).GetComponent(); if ((Object)(object)component2 == (Object)null) { return; } DeathDefyMono component3 = ((Component)component).GetComponent(); if (!((Object)(object)component3 == (Object)null) && component2.view.IsMine && ModRespawnTracker.WasOurRespawnConsumed(component)) { if (component3.HasDeathDefyRespawns()) { NetworkingManager.RPC(typeof(DeathDefyHandler), "RPC_ShowText", new object[1] { component.playerID }); } if (component3.TryProcessDeathDefyRespawn()) { NetworkingManager.RPC(typeof(DeathDefyHandler), "RPC_AddRespawn", new object[1] { component.playerID }); } } } } [HarmonyPatch(typeof(Gun), "BulletInit")] public class BulletInitPatch { private const float BASE_MAX_SPAWN_DISTANCE = 2f; private static void Postfix(Gun __instance, GameObject bullet) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance.player == (Object)null || !__instance.player.data.view.IsMine) { return; } Gun gun = __instance.player.data.weaponHandler.gun; if ((Object)(object)__instance != (Object)(object)gun) { return; } if ((Object)(object)__instance.shootPosition != (Object)null) { float playerSizeMultiplier = GetPlayerSizeMultiplier(__instance.player); float num = 2f * playerSizeMultiplier; float num2 = Vector3.Distance(bullet.transform.position, __instance.shootPosition.position); if (num2 > num) { return; } } ExecutionerMono component = ((Component)__instance.player).GetComponent(); if (!((Object)(object)component == (Object)null) && component.TryExecute()) { PhotonView component2 = bullet.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { int viewID = component2.ViewID; ApplyExecutionerEffect(viewID); NetworkingManager.RPC(typeof(BulletInitPatch), "RPC_SetExecutionerBullet", new object[1] { viewID }); } } } private static void ApplyExecutionerEffect(int bulletViewID) { PhotonView photonView = PhotonNetwork.GetPhotonView(bulletViewID); if (!((Object)(object)photonView == (Object)null)) { GameObject gameObject = ((Component)photonView).gameObject; ExecutionerBullet executionerBullet = gameObject.GetComponent(); if ((Object)(object)executionerBullet == (Object)null) { executionerBullet = gameObject.AddComponent(); } executionerBullet.isExecutionerShot = true; executionerBullet.ApplyBloodyVisuals(); } } [UnboundRPC] public static void RPC_SetExecutionerBullet(int bulletViewID) { ApplyExecutionerEffect(bulletViewID); } private static float GetPlayerSizeMultiplier(Player player) { //IL_005b: 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) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return 1f; } float num = 1f; if ((Object)(object)player.data.stats != (Object)null) { num = player.data.stats.sizeMultiplier; } float num2 = Mathf.Max(((Component)player).transform.localScale.x, ((Component)player).transform.localScale.y); if (num2 > num) { num = num2; } return Mathf.Max(1f, num); } } [HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")] [HarmonyPriority(0)] public class ExecutionerPatch { public static bool Prefix(ProjectileHit __instance, Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID, int colliderID, ref bool wasBlocked) { //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0174: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) if (wasBlocked || viewID == -1) { return true; } ExecutionerBullet component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null || !component.isExecutionerShot) { return true; } PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); if ((Object)(object)photonView == (Object)null) { return true; } Player component2 = ((Component)photonView).GetComponent(); if ((Object)(object)component2 == (Object)null || component2.data.dead) { return true; } HealthHandler component3 = ((Component)component2).GetComponent(); if ((Object)(object)component3 == (Object)null || component3.isRespawning) { return true; } if ((Object)(object)__instance.ownPlayer != (Object)null && __instance.ownPlayer.data.view.IsMine) { Vector2 val = Vector2.op_Implicit(((Component)component2).transform.position - ((Component)__instance.ownPlayer).transform.position); Vector2 normalized = ((Vector2)(ref val)).normalized; if (component2.data.stats.remainingRespawns > 0) { component2.data.view.RPC("RPCA_Die_Phoenix", (RpcTarget)0, new object[1] { normalized }); } else { component2.data.view.RPC("RPCA_Die", (RpcTarget)0, new object[1] { normalized }); } NetworkingManager.RPC(typeof(ExecutionerPatch), "RPC_ShowExecuteEffect", new object[4] { __instance.ownPlayer.playerID, ((Component)component2).transform.position.x, ((Component)component2).transform.position.y, ((Component)component2).transform.position.z }); } return false; } [UnboundRPC] public static void RPC_ShowExecuteEffect(int attackerPlayerID, float posX, float posY, float posZ) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) ExecutionerMono.ShowExecuteTextStatic(attackerPlayerID, new Vector3(posX, posY, posZ)); } } [HarmonyPatch(typeof(HealthHandler), "RPCA_Die")] public class ExecutionerDeathPatch { public static void Postfix(HealthHandler __instance, Vector2 deathDirection) { Player component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { ExecutionerMono.OnPlayerDied(component.playerID); } } } [HarmonyPatch(typeof(HealthHandler), "RPCA_Die_Phoenix")] public class ExecutionerDeathPhoenixPatch { public static void Postfix(HealthHandler __instance, Vector2 deathDirection) { Player component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { ExecutionerMono.OnPlayerDied(component.playerID); } } } [HarmonyPatch(typeof(Block), "RPCA_DoBlock")] public class ExtendedGuardSyncPatch { private static int patchCallCount; public static void Prefix(Block __instance, bool firstBlock, bool dontSetCD, BlockTriggerType triggerType, Vector3 useBlockPos, bool onlyBlockEffects) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 patchCallCount++; if ((int)triggerType > 0 || !firstBlock) { return; } Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return; } ExtendedGuardMono component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 == (Object)null) { return; } CharacterData component3 = ((Component)component).GetComponent(); if (!((Object)(object)component3 == (Object)null) && component3.view.IsMine) { float value = Random.value; float critChance = component2.GetCritChance(); if (value < critChance) { NetworkingManager.RPC(typeof(ExtendedGuardSyncPatch), "RPC_ActivateCritBlock", new object[1] { component.playerID }); } } } [UnboundRPC] public static void RPC_ActivateCritBlock(int playerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { ExtendedGuardMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.ActivateCritBlockFromRPC(); } } } } internal static class AntiRadarEffectHelper { private static float lastEffectTime; private const float EFFECT_COOLDOWN = 1.5f; public static void PlayRadarEvadeEffect(Player player) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !(Time.time - lastEffectTime < 1.5f)) { lastEffectTime = Time.time; Color color = default(Color); ((Color)(ref color))..ctor(0.4f, 0.8f, 1f, 0.8f); ShieldEffect.PlayShieldEffect(player, color, 0.6f, 0.6f); } } } [HarmonyPatch(typeof(PlayerManager), "GetClosestPlayer")] [HarmonyPatch(new Type[] { typeof(Vector2), typeof(bool) })] public class GetClosestPlayerPatch { [HarmonyPostfix] public static void Postfix(ref Player __result, Vector2 refPos, bool needVision) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__result == (Object)null) && ImmunityAntiRadarCard.HasImmunity(__result)) { Player val = __result; __result = FindClosestPlayerWithoutImmunity(refPos, val, needVision); AntiRadarEffectHelper.PlayRadarEvadeEffect(val); } } private static Player FindClosestPlayerWithoutImmunity(Vector2 pos, Player excluded, bool needVision) { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) if (PlayerManager.instance?.players == null) { return null; } Player result = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player == (Object)(object)excluded) && !((Object)(object)player.data == (Object)null) && !player.data.dead && ((Component)player).gameObject.activeInHierarchy && !ImmunityAntiRadarCard.HasImmunity(player) && (!needVision || PlayerManager.instance.CanSeePlayer(pos, player).canSee)) { float num2 = Vector2.Distance(pos, player.data.playerVel.position); if (num2 < num) { num = num2; result = player; } } } return result; } } [HarmonyPatch(typeof(PlayerManager), "GetClosestPlayer")] [HarmonyPatch(new Type[] { typeof(Vector2), typeof(Vector2) })] public class GetClosestPlayerForwardPatch { [HarmonyPostfix] public static void Postfix(ref Player __result, Vector2 refPos, Vector2 forward) { //IL_0023: 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) if (!((Object)(object)__result == (Object)null) && ImmunityAntiRadarCard.HasImmunity(__result)) { Player val = __result; __result = FindClosestPlayerWithoutImmunity(refPos, forward, val); AntiRadarEffectHelper.PlayRadarEvadeEffect(val); } } private static Player FindClosestPlayerWithoutImmunity(Vector2 refPos, Vector2 forward, Player excluded) { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00fb: 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_0101: Unknown result type (might be due to invalid IL or missing references) if (PlayerManager.instance?.players == null) { return null; } Player result = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player == (Object)(object)excluded) && !((Object)(object)player.data == (Object)null) && !player.data.dead && ((Component)player).gameObject.activeInHierarchy && !ImmunityAntiRadarCard.HasImmunity(player) && PlayerManager.instance.CanSeePlayer(refPos, player).canSee) { float num2 = Vector2.Distance(refPos, player.data.playerVel.position); float num3 = Vector2.Angle(forward, player.data.playerVel.position - refPos); float num4 = num2 + num3; if (num4 < num) { num = num4; result = player; } } } return result; } } [HarmonyPatch(typeof(BounceEffectRetarget), "FindTarget")] public class TargetBouncePatch { [HarmonyPostfix] public static void Postfix(BounceEffectRetarget __instance, ref Player __result, HitInfo hit) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_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_0047: 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) if (!((Object)(object)__result == (Object)null) && ImmunityAntiRadarCard.HasImmunity(__result)) { Player val = __result; Vector3 pos = ((Component)__instance).transform.position + Vector2.op_Implicit(hit.normal * 0.1f); __result = FindVisiblePlayerWithoutImmunity(pos, val); AntiRadarEffectHelper.PlayRadarEvadeEffect(val); } } private static Player FindVisiblePlayerWithoutImmunity(Vector3 pos, Player exclude) { //IL_00ba: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) if (PlayerManager.instance?.players == null) { return null; } Player result = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player == (Object)(object)exclude) && !((Object)(object)player.data == (Object)null) && !player.data.dead && ((Component)player).gameObject.activeInHierarchy && !ImmunityAntiRadarCard.HasImmunity(player) && PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(pos), player).canSee) { float num2 = Vector3.Distance(pos, ((Component)player).transform.position); if (num2 < num) { num = num2; result = player; } } } return result; } } internal static class OobImmunityState { internal static bool IsOobFrame; internal static bool IsImmunityRedirect; } [HarmonyPatch(typeof(OutOfBoundsHandler), "LateUpdate")] internal static class OutOfBoundsHandlerFramePatch { [CompilerGenerated] private sealed class d__2 : IEnumerable, IEnumerable, IEnumerator, IEnumerator, IDisposable { private int <>1__state; private CodeInstruction <>2__current; private int <>l__initialThreadId; private IEnumerable instructions; public IEnumerable <>3__instructions; private IEnumerator <>s__1; private CodeInstruction 5__2; CodeInstruction IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || (uint)(num - 1) <= 1u) { try { } finally { <>m__Finally1(); } } <>s__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = instructions.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; goto IL_00fa; case 2: { <>1__state = -3; goto IL_00fa; } IL_00fa: 5__2 = null; break; } if (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if (5__2.opcode == OpCodes.Ldc_R4 && (float)5__2.operand == 400f) { <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(OutOfBoundsHandlerFramePatch), "GetOobForce", (Type[])null, (Type[])null)); <>1__state = 1; return true; } <>2__current = 5__2; <>1__state = 2; return true; } <>m__Finally1(); <>s__1 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__1 != null) { <>s__1.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { d__2 d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; d__ = this; } else { d__ = new d__2(0); } d__.instructions = <>3__instructions; return d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)this).GetEnumerator(); } } private static void Prefix() { OobImmunityState.IsOobFrame = true; } private static void Postfix() { OobImmunityState.IsOobFrame = false; OobImmunityState.IsImmunityRedirect = false; } [IteratorStateMachine(typeof(d__2))] private static IEnumerable Transpiler(IEnumerable instructions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(-2) { <>3__instructions = instructions }; } private static float GetOobForce() { return OobImmunityState.IsImmunityRedirect ? 200f : 400f; } } [HarmonyPatch(typeof(Block), "IsBlocking")] internal static class BlockIsBlockingOobPatch { private static void Postfix(Block __instance, ref bool __result) { if (!__result && OobImmunityState.IsOobFrame && !((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null)) { __result = true; OobImmunityState.IsImmunityRedirect = true; } } } [HarmonyPatch(typeof(HealthHandler), "CallTakeDamage")] internal static class HealthHandlerOobPatch { private static bool Prefix(HealthHandler __instance) { if (!OobImmunityState.IsOobFrame) { return true; } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { return true; } return false; } } [HarmonyPatch(typeof(CharacterStatModifiers), "AddSlowAddative")] public class AntiSlowPatch_AddSlowAddative { public static bool Prefix(CharacterStatModifiers __instance, float slowToAdd, float maxValue, bool isFastSlow) { Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).gameObject.GetComponent() != (Object)null) { PlayResistEffects(component); return false; } return true; } public static void PlayResistEffects(Player player) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) Color color = default(Color); ((Color)(ref color))..ctor(0.2f, 1f, 0.6f, 1f); ShieldEffect.PlayShieldEffect(player, color); } } [HarmonyPatch(typeof(CharacterStatModifiers), "RPCA_AddSlow")] public class AntiSlowPatch_RPCA_AddSlow { public static bool Prefix(CharacterStatModifiers __instance, float slowToAdd, bool isFastSlow) { Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).gameObject.GetComponent() != (Object)null) { AntiSlowPatch_AddSlowAddative.PlayResistEffects(component); return false; } return true; } } [HarmonyPatch(typeof(CharacterStatModifiers), "DoSlowDown")] [HarmonyPatch(new Type[] { typeof(float) })] public class AntiSlowPatch_DoSlowDown { public static bool Prefix(CharacterStatModifiers __instance, float newSlow) { Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).gameObject.GetComponent() != (Object)null) { return false; } return true; } } public static class ReversibleEffectUniversalPatch { private static bool initialized = false; private static Type reversibleEffectType = null; private static FieldInfo playerField = null; private static FieldInfo characterStatModifiersModifierField = null; private static FieldInfo movementSpeedMultField = null; private static FieldInfo jumpMultField = null; private static float lastEffectTime = -1f; private const float EFFECT_COOLDOWN = 0.5f; public static void ApplyPatch(Harmony harmony) { //IL_0073: 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_008c: Expected O, but got Unknown try { FindReversibleEffectType(); if (reversibleEffectType == null) { Debug.LogWarning((object)"[MFM] ReversibleEffect type not found - ModdingUtils not loaded?"); return; } MethodInfo method = reversibleEffectType.GetMethod("ApplyModifiers", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { Debug.LogWarning((object)"[MFM] ApplyModifiers method not found in ReversibleEffect"); return; } CacheFields(); MethodInfo method2 = typeof(ReversibleEffectUniversalPatch).GetMethod("ApplyModifiers_Prefix", BindingFlags.Static | BindingFlags.Public); harmony.Patch((MethodBase)method, new HarmonyMethod(method2) { priority = 800 }, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); initialized = true; } catch (Exception ex) { Debug.LogError((object)("[MFM] Failed to apply ReversibleEffect patch: " + ex.Message)); } } private static void FindReversibleEffectType() { Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { try { if (assembly.FullName.Contains("ModdingUtils")) { Type type = assembly.GetType("ModdingUtils.MonoBehaviours.ReversibleEffect"); if (type != null) { reversibleEffectType = type; return; } } } catch (Exception) { } } Assembly[] assemblies2 = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly2 in assemblies2) { try { Type[] types; try { types = assembly2.GetTypes(); } catch (ReflectionTypeLoadException ex2) { types = ex2.Types; } if (types == null) { continue; } Type[] array = types; foreach (Type type2 in array) { if (type2 != null && type2.FullName == "ModdingUtils.MonoBehaviours.ReversibleEffect") { reversibleEffectType = type2; return; } } } catch (Exception) { } } } private static void CacheFields() { if (!(reversibleEffectType == null)) { playerField = reversibleEffectType.GetField("player", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); characterStatModifiersModifierField = reversibleEffectType.GetField("characterStatModifiersModifier", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (characterStatModifiersModifierField != null) { Type fieldType = characterStatModifiersModifierField.FieldType; movementSpeedMultField = fieldType.GetField("movementSpeed_mult", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); jumpMultField = fieldType.GetField("jump_mult", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } } } public static void ApplyModifiers_Prefix(object __instance) { try { if (playerField == null || characterStatModifiersModifierField == null) { return; } object? value = playerField.GetValue(__instance); Player val = (Player)((value is Player) ? value : null); if ((Object)(object)val == (Object)null) { return; } AntiSlowMono component = ((Component)val).GetComponent(); if ((Object)(object)component == (Object)null) { return; } object value2 = characterStatModifiersModifierField.GetValue(__instance); if (value2 == null) { return; } bool flag = false; if (movementSpeedMultField != null) { float num = (float)movementSpeedMultField.GetValue(value2); if (num < 1f) { movementSpeedMultField.SetValue(value2, 1f); flag = true; } } if (jumpMultField != null) { float num2 = (float)jumpMultField.GetValue(value2); if (num2 < 1f) { jumpMultField.SetValue(value2, 1f); flag = true; } } if (flag && Time.time - lastEffectTime >= 0.5f) { lastEffectTime = Time.time; AntiSlowPatch_AddSlowAddative.PlayResistEffects(val); } } catch (Exception ex) { Debug.LogWarning((object)("[MFM] ReversibleEffect patch error: " + ex.Message)); } } } public static class AntiSlowExternalModsPatch { public static void ApplyPatches(Harmony harmony) { ReversibleEffectUniversalPatch.ApplyPatch(harmony); TryPatchMethod(harmony, "GoldHealthMono", "OnStart", "GoldHealth OnStart", "GoldHealthOnStartPrefix"); TryPatchMethod(harmony, "GoldenGlazeMono", "DoHitEffect", "Golden Glaze DoHitEffect", "GenericDoHitEffectPrefix"); } private static void TryPatchMethod(Harmony harmony, string className, string methodName, string displayName, string prefixMethodName) { //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown try { Type type = null; Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { try { Type[] types; try { types = assembly.GetTypes(); } catch (ReflectionTypeLoadException ex) { types = ex.Types; } if (types == null) { continue; } Type[] array = types; foreach (Type type2 in array) { if (type2 != null && type2.Name == className) { type = type2; break; } } if (!(type != null)) { continue; } break; } catch (Exception) { } } if (type == null) { return; } MethodInfo method = type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (!(method == null)) { MethodInfo method2 = typeof(AntiSlowExternalModsPatch).GetMethod(prefixMethodName, BindingFlags.Static | BindingFlags.Public); if (!(method2 == null)) { HarmonyMethod val = new HarmonyMethod(method2) { priority = 800 }; harmony.Patch((MethodBase)method, val, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } } } catch (Exception ex3) { Debug.LogWarning((object)("[MFM] Failed to patch " + displayName + ": " + ex3.Message)); } } public static bool GoldHealthOnStartPrefix(object __instance) { try { MonoBehaviour val = (MonoBehaviour)((__instance is MonoBehaviour) ? __instance : null); if ((Object)(object)val == (Object)null) { return true; } Player component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).gameObject.GetComponent() != (Object)null) { AntiSlowPatch_AddSlowAddative.PlayResistEffects(component); Object.Destroy((Object)(object)val); return false; } } catch (Exception ex) { Debug.LogWarning((object)("[MFM] Error in GoldHealthOnStartPrefix: " + ex.Message)); } return true; } public static bool GenericDoHitEffectPrefix(object __instance, object hit) { try { Type type = hit.GetType(); FieldInfo field = type.GetField("transform", BindingFlags.Instance | BindingFlags.Public); Transform val = null; if (field != null) { object? value = field.GetValue(hit); val = (Transform)((value is Transform) ? value : null); } if ((Object)(object)val == (Object)null) { return true; } Player component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).gameObject.GetComponent() != (Object)null) { AntiSlowPatch_AddSlowAddative.PlayResistEffects(component); return false; } } catch (Exception ex) { Debug.LogWarning((object)("[MFM] Error in GenericDoHitEffectPrefix: " + ex.Message)); } return true; } } internal static class AntiKnockbackHelper { private static float lastEffectTime; private const float EFFECT_COOLDOWN = 0.15f; private static readonly Color SHIELD_COLOR = new Color(0.9f, 0.5f, 0.2f, 1f); public static bool IsCalledFromOutOfBounds() { StackTrace stackTrace = new StackTrace(); StackFrame[] frames = stackTrace.GetFrames(); if (frames == null) { return false; } StackFrame[] array = frames; foreach (StackFrame stackFrame in array) { if (stackFrame.GetMethod()?.DeclaringType?.Name == "OutOfBoundsHandler") { return true; } } return false; } public static void PlayResistEffects(Player player) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!(Time.time - lastEffectTime < 0.15f)) { lastEffectTime = Time.time; ShieldEffect.PlayShieldEffect(player, SHIELD_COLOR, 0.8f); } } public static bool ShouldBlockKnockback(Player player) { if ((Object)(object)player == (Object)null) { return false; } if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { return false; } if (IsCalledFromOutOfBounds()) { return false; } return true; } } [HarmonyPatch(typeof(HealthHandler), "TakeForce")] public class AntiKnockbackPatch_TakeForce { public static bool Prefix(HealthHandler __instance, ref Vector2 force) { Player component = ((Component)__instance).GetComponent(); if (!AntiKnockbackHelper.ShouldBlockKnockback(component)) { return true; } AntiKnockbackHelper.PlayResistEffects(component); return false; } } [HarmonyPatch(typeof(HealthHandler), "RPCA_SendTakeForce")] public class AntiKnockbackPatch_RPCA { public static bool Prefix(HealthHandler __instance, Vector2 force) { Player component = ((Component)__instance).GetComponent(); if (!AntiKnockbackHelper.ShouldBlockKnockback(component)) { return true; } AntiKnockbackHelper.PlayResistEffects(component); return false; } } [HarmonyPatch(typeof(SilenceHandler), "RPCA_AddSilence")] public class AntiSilencePatch { private static float lastEffectTime; private const float EFFECT_COOLDOWN = 0.15f; public static bool Prefix(SilenceHandler __instance, float __0) { Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).GetComponent() != (Object)null) { PlayResistEffect(component); return false; } return true; } private static void PlayResistEffect(Player player) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!(Time.time - lastEffectTime < 0.15f)) { lastEffectTime = Time.time; Color color = default(Color); ((Color)(ref color))..ctor(0.6f, 0.6f, 1f, 1f); ShieldEffect.PlayShieldEffect(player, color); } } } [HarmonyPatch(typeof(HealthHandler), "RPCA_Die")] public class DeathPatchNormal { [HarmonyPostfix] public static void Postfix(HealthHandler __instance) { KamikazeHelper.ProcessKamikaze(__instance); } } [HarmonyPatch(typeof(HealthHandler), "RPCA_Die_Phoenix")] public class DeathPatchPhoenix { [HarmonyPostfix] public static void Postfix(HealthHandler __instance) { KamikazeHelper.ProcessKamikaze(__instance); } } public static class KamikazeHelper { public static void ProcessKamikaze(HealthHandler healthHandler) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) Player component = ((Component)healthHandler).GetComponent(); if (!((Object)(object)component == (Object)null) && component.data.currentCards.Any((CardInfo card) => card.cardName == "Kamikaze")) { GameObject val = new GameObject("KamikazeOnDeath"); val.transform.position = ((Component)component).transform.position; KamikazeOnDeathComponent kamikazeOnDeathComponent = val.AddComponent(); kamikazeOnDeathComponent.SourcePlayer = component; kamikazeOnDeathComponent.MaxDistance = 15f; } } } public class KamikazeOnDeathComponent : MonoBehaviour { public Player SourcePlayer; public float MaxDistance = 15f; private void Start() { ExecuteKamikazeEffectOnDeath(); } private void ExecuteKamikazeEffectOnDeath() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: 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) if ((Object)(object)SourcePlayer == (Object)null) { MrFuntikMod.LogError("[Kamikaze] SourcePlayer is null!"); Object.Destroy((Object)(object)((Component)this).gameObject); return; } GameObject kamikazeVisual = KamikazeMono.kamikazeVisual; if ((Object)(object)kamikazeVisual != (Object)null) { Object.Instantiate(kamikazeVisual, ((Component)this).transform.position, Quaternion.identity); } Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); Player[] array = PlayerManager.instance.players.ToArray(); Player[] array2 = array; foreach (Player val2 in array2) { if (val2.teamID == SourcePlayer.teamID) { continue; } float num = Vector2.Distance(val, Vector2.op_Implicit(((Component)val2).transform.position)); bool canSee = PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)this).transform.position), val2).canSee; if (num < MaxDistance && canSee) { HealthHandler component = ((Component)val2).GetComponent(); if ((Object)(object)component != (Object)null) { ((Damagable)component).TakeDamage(200f * Vector2.down, Vector2.op_Implicit(((Component)val2).transform.position), ((Component)SourcePlayer.data.weaponHandler).gameObject, SourcePlayer, true, false); Vector3 val3 = ((Component)val2).transform.position - Vector2.op_Implicit(val); component.TakeForce(Vector2.op_Implicit(((Vector3)(ref val3)).normalized * 12000f), (ForceMode2D)1, true, false, 0.8f); } } } Object.Destroy((Object)(object)((Component)this).gameObject, 0.1f); } } [HarmonyPatch(typeof(HealthHandler), "DoDamage")] public class KineticArmorDamagePatch { public static void Postfix(HealthHandler __instance, Vector2 damage, Player damagingPlayer) { if (((Vector2)(ref damage)).magnitude <= 0f) { return; } Player component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null) && component.data.view.IsMine && (!((Object)(object)damagingPlayer != (Object)null) || !((Object)(object)damagingPlayer == (Object)(object)component))) { KineticArmorMono component2 = ((Component)component).GetComponent(); if (!((Object)(object)component2 == (Object)null)) { component2.AddCharge(((Vector2)(ref damage)).magnitude); } } } } [HarmonyPatch(typeof(Gun), "BulletInit")] public class KineticArmorBulletInitPatch { private const float BASE_MAX_SPAWN_DISTANCE = 2f; public static void Postfix(Gun __instance, GameObject bullet) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance.player == (Object)null || !__instance.player.data.view.IsMine || (Object)(object)__instance != (Object)(object)__instance.player.data.weaponHandler.gun) { return; } if ((Object)(object)__instance.shootPosition != (Object)null) { float playerSizeMultiplier = GetPlayerSizeMultiplier(__instance.player); float num = 2f * playerSizeMultiplier; if (Vector3.Distance(bullet.transform.position, __instance.shootPosition.position) > num) { return; } } KineticArmorMono component = ((Component)__instance.player).GetComponent(); if (!((Object)(object)component == (Object)null) && !(component.GetStoredCharge() <= 0f)) { PhotonView component2 = bullet.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { float num2 = component.ConsumeCharge(); int viewID = component2.ViewID; ApplyKineticEffect(viewID, num2); NetworkingManager.RPC(typeof(KineticArmorBulletInitPatch), "RPC_SetKineticBullet", new object[2] { viewID, num2 }); } } } private static void ApplyKineticEffect(int bulletViewID, float bonusDamage) { PhotonView photonView = PhotonNetwork.GetPhotonView(bulletViewID); if (!((Object)(object)photonView == (Object)null)) { GameObject gameObject = ((Component)photonView).gameObject; KineticArmorBullet kineticArmorBullet = gameObject.GetComponent(); if ((Object)(object)kineticArmorBullet == (Object)null) { kineticArmorBullet = gameObject.AddComponent(); } kineticArmorBullet.bonusDamage = bonusDamage; kineticArmorBullet.ApplyKineticVisuals(); } } [UnboundRPC] public static void RPC_SetKineticBullet(int bulletViewID, float bonusDamage) { ApplyKineticEffect(bulletViewID, bonusDamage); } private static float GetPlayerSizeMultiplier(Player player) { //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) if ((Object)(object)player?.data?.stats == (Object)null) { return 1f; } float num = player.data.stats.sizeMultiplier; float num2 = Mathf.Max(((Component)player).transform.localScale.x, ((Component)player).transform.localScale.y); if (num2 > num) { num = num2; } return Mathf.Max(1f, num); } } [HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")] public class KineticArmorHitPatch { public static void Prefix(ProjectileHit __instance, Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID, int colliderID, ref bool wasBlocked) { //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) if (wasBlocked || viewID == -1) { return; } KineticArmorBullet component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null || component.bonusDamage <= 0f) { return; } float bonusDamage = component.bonusDamage; component.bonusDamage = 0f; if ((Object)(object)__instance.ownPlayer == (Object)null || !__instance.ownPlayer.data.view.IsMine) { return; } PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); if ((Object)(object)photonView == (Object)null) { return; } Player component2 = ((Component)photonView).GetComponent(); if (!((Object)(object)component2 == (Object)null) && !component2.data.dead) { HealthHandler component3 = ((Component)component2).GetComponent(); if (!((Object)(object)component3 == (Object)null)) { ((Damagable)component3).CallTakeDamage(Vector2.down * bonusDamage, Vector2.op_Implicit(new Vector3(hitPoint.x, hitPoint.y, 0f)), ((Component)__instance.ownPlayer.data.weaponHandler.gun).gameObject, __instance.ownPlayer, true); } } } } public static class ModRespawnTracker { public static int GetOurRemainingRespawns(Player player) { int num = 0; PhoenixSurgeMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { num += component.OurRemainingCount; } DeathDefyMono component2 = ((Component)player).GetComponent(); if ((Object)(object)component2 != (Object)null) { num += component2.OurRemainingCount; } return num; } public static bool WasOurRespawnConsumed(Player player) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || (Object)(object)player.data.stats == (Object)null) { return false; } int remainingRespawns = player.data.stats.remainingRespawns; int ourRemainingRespawns = GetOurRemainingRespawns(player); return remainingRespawns < ourRemainingRespawns; } } public static class PhoenixSurgeHandler { [CompilerGenerated] private sealed class d__1 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; private List.Enumerator <>s__1; private Player 5__2; private CharacterData 5__3; private PhoenixSurgeMono 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>s__1 = PlayerManager.instance.players.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if ((Object)(object)5__2 == (Object)null) { continue; } 5__3 = ((Component)5__2).GetComponent(); if (!((Object)(object)5__3 == (Object)null)) { 5__4 = ((Component)5__2).GetComponent(); if (!((Object)(object)5__4 == (Object)null) && 5__3.view.IsMine) { NetworkingManager.RPC(typeof(PhoenixSurgeHandler), "RPC_AddRespawn", new object[1] { 5__2.playerID }); 5__3 = null; 5__4 = null; 5__2 = null; } } } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__2 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; private List.Enumerator <>s__1; private Player 5__2; private PhoenixSurgeMono 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>s__1 = PlayerManager.instance.players.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if (!((Object)(object)5__2 == (Object)null)) { 5__3 = ((Component)5__2).GetComponent(); if (!((Object)(object)5__3 == (Object)null)) { 5__3.ClearTempRespawn(); 5__3 = null; 5__2 = null; } } } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); 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(); } } public static void RegisterHooks() { GameModeManager.AddHook("BattleStart", (Func)OnBattleStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } [IteratorStateMachine(typeof(d__1))] private static IEnumerator OnBattleStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1(0) { gm = gm }; } [IteratorStateMachine(typeof(d__2))] private static IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0) { gm = gm }; } [UnboundRPC] public static void RPC_AddRespawn(int playerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { PhoenixSurgeMono component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.AddTempRespawn(); } } } [UnboundRPC] public static void RPC_MarkPendingExplosion(int playerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { PhoenixSurgeMono component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.MarkPendingExplosion(); } } } [UnboundRPC] public static void RPC_ShowText(int playerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { PhoenixSurgeMono component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.ShowSurgeText(); } } } } [HarmonyPatch(typeof(HealthHandler), "RPCA_Die_Phoenix")] [HarmonyPriority(800)] public class PhoenixSurgePhoenixPatch { public static void Postfix(HealthHandler __instance) { Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return; } CharacterData component2 = ((Component)__instance).GetComponent(); if (!((Object)(object)component2 == (Object)null)) { PhoenixSurgeMono component3 = ((Component)component).GetComponent(); if (!((Object)(object)component3 == (Object)null) && component2.view.IsMine && component3.HasActiveRespawn() && ModRespawnTracker.WasOurRespawnConsumed(component) && component3.TryConsumeRespawn()) { NetworkingManager.RPC(typeof(PhoenixSurgeHandler), "RPC_ShowText", new object[1] { component.playerID }); NetworkingManager.RPC(typeof(PhoenixSurgeHandler), "RPC_MarkPendingExplosion", new object[1] { component.playerID }); } } } } [HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")] [HarmonyPriority(800)] public class SoulPiercerPatch { public static bool Prefix(ProjectileHit __instance, Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID, int colliderID, bool wasBlocked) { //IL_011d: 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) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance.ownPlayer == (Object)null) { return true; } SoulPiercerMono component = ((Component)__instance.ownPlayer).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if (wasBlocked) { return true; } if (viewID == -1) { return true; } PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); if ((Object)(object)photonView == (Object)null) { return true; } HealthHandler component2 = ((Component)photonView).GetComponent(); if ((Object)(object)component2 == (Object)null) { return true; } Player component3 = ((Component)component2).GetComponent(); if ((Object)(object)component3 == (Object)null) { return true; } if ((Object)(object)component3.data == (Object)null || component3.data.dead) { return true; } if (component2.isRespawning) { return true; } Block component4 = ((Component)component2).GetComponent(); if ((Object)(object)component4 != (Object)null && component4.IsBlocking()) { return true; } HitInfo val = new HitInfo { point = hitPoint, normal = hitNormal, collider = ((Component)photonView).GetComponentInChildren(), transform = ((Component)photonView).transform, rigidbody = ((Component)photonView).GetComponent() }; Damagable val2 = (Damagable)(object)component2; float num = __instance.damage; if (__instance.percentageDamage != 0f) { num += component3.data.maxHealth * __instance.percentageDamage; } if ((bool)AccessTools.Field(typeof(ProjectileHit), "hasControl").GetValue(__instance)) { float num2 = (__instance.bulletCanDealDeamage ? num : 1f) * __instance.dealDamageMultiplierr; Vector2 val3 = Vector2.op_Implicit(((Component)__instance).transform.forward) * num2; val2.CallTakeDamage(val3, hitPoint, __instance.ownWeapon, __instance.ownPlayer, true); if (__instance.movementSlow != 0f) { CharacterStatModifiers component5 = ((Component)component2).GetComponent(); if ((Object)(object)component5 != (Object)null) { component5.RPCA_AddSlow(__instance.movementSlow, false); } } if (__instance.force != 0f) { PlayerVelocity component6 = ((Component)component3).GetComponent(); if ((Object)(object)component6 != (Object)null) { float num3 = (float)Traverse.Create((object)component6).Field("mass").GetValue(); float num4 = Mathf.Clamp(num3 / 100f, 0f, 1f); component2.CallTakeForce(Vector2.op_Implicit(((Component)__instance).transform.forward) * num4 * __instance.force, (ForceMode2D)1, false, false, 0f); } } } if (__instance.isAllowedToSpawnObjects) { SpawnPierceParticles(Vector2.op_Implicit(hitPoint), ((Component)__instance).transform.forward); GamefeelManager.GameFeel(Vector2.op_Implicit(((Component)__instance).transform.forward * 3f * __instance.shake)); DynamicParticles.instance.PlayBulletHit(__instance.damage, ((Component)__instance).transform, val, __instance.projectileColor); SpawnedAttack val4 = (SpawnedAttack)AccessTools.Field(typeof(ProjectileHit), "spawnedAttack").GetValue(__instance); for (int i = 0; i < __instance.objectsToSpawn.Length; i++) { ObjectsToSpawn.SpawnObject(((Component)__instance).transform, val, __instance.objectsToSpawn[i], component2, __instance.team, __instance.damage, val4, false); } } if (__instance.effects != null && __instance.effects.Count > 0) { foreach (RayHitEffect effect in __instance.effects) { if ((Object)(object)effect != (Object)null) { HasToReturn val5 = effect.DoHitEffect(val); } } } __instance.AddPlayerToHeld(component2); return false; } private static void SpawnPierceParticles(Vector3 position, Vector3 direction) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_00ad: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown GameObject val = new GameObject("SoulPierceBurst"); val.transform.position = position; val.transform.rotation = Quaternion.LookRotation(direction); ParticleSystem val2 = val.AddComponent(); MainModule main = val2.main; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.15f, 0.4f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(4f, 10f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.04f, 0.1f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.7f, 0.3f, 1f, 1f), new Color(0.9f, 0.8f, 1f, 1f)); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).maxParticles = 30; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(0f); ((MainModule)(ref main)).loop = false; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).enabled = true; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ((EmissionModule)(ref emission)).SetBursts((Burst[])(object)new Burst[1] { new Burst(0f, (short)20, (short)30) }); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).enabled = true; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)4; ((ShapeModule)(ref shape)).angle = 20f; ((ShapeModule)(ref shape)).radius = 0.05f; ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(0.95f, 0.9f, 1f), 0f), new GradientColorKey(new Color(0.6f, 0.2f, 1f), 0.4f), new GradientColorKey(new Color(0.3f, 0f, 0.6f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.5f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); ParticleSystemRenderer component = val.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 100; ((Renderer)component).material = new Material(Shader.Find("Sprites/Default")); val2.Play(); Object.Destroy((Object)(object)val, 0.6f); } } [HarmonyPatch(typeof(HealthHandler), "DoDamage")] public class ThornShieldPatch { [HarmonyPostfix] public static void Postfix(HealthHandler __instance, Vector2 damage, Player damagingPlayer) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) Player component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { ThornShieldMono.TryReflectDamage(component, damage, damagingPlayer); } } } [HarmonyPatch(typeof(HealthHandler), "Heal")] public class VengefulSparkHealPatch { [HarmonyPrefix] public static void Prefix(HealthHandler __instance, ref float healAmount) { if (!(healAmount <= 0f)) { VengefulSparkEffect component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && component.hasHealBonus) { healAmount *= 1.1f; } } } } [HarmonyPatch(typeof(HealthHandler), "DoDamage")] public class VengefulSparkDamagePatch { [HarmonyPostfix] public static void Postfix(HealthHandler __instance, Vector2 damage, Vector2 position, Color blinkColor, GameObject damagingWeapon, Player damagingPlayer, bool healthRemoval, bool lethal, bool ignoreBlock) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (healthRemoval) { return; } Player component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { VengefulSparkEffect component2 = ((Component)component).GetComponent(); if (!((Object)(object)component2 == (Object)null)) { component2.OnDamageReceived(damage, damagingPlayer, damagingWeapon); } } } } [HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")] public class VengefulSparkResetStatsPatch { [HarmonyPostfix] public static void Postfix(CharacterStatModifiers __instance) { VengefulSparkEffect component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null) { component.OnRoundStart(); } } } [Serializable] [HarmonyPatch(typeof(Block), "blocked")] internal class BlockPatchblocked { private static void Prefix(Block __instance, GameObject projectile, Vector3 forward, Vector3 hitPos) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) bool flag = false; ProjectileHit component = projectile.GetComponent(); HealthHandler val = (HealthHandler)Traverse.Create((object)__instance).Field("health").GetValue(); if ((double)component.ownPlayer.data.stats.GetAdditionalData().piercingDamage > 0.0) { Vector2 val2 = Vector2.op_Implicit((component.bulletCanDealDeamage ? component.damage : 1f) * component.ownPlayer.data.stats.GetAdditionalData().piercingDamage * ((Vector3)(ref forward)).normalized); ((Damagable)val).TakeDamage(val2, Vector2.op_Implicit(hitPos), component.projectileColor, component.ownWeapon, component.ownPlayer, true, true); flag = true; } if (flag) { Object.Destroy((Object)(object)projectile); } } private static void Postfix(Block __instance) { __instance.GetAdditionalData().timeOfLastSuccessfulBlock = Time.time; } } } namespace MrFuntikMod.Effects { public class AegisShieldMono : MonoBehaviour { [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public AegisShieldMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float SHIELD_DURATION = 2f; private const float COOLDOWN = 15f; private Player player; private Block block; private CharacterData data; private bool isShieldActive = false; private float shieldTimer = 0f; private float cooldownRemaining = 0f; private bool isReady = true; private Action blockAction; private GameObject shieldVisual; private LineRenderer[] orbitRenderers = (LineRenderer[])(object)new LineRenderer[3]; private LineRenderer circleRenderer; private float[] orbitAngles = new float[3] { 0f, 120f, 240f }; private float[] orbitTilts = new float[3] { 0f, 60f, -60f }; private float[] orbitSpeeds = new float[3] { 80f, -110f, 65f }; private float[] orbitPulseFreqs = new float[3] { 3f, 4.5f, 2.5f }; private float[] orbitPulseAmplitudes = new float[3] { 0.12f, 0.08f, 0.15f }; private const int ORBIT_SEGMENTS = 48; private const float ORBIT_RADIUS_X = 1.2075f; private const float ORBIT_RADIUS_Y = 0.575f; private const int CIRCLE_SEGMENTS = 48; private const float CIRCLE_BASE_RADIUS = 1.38f; private const float CIRCLE_PULSE_AMPLITUDE = 0.1f; private const float CIRCLE_PULSE_FREQ = 2f; private CooldownUI cooldownUI; private static Material sharedMaterial; public static bool IsShieldActiveForPlayer(Player player) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { return false; } AegisShieldMono component = ((Component)player).gameObject.GetComponent(); return (Object)(object)component != (Object)null && component.isShieldActive; } private void Start() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); CreateShieldVisual(); if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("O", (Color?)new Color(0.2f, 0.8f, 1f)); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__30))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this, gm = gm }; } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { return; } if (data.dead) { CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } if ((Object)(object)shieldVisual != (Object)null && shieldVisual.activeSelf) { shieldVisual.SetActive(false); } return; } if (!isReady && cooldownRemaining > 0f) { cooldownRemaining -= Time.deltaTime; if (cooldownRemaining <= 0f) { cooldownRemaining = 0f; isReady = true; } } if (isShieldActive) { shieldTimer += TimeHandler.deltaTime; if (shieldTimer < 2f) { block.sinceBlock = 0f; UpdateShieldVisual(); } else { DeactivateShield(); } } UpdateUI(); } private void OnBlock(BlockTriggerType triggerType) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 if ((int)triggerType <= 0 && isReady && !isShieldActive && !((Object)(object)data == (Object)null) && !data.dead && data.view.IsMine) { ActivateShieldLocal(); NetworkingManager.RPC(typeof(AegisShieldMono), "RPC_ActivateShield", new object[1] { player.playerID }); } } [UnboundRPC] public static void RPC_ActivateShield(int playerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { ((Component)val).GetComponent()?.ActivateShieldLocal(); } } private void ActivateShieldLocal() { isShieldActive = true; shieldTimer = 0f; isReady = false; cooldownRemaining = 15f; if ((Object)(object)shieldVisual != (Object)null) { shieldVisual.SetActive(true); } } private void DeactivateShield() { isShieldActive = false; shieldTimer = 0f; if ((Object)(object)shieldVisual != (Object)null) { shieldVisual.SetActive(false); } } public float GetShieldTimeRemaining() { return isShieldActive ? Mathf.Max(0f, 2f - shieldTimer) : 0f; } private void ResetState() { isShieldActive = false; shieldTimer = 0f; cooldownRemaining = 0f; isReady = true; if ((Object)(object)shieldVisual != (Object)null) { shieldVisual.SetActive(false); } CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } private void CreateShieldVisual() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) shieldVisual = new GameObject("AegisShield"); shieldVisual.transform.SetParent(((Component)this).transform); shieldVisual.transform.localPosition = Vector3.zero; GameObject val = new GameObject("OuterCircle"); val.transform.SetParent(shieldVisual.transform); val.transform.localPosition = Vector3.zero; SpriteRenderer componentInChildren = ((Component)this).GetComponentInChildren(); int sortingLayerID = 0; int sortingOrder = 0; if ((Object)(object)componentInChildren != (Object)null) { sortingLayerID = ((Renderer)componentInChildren).sortingLayerID; sortingOrder = ((Renderer)componentInChildren).sortingOrder - 5; } circleRenderer = val.AddComponent(); circleRenderer.useWorldSpace = false; circleRenderer.loop = true; circleRenderer.startWidth = 0.1f; circleRenderer.endWidth = 0.1f; circleRenderer.positionCount = 48; ((Renderer)circleRenderer).material = sharedMaterial; ((Renderer)circleRenderer).sortingLayerID = sortingLayerID; ((Renderer)circleRenderer).sortingOrder = sortingOrder; for (int i = 0; i < 3; i++) { GameObject val2 = new GameObject($"Orbit_{i}"); val2.transform.SetParent(shieldVisual.transform); val2.transform.localPosition = Vector3.zero; LineRenderer val3 = val2.AddComponent(); val3.useWorldSpace = false; val3.loop = true; val3.startWidth = 0.08f; val3.endWidth = 0.08f; val3.positionCount = 48; ((Renderer)val3).material = sharedMaterial; ((Renderer)val3).sortingLayerID = sortingLayerID; ((Renderer)val3).sortingOrder = sortingOrder; orbitRenderers[i] = val3; } shieldVisual.SetActive(false); } private void UpdateShieldVisual() { //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)shieldVisual == (Object)null) { return; } float shieldTimeRemaining = GetShieldTimeRemaining(); float num = shieldTimeRemaining / 2f; float num2; Color val = default(Color); Color val2 = default(Color); if (num > 0.2f) { num2 = 3f; ((Color)(ref val))..ctor(1f, 1f, 0.3f, 0.85f); ((Color)(ref val2))..ctor(1f, 1f, 1f, 0.95f); } else if (num > 0.1f) { num2 = 7f; ((Color)(ref val))..ctor(1f, 0.15f, 0.15f, 0.95f); ((Color)(ref val2))..ctor(1f, 0.55f, 0.15f, 0.9f); } else { num2 = 14f; ((Color)(ref val))..ctor(1f, 0.05f, 0.05f, 1f); ((Color)(ref val2))..ctor(1f, 0.35f, 0.1f, 0.9f); } float num3 = Mathf.Sin(Time.time * num2 * MathF.PI * 2f) * 0.5f + 0.5f; Color val3 = Color.Lerp(val, val2, num3); if ((Object)(object)circleRenderer != (Object)null) { float num4 = 1f + Mathf.Sin(Time.time * 2f) * 0.1f; float num5 = 1.38f * num4; for (int i = 0; i < 48; i++) { float num6 = (float)i / 48f * MathF.PI * 2f; circleRenderer.SetPosition(i, new Vector3(Mathf.Cos(num6) * num5, Mathf.Sin(num6) * num5, 0f)); } Color val4 = val3; val4.a *= 0.5f; circleRenderer.startColor = val4; circleRenderer.endColor = val4; } for (int j = 0; j < 3; j++) { if (!((Object)(object)orbitRenderers[j] == (Object)null)) { orbitAngles[j] += orbitSpeeds[j] * Time.deltaTime; if (orbitAngles[j] > 360f) { orbitAngles[j] -= 360f; } if (orbitAngles[j] < -360f) { orbitAngles[j] += 360f; } float num7 = 1f + Mathf.Sin(Time.time * orbitPulseFreqs[j]) * orbitPulseAmplitudes[j]; float num8 = 1.2075f * num7; float num9 = 0.575f * num7; float num10 = orbitAngles[j] * (MathF.PI / 180f); float num11 = orbitTilts[j] * (MathF.PI / 180f); for (int k = 0; k < 48; k++) { float num12 = (float)k / 48f * MathF.PI * 2f; float num13 = Mathf.Cos(num12) * num8; float num14 = Mathf.Sin(num12) * num9; float num15 = num13; float num16 = num14 * Mathf.Cos(num11); float num17 = num15 * Mathf.Cos(num10) - num16 * Mathf.Sin(num10); float num18 = num15 * Mathf.Sin(num10) + num16 * Mathf.Cos(num10); orbitRenderers[j].SetPosition(k, new Vector3(num17, num18, 0f)); } orbitRenderers[j].startColor = val3; orbitRenderers[j].endColor = val3; } } } private void UpdateUI() { if (!((Object)(object)cooldownUI == (Object)null)) { if (isShieldActive) { cooldownUI.ShowActive(GetShieldTimeRemaining()); } else if (!isReady && cooldownRemaining > 0f) { cooldownUI.ShowCooldown(cooldownRemaining, 15f); } else { cooldownUI.Hide(); } } } private void OnDestroy() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); if ((Object)(object)shieldVisual != (Object)null) { Object.Destroy((Object)(object)shieldVisual); } if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } } public class ArcFieldMono : MonoBehaviour { private const float RADIUS_BONUS = 3f; private const float DAMAGE_MULTIPLIER = 0.01f; private const float BASE_BULLET_DAMAGE = 55f; private const float TICK_INTERVAL = 0.15f; private const float ARC_DURATION = 0.15f; private Player player; private CharacterData data; private PhotonView view; private float nextTickTime; private float currentRadius; private Player[] cachedPlayers; private float lastPlayerCacheTime; private const float PLAYER_CACHE_INTERVAL = 0.5f; private static Material sharedMaterial; private List ambientArcs = new List(); private const int AMBIENT_ARC_COUNT = 4; private float ambientUpdateInterval = 0.07f; private float lastAmbientUpdate; private static int wallLayerMask = -1; private static bool wallLayerMaskInitialized = false; private void Start() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); view = player?.data?.view; if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } if (!wallLayerMaskInitialized) { wallLayerMask = LayerMask.GetMask(new string[3] { "Default", "Obstacle", "IgnorePlayer" }); if (wallLayerMask == 0) { wallLayerMask = ~LayerMask.GetMask(new string[2] { "Player", "PlayerObjectCollider" }); } wallLayerMaskInitialized = true; } UpdatePlayerCache(); nextTickTime = Time.time + 0.15f; CreateAmbientArcs(); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null || !data.isPlaying || data.dead) { return; } UpdateRadius(); if (Time.time - lastPlayerCacheTime > 0.5f) { UpdatePlayerCache(); } UpdateAmbientArcs(); if (Time.time >= nextTickTime) { if ((Object)(object)view != (Object)null && view.IsMine) { DamageNearbyEnemies(); } nextTickTime = Time.time + 0.15f; } } private void UpdateRadius() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) float num = 1f; if ((Object)(object)data.stats != (Object)null) { num = data.stats.sizeMultiplier; } float num2 = Mathf.Max(((Component)this).transform.localScale.x, ((Component)this).transform.localScale.y); if (num2 > num) { num = num2; } currentRadius = num + 3f; } private float GetPlayerBulletDamage() { if ((Object)(object)player?.data?.weaponHandler?.gun != (Object)null) { return player.data.weaponHandler.gun.damage * 55f; } return 55f; } private void UpdatePlayerCache() { if ((Object)(object)PlayerManager.instance != (Object)null && PlayerManager.instance.players != null) { cachedPlayers = PlayerManager.instance.players.ToArray(); } lastPlayerCacheTime = Time.time; } private void DamageNearbyEnemies() { //IL_0019: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0093: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) if (cachedPlayers == null) { return; } Vector3 position = ((Component)this).transform.position; float playerBulletDamage = GetPlayerBulletDamage(); float num = playerBulletDamage * 0.01f; for (int i = 0; i < cachedPlayers.Length; i++) { Player val = cachedPlayers[i]; if (IsValidTarget(val)) { Vector3 position2 = ((Component)val).transform.position; float num2 = Vector2.Distance(Vector2.op_Implicit(position), Vector2.op_Implicit(position2)); if (num2 <= currentRadius && HasLineOfSight(position, position2)) { Vector3 val2 = position2 - position; Vector2 val3 = Vector2.op_Implicit(((Vector3)(ref val2)).normalized); ((Damagable)val.data.healthHandler).CallTakeDamage(val3 * num, Vector2.op_Implicit(position), (GameObject)null, player, true); NetworkingManager.RPC(typeof(ArcFieldMono), "RPCA_CreateLightningArc", new object[2] { player.playerID, val.playerID }); } } } } private bool IsValidTarget(Player targetPlayer) { if ((Object)(object)targetPlayer == (Object)null) { return false; } if (targetPlayer.playerID == player.playerID) { return false; } if (targetPlayer.teamID == player.teamID) { return false; } if ((Object)(object)targetPlayer.data == (Object)null) { return false; } if (targetPlayer.data.dead) { return false; } if (!targetPlayer.data.isPlaying) { return false; } return true; } private bool HasLineOfSight(Vector3 from, Vector3 to) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(to - from); float magnitude = ((Vector2)(ref val)).magnitude; RaycastHit2D val2 = Physics2D.Raycast(Vector2.op_Implicit(from), ((Vector2)(ref val)).normalized, magnitude, wallLayerMask); return (Object)(object)((RaycastHit2D)(ref val2)).collider == (Object)null; } [UnboundRPC] public static void RPCA_CreateLightningArc(int ownerPlayerID, int targetPlayerID) { //IL_006e: 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) Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == ownerPlayerID); Player val2 = PlayerManager.instance.players.Find((Player p) => p.playerID == targetPlayerID); if (!((Object)(object)val == (Object)null) && !((Object)(object)val2 == (Object)null)) { CreateLightningArcVisual(((Component)val).transform.position, ((Component)val2).transform.position); ArcFieldMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.BoostAmbientArcs(); } } } private static void CreateLightningArcVisual(Vector3 start, Vector3 end) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00c3: 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_0064: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("ArcField_Lightning"); val.transform.position = start; LineRenderer val2 = val.AddComponent(); val2.startWidth = 0.12f; val2.endWidth = 0.05f; val2.positionCount = 5; if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } ((Renderer)val2).material = sharedMaterial; val2.startColor = new Color(0.4f, 0.75f, 1f, 1f); val2.endColor = new Color(0.85f, 0.95f, 1f, 0.8f); ((Renderer)val2).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val2).receiveShadows = false; val2.SetPosition(0, start); for (int i = 1; i < val2.positionCount - 1; i++) { float num = (float)i / (float)(val2.positionCount - 1); Vector3 val3 = Vector3.Lerp(start, end, num); val3 += Vector2.op_Implicit(Random.insideUnitCircle) * 0.35f; val2.SetPosition(i, val3); } val2.SetPosition(val2.positionCount - 1, end); ArcFieldLightningDestroy arcFieldLightningDestroy = val.AddComponent(); arcFieldLightningDestroy.lifetime = 0.15f; } private void CreateAmbientArcs() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 4; i++) { GameObject val = new GameObject($"ArcField_Ambient_{i}"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; LineRenderer val2 = val.AddComponent(); val2.startWidth = 0.06f; val2.endWidth = 0.02f; val2.positionCount = 3; ((Renderer)val2).material = sharedMaterial; val2.startColor = new Color(0.5f, 0.8f, 1f, 0.5f); val2.endColor = new Color(0.85f, 0.95f, 1f, 0.25f); ((Renderer)val2).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val2).receiveShadows = false; ambientArcs.Add(val2); } } private void UpdateAmbientArcs() { //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) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) if (Time.time - lastAmbientUpdate < ambientUpdateInterval) { return; } lastAmbientUpdate = Time.time; Vector3 position = ((Component)this).transform.position; float num = Mathf.Min(1.2f, currentRadius * 0.2f); Vector3 val2 = default(Vector3); for (int i = 0; i < ambientArcs.Count; i++) { LineRenderer val = ambientArcs[i]; if (!((Object)(object)val == (Object)null)) { for (int j = 0; j < val.positionCount; j++) { float num2 = Random.Range(0f, 360f) * (MathF.PI / 180f); float num3 = Random.Range(num * 0.4f, num); ((Vector3)(ref val2))..ctor(Mathf.Cos(num2) * num3, Mathf.Sin(num2) * num3, 0f); val.SetPosition(j, position + val2); } } } } private void BoostAmbientArcs() { //IL_0035: 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) for (int i = 0; i < ambientArcs.Count; i++) { LineRenderer val = ambientArcs[i]; if (!((Object)(object)val == (Object)null)) { val.startColor = new Color(0.5f, 0.85f, 1f, 0.95f); val.endColor = new Color(0.9f, 0.95f, 1f, 0.75f); val.startWidth = 0.1f; } } ((MonoBehaviour)this).Invoke("ResetAmbientArcs", 0.12f); } private void ResetAmbientArcs() { //IL_0035: 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) for (int i = 0; i < ambientArcs.Count; i++) { LineRenderer val = ambientArcs[i]; if (!((Object)(object)val == (Object)null)) { val.startColor = new Color(0.5f, 0.8f, 1f, 0.5f); val.endColor = new Color(0.85f, 0.95f, 1f, 0.25f); val.startWidth = 0.06f; } } } private void OnDestroy() { for (int i = 0; i < ambientArcs.Count; i++) { if ((Object)(object)ambientArcs[i] != (Object)null) { Object.Destroy((Object)(object)((Component)ambientArcs[i]).gameObject); } } ambientArcs.Clear(); } } public class ArcFieldLightningDestroy : MonoBehaviour { public float lifetime = 0.15f; private float timer = 0f; private LineRenderer lineRenderer; private Color startColorInitial; private Color endColorInitial; private void Start() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) lineRenderer = ((Component)this).GetComponent(); if ((Object)(object)lineRenderer != (Object)null) { startColorInitial = lineRenderer.startColor; endColorInitial = lineRenderer.endColor; } } private void Update() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; if ((Object)(object)lineRenderer != (Object)null) { float num = 1f - timer / lifetime; lineRenderer.startColor = new Color(startColorInitial.r, startColorInitial.g, startColorInitial.b, startColorInitial.a * num); lineRenderer.endColor = new Color(endColorInitial.r, endColorInitial.g, endColorInitial.b, endColorInitial.a * num); } if (timer >= lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class BacktrackMono : MonoBehaviour { private struct Snapshot { public Vector3 position; public float time; } [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BacktrackMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float BACKTRACK_TIME = 3f; private const float BASE_COOLDOWN = 10f; private const float COOLDOWN_REDUCTION_PER_STACK = 1f; private const float RECORD_INTERVAL = 0.05f; private const float HISTORY_DURATION = 4f; public int stackCount = 1; private Player player; private Block block; private CharacterData data; private float cooldownRemaining = 0f; private bool isReady = true; private float lastRecordTime = 0f; private LinkedList history = new LinkedList(); private Action blockAction; private CooldownUI cooldownUI; private GameObject backtrackPreview; private SpriteRenderer previewSprite; private static Material ghostMaterial; public bool IsHolding => false; private void Start() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); if ((Object)(object)ghostMaterial == (Object)null) { ghostMaterial = new Material(Shader.Find("Sprites/Default")); } blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("<", (Color?)new Color(0.43f, 0.66f, 1f)); CreateBacktrackPreview(); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__23))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { <>4__this = this, gm = gm }; } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { HideAllUI(); return; } if (data.dead) { HideAllUI(); return; } if (Time.time - lastRecordTime >= 0.05f) { RecordSnapshot(); lastRecordTime = Time.time; } CleanOldHistory(); if (!isReady) { cooldownRemaining -= Time.deltaTime; if (cooldownRemaining <= 0f) { cooldownRemaining = 0f; isReady = true; } } if (data.view.IsMine) { UpdateUI(); UpdateBacktrackPreview(); } } private void OnDisable() { HideAllUI(); } private void HideAllUI() { CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } if ((Object)(object)backtrackPreview != (Object)null) { backtrackPreview.SetActive(false); } } private void ResetState() { history?.Clear(); cooldownRemaining = 0f; isReady = true; lastRecordTime = 0f; HideAllUI(); } private void RecordSnapshot() { //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) if (!((Object)(object)data == (Object)null) && history != null) { history.AddLast(new Snapshot { position = ((Component)this).transform.position, time = Time.time }); } } private void CleanOldHistory() { if (history != null) { float num = Time.time - 4f; while (history.Count > 0 && history.First.Value.time < num) { history.RemoveFirst(); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Invalid comparison between Unknown and I4 //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0175: 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_0186: 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) if ((Object)(object)data == (Object)null || data.dead || !isReady) { return; } bool flag = PhotonNetwork.OfflineMode; if (!flag && (Object)(object)data.view != (Object)null) { flag = data.view.IsMine; } if (!flag || (int)triggerType > 0 || history == null || history.Count == 0) { return; } float num = Time.time - 3f; float time = history.First.Value.time; float targetTime = Mathf.Max(num, time); Snapshot? snapshot = FindSnapshotAtTime(targetTime); if (snapshot.HasValue && !(Vector3.Distance(((Component)this).transform.position, snapshot.Value.position) < 0.5f)) { Vector3 position = ((Component)this).transform.position; if (PhotonNetwork.OfflineMode) { RPC_PerformBacktrack(player.playerID, snapshot.Value.position.x, snapshot.Value.position.y, snapshot.Value.position.z, position.x, position.y, position.z); } else { NetworkingManager.RPC(typeof(BacktrackMono), "RPC_PerformBacktrack", new object[7] { player.playerID, snapshot.Value.position.x, snapshot.Value.position.y, snapshot.Value.position.z, position.x, position.y, position.z }); } isReady = false; cooldownRemaining = GetCooldown(); } } [UnboundRPC] public static void RPC_PerformBacktrack(int playerID, float px, float py, float pz, float ox, float oy, float oz) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player x) => x.playerID == playerID)); if ((Object)(object)val != (Object)null) { BacktrackMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)val.data != (Object)null && !val.data.dead) { Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(px, py, pz); Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(ox, oy, oz); component.PerformBacktrackLocal(val2); TeleportPlayerGhostEffect.Create(val, val3); TeleportPathEffect.Create(val3, val2, new Color(0.43f, 0.66f, 1f, 1f), ((Component)val).transform.localScale.x, 0.45f, val); } } } private void PerformBacktrackLocal(Vector3 position) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)data == (Object)null) && !data.dead) { PlayerCollision component = ((Component)player).GetComponent(); if (component != null) { component.IgnoreWallForFrames(10); } Rigidbody2D component2 = ((Component)player).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity = Vector2.zero; component2.position = Vector2.op_Implicit(position); } ((Component)this).transform.position = position; history?.Clear(); } } private Snapshot? FindSnapshotAtTime(float targetTime) { if (history == null || history.Count == 0) { return null; } return history.OrderBy((Snapshot s) => Mathf.Abs(s.time - targetTime)).First(); } private float GetCooldown() { return Mathf.Max(10f - (float)(stackCount - 1) * 1f, 5f); } public void AddStack() { stackCount++; } public void RemoveStack() { stackCount = Mathf.Max(0, stackCount - 1); } private void UpdateUI() { if (!((Object)(object)cooldownUI == (Object)null)) { if (!isReady && cooldownRemaining > 0f) { cooldownUI.ShowCooldown(cooldownRemaining, GetCooldown()); } else { cooldownUI.Hide(); } } } private void CreateBacktrackPreview() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) backtrackPreview = new GameObject("BacktrackPreview"); previewSprite = backtrackPreview.AddComponent(); SpriteRenderer componentInChildren = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { previewSprite.sprite = componentInChildren.sprite; } Color color = player.GetTeamColors().color; color.a = 0.35f; previewSprite.color = color; ((Renderer)previewSprite).material = ghostMaterial; ((Renderer)previewSprite).sortingLayerName = "MostFront"; ((Renderer)previewSprite).sortingOrder = 40; backtrackPreview.SetActive(false); } private void UpdateBacktrackPreview() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)backtrackPreview == (Object)null || (Object)(object)data == (Object)null) { return; } if (isReady && !data.dead && history != null && history.Count > 0) { float num = Time.time - 3f; float time = history.First.Value.time; float targetTime = Mathf.Max(num, time); Vector3? interpolatedPosition = GetInterpolatedPosition(targetTime); if (interpolatedPosition.HasValue && Vector3.Distance(((Component)this).transform.position, interpolatedPosition.Value) >= 0.5f) { backtrackPreview.SetActive(true); backtrackPreview.transform.position = Vector3.Lerp(backtrackPreview.transform.position, interpolatedPosition.Value, Time.deltaTime * 15f); backtrackPreview.transform.localScale = ((Component)this).transform.localScale; } else { backtrackPreview.SetActive(false); } } else { backtrackPreview.SetActive(false); } } private Vector3? GetInterpolatedPosition(float targetTime) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) if (history == null || history.Count < 2) { LinkedList linkedList = history; return (linkedList != null && linkedList.Count > 0) ? new Vector3?(history.First.Value.position) : null; } Snapshot? snapshot = null; Snapshot? snapshot2 = null; foreach (Snapshot item in history) { if (item.time <= targetTime) { snapshot = item; continue; } snapshot2 = item; break; } if (!snapshot.HasValue || !snapshot2.HasValue) { return snapshot.HasValue ? new Vector3?(snapshot.GetValueOrDefault().position) : snapshot2?.position; } float num = (targetTime - snapshot.Value.time) / (snapshot2.Value.time - snapshot.Value.time); return Vector3.Lerp(snapshot.Value.position, snapshot2.Value.position, num); } private void SpawnGhostEffect(Vector3 pos) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_0025: 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_003c: Unknown result type (might be due to invalid IL or missing references) Color color = player.GetTeamColors().color; GameObject val = new GameObject("Ghost"); GhostEffectRunner ghostEffectRunner = val.AddComponent(); ghostEffectRunner.Run(pos, ((Component)this).transform.localScale, ((Component)this).GetComponentInChildren(), ghostMaterial, color); } private void OnDestroy() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } if ((Object)(object)backtrackPreview != (Object)null) { Object.Destroy((Object)(object)backtrackPreview); } } } public class GhostEffectRunner : MonoBehaviour { private SpriteRenderer sr; private float life = 0.8f; private float timer = 0f; private Color ghostColor; private Vector3 initialScale; public void Run(Vector3 pos, Vector3 scale, SpriteRenderer source, Material mat, Color color) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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) ((Component)this).transform.position = pos; ((Component)this).transform.localScale = scale; initialScale = scale; ghostColor = color; sr = ((Component)this).gameObject.AddComponent(); if ((Object)(object)source != (Object)null) { sr.sprite = source.sprite; sr.flipX = source.flipX; } ((Renderer)sr).material = mat; sr.color = new Color(ghostColor.r, ghostColor.g, ghostColor.b, 0.6f); ((Renderer)sr).sortingLayerName = "MostFront"; ((Renderer)sr).sortingOrder = 40; } private void Update() { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = timer / life; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } sr.color = new Color(ghostColor.r, ghostColor.g, ghostColor.b, Mathf.Lerp(0.6f, 0f, num)); ((Component)this).transform.localScale = initialScale * (1f + num * 0.3f); } } public class BulletTeleporterMono : MonoBehaviour { [CompilerGenerated] private sealed class d__22 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BulletTeleporterMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); 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 static readonly Color teleportColor = new Color(0.4f, 0.85f, 1f, 1f); private static readonly Color teleportColorBright = new Color(0.4f, 0.85f, 1f, 1f); private Player player; private CharacterData data; private Block block; private Gun gun; private bool isOn = false; private Transform particleTransform; private ParticleSystem[] parts; private SoundEvent soundSpawn; private SoundEvent soundShoot; private readonly List activeTeleportVisuals = new List(); private Action blockAction; private Action shootAction; private ReversibleColorEffect colorEffect; private static Material ghostMaterial; public bool IsCharged { get; private set; } = false; private void Start() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); gun = data.weaponHandler.gun; GameObject val = (GameObject)Resources.Load("0 cards/Empower"); if ((Object)(object)val == (Object)null) { MrFuntikMod.LogError("[BulletTeleporter] Failed to load Empower prefab!"); return; } GameObject addObjectToPlayer = val.GetComponent().AddObjectToPlayer; if ((Object)(object)addObjectToPlayer == (Object)null) { MrFuntikMod.LogError("[BulletTeleporter] AddObjectToPlayer is null!"); return; } Empower component = addObjectToPlayer.GetComponent(); if ((Object)(object)component != (Object)null) { soundSpawn = component.soundEmpowerSpawn; GameObject addObjectToBullet = component.addObjectToBullet; if ((Object)(object)addObjectToBullet != (Object)null) { SoundUnityEventPlayer component2 = addObjectToBullet.GetComponent(); if ((Object)(object)component2 != (Object)null) { soundShoot = component2.soundStart; } } } if (addObjectToPlayer.transform.childCount > 0) { GameObject gameObject = ((Component)addObjectToPlayer.transform.GetChild(0)).gameObject; particleTransform = Object.Instantiate(gameObject, ((Component)this).transform).transform; parts = ((Component)particleTransform).GetComponentsInChildren(); ParticleSystem[] array = parts; foreach (ParticleSystem val2 in array) { if ((Object)(object)val2 != (Object)null) { MainModule main = val2.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(teleportColor); } } } else { MrFuntikMod.LogError("[BulletTeleporter] No particle child found in Empower prefab!"); parts = (ParticleSystem[])(object)new ParticleSystem[0]; } blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); shootAction = OnShoot; gun.ShootPojectileAction = (Action)Delegate.Combine(gun.ShootPojectileAction, shootAction); if ((Object)(object)ghostMaterial == (Object)null) { ghostMaterial = new Material(Shader.Find("Sprites/Default")); } GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__22))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__22(0) { <>4__this = this, gm = gm }; } private void ResetState() { IsCharged = false; isOn = false; BulletTeleporterSpeedEffect component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } if (parts != null) { ParticleSystem[] array = parts; foreach (ParticleSystem val in array) { if ((Object)(object)val != (Object)null) { val.Stop(); } } } if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); colorEffect = null; } ClearTeleportVisuals(); } private void ClearTeleportVisuals() { for (int num = activeTeleportVisuals.Count - 1; num >= 0; num--) { GameObject val = activeTeleportVisuals[num]; activeTeleportVisuals.RemoveAt(num); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } } private void RegisterTeleportVisual(GameObject visual) { if (!((Object)(object)visual == (Object)null)) { activeTeleportVisuals.RemoveAll((GameObject item) => (Object)(object)item == (Object)null); activeTeleportVisuals.Add(visual); } } private void OnBlock(BlockTriggerType triggerType) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 if ((int)triggerType != 3 && (int)triggerType != 4 && (int)triggerType != 2 && !((Object)(object)data == (Object)null) && !data.dead) { IsCharged = true; if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } } private void OnShoot(GameObject projectile) { if (IsCharged && !((Object)(object)projectile == (Object)null)) { IsCharged = false; TeleportBulletMarker teleportBulletMarker = projectile.GetComponent(); if ((Object)(object)teleportBulletMarker == (Object)null) { teleportBulletMarker = projectile.AddComponent(); } teleportBulletMarker.Initialize(player.playerID); if ((Object)(object)soundShoot != (Object)null) { SoundManager.Instance.PlayAtPosition(soundShoot, SoundManager.Instance.GetTransform(), ((Component)this).transform); } } } private void Update() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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) if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { return; } if (data.dead) { ResetState(); } else if (IsCharged) { if ((Object)(object)particleTransform != (Object)null && (Object)(object)gun != (Object)null) { particleTransform.position = ((Component)data.weaponHandler.gun).transform.position; particleTransform.rotation = ((Component)data.weaponHandler.gun).transform.rotation; } if (isOn) { return; } if ((Object)(object)soundSpawn != (Object)null) { SoundManager.Instance.PlayAtPosition(soundSpawn, SoundManager.Instance.GetTransform(), ((Component)this).transform); } if (parts != null) { for (int i = 0; i < parts.Length; i++) { if ((Object)(object)parts[i] != (Object)null) { parts[i].Play(); } } } if ((Object)(object)colorEffect == (Object)null) { colorEffect = ((Component)player).gameObject.AddComponent(); ((ColorEffect)colorEffect).SetColor(teleportColor); colorEffect.SetLivesToEffect(int.MaxValue); } isOn = true; } else { if (!isOn) { return; } if (parts != null) { for (int j = 0; j < parts.Length; j++) { if ((Object)(object)parts[j] != (Object)null) { parts[j].Stop(); } } } if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); colorEffect = null; } isOn = false; } } public void PerformTeleport(Vector3 targetPosition) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_0066: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)data == (Object)null) && !data.dead) { Vector3 position = ((Component)this).transform.position; PlayerCollision component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.IgnoreWallForFrames(5); } Rigidbody2D component2 = ((Component)this).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity = Vector2.zero; } ((Component)this).transform.position = targetPosition; TeleportPlayerGhostEffect.Create(player, position); RegisterTeleportVisual(TeleportPathEffect.Create(position, targetPosition, teleportColorBright, ((Component)this).transform.localScale.x, 0.45f, player)); SpawnArrivalEffect(targetPosition); } } private void SpawnGhostEffect(Vector3 position) { //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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0040: 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_0052: Unknown result type (might be due to invalid IL or missing references) SpriteRenderer componentInChildren = ((Component)this).GetComponentInChildren(); if (!((Object)(object)componentInChildren == (Object)null)) { Color color = PlayerSkinBank.GetPlayerSkinColors(player.playerID).color; GameObject val = new GameObject("TeleportGhost"); TeleportGhostEffect teleportGhostEffect = val.AddComponent(); teleportGhostEffect.Run(position, ((Component)this).transform.localScale, componentInChildren, ghostMaterial, color); RegisterTeleportVisual(val); } } private void SpawnArrivalEffect(Vector3 position) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("TeleportWave"); val.transform.position = position; TeleportWaveEffect teleportWaveEffect = val.AddComponent(); teleportWaveEffect.color = teleportColorBright; teleportWaveEffect.maxRadius = 2f * ((Component)this).transform.localScale.x; RegisterTeleportVisual(val); } private void OnDestroy() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } if ((Object)(object)gun != (Object)null && shootAction != null) { gun.ShootPojectileAction = (Action)Delegate.Remove(gun.ShootPojectileAction, shootAction); } GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); colorEffect = null; } ClearTeleportVisuals(); if ((Object)(object)particleTransform != (Object)null) { Object.Destroy((Object)(object)((Component)particleTransform).gameObject); } } } public class BulletTeleporterSpeedEffect : ReversibleEffect { private BulletTeleporterMono mono; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); base.gunStatModifier.projectileSpeed_mult = 2f; base.gunStatModifier.reflects_mult = 0; base.gunStatModifier.reflects_add = 0; ((ReversibleEffect)this).ApplyModifiers(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || !mono.IsCharged) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } Object.Destroy((Object)(object)this); } } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class TeleportBulletMarker : RayHitEffect { private int ownerPlayerID = -1; private bool hasTeleported = false; private ProjectileHit projectileHit; private void Awake() { projectileHit = ((Component)this).GetComponent(); if ((Object)(object)projectileHit != (Object)null && projectileHit.effects != null) { projectileHit.effects.Insert(0, (RayHitEffect)(object)this); } } public void Initialize(int playerID) { ownerPlayerID = playerID; hasTeleported = false; } private void Start() { ApplyVisuals(); } private void ApplyVisuals() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) Color val = default(Color); ((Color)(ref val))..ctor(0.4f, 0.85f, 1f, 1f); if ((Object)(object)projectileHit != (Object)null) { projectileHit.projectileColor = val; } SpriteRenderer[] componentsInChildren = ((Component)this).GetComponentsInChildren(); SpriteRenderer[] array = componentsInChildren; foreach (SpriteRenderer val2 in array) { if ((Object)(object)val2 != (Object)null) { val2.color = val; } } TrailRenderer[] componentsInChildren2 = ((Component)this).GetComponentsInChildren(); TrailRenderer[] array2 = componentsInChildren2; foreach (TrailRenderer val3 in array2) { if ((Object)(object)val3 != (Object)null) { val3.startColor = val; val3.endColor = new Color(val.r, val.g, val.b, 0f); } } SetTeamColor[] componentsInChildren3 = ((Component)this).GetComponentsInChildren(); SetTeamColor[] array3 = componentsInChildren3; foreach (SetTeamColor val4 in array3) { ((Behaviour)val4).enabled = false; } } public override HasToReturn DoHitEffect(HitInfo hit) { //IL_000c: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_00a9: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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) if (hasTeleported) { return (HasToReturn)1; } if (hit == null) { return (HasToReturn)1; } Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == ownerPlayerID)); if ((Object)(object)val == (Object)null) { return (HasToReturn)1; } if ((Object)(object)val.data == (Object)null || val.data.dead) { return (HasToReturn)1; } if (!val.data.view.IsMine) { return (HasToReturn)1; } hasTeleported = true; Vector3 val2 = Vector2.op_Implicit(hit.point) + Vector2.op_Implicit(hit.normal * 0.5f); NetworkingManager.RPC(typeof(TeleportBulletMarker), "RPC_DoTeleport", new object[4] { ownerPlayerID, val2.x, val2.y, val2.z }); return (HasToReturn)1; } [UnboundRPC] public static void RPC_DoTeleport(int playerID, float x, float y, float z) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null)) { BulletTeleporterMono component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.PerformTeleport(new Vector3(x, y, z)); } } } } public class TeleportGhostEffect : MonoBehaviour { private SpriteRenderer sr; private float life = 0.8f; private float timer = 0f; private Color ghostColor; private Vector3 initialScale; public void Run(Vector3 pos, Vector3 scale, SpriteRenderer source, Material mat, Color color) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.position = pos; ((Component)this).transform.localScale = scale; initialScale = scale; ghostColor = new Color(color.r, color.g, color.b, 0.6f); sr = ((Component)this).gameObject.AddComponent(); if ((Object)(object)source != (Object)null) { sr.sprite = source.sprite; sr.flipX = source.flipX; } ((Renderer)sr).material = mat; sr.color = ghostColor; ((Renderer)sr).sortingLayerName = "MostFront"; ((Renderer)sr).sortingOrder = 40; } private void Update() { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = timer / life; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } sr.color = new Color(ghostColor.r, ghostColor.g, ghostColor.b, Mathf.Lerp(0.6f, 0f, num)); ((Component)this).transform.localScale = initialScale * (1f + num * 0.3f); } } public class TeleportWaveEffect : MonoBehaviour { public Color color = new Color(0.4f, 0.85f, 1f, 1f); private float life = 0.65f; private float timer = 0f; public float maxRadius = 2f; private LineRenderer line; private void Start() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) line = ((Component)this).gameObject.AddComponent(); line.useWorldSpace = false; line.loop = true; line.startWidth = 0.25f; line.endWidth = 0.25f; ((Renderer)line).material = new Material(Shader.Find("Sprites/Default")); line.startColor = color; line.endColor = color; ((Renderer)line).sortingLayerName = "MostFront"; ((Renderer)line).sortingOrder = 50; int num = 32; line.positionCount = num; for (int i = 0; i < num; i++) { float num2 = (float)i / (float)num * MathF.PI * 2f; line.SetPosition(i, new Vector3(Mathf.Cos(num2), Mathf.Sin(num2), 0f) * 0.1f); } } private void Update() { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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) timer += Time.deltaTime; float num = timer / life; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num2 = Mathf.Lerp(0.1f, maxRadius, num); int positionCount = line.positionCount; for (int i = 0; i < positionCount; i++) { float num3 = (float)i / (float)positionCount * MathF.PI * 2f; line.SetPosition(i, new Vector3(Mathf.Cos(num3), Mathf.Sin(num3), 0f) * num2); } Color val = default(Color); ((Color)(ref val))..ctor(color.r, color.g, color.b, Mathf.Lerp(1f, 0f, num)); line.startColor = val; line.endColor = val; line.startWidth = Mathf.Lerp(0.25f, 0.04f, num); line.endWidth = line.startWidth; } } public class DancerMono : MonoBehaviour { [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public DancerMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetForNewRound(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float BASE_DODGE_CHANCE = 0.15f; private const float DODGE_CHANCE_PER_STACK = 0.15f; private const float MAX_DODGE_CHANCE = 0.6f; public int stackCount = 1; private Player player; private void Start() { player = ((Component)this).GetComponent(); GameModeManager.AddHook("PointStart", (Func)OnPointStart); } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); } [IteratorStateMachine(typeof(d__7))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this, gm = gm }; } public float GetDodgeChance() { float num = 0.15f + (float)(stackCount - 1) * 0.15f; return Mathf.Min(num, 0.6f); } public bool TryDodge() { if (!CanDodge()) { return false; } float value = Random.value; float dodgeChance = GetDodgeChance(); return value < dodgeChance; } public bool CanDodge() { if ((Object)(object)player == (Object)null) { return false; } if ((Object)(object)player.data == (Object)null) { return false; } if (player.data.health <= 0f) { return false; } if (player.data.dead) { return false; } if (!((Component)player).gameObject.activeInHierarchy) { return false; } return true; } public void ShowMissText() { //IL_001b: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (CanDodge()) { Vector3 position = ((Component)player).transform.position + new Vector3(Random.Range(-0.3f, 0.3f), 0.5f, 0f); TextEffectPool.Show(position); } } public void AddStack() { stackCount++; } public void RemoveStack() { stackCount--; } public void ResetForNewRound() { } } public class DeathDefyMono : MonoBehaviour { private const float BASE_REVIVE_CHANCE = 0.2f; private const float REVIVE_CHANCE_PER_STACK = 0.2f; private const float MAX_REVIVE_CHANCE = 0.6f; private const float RESPAWN_CHANCE_REDUCTION_FACTOR = 2f; public int stackCount = 1; private Player player = null; private CharacterData data = null; private int remainingDeathDefyRespawns = 0; private int totalAddedThisRound = 0; private float currentRoundChance = -1f; private bool hasRolledThisRound = false; private float lastPhoenixRollTime = -999f; private const float PHOENIX_ROLL_COOLDOWN = 2f; private static Dictionary lastTextTimeByPlayer = new Dictionary(); private static Dictionary lastRespawnTimeByPlayer = new Dictionary(); private const float COOLDOWN = 1f; public int OurRemainingCount => remainingDeathDefyRespawns; private void Start() { player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); } private float GetBaseChance() { return Mathf.Min(0.2f + (float)(stackCount - 1) * 0.2f, 0.6f); } public float GetReviveChance() { if (currentRoundChance < 0f) { currentRoundChance = GetBaseChance(); } return currentRoundChance; } public bool TryRollReviveOnBattleStart() { if (hasRolledThisRound) { return false; } hasRolledThisRound = true; currentRoundChance = GetBaseChance(); return RollRevive("BattleStart"); } public bool TryProcessDeathDefyRespawn() { if (remainingDeathDefyRespawns <= 0) { return false; } remainingDeathDefyRespawns--; float time = Time.time; if (time - lastPhoenixRollTime < 2f) { return false; } lastPhoenixRollTime = time; currentRoundChance /= 2f; return RollRevive("PhoenixDeath"); } public bool HasDeathDefyRespawns() { return remainingDeathDefyRespawns > 0; } private bool RollRevive(string source) { float reviveChance = GetReviveChance(); int num = Random.Range(0, 100); int num2 = Mathf.RoundToInt(reviveChance * 100f); return num < num2; } public void AddTempRespawn() { if (!((Object)(object)data?.stats == (Object)null) && !((Object)(object)player == (Object)null)) { int playerID = player.playerID; float time = Time.time; if (!lastRespawnTimeByPlayer.TryGetValue(playerID, out var value) || !(time - value < 1f)) { lastRespawnTimeByPlayer[playerID] = time; CharacterStatModifiers stats = data.stats; stats.respawns++; CharacterStatModifiers stats2 = data.stats; stats2.remainingRespawns++; remainingDeathDefyRespawns++; totalAddedThisRound++; } } } public void ClearTempRespawns() { if (!((Object)(object)data?.stats == (Object)null)) { CharacterStatModifiers stats = data.stats; stats.respawns -= totalAddedThisRound; remainingDeathDefyRespawns = 0; totalAddedThisRound = 0; hasRolledThisRound = false; lastPhoenixRollTime = -999f; currentRoundChance = -1f; } } public void ShowReviveText() { //IL_0064: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { int playerID = player.playerID; float time = Time.time; if (!lastTextTimeByPlayer.TryGetValue(playerID, out var value) || !(time - value < 1f)) { lastTextTimeByPlayer[playerID] = time; Vector3 position = ((Component)player).transform.position + new Vector3(0f, 0.5f, 0f); TextEffectPool.Show(position); } } } public void AddStack() { stackCount++; } public void RemoveStack() { stackCount--; } public static void ClearStaticData() { lastTextTimeByPlayer.Clear(); lastRespawnTimeByPlayer.Clear(); } } public class PainFuelMono : WasDealtDamageTrigger { [CompilerGenerated] private sealed class d__49 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int viewID; public float healAmount; public PainFuelMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__49(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; NetworkingManager.RPC(typeof(PainFuelMono), "RPC_HealRecoup", new object[2] { viewID, healAmount }); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__53 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public PainFuelMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__53(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.speedBoostActive = false; <>4__this.speedBoostTimer = 0f; <>4__this.visualBoostActive = false; <>4__this.visualBoostTimer = 0f; <>4__this.reflexPending = false; <>4__this.pressureHitCount = 0; <>4__this.frenzyBonus = 0f; 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(); } } public int painFuelStacks = 0; public int reflexStacks = 0; public int parryStacks = 0; public int furyStacks = 0; public int hasteStacks = 0; public int surgeStacks = 0; public int pressureStacks = 0; public int cadenceStacks = 0; public int zenStacks = 0; public int frenzyStacks = 0; public int bloodrushStacks = 0; public int accelerateStacks = 0; public int quickenStacks = 0; public int rapidStacks = 0; public int devourStacks = 0; public int tempoStacks = 0; public int aegisStacks = 0; public int rushStacks = 0; public bool hasRecoup = false; public bool speedBoostActive = false; private float speedBoostTimer = 0f; private bool visualBoostActive = false; private float visualBoostTimer = 0f; public bool reflexPending = false; public int pressureHitCount = 0; private float frenzyBonus = 0f; private Player player; private CharacterData data; private Gun gun; private Action shootAction; private PainFuelEffect effect; private PressureEffect pressureEffect; private CadenceEffect cadenceEffect; private ParryEffect parryEffect; private AccelerateEffect accelerateEffect; private QuickenEffect quickenEffect; private RapidEffect rapidEffect; private DevourEffect devourEffect; private CooldownUI cooldownUI; private ParticleSystem boostParticles; private TrailRenderer[] boostTrails; public float BoostDuration => 5f + 2f * (float)painFuelStacks; private void Start() { //IL_01ca: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); gun = data?.weaponHandler?.gun; shootAction = OnShoot; if ((Object)(object)gun != (Object)null) { gun.ShootPojectileAction = (Action)Delegate.Combine(gun.ShootPojectileAction, shootAction); } effect = ((Component)this).gameObject.GetComponent() ?? ((Component)this).gameObject.AddComponent(); pressureEffect = ((Component)this).gameObject.GetComponent() ?? ((Component)this).gameObject.AddComponent(); cadenceEffect = ((Component)this).gameObject.GetComponent() ?? ((Component)this).gameObject.AddComponent(); parryEffect = ((Component)this).gameObject.GetComponent() ?? ((Component)this).gameObject.AddComponent(); accelerateEffect = ((Component)this).gameObject.GetComponent() ?? ((Component)this).gameObject.AddComponent(); quickenEffect = ((Component)this).gameObject.GetComponent() ?? ((Component)this).gameObject.AddComponent(); rapidEffect = ((Component)this).gameObject.GetComponent() ?? ((Component)this).gameObject.AddComponent(); devourEffect = ((Component)this).gameObject.GetComponent() ?? ((Component)this).gameObject.AddComponent(); if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("⚡", (Color?)new Color(1f, 0.8f, 0.2f)); } boostParticles = CreateBoostParticles(); boostTrails = CreateBoostTrails(); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data?.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } public override void WasDealtDamage(Vector2 damage, bool selfDamage) { if (selfDamage || (Object)(object)data == (Object)null || !data.view.IsMine) { return; } if (frenzyStacks > 0) { float num = 5f; frenzyBonus = Mathf.Min(frenzyBonus + 1f * (float)frenzyStacks, num); } speedBoostActive = true; speedBoostTimer = BoostDuration + frenzyBonus; NetworkingManager.RPC(typeof(PainFuelMono), "RPC_SetBoostVisual", new object[2] { data.view.ViewID, speedBoostTimer }); if (reflexStacks > 0) { reflexPending = true; } if (pressureStacks > 0 || cadenceStacks > 0 || parryStacks > 0 || accelerateStacks > 0 || quickenStacks > 0 || rapidStacks > 0 || devourStacks > 0) { pressureHitCount++; } if (((Vector2)(ref damage)).magnitude > 0f) { int viewID = data.view.ViewID; if (hasRecoup) { float healAmount = ((Vector2)(ref damage)).magnitude * 0.25f; ((MonoBehaviour)this).StartCoroutine(HealDelayed(viewID, healAmount)); } } } private void Update() { if (speedBoostActive) { speedBoostTimer -= Time.deltaTime; if (speedBoostTimer <= 0f) { speedBoostActive = false; } } if (visualBoostActive) { visualBoostTimer -= Time.deltaTime; if (visualBoostTimer <= 0f) { visualBoostActive = false; } } if ((Object)(object)cooldownUI != (Object)null) { if (speedBoostActive) { cooldownUI.ShowActive(speedBoostTimer); } else { cooldownUI.Hide(); } } if ((Object)(object)boostParticles != (Object)null) { if (visualBoostActive && !boostParticles.isEmitting) { boostParticles.Play(); } else if (!visualBoostActive && boostParticles.isEmitting) { boostParticles.Stop(false, (ParticleSystemStopBehavior)1); } } if (boostTrails == null) { return; } for (int i = 0; i < boostTrails.Length; i++) { if (!((Object)(object)boostTrails[i] == (Object)null)) { bool emitting = visualBoostActive && Mathf.Sin(Time.time * 4f + (float)i * 1.2f) > 0f; boostTrails[i].emitting = emitting; } } } private ParticleSystem CreateBoostParticles() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0024: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01be: 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_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: 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_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown GameObject val = new GameObject("ElasticBoostParticles"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; ParticleSystem val2 = val.AddComponent(); MainModule main = val2.main; ((MainModule)(ref main)).loop = true; ((MainModule)(ref main)).playOnAwake = false; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.3f, 0.6f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(3f, 7f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.05f, 0.12f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 0.3f, 0.1f, 1f), new Color(0.8f, 0.05f, 0.05f, 1f)); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(0f); ((MainModule)(ref main)).maxParticles = 200; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).enabled = true; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(30f); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).enabled = true; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10; ((ShapeModule)(ref shape)).radius = 0.3f; VelocityOverLifetimeModule velocityOverLifetime = val2.velocityOverLifetime; ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).enabled = true; ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).space = (ParticleSystemSimulationSpace)0; ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).x = new MinMaxCurve(-1f, 1f); ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).y = new MinMaxCurve(0f, 2f); ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(new Color(1f, 0.3f, 0.1f), 0f), new GradientColorKey(new Color(0.7f, 0f, 0f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); ParticleSystemRenderer component = val.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 1; ((Renderer)component).material = new Material(Shader.Find("Sprites/Default")); return val2; } private TrailRenderer[] CreateBoostTrails() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown float[] array = new float[4] { -0.55f, -0.2f, 0.15f, 0.5f }; TrailRenderer[] array2 = (TrailRenderer[])(object)new TrailRenderer[array.Length]; Gradient val = new Gradient(); val.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(new Color(0.5f, 0.05f, 0.05f), 0f), new GradientColorKey(new Color(1f, 0.25f, 0.05f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey(0.5f, 0f), new GradientAlphaKey(0f, 1f) }); for (int i = 0; i < array.Length; i++) { GameObject val2 = new GameObject($"ElasticBoostTrail_{i}"); val2.transform.SetParent(((Component)this).transform); val2.transform.localPosition = new Vector3(0f, array[i], 0f); TrailRenderer val3 = val2.AddComponent(); val3.time = 0.45f; val3.startWidth = 0.04f; val3.endWidth = 0f; val3.minVertexDistance = 0.03f; val3.emitting = false; val3.colorGradient = val; ((Renderer)val3).material = new Material(Shader.Find("Sprites/Default")); ((Renderer)val3).sortingLayerName = "MostFront"; ((Renderer)val3).sortingOrder = 0; array2[i] = val3; } return array2; } private void OnShoot(GameObject projectile) { if (reflexPending && reflexStacks > 0 && !((Object)(object)projectile == (Object)null)) { reflexPending = false; ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage *= 1f + 0.5f * (float)reflexStacks; } } } [IteratorStateMachine(typeof(d__49))] private IEnumerator HealDelayed(int viewID, float healAmount) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__49(0) { <>4__this = this, viewID = viewID, healAmount = healAmount }; } [UnboundRPC] public static void RPC_HealRecoup(int viewID, float healAmount) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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) PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); if (!((Object)(object)photonView == (Object)null)) { Player component = ((Component)photonView).GetComponent(); if (!((Object)(object)component == (Object)null) && !((Object)(object)component.data == (Object)null) && !component.data.dead) { component.data.healthHandler.Heal(healAmount); HealTextEffect.Show(((Component)component).transform.position + new Vector3(0f, 1.2f, 0f), healAmount); } } } [UnboundRPC] public static void RPC_SetBoostVisual(int viewID, float duration) { PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); if (!((Object)(object)photonView == (Object)null)) { PainFuelMono component = ((Component)photonView).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.visualBoostActive = true; component.visualBoostTimer = duration; } } } private void OnRevive() { speedBoostActive = false; speedBoostTimer = 0f; visualBoostActive = false; visualBoostTimer = 0f; reflexPending = false; } [IteratorStateMachine(typeof(d__53))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__53(0) { <>4__this = this, gm = gm }; } private void OnDestroy() { if ((Object)(object)gun != (Object)null && shootAction != null) { gun.ShootPojectileAction = (Action)Delegate.Remove(gun.ShootPojectileAction, shootAction); } if ((Object)(object)effect != (Object)null) { Object.DestroyImmediate((Object)(object)effect); } if ((Object)(object)pressureEffect != (Object)null) { Object.DestroyImmediate((Object)(object)pressureEffect); } if ((Object)(object)cadenceEffect != (Object)null) { Object.DestroyImmediate((Object)(object)cadenceEffect); } if ((Object)(object)parryEffect != (Object)null) { Object.DestroyImmediate((Object)(object)parryEffect); } if ((Object)(object)accelerateEffect != (Object)null) { Object.DestroyImmediate((Object)(object)accelerateEffect); } if ((Object)(object)quickenEffect != (Object)null) { Object.DestroyImmediate((Object)(object)quickenEffect); } if ((Object)(object)rapidEffect != (Object)null) { Object.DestroyImmediate((Object)(object)rapidEffect); } if ((Object)(object)devourEffect != (Object)null) { Object.DestroyImmediate((Object)(object)devourEffect); } if ((Object)(object)boostParticles != (Object)null) { Object.Destroy((Object)(object)((Component)boostParticles).gameObject); } if (boostTrails != null) { TrailRenderer[] array = boostTrails; foreach (TrailRenderer val in array) { if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); } } } if ((Object)(object)cooldownUI != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)cooldownUI).gameObject); } GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data?.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } } } public class PainFuelEffect : ReversibleEffect { private PainFuelMono mono; private HealthHandler healthHandler; private int lastFuryStacks = -1; private int lastHasteStacks = -1; private int lastSurgeStacks = -1; private int lastZenStacks = -1; private int lastBloodrushStacks = -1; private int lastTempoStacks = -1; private int lastAegisStacks = -1; private int lastRushStacks = -1; private float appliedRegen = 0f; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); healthHandler = ((Component)this).GetComponent(); } private void ApplyZenRegen(float newRegen) { if (!((Object)(object)healthHandler == (Object)null)) { HealthHandler obj = healthHandler; obj.regeneration += newRegen - appliedRegen; appliedRegen = newRegen; } } private void ClearZenRegen() { if (appliedRegen != 0f && !((Object)(object)healthHandler == (Object)null)) { HealthHandler obj = healthHandler; obj.regeneration -= appliedRegen; appliedRegen = 0f; } } public override void OnOnEnable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } ClearZenRegen(); lastFuryStacks = -1; lastHasteStacks = -1; lastSurgeStacks = -1; lastZenStacks = -1; lastBloodrushStacks = -1; lastTempoStacks = -1; lastAegisStacks = -1; lastRushStacks = -1; } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || !mono.speedBoostActive) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } ClearZenRegen(); lastFuryStacks = -1; lastHasteStacks = -1; lastSurgeStacks = -1; lastZenStacks = -1; lastBloodrushStacks = -1; lastTempoStacks = -1; lastAegisStacks = -1; lastRushStacks = -1; return; } if (!((ReversibleEffect)this).modifiersActive || lastFuryStacks != mono.furyStacks || lastHasteStacks != mono.hasteStacks || lastSurgeStacks != mono.surgeStacks || lastBloodrushStacks != mono.bloodrushStacks || lastTempoStacks != mono.tempoStacks || lastAegisStacks != mono.aegisStacks || lastRushStacks != mono.rushStacks) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } base.characterStatModifiersModifier.movementSpeed_mult = 1.25f + ((mono.rushStacks > 0) ? (0.25f * (float)mono.rushStacks) : 0f); base.gunStatModifier.damage_mult = 1.5f + ((mono.furyStacks > 0) ? (0.25f * (float)mono.furyStacks) : 0f); base.gunStatModifier.attackSpeed_mult = ((mono.hasteStacks > 0) ? (1f / (1f + 0.25f * (float)mono.hasteStacks)) : 1f); base.gunStatModifier.projectileSpeed_mult = ((mono.surgeStacks > 0) ? (1f + 0.5f * (float)mono.surgeStacks) : 1f); base.characterStatModifiersModifier.lifeSteal_add = ((mono.bloodrushStacks > 0) ? (0.25f * (float)mono.bloodrushStacks) : 0f); base.gunAmmoStatModifier.reloadTimeMultiplier_mult = ((mono.tempoStacks > 0) ? (1f - 0.25f * (float)mono.tempoStacks) : 1f); base.blockModifier.cdMultiplier_mult = ((mono.aegisStacks > 0) ? (1f - 0.25f * (float)mono.aegisStacks) : 1f); ((ReversibleEffect)this).ApplyModifiers(); lastFuryStacks = mono.furyStacks; lastHasteStacks = mono.hasteStacks; lastSurgeStacks = mono.surgeStacks; lastBloodrushStacks = mono.bloodrushStacks; lastTempoStacks = mono.tempoStacks; lastAegisStacks = mono.aegisStacks; lastRushStacks = mono.rushStacks; } if (lastZenStacks != mono.zenStacks) { ApplyZenRegen((mono.zenStacks > 0) ? (10f * (float)mono.zenStacks) : 0f); lastZenStacks = mono.zenStacks; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } ClearZenRegen(); lastFuryStacks = -1; lastHasteStacks = -1; lastSurgeStacks = -1; lastZenStacks = -1; lastBloodrushStacks = -1; lastTempoStacks = -1; lastAegisStacks = -1; lastRushStacks = -1; } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } ClearZenRegen(); } } public class PressureEffect : ReversibleEffect { private PainFuelMono mono; private int lastPressureValue = -1; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || mono.pressureStacks == 0 || mono.pressureHitCount == 0) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastPressureValue = 0; return; } int num = mono.pressureHitCount * mono.pressureStacks; if (num != lastPressureValue) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } float num2 = 2f; base.gunStatModifier.damage_mult = Mathf.Min(1f + 0.2f * (float)mono.pressureHitCount * (float)mono.pressureStacks, num2); ((ReversibleEffect)this).ApplyModifiers(); lastPressureValue = num; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastPressureValue = -1; } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class CadenceEffect : ReversibleEffect { private PainFuelMono mono; private int lastCadenceValue = -1; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || mono.cadenceStacks == 0 || mono.pressureHitCount == 0) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastCadenceValue = 0; return; } int num = mono.pressureHitCount * mono.cadenceStacks; if (num != lastCadenceValue) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } float num2 = 0.2f; base.gunAmmoStatModifier.reloadTimeMultiplier_mult = Mathf.Max(1f - 0.1f * (float)mono.pressureHitCount * (float)mono.cadenceStacks, num2); ((ReversibleEffect)this).ApplyModifiers(); lastCadenceValue = num; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastCadenceValue = -1; } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class ParryEffect : ReversibleEffect { private PainFuelMono mono; private int lastParryValue = -1; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || mono.parryStacks == 0 || mono.pressureHitCount == 0) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastParryValue = 0; return; } int num = mono.pressureHitCount * mono.parryStacks; if (num != lastParryValue) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } float num2 = 0.2f; base.blockModifier.cdMultiplier_mult = Mathf.Max(1f - 0.1f * (float)mono.pressureHitCount * (float)mono.parryStacks, num2); ((ReversibleEffect)this).ApplyModifiers(); lastParryValue = num; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastParryValue = -1; } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class AccelerateEffect : ReversibleEffect { private PainFuelMono mono; private int lastAccelerateValue = -1; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || mono.accelerateStacks == 0 || mono.pressureHitCount == 0) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastAccelerateValue = 0; return; } int num = mono.pressureHitCount * mono.accelerateStacks; if (num != lastAccelerateValue) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } float num2 = 1.8f; base.characterStatModifiersModifier.movementSpeed_mult = Mathf.Min(1f + 0.1f * (float)mono.pressureHitCount * (float)mono.accelerateStacks, num2); ((ReversibleEffect)this).ApplyModifiers(); lastAccelerateValue = num; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastAccelerateValue = -1; } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class QuickenEffect : ReversibleEffect { private PainFuelMono mono; private int lastQuickenValue = -1; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || mono.quickenStacks == 0 || mono.pressureHitCount == 0) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastQuickenValue = 0; return; } int num = mono.pressureHitCount * mono.quickenStacks; if (num != lastQuickenValue) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } float num2 = 0.2f; base.gunStatModifier.attackSpeed_mult = Mathf.Max(1f - 0.1f * (float)mono.pressureHitCount * (float)mono.quickenStacks, num2); ((ReversibleEffect)this).ApplyModifiers(); lastQuickenValue = num; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastQuickenValue = -1; } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class RapidEffect : ReversibleEffect { private PainFuelMono mono; private int lastRapidValue = -1; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || mono.rapidStacks == 0 || mono.pressureHitCount == 0) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastRapidValue = 0; return; } int num = mono.pressureHitCount * mono.rapidStacks; if (num != lastRapidValue) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } float num2 = 2f; base.gunStatModifier.projectileSpeed_mult = Mathf.Min(1f + 0.1f * (float)mono.pressureHitCount * (float)mono.rapidStacks, num2); ((ReversibleEffect)this).ApplyModifiers(); lastRapidValue = num; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastRapidValue = -1; } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class DevourEffect : ReversibleEffect { private PainFuelMono mono; private int lastDevourValue = -1; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || mono.devourStacks == 0 || mono.pressureHitCount == 0) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastDevourValue = 0; return; } int num = mono.pressureHitCount * mono.devourStacks; if (num != lastDevourValue) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } float num2 = 1f; base.characterStatModifiersModifier.lifeSteal_add = Mathf.Min(0.1f * (float)mono.pressureHitCount * (float)mono.devourStacks, num2); ((ReversibleEffect)this).ApplyModifiers(); lastDevourValue = num; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } lastDevourValue = -1; } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class ExecutionerMono : MonoBehaviour { public struct PendingExecution { public int attackerPlayerID; public Vector3 position; public float timestamp; } private const float BASE_EXECUTE_CHANCE = 0.02f; private const float EXECUTE_CHANCE_PER_STACK = 0.02f; private const float MAX_EXECUTE_CHANCE = 0.5f; private const float PENDING_EXECUTION_TIMEOUT = 0.5f; public int stackCount = 1; private Player player = null; private static Dictionary pendingExecutions = new Dictionary(); private void Start() { player = ((Component)this).GetComponent(); } public float GetExecuteChance() { float num = 0.02f + (float)(stackCount - 1) * 0.02f; return Mathf.Min(num, 0.5f); } public bool TryExecute() { float value = Random.value; float executeChance = GetExecuteChance(); return value < executeChance; } public static void RegisterPendingExecution(int targetPlayerID, int attackerPlayerID, Vector3 position) { //IL_001f: 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) CleanupOldPendingExecutions(); pendingExecutions[targetPlayerID] = new PendingExecution { attackerPlayerID = attackerPlayerID, position = position, timestamp = Time.time }; } public static void OnPlayerDied(int deadPlayerID) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) if (pendingExecutions.TryGetValue(deadPlayerID, out var value)) { if (Time.time - value.timestamp > 0.5f) { pendingExecutions.Remove(deadPlayerID); return; } pendingExecutions.Remove(deadPlayerID); ShowExecuteTextStatic(value.attackerPlayerID, value.position); } } public static void ShowExecuteTextStatic(int attackerPlayerID, Vector3 position) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) Vector3 position2 = position + new Vector3(Random.Range(-0.3f, 0.3f), 0.5f, 0f); TextEffectPool.Show(position2); } public void ShowExecuteText(Vector3 position) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) ShowExecuteTextStatic(player?.playerID ?? (-1), position); } private static void CleanupOldPendingExecutions() { List list = new List(); foreach (KeyValuePair pendingExecution in pendingExecutions) { if (Time.time - pendingExecution.Value.timestamp > 1f) { list.Add(pendingExecution.Key); } } foreach (int item in list) { pendingExecutions.Remove(item); } } public void AddStack() { stackCount++; } public void RemoveStack() { stackCount--; } public static void ClearPendingExecutions() { pendingExecutions.Clear(); } private void OnDestroy() { } } public class ExecutionerBullet : MonoBehaviour { public bool isExecutionerShot = false; private bool visualsApplied = false; private GameObject bloodDropsObj = null; private GameObject deathGlowObj = null; private GameObject orbitsObj = null; private ParticleSystem bloodDrops = null; private ParticleSystem deathGlow = null; private ParticleSystem orbits = null; private static readonly Color bulletColor = new Color(1f, 0f, 0f, 1f); private static readonly Color bloodBright = new Color(1f, 0.1f, 0.1f, 1f); private static readonly Color bloodMid = new Color(0.8f, 0f, 0f, 1f); private static readonly Color bloodDark = new Color(0.3f, 0f, 0f, 1f); private static readonly Color glowColor = new Color(1f, 0.2f, 0.2f, 0.45f); private static readonly Color deathBlack = new Color(0.2f, 0f, 0f, 0.9f); private static Material cachedMaterial = null; private int frameCount = 0; private void Update() { if (isExecutionerShot && visualsApplied && frameCount < 5) { frameCount++; ForceApplyColor(); } } private static Material GetMaterial() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown if ((Object)(object)cachedMaterial == (Object)null) { cachedMaterial = new Material(Shader.Find("Sprites/Default")); } return cachedMaterial; } private void ForceApplyColor() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) SetTeamColor[] componentsInChildren = ((Component)this).GetComponentsInChildren(); SetTeamColor[] array = componentsInChildren; foreach (SetTeamColor val in array) { ((Behaviour)val).enabled = false; } SpawnedAttack component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetColor(bulletColor); } SpriteRenderer[] componentsInChildren2 = ((Component)this).GetComponentsInChildren(); SpriteRenderer[] array2 = componentsInChildren2; foreach (SpriteRenderer val2 in array2) { if ((Object)(object)val2 != (Object)null) { val2.color = bulletColor; } } TrailRenderer[] componentsInChildren3 = ((Component)this).GetComponentsInChildren(); TrailRenderer[] array3 = componentsInChildren3; foreach (TrailRenderer val3 in array3) { if ((Object)(object)val3 != (Object)null) { val3.startColor = bulletColor; val3.endColor = new Color(bulletColor.r, bulletColor.g, bulletColor.b, 0f); } } ProjectileHit component2 = ((Component)this).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.projectileColor = bulletColor; } } public void ApplyBloodyVisuals() { if (!visualsApplied) { visualsApplied = true; ForceApplyColor(); CreateDeathGlow(); CreateOrbits(); CreateBloodDrops(); } } private void CreateDeathGlow() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0033: 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) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) deathGlowObj = new GameObject("DeathGlow"); deathGlowObj.transform.SetParent(((Component)this).transform); deathGlowObj.transform.localPosition = Vector3.zero; deathGlow = deathGlowObj.AddComponent(); MainModule main = deathGlow.main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(0.1f); ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(0f); ((MainModule)(ref main)).startSize = MinMaxCurve.op_Implicit(0.25f); ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(glowColor); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)0; ((MainModule)(ref main)).maxParticles = 2; EmissionModule emission = deathGlow.emission; ((EmissionModule)(ref emission)).enabled = true; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(15f); ShapeModule shape = deathGlow.shape; ((ShapeModule)(ref shape)).enabled = false; SizeOverLifetimeModule sizeOverLifetime = deathGlow.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; AnimationCurve val = new AnimationCurve(); val.AddKey(0f, 0.8f); val.AddKey(0.5f, 1f); val.AddKey(1f, 0.7f); ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, val); ColorOverLifetimeModule colorOverLifetime = deathGlow.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val2 = new Gradient(); val2.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(glowColor, 0f), new GradientColorKey(glowColor, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(0.4f, 0f), new GradientAlphaKey(0.5f, 0.5f), new GradientAlphaKey(0.3f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val2); ParticleSystemRenderer component = deathGlowObj.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 98; ((Renderer)component).material = GetMaterial(); deathGlow.Play(); } private void CreateOrbits() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0033: 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) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_009d: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: 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_0197: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) orbitsObj = new GameObject("DeathOrbits"); orbitsObj.transform.SetParent(((Component)this).transform); orbitsObj.transform.localPosition = Vector3.zero; orbits = orbitsObj.AddComponent(); MainModule main = orbits.main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(0.3f); ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(0f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.03f, 0.05f); ((MainModule)(ref main)).startColor = new MinMaxGradient(bloodBright, deathBlack); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)0; ((MainModule)(ref main)).maxParticles = 6; EmissionModule emission = orbits.emission; ((EmissionModule)(ref emission)).enabled = true; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(12f); ShapeModule shape = orbits.shape; ((ShapeModule)(ref shape)).enabled = true; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10; ((ShapeModule)(ref shape)).radius = 0.12f; ((ShapeModule)(ref shape)).radiusThickness = 0f; VelocityOverLifetimeModule velocityOverLifetime = orbits.velocityOverLifetime; ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).enabled = true; ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).orbitalZ = new MinMaxCurve(10f, 15f); ColorOverLifetimeModule colorOverLifetime = orbits.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val = new Gradient(); val.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(bloodBright, 0f), new GradientColorKey(deathBlack, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.6f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val); ParticleSystemRenderer component = orbitsObj.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 101; ((Renderer)component).material = GetMaterial(); orbits.Play(); } private void CreateBloodDrops() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0033: 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) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0275: 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_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) bloodDropsObj = new GameObject("BloodDrops"); bloodDropsObj.transform.SetParent(((Component)this).transform); bloodDropsObj.transform.localPosition = Vector3.zero; bloodDrops = bloodDropsObj.AddComponent(); MainModule main = bloodDrops.main; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(2f, 3.5f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(0.4f, 1.2f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.04f, 0.14f); ((MainModule)(ref main)).startColor = new MinMaxGradient(bloodBright, bloodMid); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).maxParticles = 455; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(0.067f); EmissionModule emission = bloodDrops.emission; ((EmissionModule)(ref emission)).enabled = true; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(130f); ShapeModule shape = bloodDrops.shape; ((ShapeModule)(ref shape)).enabled = true; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)0; ((ShapeModule)(ref shape)).radius = 0.08f; VelocityOverLifetimeModule velocityOverLifetime = bloodDrops.velocityOverLifetime; ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).enabled = true; AnimationCurve val = new AnimationCurve(); val.AddKey(0f, 1f); val.AddKey(0.3f, 0.5f); val.AddKey(0.6f, 0.2f); val.AddKey(1f, 0f); ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).speedModifier = new MinMaxCurve(1f, val); SizeOverLifetimeModule sizeOverLifetime = bloodDrops.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; AnimationCurve val2 = new AnimationCurve(); val2.AddKey(0f, 0.8f); val2.AddKey(0.15f, 1f); val2.AddKey(0.5f, 0.6f); val2.AddKey(1f, 0f); ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, val2); ColorOverLifetimeModule colorOverLifetime = bloodDrops.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[4] { new GradientColorKey(bloodBright, 0f), new GradientColorKey(bloodMid, 0.3f), new GradientColorKey(bloodDark, 0.6f), new GradientColorKey(new Color(0.1f, 0f, 0f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.8f, 0.3f), new GradientAlphaKey(0.4f, 0.7f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); ParticleSystemRenderer component = bloodDropsObj.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 100; ((Renderer)component).material = GetMaterial(); bloodDrops.Play(); } private void OnDestroy() { DetachAndFade(deathGlowObj, deathGlow); DetachAndFade(orbitsObj, orbits); DetachAndFade(bloodDropsObj, bloodDrops); } private void DetachAndFade(GameObject obj, ParticleSystem ps) { //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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)obj == (Object)null) && !((Object)(object)ps == (Object)null)) { obj.transform.SetParent((Transform)null); EmissionModule emission = ps.emission; ((EmissionModule)(ref emission)).enabled = false; MainModule main = ps.main; MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime; Object.Destroy((Object)(object)obj, ((MinMaxCurve)(ref startLifetime)).constantMax + 0.1f); } } } public class ExtendedGuardMono : MonoBehaviour { [CompilerGenerated] private sealed class d__17 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ExtendedGuardMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float BASE_CRIT_CHANCE = 0.25f; private const float CRIT_CHANCE_PER_STACK = 0.15f; private const float MAX_CRIT_CHANCE = 0.75f; private const float CRIT_BLOCK_DURATION = 0.6f; public int stackCount = 1; private Player player; private Block block; private CharacterData data; private Action blockAction; private GameObject critVisual; private LineRenderer critRenderer; private float critVisualTimer = 0f; private const float CRIT_VISUAL_DURATION = 0.6f; private bool isCritBlock = false; private float critBlockTimer = 0f; private void Start() { player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); CreateCritVisual(); GameModeManager.AddHook("PointStart", (Func)OnPointStart); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__17))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__17(0) { <>4__this = this, gm = gm }; } public float GetCritChance() { float num = 0.25f + (float)(stackCount - 1) * 0.15f; return Mathf.Min(num, 0.75f); } private void OnBlock(BlockTriggerType triggerType) { } public void ActivateCritBlockFromRPC() { isCritBlock = true; critBlockTimer = 0f; ShowCritVisual(); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { return; } if (data.dead) { HideCritVisual(); return; } if (isCritBlock) { critBlockTimer += TimeHandler.deltaTime; if (critBlockTimer < 0.6f) { block.sinceBlock = 0f; } else { isCritBlock = false; } } if (critVisualTimer > 0f) { critVisualTimer -= Time.deltaTime; UpdateCritVisual(); if (critVisualTimer <= 0f) { HideCritVisual(); } } } private void ResetState() { isCritBlock = false; critVisualTimer = 0f; critBlockTimer = 0f; HideCritVisual(); } private void CreateCritVisual() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) critVisual = new GameObject("ExtendedGuardCrit"); critVisual.transform.SetParent(((Component)this).transform); critVisual.transform.localPosition = Vector3.zero; critRenderer = critVisual.AddComponent(); critRenderer.useWorldSpace = false; critRenderer.loop = true; critRenderer.startWidth = 0.2f; critRenderer.endWidth = 0.2f; critRenderer.positionCount = 6; ((Renderer)critRenderer).material = new Material(Shader.Find("Sprites/Default")); ((Renderer)critRenderer).sortingLayerName = "MostFront"; ((Renderer)critRenderer).sortingOrder = 100; for (int i = 0; i < 6; i++) { float num = (float)i / 6f * MathF.PI * 2f - MathF.PI / 2f; critRenderer.SetPosition(i, new Vector3(Mathf.Cos(num), Mathf.Sin(num), 0f)); } critVisual.SetActive(false); } private void ShowCritVisual() { critVisualTimer = 0.6f; if ((Object)(object)critVisual != (Object)null) { critVisual.SetActive(true); } } private void UpdateCritVisual() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)critRenderer == (Object)null)) { float num = critVisualTimer / 0.6f; float num2 = 1f + Mathf.Sin(Time.time * 15f) * 0.15f; float num3 = 1.5f * num2; for (int i = 0; i < 6; i++) { float num4 = (float)i / 6f * MathF.PI * 2f - MathF.PI / 2f; critRenderer.SetPosition(i, new Vector3(Mathf.Cos(num4) * num3, Mathf.Sin(num4) * num3, 0f)); } float num5 = Mathf.Lerp(0.3f, 1f, num); Color val = default(Color); ((Color)(ref val))..ctor(1f, 0.85f, 0.2f, num5); critRenderer.startColor = val; critRenderer.endColor = val; float num6 = Mathf.Lerp(0.1f, 0.25f, num); critRenderer.startWidth = num6; critRenderer.endWidth = num6; } } private void HideCritVisual() { if ((Object)(object)critVisual != (Object)null) { critVisual.SetActive(false); } } public void AddStack() { stackCount++; } public void RemoveStack() { stackCount--; } private void OnDestroy() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); if ((Object)(object)critVisual != (Object)null) { Object.Destroy((Object)(object)critVisual); } } } public class GravitySurgeMono : MonoBehaviour { private const float COOLDOWN = 15f; private const float DURATION = 0.5f; private const float FORCE_MULTIPLIER = 10f; private const float BASE_PULL_FORCE = 125f; private const float MAX_DISTANCE = 30f; private const float MIN_DISTANCE = 2f; private Player player; private Block block; private PhotonView view; private FieldInfo velocityField; private FieldInfo simulatedField; private float cooldownTimer = 0f; private float activeTimer = 0f; private bool isActive = false; private bool isReady = true; private CooldownUI cooldownUI; private void Start() { //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); if ((Object)(object)player == (Object)null) { Object.Destroy((Object)(object)this); return; } block = player.data.block; view = player.data.view; if ((Object)(object)block != (Object)null) { block.BlockAction = (Action)Delegate.Combine(block.BlockAction, new Action(OnBlock)); } velocityField = typeof(PlayerVelocity).GetField("velocity", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); simulatedField = typeof(PlayerVelocity).GetField("simulated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (view.IsMine || PhotonNetwork.OfflineMode) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("◉", (Color?)new Color(0.6f, 0.3f, 0.8f)); cooldownUI.SetColors(new Color(0.6f, 0.3f, 0.8f), new Color(0.8f, 0.3f, 0.3f), new Color(0.3f, 0.6f, 1f)); } } private void OnBlock(BlockTriggerType triggerType) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 if ((int)triggerType <= 0 && isReady && !player.data.dead && player.data.isPlaying && (!((Object)(object)view != (Object)null) || view.IsMine || PhotonNetwork.OfflineMode)) { ActivateSurge(); } } private void ActivateSurge() { isActive = true; isReady = false; activeTimer = 0.5f; cooldownTimer = 15f; NetworkingManager.RPC(typeof(GravitySurgeMono), "RPCA_ActivateSurge", new object[1] { player.playerID }); } [UnboundRPC] public static void RPCA_ActivateSurge(int playerID) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if (!((Object)(object)val == (Object)null)) { GravitySurgeMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.isActive = true; component.activeTimer = 0.5f; } CreateSurgeVisual(((Component)val).transform.position); } } private static void CreateSurgeVisual(Vector3 position) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: 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_005e: Expected O, but got Unknown //IL_0074: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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) GameObject val = new GameObject("GravitySurge_Visual"); val.transform.position = position; LineRenderer val2 = val.AddComponent(); val2.positionCount = 32; val2.loop = true; val2.startWidth = 0.3f; val2.endWidth = 0.3f; ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); val2.startColor = new Color(0.6f, 0.3f, 0.8f, 0.8f); val2.endColor = new Color(0.4f, 0.2f, 0.6f, 0.5f); ((Renderer)val2).shadowCastingMode = (ShadowCastingMode)0; float num = 2f; for (int i = 0; i < 32; i++) { float num2 = (float)i / 32f * MathF.PI * 2f; Vector3 val3 = position + new Vector3(Mathf.Cos(num2), Mathf.Sin(num2), 0f) * num; val2.SetPosition(i, val3); } GravitySurgeVisualExpand gravitySurgeVisualExpand = val.AddComponent(); gravitySurgeVisualExpand.duration = 0.5f; } private void FixedUpdate() { if (!((Object)(object)player == (Object)null) && !player.data.dead && player.data.isPlaying && isActive) { ApplyGravityToAllPlayers(); } } private void Update() { if ((Object)(object)player == (Object)null) { return; } if (PhotonNetwork.OfflineMode || ((Object)(object)view != (Object)null && view.IsMine)) { if (isActive) { activeTimer -= Time.deltaTime; if (activeTimer <= 0f) { NetworkingManager.RPC(typeof(GravitySurgeMono), "RPCA_DeactivateSurge", new object[1] { player.playerID }); } } if (!isReady) { cooldownTimer -= Time.deltaTime; if (cooldownTimer <= 0f) { isReady = true; cooldownTimer = 0f; } } } UpdateUI(); } [UnboundRPC] public static void RPCA_DeactivateSurge(int playerID) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if (!((Object)(object)val == (Object)null)) { GravitySurgeMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.isActive = false; component.activeTimer = 0f; } } } private void UpdateUI() { if (!((Object)(object)cooldownUI == (Object)null)) { if ((Object)(object)view != (Object)null && !view.IsMine && !PhotonNetwork.OfflineMode) { cooldownUI.Hide(); } else if (player.data.dead || !player.data.isPlaying) { cooldownUI.Hide(); } else if (isActive) { cooldownUI.ShowActive(activeTimer); } else if (!isReady) { cooldownUI.ShowCooldown(cooldownTimer, 15f); } else { cooldownUI.Hide(); } } } private void ApplyGravityToAllPlayers() { //IL_0007: 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) //IL_005e: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; float pullForce = 1250f; foreach (Player player in PlayerManager.instance.players) { if (player.playerID != this.player.playerID && IsValidTarget(player)) { PullPlayer(player, position, pullForce); } } } private bool IsValidTarget(Player target) { if ((Object)(object)target == (Object)null) { return false; } if ((Object)(object)target.data == (Object)null) { return false; } if (!target.data.isPlaying) { return false; } if (target.data.dead) { return false; } if (target.data.health <= 0f) { return false; } if ((Object)(object)target.data.playerVel != (Object)null && simulatedField != null && !(bool)simulatedField.GetValue(target.data.playerVel)) { return false; } return true; } private void PullPlayer(Player target, Vector3 myPosition, float pullForce) { //IL_001d: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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) if ((Object)(object)((Component)target).gameObject.GetComponent() != (Object)null) { return; } Vector3 val = myPosition - ((Component)target).transform.position; float magnitude = ((Vector3)(ref val)).magnitude; if (!(magnitude > 30f) && !(magnitude < 2f)) { float num = pullForce * Time.fixedDeltaTime; Vector2 val2 = Vector2.op_Implicit(((Vector3)(ref val)).normalized * num); PlayerVelocity playerVel = target.data.playerVel; if ((Object)(object)playerVel != (Object)null && velocityField != null) { Vector2 val3 = (Vector2)velocityField.GetValue(playerVel); val3 += val2; velocityField.SetValue(playerVel, val3); } } } private void OnDestroy() { if ((Object)(object)block != (Object)null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, new Action(OnBlock)); } if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } public void ResetState() { isActive = false; isReady = true; cooldownTimer = 0f; activeTimer = 0f; } } public class GravitySurgeVisualExpand : MonoBehaviour { public float duration = 1f; private float timer = 0f; private LineRenderer line; private Vector3 center; private float startRadius = 2f; private float endRadius = 30f; private void Start() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) line = ((Component)this).GetComponent(); center = ((Component)this).transform.position; } private void Update() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0135: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = timer / duration; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num2 = Mathf.Lerp(startRadius, endRadius, num); float num3 = 1f - num; if ((Object)(object)line != (Object)null) { line.startColor = new Color(0.6f, 0.3f, 0.8f, 0.8f * num3); line.endColor = new Color(0.4f, 0.2f, 0.6f, 0.5f * num3); line.startWidth = 0.3f * (1f - num * 0.5f); line.endWidth = 0.3f * (1f - num * 0.5f); for (int i = 0; i < 32; i++) { float num4 = (float)i / 32f * MathF.PI * 2f; Vector3 val = center + new Vector3(Mathf.Cos(num4), Mathf.Sin(num4), 0f) * num2; line.SetPosition(i, val); } } } } public class OobImmunityMono : MonoBehaviour { } public class AntiSlowMono : MonoBehaviour { private Player player = null; private CharacterStatModifiers stats = null; public void Start() { player = ((Component)this).GetComponent(); stats = ((Component)this).GetComponent(); } public void Update() { if ((Object)(object)stats != (Object)null && (stats.slow > 0f || stats.slowSlow > 0f || stats.fastSlow > 0f)) { stats.slow = 0f; stats.slowSlow = 0f; stats.fastSlow = 0f; } } private void OnDestroy() { } } public class AntiKnockbackMono : MonoBehaviour { private Player player = null; public void Start() { player = ((Component)this).GetComponent(); } private void OnDestroy() { } } public class AntiSilenceMono : MonoBehaviour { private Player player; public void Start() { player = ((Component)this).GetComponent(); } private void OnDestroy() { } } public class AntiStunMono : MonoBehaviour { private CharacterData data = null; public Player player = null; private Vector2 lastMoveSpeed; private float lastEffectTime; private readonly float effectCooldown = 0.15f; public void Start() { data = ((Component)this).GetComponentInParent(); player = ((Component)this).GetComponent(); } public void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { if (player.data.isStunned) { CancelStun(); PlayResistEffect(); } else { TrySaveVelocity(); } } } private void CancelStun() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) StunHandler stunHandler = player.data.stunHandler; ((MonoBehaviour)stunHandler.codeAnim).StopAllCoroutines(); stunHandler.codeAnim.currentState = (AnimationUse)2; stunHandler.codeAnim.animations = (CodeAnimationInstance[])(object)new CodeAnimationInstance[0]; stunHandler.codeAnim.isPlaying = false; stunHandler.StopStun(); ExtensionMethods.SetFieldValue((object)player.data.playerVel, "velocity", (object)lastMoveSpeed); } private void PlayResistEffect() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) if (!(Time.time - lastEffectTime < effectCooldown)) { lastEffectTime = Time.time; Color color = default(Color); ((Color)(ref color))..ctor(0.3f, 0.8f, 1f, 1f); ShieldEffect.PlayShieldEffect(player, color); } } private void TrySaveVelocity() { //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) try { lastMoveSpeed = (Vector2)ExtensionMethods.GetFieldValue((object)player.data.playerVel, "velocity"); } catch { } } private void OnDestroy() { } } public class KineticArmorMono : MonoBehaviour { [CompilerGenerated] private sealed class d__16 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public KineticArmorMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.storedCharge = 0f; <>4__this.displayCharge = 0f; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float BASE_CHARGE_RATE = 0.25f; private const float CHARGE_RATE_PER_STACK = 0.15f; private const float BASE_BULLET_DAMAGE = 55f; public int stackCount = 1; private float storedCharge = 0f; private Player player; private CharacterData data; private CooldownUI cooldownUI; private static readonly Color chargeColorLow = new Color(1f, 0.5f, 0.1f); private static readonly Color chargeColorFull = new Color(1f, 0.95f, 0.6f); private float displayCharge = 0f; private float lastSyncTime = -999f; private const float SYNC_INTERVAL = 0.2f; private void Start() { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data?.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("!", (Color?)new Color(1f, 0.65f, 0.05f)); } private void Update() { if ((Object)(object)data != (Object)null && data.view.IsMine) { float maxCharge = GetMaxCharge(); displayCharge = ((maxCharge > 0f) ? Mathf.Clamp01(storedCharge / maxCharge) : 0f); } UpdateUI(); } private void UpdateUI() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)cooldownUI == (Object)null)) { if ((Object)(object)data != (Object)null && data.dead) { cooldownUI.Hide(); return; } if (displayCharge <= 0f) { cooldownUI.Hide(); return; } int num = Mathf.RoundToInt(displayCharge * 100f); Color val = Color.Lerp(chargeColorLow, chargeColorFull, displayCharge); cooldownUI.ShowText($"{num}%", val); } } [IteratorStateMachine(typeof(d__16))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__16(0) { <>4__this = this, gm = gm }; } private void OnRevive() { storedCharge = 0f; displayCharge = 0f; if ((Object)(object)data != (Object)null && data.view.IsMine) { NetworkingManager.RPC(typeof(KineticArmorMono), "RPC_SyncCharge", new object[2] { data.view.ViewID, 0f }); } } private float GetMaxCharge() { if ((Object)(object)player?.data?.weaponHandler?.gun == (Object)null) { return 55f; } return player.data.weaponHandler.gun.damage * 55f; } public float GetChargeRate() { return 0.25f + (float)(stackCount - 1) * 0.15f; } public void AddCharge(float damage) { if (!(damage <= 0f)) { storedCharge = Mathf.Min(storedCharge + damage * GetChargeRate(), GetMaxCharge()); if (Time.time - lastSyncTime >= 0.2f) { lastSyncTime = Time.time; float maxCharge = GetMaxCharge(); float num = ((maxCharge > 0f) ? (storedCharge / maxCharge) : 0f); NetworkingManager.RPC(typeof(KineticArmorMono), "RPC_SyncCharge", new object[2] { data.view.ViewID, num }); } } } public float GetStoredCharge() { return storedCharge; } public float ConsumeCharge() { float result = storedCharge; if (storedCharge > 0f) { storedCharge = 0f; NetworkingManager.RPC(typeof(KineticArmorMono), "RPC_SyncCharge", new object[2] { data.view.ViewID, 0f }); } return result; } public void AddStack() { stackCount++; } public void RemoveStack() { stackCount = Mathf.Max(0, stackCount - 1); } [UnboundRPC] public static void RPC_SyncCharge(int playerViewID, float chargePct) { PhotonView photonView = PhotonNetwork.GetPhotonView(playerViewID); if (!((Object)(object)photonView == (Object)null)) { KineticArmorMono kineticArmorMono = ((Component)photonView).GetComponent() ?? ((Component)photonView).GetComponentInParent(); if ((Object)(object)kineticArmorMono != (Object)null && !kineticArmorMono.data.view.IsMine) { kineticArmorMono.displayCharge = chargePct; } } } private void OnDestroy() { GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data?.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } } public class KineticArmorBullet : MonoBehaviour { public float bonusDamage = 0f; private bool visualsApplied = false; private int frameCount = 0; private GameObject trailObj; private TrailRenderer meteorTrail; private static readonly Color bulletColor = new Color(1f, 0.55f, 0.08f, 1f); private static Material cachedMaterial; private void Update() { if (visualsApplied && frameCount < 5) { frameCount++; ForceApplyColor(); } } private static Material GetMaterial() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown if ((Object)(object)cachedMaterial == (Object)null) { cachedMaterial = new Material(Shader.Find("Sprites/Default")); } return cachedMaterial; } private void ForceApplyColor() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_009d: Unknown result type (might be due to invalid IL or missing references) SetTeamColor[] componentsInChildren = ((Component)this).GetComponentsInChildren(); foreach (SetTeamColor val in componentsInChildren) { ((Behaviour)val).enabled = false; } SpawnedAttack component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetColor(bulletColor); } SpriteRenderer[] componentsInChildren2 = ((Component)this).GetComponentsInChildren(); foreach (SpriteRenderer val2 in componentsInChildren2) { if ((Object)(object)val2 != (Object)null) { val2.color = bulletColor; } } ProjectileHit component2 = ((Component)this).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.projectileColor = bulletColor; } } public void ApplyKineticVisuals() { if (!visualsApplied) { visualsApplied = true; ForceApplyColor(); CreateMeteorTrail(); } } private void CreateMeteorTrail() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) trailObj = new GameObject("MeteorTrail"); trailObj.transform.SetParent(((Component)this).transform); trailObj.transform.localPosition = Vector3.zero; meteorTrail = trailObj.AddComponent(); meteorTrail.time = 0.25f; meteorTrail.startWidth = 0.15f; meteorTrail.endWidth = 0f; meteorTrail.minVertexDistance = 0.05f; ((Renderer)meteorTrail).material = GetMaterial(); ((Renderer)meteorTrail).sortingLayerName = "MostFront"; ((Renderer)meteorTrail).sortingOrder = 100; Gradient val = new Gradient(); val.SetKeys((GradientColorKey[])(object)new GradientColorKey[4] { new GradientColorKey(new Color(1f, 0.9f, 0.4f), 0f), new GradientColorKey(new Color(1f, 0.55f, 0.08f), 0.2f), new GradientColorKey(new Color(0.8f, 0.2f, 0f), 0.6f), new GradientColorKey(new Color(0.3f, 0.05f, 0f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.85f, 0.2f), new GradientAlphaKey(0.4f, 0.65f), new GradientAlphaKey(0f, 1f) }); meteorTrail.colorGradient = val; } private void OnDestroy() { if (!((Object)(object)trailObj == (Object)null)) { trailObj.transform.SetParent((Transform)null); if ((Object)(object)meteorTrail != (Object)null) { meteorTrail.emitting = false; } float num = (((Object)(object)meteorTrail != (Object)null) ? (meteorTrail.time + 0.1f) : 0.6f); Object.Destroy((Object)(object)trailObj, num); } } } public class LastChanceMono : MonoBehaviour { private Gun gun; private CharacterData data; private Action shootAction; private void Start() { data = ((Component)this).GetComponent(); if ((Object)(object)data != (Object)null) { gun = data.weaponHandler.gun; } shootAction = OnShoot; if ((Object)(object)gun != (Object)null) { gun.ShootPojectileAction = (Action)Delegate.Combine(gun.ShootPojectileAction, shootAction); } } private void OnShoot(GameObject projectile) { if (!((Object)(object)projectile == (Object)null) && (Object)(object)projectile.GetComponent() == (Object)null) { projectile.AddComponent(); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null && shootAction != null) { gun.ShootPojectileAction = (Action)Delegate.Remove(gun.ShootPojectileAction, shootAction); } } } public class LastChanceBulletMono : MonoBehaviour { private const float PASS_RADIUS = 3f; private const float TRIGGER_OFFSET = 5f; private const float BASE_SPEED = 40f; private const float ACCEL = 80f; private const float ROT_SPEED = 360f; private const float HOMING_TIMEOUT = 0.5f; private int state = 0; private bool wasNear = false; private float minDist = float.MaxValue; private Player lockedTarget; private bool gravityDisabled = false; private float currentSpeed = 0f; private float homingTimer = 0f; private Vector3 homingDir; private const float BLINK_INTERVAL = 0.08f; private const float BLINK_RADIUS = 0.5f; private MoveTransform moveTransform; private Player ownPlayer; private LineRenderer blinkRenderer; private Material blinkMaterial; private float blinkTimer = 0f; private bool blinkState = false; private ProjectileHit projectileHit; private float prevSinceReflect; private void Start() { moveTransform = ((Component)this).GetComponent(); projectileHit = ((Component)this).GetComponent(); prevSinceReflect = (((Object)(object)projectileHit != (Object)null) ? projectileHit.sinceReflect : 10f); SpawnedAttack component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { ownPlayer = component.spawner; } CreateBlinkEffect(); } private void CreateBlinkEffect() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0024: 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_0044: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("LC_Blink"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; blinkMaterial = new Material(Shader.Find("Sprites/Default")); blinkRenderer = val.AddComponent(); blinkRenderer.useWorldSpace = false; blinkRenderer.loop = true; blinkRenderer.startWidth = 0.15f; blinkRenderer.endWidth = 0.15f; ((Renderer)blinkRenderer).material = blinkMaterial; ((Renderer)blinkRenderer).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)blinkRenderer).receiveShadows = false; int num = 10; blinkRenderer.positionCount = num; for (int i = 0; i < num; i++) { float num2 = (float)i / (float)num * 2f * MathF.PI; blinkRenderer.SetPosition(i, new Vector3(Mathf.Cos(num2) * 0.5f, Mathf.Sin(num2) * 0.5f, 0f)); } ((Renderer)blinkRenderer).enabled = false; } private void Update() { if ((Object)(object)moveTransform == (Object)null) { return; } if ((Object)(object)projectileHit != (Object)null) { float sinceReflect = projectileHit.sinceReflect; if (prevSinceReflect > 0.5f && sinceReflect < 0.05f) { Object.Destroy((Object)(object)this); return; } prevSinceReflect = sinceReflect; } switch (state) { case 0: TrackNearest(); break; case 1: Homing(); break; } } private Vector3 GetTargetCenter() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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_0046: 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_0039: 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_004e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)lockedTarget == (Object)null) { return Vector3.zero; } Collider2D component = ((Component)lockedTarget).GetComponent(); Vector3 result; if (!((Object)(object)component != (Object)null)) { result = ((Component)lockedTarget).transform.position; } else { Bounds bounds = component.bounds; result = ((Bounds)(ref bounds)).center; } return result; } private void TrackNearest() { //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) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_014e: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) if (!wasNear) { Player closestPlayer = PlayerManager.instance.GetClosestPlayer(Vector2.op_Implicit(((Component)this).transform.position), true); if (!((Object)(object)closestPlayer == (Object)null) && !closestPlayer.data.dead && ((Component)closestPlayer).gameObject.activeInHierarchy && (!((Object)(object)ownPlayer != (Object)null) || closestPlayer.teamID != ownPlayer.teamID)) { float num = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), closestPlayer.data.playerVel.position); if (num < 3f) { wasNear = true; lockedTarget = closestPlayer; minDist = num; } } } else if ((Object)(object)lockedTarget == (Object)null || lockedTarget.data.dead || !((Component)lockedTarget).gameObject.activeInHierarchy) { Object.Destroy((Object)(object)this); } else { float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), lockedTarget.data.playerVel.position); if (num2 < minDist) { minDist = num2; } if (num2 > minDist + 5f) { state = 1; } } } private void Homing() { //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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) if (!gravityDisabled) { moveTransform.velocity = Vector3.zero; MoveTransform obj = moveTransform; obj.simulateGravity--; gravityDisabled = true; currentSpeed = 0f; homingTimer = 0f; Vector3 val = GetTargetCenter() - ((Component)this).transform.position; val.z = 0f; homingDir = ((((Vector3)(ref val)).sqrMagnitude > 0.0001f) ? ((Vector3)(ref val)).normalized : ((Component)this).transform.right); if ((Object)(object)blinkRenderer != (Object)null) { ((Renderer)blinkRenderer).enabled = true; } } homingTimer += Time.deltaTime; if (homingTimer >= 0.5f || (Object)(object)lockedTarget == (Object)null || lockedTarget.data.dead || !((Component)lockedTarget).gameObject.activeInHierarchy) { Object.Destroy((Object)(object)this); return; } Vector3 targetCenter = GetTargetCenter(); Vector3 val2 = targetCenter - ((Component)this).transform.position; val2.z = 0f; if (((Vector3)(ref val2)).sqrMagnitude > 0.0001f) { homingDir = Vector3.RotateTowards(homingDir, ((Vector3)(ref val2)).normalized, MathF.PI * 2f * Time.deltaTime, 0f); } currentSpeed = Mathf.MoveTowards(currentSpeed, 40f, 80f * Time.deltaTime); moveTransform.velocity = homingDir * currentSpeed; moveTransform.velocity.z = 0f; blinkTimer += Time.deltaTime; if (blinkTimer >= 0.08f && (Object)(object)blinkRenderer != (Object)null) { blinkTimer = 0f; blinkState = !blinkState; Color val3 = (blinkState ? new Color(1f, 0f, 0f, 1f) : new Color(1f, 0f, 0f, 0f)); blinkRenderer.startColor = val3; blinkRenderer.endColor = val3; } } private void OnDestroy() { if (gravityDisabled) { gravityDisabled = false; if ((Object)(object)moveTransform != (Object)null) { MoveTransform obj = moveTransform; obj.simulateGravity++; } } if ((Object)(object)blinkRenderer != (Object)null) { Object.Destroy((Object)(object)((Component)blinkRenderer).gameObject); } } } public class NothingMono : MonoBehaviour { private Player player; private readonly float updateDelay = 1f; private float lastCheckTime; public void Start() { player = ((Component)this).GetComponent(); lastCheckTime = Time.time; } public void Update() { if (Time.time < lastCheckTime + updateDelay) { return; } lastCheckTime = Time.time; if ((Object)(object)player == (Object)null) { player = ((Component)this).GetComponent(); if ((Object)(object)player == (Object)null) { return; } } if (NothingTimerManager.GetTimerCount(player) == 0) { Object.Destroy((Object)(object)this); return; } float oldestTimerElapsed = NothingTimerManager.GetOldestTimerElapsed(player); if (!(oldestTimerElapsed < 0f) && oldestTimerElapsed >= 600f) { NothingTimerManager.TransformOldestNothing(targetCardName: (!NothingTimerManager.HasItBecomesAll(player)) ? "Something" : "All", player: player); } } private void OnDestroy() { MrFuntikMod.Log("[NothingMono] Destroyed for player " + (((Object)(object)player != (Object)null) ? player.playerID.ToString() : "null")); } } public class PhoenixSurgeMono : MonoBehaviour { private Player player = null; private CharacterData data = null; private bool respawnAdded = false; private int totalAddedThisRound = 0; private bool pendingExplosion = false; private static Dictionary lastRespawnTimeByPlayer = new Dictionary(); private static Dictionary lastTextTimeByPlayer = new Dictionary(); private const float COOLDOWN = 1f; public int OurRemainingCount => respawnAdded ? 1 : 0; private void Start() { player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { if (pendingExplosion) { pendingExplosion = false; DoExplosion(); } } public void AddTempRespawn() { if (!((Object)(object)data?.stats == (Object)null) && !((Object)(object)player == (Object)null)) { int playerID = player.playerID; float time = Time.time; if (!lastRespawnTimeByPlayer.TryGetValue(playerID, out var value) || !(time - value < 1f)) { lastRespawnTimeByPlayer[playerID] = time; CharacterStatModifiers stats = data.stats; stats.respawns++; CharacterStatModifiers stats2 = data.stats; stats2.remainingRespawns++; respawnAdded = true; totalAddedThisRound++; } } } public bool TryConsumeRespawn() { if (!respawnAdded) { return false; } respawnAdded = false; return true; } public bool HasActiveRespawn() { return respawnAdded; } public void MarkPendingExplosion() { pendingExplosion = true; } public void ClearTempRespawn() { if (!((Object)(object)data?.stats == (Object)null)) { CharacterStatModifiers stats = data.stats; stats.respawns -= totalAddedThisRound; respawnAdded = false; totalAddedThisRound = 0; pendingExplosion = false; } } public void ShowSurgeText() { //IL_0064: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { int playerID = player.playerID; float time = Time.time; if (!lastTextTimeByPlayer.TryGetValue(playerID, out var value) || !(time - value < 1f)) { lastTextTimeByPlayer[playerID] = time; Vector3 position = ((Component)player).transform.position + new Vector3(0f, 0.5f, 0f); TextEffectPool.Show(position); } } } public void DoExplosion() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { return; } GameObject kamikazeVisual = KamikazeMono.kamikazeVisual; if ((Object)(object)kamikazeVisual != (Object)null) { Object.Instantiate(kamikazeVisual, ((Component)player).transform.position, Quaternion.identity); } Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); Player[] array = PlayerManager.instance.players.ToArray(); Player[] array2 = array; foreach (Player val2 in array2) { if (val2.teamID == player.teamID) { continue; } float num = Vector2.Distance(val, Vector2.op_Implicit(((Component)val2).transform.position)); bool canSee = PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)player).transform.position), val2).canSee; if (num < 15f && canSee) { HealthHandler component = ((Component)val2).GetComponent(); if ((Object)(object)component != (Object)null) { ((Damagable)component).TakeDamage(200f * Vector2.down, Vector2.op_Implicit(((Component)val2).transform.position), ((Component)player.data.weaponHandler).gameObject, player, true, false); Vector3 val3 = ((Component)val2).transform.position - Vector2.op_Implicit(val); component.TakeForce(Vector2.op_Implicit(((Vector3)(ref val3)).normalized * 12000f), (ForceMode2D)1, true, false, 0.8f); } } } } private void OnDestroy() { if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } } public static void ClearStaticData() { lastRespawnTimeByPlayer.Clear(); lastTextTimeByPlayer.Clear(); } } public class GravityFieldMono : MonoBehaviour { private Player player = null; private float pullForce = 100f; private float maxDistance = 30f; private float minDistance = 2f; private float deadZone = 5f; private float weakZoneEnd = 10f; private int stacks = 1; private static FieldInfo simulatedField; private static FieldInfo velocityField; private static bool reflectionInitialized; public void Start() { player = ((Component)this).GetComponent(); if (!reflectionInitialized) { simulatedField = typeof(PlayerVelocity).GetField("simulated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); velocityField = typeof(PlayerVelocity).GetField("velocity", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); reflectionInitialized = true; } } public void FixedUpdate() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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) if ((Object)(object)player == (Object)null || !player.data.isPlaying || player.data.dead) { return; } Vector3 position = ((Component)this).transform.position; foreach (Player player in PlayerManager.instance.players) { if (player.playerID != this.player.playerID && IsValidTarget(player)) { PullPlayer(player, position); } } } private bool IsValidTarget(Player target) { if ((Object)(object)target == (Object)null) { return false; } if ((Object)(object)target.data == (Object)null) { return false; } if (!target.data.isPlaying) { return false; } if (target.data.dead) { return false; } if (target.data.health <= 0f) { return false; } if ((Object)(object)target.data.playerVel != (Object)null && simulatedField != null && !(bool)simulatedField.GetValue(target.data.playerVel)) { return false; } return true; } private void PullPlayer(Player target, Vector3 myPosition) { //IL_001d: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)target).gameObject.GetComponent() != (Object)null) { return; } Vector3 val = myPosition - ((Component)target).transform.position; float magnitude = ((Vector3)(ref val)).magnitude; if (!(magnitude > maxDistance) && !(magnitude < minDistance)) { float num2; if (magnitude < deadZone) { float num = (magnitude - minDistance) / (deadZone - minDistance); num2 = pullForce * num * 0.1f; } else if (magnitude < weakZoneEnd) { float num3 = (magnitude - deadZone) / (weakZoneEnd - deadZone); num2 = pullForce * (0.1f + num3 * 0.2f); } else { num2 = pullForce * 0.3f; } num2 *= Time.fixedDeltaTime * (float)stacks; Vector2 val2 = Vector2.op_Implicit(((Vector3)(ref val)).normalized * num2); PlayerVelocity playerVel = target.data.playerVel; if ((Object)(object)playerVel != (Object)null && velocityField != null) { Vector2 val3 = (Vector2)velocityField.GetValue(playerVel); val3 += val2; velocityField.SetValue(playerVel, val3); } } } public void AddStack() { stacks++; } public bool RemoveStack() { stacks--; return stacks <= 0; } private void OnDestroy() { } } public class PlanetRegenMono : MonoBehaviour { public Player player; public int stackCount = 0; private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && player.data.isPlaying && !(player.data.health >= player.data.maxHealth)) { float num = player.data.maxHealth * 0.01f * (float)stackCount * TimeHandler.deltaTime; player.data.healthHandler.Heal(num); } } } public class RollbackMono : MonoBehaviour { private struct HealthSnapshot { public float health; public float time; } [CompilerGenerated] private sealed class d__18 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public RollbackMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__18(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float ROLLBACK_TIME = 3f; private const float BASE_COOLDOWN = 25f; private const float COOLDOWN_REDUCTION_PER_STACK = 3f; private const float RECORD_INTERVAL = 0.1f; private const float HISTORY_DURATION = 4f; public int stackCount = 1; private Player player; private Block block; private CharacterData data; private float cooldownRemaining = 0f; private bool isReady = true; private float lastRecordTime = 0f; private LinkedList healthHistory = new LinkedList(); private Action blockAction; private CooldownUI cooldownUI; private void Start() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("+", (Color?)new Color(1f, 0.4f, 0.4f)); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__18))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__18(0) { <>4__this = this, gm = gm }; } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { return; } if (data.dead) { CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } return; } if (Time.time - lastRecordTime >= 0.1f) { RecordHealthSnapshot(); lastRecordTime = Time.time; } CleanOldHistory(); if (!isReady) { cooldownRemaining -= Time.deltaTime; if (cooldownRemaining <= 0f) { cooldownRemaining = 0f; isReady = true; } } if (data.view.IsMine) { UpdateUI(); } } private void ResetState() { healthHistory?.Clear(); cooldownRemaining = 0f; isReady = true; lastRecordTime = 0f; CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } private void RecordHealthSnapshot() { if (!((Object)(object)data == (Object)null) && healthHistory != null) { healthHistory.AddLast(new HealthSnapshot { health = data.health, time = Time.time }); } } private void CleanOldHistory() { if (healthHistory != null) { float num = Time.time - 4f; while (healthHistory.Count > 0 && healthHistory.First.Value.time < num) { healthHistory.RemoveFirst(); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Invalid comparison between Unknown and I4 if (!((Object)(object)data == (Object)null) && !data.dead && isReady && data.view.IsMine && (int)triggerType <= 0 && healthHistory != null && healthHistory.Count != 0) { float num = Time.time - 3f; float time = healthHistory.First.Value.time; float targetTime = Mathf.Max(num, time); float? num2 = FindHealthAtTime(targetTime); if (num2.HasValue && !(num2.Value <= data.health)) { NetworkingManager.RPC(typeof(RollbackMono), "RPC_RestoreHealth", new object[2] { player.playerID, num2.Value }); isReady = false; cooldownRemaining = GetCooldown(); } } } [UnboundRPC] public static void RPC_RestoreHealth(int playerID, float health) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player x) => x.playerID == playerID)); if ((Object)(object)val != (Object)null) { RollbackMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)val.data != (Object)null && !val.data.dead) { component.RestoreHealthLocal(health); } } } private void RestoreHealthLocal(float health) { if (!((Object)(object)data == (Object)null) && !data.dead) { float maxHealth = data.maxHealth; data.health = Mathf.Min(health, maxHealth); SpawnHealEffect(); healthHistory?.Clear(); } } private float? FindHealthAtTime(float targetTime) { if (healthHistory == null || healthHistory.Count == 0) { return null; } HealthSnapshot? healthSnapshot = null; float num = float.MaxValue; foreach (HealthSnapshot item in healthHistory) { float num2 = Mathf.Abs(item.time - targetTime); if (num2 < num) { num = num2; healthSnapshot = item; } } return healthSnapshot?.health; } private float GetCooldown() { return Mathf.Max(25f - (float)(stackCount - 1) * 3f, 10f); } public void AddStack() { stackCount++; } public void RemoveStack() { stackCount = Mathf.Max(0, stackCount - 1); } private void UpdateUI() { if (!((Object)(object)cooldownUI == (Object)null)) { if (!isReady && cooldownRemaining > 0f) { cooldownUI.ShowCooldown(cooldownRemaining, GetCooldown()); } else { cooldownUI.Hide(); } } } private void SpawnHealEffect() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("HealEffect"); val.transform.position = ((Component)this).transform.position; HealEffectRunner healEffectRunner = val.AddComponent(); healEffectRunner.Run(((Component)this).transform); } private void OnDestroy() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } } public class HealEffectRunner : MonoBehaviour { private float life = 0.5f; private float timer = 0f; private Transform target; private SpriteRenderer sr; public void Run(Transform followTarget) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) target = followTarget; sr = ((Component)this).gameObject.AddComponent(); sr.sprite = CreateCircleSprite(); sr.color = new Color(0.3f, 1f, 0.5f, 0.6f); ((Renderer)sr).sortingLayerName = "MostFront"; ((Renderer)sr).sortingOrder = 50; ((Component)this).transform.localScale = Vector3.one * 0.5f; } private Sprite CreateCircleSprite() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) int num = 32; Texture2D val = new Texture2D(num, num); Color[] array = (Color[])(object)new Color[num * num]; float num2 = (float)num / 2f; float num3 = (float)num / 2f - 1f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num4 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); array[i * num + j] = ((num4 <= num3) ? Color.white : Color.clear); } } val.SetPixels(array); val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), (float)num); } private void Update() { //IL_006e: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = timer / life; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if ((Object)(object)target != (Object)null) { ((Component)this).transform.position = target.position; } ((Component)this).transform.localScale = Vector3.one * (0.5f + num * 2f); sr.color = new Color(0.3f, 1f, 0.5f, Mathf.Lerp(0.6f, 0f, num)); } } public class SidePortalEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public SidePortalEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this._pointActive = false; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__38 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public SidePortalEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; s_boundsLastRefresh = -999f; <>4__this._pointActive = true; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float MIN_UPWARD_VEL = 12f; private const float WALL_CHECK_RADIUS = 0.6f; private const float WALL_CHECK_Y_OFFSET = 0.2f; private const float HP_COST_PERCENT = 0.1f; private const float WRAP_SPAM_GUARD = 0.05f; public Player ownerPlayer; private CharacterData data; private OutOfBoundsHandler oobHandler; private Block block; private PlayerCollision playerCollision; private int playerLayerMask; private float wrapCooldown = 0f; private bool _pointActive = false; private float _lastBlockedLog = -99f; private const float UNIT_RATIO = 1f / 27f; private static float s_xMin = -35.56f; private static float s_xMax = 35.56f; private static float s_yMin = -20f; private static float s_yMax = 20f; private static float s_boundsLastRefresh = -999f; private const float BOUNDS_CACHE_TTL = 0.2f; private static float s_loggedXMin = float.MinValue; private static bool s_mapsExtProbed = false; private static MethodInfo s_getCustomMap = null; private static PropertyInfo s_settingsProp = null; private static PropertyInfo s_mapSizeProp = null; private static MethodInfo s_getMinX = null; private static MethodInfo s_getMaxX = null; private static MethodInfo s_getMinY = null; private static MethodInfo s_getMaxY = null; private static Material s_ghostMat; private static void ProbeMapExtensions() { if (s_mapsExtProbed) { return; } s_mapsExtProbed = true; try { Assembly assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "MapsExtended"); if (assembly == null) { return; } s_getCustomMap = assembly.GetType("MapsExt.MapManagerExtensions")?.GetMethod("GetCurrentCustomMap", BindingFlags.Static | BindingFlags.Public); Type type = assembly.GetType("MapsExt.CustomMap"); Type type2 = assembly.GetType("MapsExt.CustomMapSettings"); s_settingsProp = type?.GetProperty("Settings", BindingFlags.Instance | BindingFlags.Public); s_mapSizeProp = type2?.GetProperty("MapSize", BindingFlags.Instance | BindingFlags.Public); Type[] types = assembly.GetTypes(); foreach (Type type3 in types) { if (!(type3.Name != "OutOfBoundsHandler_Patch")) { s_getMinX = type3.GetMethod("GetMinX", BindingFlags.Static | BindingFlags.NonPublic); s_getMaxX = type3.GetMethod("GetMaxX", BindingFlags.Static | BindingFlags.NonPublic); s_getMinY = type3.GetMethod("GetMinY", BindingFlags.Static | BindingFlags.NonPublic); s_getMaxY = type3.GetMethod("GetMaxY", BindingFlags.Static | BindingFlags.NonPublic); break; } } } catch { } } private static void RefreshBoundsCache() { //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: 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_01d7: Unknown result type (might be due to invalid IL or missing references) ProbeMapExtensions(); if (s_getMinX != null && s_getMaxX != null && s_getMinY != null && s_getMaxY != null) { try { s_xMin = (float)s_getMinX.Invoke(null, null); s_xMax = (float)s_getMaxX.Invoke(null, null); s_yMin = (float)s_getMinY.Invoke(null, null); s_yMax = (float)s_getMaxY.Invoke(null, null); s_boundsLastRefresh = Time.time; if (s_xMin != s_loggedXMin) { s_loggedXMin = s_xMin; MrFuntikMod.Log($"[SidePortal] BOUNDS (MapsExt): X[{s_xMin:F2}, {s_xMax:F2}] Y[{s_yMin:F2}, {s_yMax:F2}]"); } return; } catch { } } float num = 35.56f; float num2 = 20f; try { if (s_getCustomMap != null) { object obj2 = s_getCustomMap.Invoke(null, new object[1] { MapManager.instance }); if (obj2 != null && s_settingsProp != null && s_mapSizeProp != null) { object value = s_settingsProp.GetValue(obj2); if (value != null) { object value2 = s_mapSizeProp.GetValue(value); if (value2 is Vector2) { Vector2 val = (Vector2)value2; if (true) { num = val.x * (1f / 27f) / 2f; num2 = val.y * (1f / 27f) / 2f; } } } } } } catch { } s_xMin = 0f - num; s_xMax = num; s_yMin = 0f - num2; s_yMax = num2; s_boundsLastRefresh = Time.time; if (s_xMin != s_loggedXMin) { s_loggedXMin = s_xMin; MrFuntikMod.Log($"[SidePortal] BOUNDS (fallback): X[{s_xMin:F2}, {s_xMax:F2}] Y[{s_yMin:F2}, {s_yMax:F2}]"); } } private static void GetBounds(out float xMin, out float xMax, out float yMin, out float yMax) { if (Time.time - s_boundsLastRefresh > 0.2f) { RefreshBoundsCache(); } xMin = s_xMin; xMax = s_xMax; yMin = s_yMin; yMax = s_yMax; } private static Material GetGhostMat() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown if ((Object)(object)s_ghostMat == (Object)null) { s_ghostMat = new Material(Shader.Find("Sprites/Default")); } return s_ghostMat; } private void Start() { if ((Object)(object)ownerPlayer == (Object)null) { ownerPlayer = ((Component)this).GetComponent(); } data = ownerPlayer?.data; Player obj = ownerPlayer; block = ((obj != null) ? ((Component)obj).GetComponent() : null); Player obj2 = ownerPlayer; playerCollision = ((obj2 != null) ? ((Component)obj2).GetComponent() : null); playerLayerMask = (((Object)(object)ownerPlayer != (Object)null) ? (1 << ((Component)ownerPlayer).gameObject.layer) : 0); GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data?.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnDestroy() { if ((Object)(object)oobHandler != (Object)null) { ((Behaviour)oobHandler).enabled = true; } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data?.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } } private void FindAndDisableOobHandler() { if ((Object)(object)oobHandler != (Object)null || (Object)(object)ownerPlayer == (Object)null) { return; } OutOfBoundsHandler[] array = Object.FindObjectsOfType(); foreach (OutOfBoundsHandler val in array) { object value = Traverse.Create((object)val).Field("data").GetValue(); if (((CharacterData)(((value is CharacterData) ? value : null)?)).player?.playerID == ownerPlayer.playerID) { oobHandler = val; ((Behaviour)oobHandler).enabled = false; break; } } } [IteratorStateMachine(typeof(d__38))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__39))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { <>4__this = this, gm = gm }; } private void OnRevive() { ResetState(); } private void ResetState() { wrapCooldown = 0f; } private void Update() { //IL_013b: 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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ownerPlayer == (Object)null || (Object)(object)data == (Object)null || data.dead || !data.isPlaying) { return; } if (!data.view.IsMine && !PhotonNetwork.OfflineMode) { if ((Object)(object)oobHandler != (Object)null && !((Behaviour)oobHandler).enabled) { ((Behaviour)oobHandler).enabled = true; } return; } if (!_pointActive && !PhotonNetwork.OfflineMode) { if ((Object)(object)oobHandler != (Object)null && !((Behaviour)oobHandler).enabled) { ((Behaviour)oobHandler).enabled = true; } return; } if ((Object)(object)oobHandler == (Object)null) { FindAndDisableOobHandler(); } wrapCooldown = Mathf.Max(0f, wrapCooldown - Time.deltaTime); Vector3 position = ((Component)ownerPlayer).transform.position; GetBounds(out var xMin, out var xMax, out var yMin, out var yMax); float num = position.x; float num2 = position.y; bool flag = false; bool flag2 = false; bool fromBottom = false; bool flag3 = false; if (position.x > xMax) { num = position.x - (xMax - xMin); flag = true; flag3 = true; } else if (position.x < xMin) { num = position.x + (xMax - xMin); flag = true; flag3 = true; } else if (position.y > yMax) { num2 = position.y - (yMax - yMin); flag2 = true; flag3 = true; } else if (position.y < yMin) { num2 = position.y + (yMax - yMin); fromBottom = true; flag3 = true; } if (!flag3) { if ((Object)(object)oobHandler != (Object)null && !((Behaviour)oobHandler).enabled) { ((Behaviour)oobHandler).enabled = true; } return; } if ((Object)(object)block != (Object)null && block.IsBlocking()) { if ((Object)(object)oobHandler != (Object)null && !((Behaviour)oobHandler).enabled) { ((Behaviour)oobHandler).enabled = true; } return; } float num3 = Mathf.Clamp(num, xMin + 0.2f, xMax - 0.2f); float num4 = (flag ? Mathf.Clamp(num2, yMin + 2f, yMax - 2f) : (flag2 ? (yMin + 2f) : (yMax - 2f))); int num5 = (((Object)(object)playerCollision != (Object)null) ? LayerMask.op_Implicit(playerCollision.mask) : LayerMask.GetMask(new string[1] { "Default" })) & ~playerLayerMask; Collider2D val = Physics2D.OverlapCircle(new Vector2(num3, num4 + 0.2f), 0.6f, num5); bool flag4 = (Object)(object)val != (Object)null; if (flag4 || wrapCooldown > 0f) { if (Time.time - _lastBlockedLog >= 1f) { _lastBlockedLog = Time.time; string text = (flag4 ? $"wall '{((Object)val).name}' (layer {((Component)val).gameObject.layer}) at check ({num3:F2}, {num4 + 0.2f:F2})" : $"cooldown {wrapCooldown:F3}s"); MrFuntikMod.Log($"[SidePortal] NO PORTAL: pos=({position.x:F2},{position.y:F2}) dest=({num3:F2},{num4:F2}) reason={text}"); } if ((Object)(object)oobHandler != (Object)null && !((Behaviour)oobHandler).enabled) { ((Behaviour)oobHandler).enabled = true; } } else { string text2 = ((!flag) ? (flag2 ? "top→bottom" : "bottom→top") : ((position.x > xMax) ? "right→left" : "left→right")); MrFuntikMod.Log($"[SidePortal] PORTAL: {text2} from ({position.x:F2},{position.y:F2}) → dest ({num:F2},{num2:F2}) bounds X[{xMin:F2},{xMax:F2}] Y[{yMin:F2},{yMax:F2}]"); if ((Object)(object)oobHandler != (Object)null) { ((Behaviour)oobHandler).enabled = false; } TryWrap(new Vector3(num, num2, position.z), flag, flag2, fromBottom); } } private void TryWrap(Vector3 destPos, bool isXAxis, bool fromTop, bool fromBottom) { //IL_0011: 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_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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0270: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: 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_0207: Unknown result type (might be due to invalid IL or missing references) GetBounds(out var xMin, out var xMax, out var yMin, out var yMax); destPos.x = Mathf.Clamp(destPos.x, xMin + 0.2f, xMax - 0.2f); if (!isXAxis) { destPos.y = (fromTop ? (yMin + 2f) : (yMax - 2f)); } else { destPos.y = Mathf.Clamp(destPos.y, yMin + 2f, yMax - 2f); } int num = (((Object)(object)playerCollision != (Object)null) ? LayerMask.op_Implicit(playerCollision.mask) : LayerMask.GetMask(new string[1] { "Default" })) & ~playerLayerMask; Collider2D val = Physics2D.OverlapCircle(new Vector2(destPos.x, destPos.y + 0.2f), 0.6f, num); if ((Object)(object)val != (Object)null) { MrFuntikMod.Log($"[SidePortal] SAFETY ABORT: dest ({destPos.x:F2},{destPos.y + 0.2f:F2}) hit '{((Object)val).name}' (layer {((Component)val).gameObject.layer})"); if ((Object)(object)oobHandler != (Object)null) { ((Behaviour)oobHandler).enabled = true; } return; } wrapCooldown = 0.05f; Vector3 position = ((Component)ownerPlayer).transform.position; PlayerCollision obj = playerCollision; if (obj != null) { obj.IgnoreWallForFrames(2); } Rigidbody2D component = ((Component)ownerPlayer).GetComponent(); if ((Object)(object)component != (Object)null) { Vector2 velocity = component.velocity; if (fromTop && velocity.y < 12f) { velocity.y = 12f; } if (fromBottom) { velocity.y = 0f; } component.velocity = velocity; component.position = new Vector2(destPos.x, destPos.y); } ((Component)ownerPlayer).transform.position = destPos; MrFuntikMod.Log($"[SidePortal] RPC SENT: player {ownerPlayer.playerID} dest ({destPos.x:F2},{destPos.y:F2}) from ({position.x:F2},{position.y:F2})"); if (PhotonNetwork.OfflineMode) { RPCA_WrapPlayer(ownerPlayer.playerID, destPos.x, destPos.y, destPos.z, fromTop, fromBottom, position.x, position.y); return; } NetworkingManager.RPC(typeof(SidePortalEffect), "RPCA_WrapPlayer", new object[8] { ownerPlayer.playerID, destPos.x, destPos.y, destPos.z, fromTop, fromBottom, position.x, position.y }); } [UnboundRPC] public static void RPCA_WrapPlayer(int playerID, float x, float y, float z, bool fromTop, bool fromBottom, float oldX, float oldY) { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_0132: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: 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) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if ((Object)(object)val == (Object)null || val.data.dead) { return; } PlayerCollision component = ((Component)val).GetComponent(); if (component != null) { component.IgnoreWallForFrames(2); } Rigidbody2D component2 = ((Component)val).GetComponent(); if ((Object)(object)component2 != (Object)null) { Vector2 velocity = component2.velocity; if (fromTop && velocity.y < 12f) { velocity.y = 12f; } if (fromBottom) { velocity.y = 0f; } component2.velocity = velocity; component2.position = new Vector2(x, y); } ((Component)val).transform.position = new Vector3(x, y, z); MrFuntikMod.Log($"[SidePortal] RPC RECV: player {playerID} placed at ({x:F2},{y:F2})"); PlayerCollision component3 = ((Component)val).GetComponent(); int num = (((Object)(object)component3 != (Object)null) ? LayerMask.op_Implicit(component3.mask) : LayerMask.GetMask(new string[1] { "Default" })) & ~(1 << ((Component)val).gameObject.layer); CircleCollider2D component4 = ((Component)val).GetComponent(); float num2 = (((Object)(object)component4 != (Object)null) ? (component4.radius * ((Component)val).transform.localScale.x) : 0.5f); if ((Object)(object)Physics2D.OverlapCircle(new Vector2(x, y), num2 + 0.1f, num) != (Object)null) { Vector2 val2 = FindSafeExit(new Vector2(x, y), num2, num); MrFuntikMod.Log($"[SidePortal] WALL PENETRATION: inside wall at ({x:F2},{y:F2}) → safe exit ({val2.x:F2},{val2.y:F2})"); ((Component)val).transform.position = new Vector3(val2.x, val2.y, z); if ((Object)(object)component2 != (Object)null) { component2.position = val2; } } else { MrFuntikMod.Log($"[SidePortal] TELEPORT OK: player {playerID} at ({x:F2},{y:F2}) — no wall overlap"); } SpawnPortalGhost(val, new Vector3(oldX, oldY, z)); if (val.data.view.IsMine || PhotonNetwork.OfflineMode) { float num3 = val.data.maxHealth * 0.1f; MrFuntikMod.Log($"[SidePortal] HP COST: -{num3:F1} (before: {val.data.health:F1} / {val.data.maxHealth:F1})"); ((Damagable)val.data.healthHandler).CallTakeDamage(Vector2.up * num3, Vector2.op_Implicit(((Component)val).transform.position), (GameObject)null, (Player)null, true); } } private static Vector2 FindSafeExit(Vector2 insidePos, float radius, int wallMask) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0085: 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_009b: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_01ac: 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) GetBounds(out var xMin, out var xMax, out var yMin, out var yMax); float num = 15f; Vector2[] obj = new Vector2[8] { Vector2.right, Vector2.left, Vector2.up, Vector2.down, default(Vector2), default(Vector2), default(Vector2), default(Vector2) }; Vector2 val = new Vector2(1f, 1f); obj[4] = ((Vector2)(ref val)).normalized; val = new Vector2(-1f, 1f); obj[5] = ((Vector2)(ref val)).normalized; val = new Vector2(1f, -1f); obj[6] = ((Vector2)(ref val)).normalized; val = new Vector2(-1f, -1f); obj[7] = ((Vector2)(ref val)).normalized; Vector2[] array = (Vector2[])(object)obj; float num2 = float.MaxValue; Vector2 result = insidePos; Vector2[] array2 = array; foreach (Vector2 val2 in array2) { RaycastHit2D val3 = Physics2D.Raycast(insidePos + val2 * num, -val2, num, wallMask); if ((Object)(object)((RaycastHit2D)(ref val3)).collider == (Object)null) { continue; } Vector2 val4 = ((RaycastHit2D)(ref val3)).point + val2 * (radius + 0.2f); if (!(val4.x < xMin) && !(val4.x > xMax) && !(val4.y < yMin) && !(val4.y > yMax) && !((Object)(object)Physics2D.OverlapCircle(val4, radius * 0.9f, wallMask) != (Object)null)) { float num3 = Vector2.Distance(insidePos, val4); if (num3 < num2) { num2 = num3; result = val4; } } } return result; } private static void SpawnPortalGhost(Player player, Vector3 atPosition) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0019: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("PortalGhost"); GhostEffectRunner ghostEffectRunner = val.AddComponent(); Color color = player.GetTeamColors().color; SpriteRenderer componentInChildren = ((Component)player).GetComponentInChildren(); ghostEffectRunner.Run(atPosition, ((Component)player).transform.localScale, componentInChildren, GetGhostMat(), color); } } public class SoulPiercerMono : MonoBehaviour { public int stackCount = 1; public void AddStack() { stackCount++; } public void RemoveStack() { stackCount--; } } public class SwapStrikeMono : MonoBehaviour { [CompilerGenerated] private sealed class d__20 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public SwapStrikeMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__20(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__19 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public SwapStrikeMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); 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 static readonly Color swapColor = new Color(1f, 0.54f, 0.12f, 1f); private Player player; private CharacterData data; private Block block; private Gun gun; private bool isOn = false; private Transform particleTransform; private ParticleSystem[] parts; private SoundEvent soundSpawn; private SoundEvent soundShoot; private Action blockAction; private Action shootAction; private ReversibleColorEffect colorEffect; public bool IsCharged { get; private set; } = false; private void Start() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); gun = data.weaponHandler.gun; GameObject val = (GameObject)Resources.Load("0 cards/Empower"); if ((Object)(object)val != (Object)null) { GameObject addObjectToPlayer = val.GetComponent().AddObjectToPlayer; if ((Object)(object)addObjectToPlayer != (Object)null) { Empower component = addObjectToPlayer.GetComponent(); if ((Object)(object)component != (Object)null) { soundSpawn = component.soundEmpowerSpawn; GameObject addObjectToBullet = component.addObjectToBullet; if ((Object)(object)addObjectToBullet != (Object)null) { SoundUnityEventPlayer component2 = addObjectToBullet.GetComponent(); if ((Object)(object)component2 != (Object)null) { soundShoot = component2.soundStart; } } } if (addObjectToPlayer.transform.childCount > 0) { GameObject gameObject = ((Component)addObjectToPlayer.transform.GetChild(0)).gameObject; particleTransform = Object.Instantiate(gameObject, ((Component)this).transform).transform; parts = ((Component)particleTransform).GetComponentsInChildren(); ParticleSystem[] array = parts; foreach (ParticleSystem val2 in array) { if ((Object)(object)val2 != (Object)null) { MainModule main = val2.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(swapColor); } } } } } if (parts == null) { parts = (ParticleSystem[])(object)new ParticleSystem[0]; } blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); shootAction = OnShoot; gun.ShootPojectileAction = (Action)Delegate.Combine(gun.ShootPojectileAction, shootAction); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); GameModeManager.AddHook("BattleStart", (Func)OnBattleStart); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__19))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__19(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__20))] private IEnumerator OnBattleStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__20(0) { <>4__this = this, gm = gm }; } private void ResetState() { IsCharged = false; isOn = false; SwapStrikeSpeedEffect component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } if (parts != null) { ParticleSystem[] array = parts; foreach (ParticleSystem val in array) { if ((Object)(object)val != (Object)null) { val.Stop(); } } } if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); colorEffect = null; } } private void OnBlock(BlockTriggerType triggerType) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 if ((int)triggerType != 3 && (int)triggerType != 4 && (int)triggerType != 2 && !((Object)(object)data == (Object)null) && !data.dead) { IsCharged = true; if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } } private void OnShoot(GameObject projectile) { if (IsCharged && !((Object)(object)projectile == (Object)null) && !((Object)(object)data == (Object)null) && !data.dead) { IsCharged = false; SwapBulletMarker swapBulletMarker = projectile.GetComponent(); if ((Object)(object)swapBulletMarker == (Object)null) { swapBulletMarker = projectile.AddComponent(); } swapBulletMarker.Initialize(player.playerID); if ((Object)(object)soundShoot != (Object)null) { SoundManager.Instance.PlayAtPosition(soundShoot, SoundManager.Instance.GetTransform(), ((Component)this).transform); } } } private void Update() { //IL_009a: 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_0189: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { return; } if (data.dead) { if (isOn) { ResetState(); } } else if (IsCharged) { if ((Object)(object)particleTransform != (Object)null && (Object)(object)gun != (Object)null) { particleTransform.position = ((Component)data.weaponHandler.gun).transform.position; particleTransform.rotation = ((Component)data.weaponHandler.gun).transform.rotation; } if (isOn) { return; } if ((Object)(object)soundSpawn != (Object)null) { SoundManager.Instance.PlayAtPosition(soundSpawn, SoundManager.Instance.GetTransform(), ((Component)this).transform); } if (parts != null) { ParticleSystem[] array = parts; foreach (ParticleSystem val in array) { if ((Object)(object)val != (Object)null) { val.Play(); } } } if ((Object)(object)colorEffect == (Object)null) { colorEffect = ((Component)player).gameObject.AddComponent(); ((ColorEffect)colorEffect).SetColor(swapColor); colorEffect.SetLivesToEffect(1); } isOn = true; } else { if (!isOn) { return; } if (parts != null) { ParticleSystem[] array2 = parts; foreach (ParticleSystem val2 in array2) { if ((Object)(object)val2 != (Object)null) { val2.Stop(); } } } if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); colorEffect = null; } isOn = false; } } private void OnDestroy() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } if ((Object)(object)gun != (Object)null && shootAction != null) { gun.ShootPojectileAction = (Action)Delegate.Remove(gun.ShootPojectileAction, shootAction); } GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); GameModeManager.RemoveHook("BattleStart", (Func)OnBattleStart); if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); colorEffect = null; } if ((Object)(object)particleTransform != (Object)null) { Object.Destroy((Object)(object)((Component)particleTransform).gameObject); } } } public class SwapStrikeSpeedEffect : ReversibleEffect { private SwapStrikeMono mono; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { base.applyImmediately = false; mono = ((Component)this).GetComponent(); base.gunStatModifier.projectileSpeed_mult = 2f; ((ReversibleEffect)this).ApplyModifiers(); } public override void OnUpdate() { if ((Object)(object)mono == (Object)null || !mono.IsCharged) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } Object.Destroy((Object)(object)this); } } public override void OnOnDestroy() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } } } public class SwapBulletMarker : RayHitEffect { private int ownerPlayerID = -1; private bool hasSwapped = false; private ProjectileHit projectileHit; public void Initialize(int playerID) { ownerPlayerID = playerID; hasSwapped = false; } private void Start() { projectileHit = ((Component)this).GetComponent(); if ((Object)(object)projectileHit != (Object)null && projectileHit.effects != null) { projectileHit.effects.Insert(0, (RayHitEffect)(object)this); } ApplyVisuals(); } private void ApplyVisuals() { //IL_0032: 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_0059: 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_009a: 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_00a6: 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) Color val = default(Color); ((Color)(ref val))..ctor(1f, 0.54f, 0.12f, 1f); if ((Object)(object)projectileHit != (Object)null) { projectileHit.projectileColor = val; } SpriteRenderer[] componentsInChildren = ((Component)this).GetComponentsInChildren(); foreach (SpriteRenderer val2 in componentsInChildren) { if ((Object)(object)val2 != (Object)null) { val2.color = val; } } TrailRenderer[] componentsInChildren2 = ((Component)this).GetComponentsInChildren(); foreach (TrailRenderer val3 in componentsInChildren2) { if ((Object)(object)val3 != (Object)null) { val3.startColor = val; val3.endColor = new Color(val.r, val.g, val.b, 0f); } } SetTeamColor[] componentsInChildren3 = ((Component)this).GetComponentsInChildren(); foreach (SetTeamColor val4 in componentsInChildren3) { ((Behaviour)val4).enabled = false; } } public override HasToReturn DoHitEffect(HitInfo hit) { //IL_000e: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: 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_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0233: 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_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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) if (hasSwapped) { return (HasToReturn)1; } if (hit == null || (Object)(object)hit.transform == (Object)null) { return (HasToReturn)1; } Player val = ((Component)hit.transform).GetComponent() ?? ((Component)hit.transform).GetComponentInParent(); if ((Object)(object)val == (Object)null) { return (HasToReturn)1; } if (val.playerID == ownerPlayerID) { return (HasToReturn)1; } Player val2 = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == ownerPlayerID)); if ((Object)(object)val2 == (Object)null) { return (HasToReturn)1; } if ((Object)(object)val2.data == (Object)null || val2.data.dead) { return (HasToReturn)1; } if ((Object)(object)val.data == (Object)null || val.data.dead) { return (HasToReturn)1; } bool flag = PhotonNetwork.OfflineMode; if (!flag && (Object)(object)val2.data.view != (Object)null) { flag = val2.data.view.IsMine; } if (!flag) { return (HasToReturn)1; } hasSwapped = true; Vector3 position = ((Component)val2).transform.position; Vector3 position2 = ((Component)val).transform.position; if (PhotonNetwork.OfflineMode) { RPC_DoSwap(ownerPlayerID, val.playerID, position.x, position.y, position.z, position2.x, position2.y, position2.z); } else { NetworkingManager.RPC(typeof(SwapBulletMarker), "RPC_DoSwap", new object[8] { ownerPlayerID, val.playerID, position.x, position.y, position.z, position2.x, position2.y, position2.z }); } return (HasToReturn)1; } [UnboundRPC] public static void RPC_DoSwap(int attackerID, int targetID, float ax, float ay, float az, float tx, float ty, float tz) { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0177: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: 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_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == attackerID)); Player val2 = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == targetID)); if (!((Object)(object)val == (Object)null) && !((Object)(object)val2 == (Object)null) && !val.data.dead && !val2.data.dead) { Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(ax, ay, az); Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(tx, ty, tz); PlayerCollision component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.IgnoreWallForFrames(5); } Rigidbody2D component2 = ((Component)val).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity = Vector2.zero; } ((Component)val).transform.position = val4; PlayerCollision component3 = ((Component)val2).GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.IgnoreWallForFrames(5); } Rigidbody2D component4 = ((Component)val2).GetComponent(); if ((Object)(object)component4 != (Object)null) { component4.velocity = Vector2.zero; } ((Component)val2).transform.position = val3; Color effectColor = default(Color); ((Color)(ref effectColor))..ctor(1f, 0.54f, 0.12f, 1f); TeleportPlayerGhostEffect.Create(val, val3); TeleportPlayerGhostEffect.Create(val2, val4); TeleportPathEffect.Create(val3, val4, effectColor, ((Component)val).transform.localScale.x, 0.45f, val); TeleportPathEffect.Create(val4, val3, effectColor, ((Component)val2).transform.localScale.x, 0.45f, val2); SpawnSwapWave(val, val3, ((Component)val).transform.localScale.x); SpawnSwapWave(val2, val4, ((Component)val2).transform.localScale.x); } } private static void SpawnSwapWave(Player owner, Vector3 position, float playerScale = 1f) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: 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_0041: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("SwapWave"); val.transform.position = position; DiamondWaveEffect diamondWaveEffect = val.AddComponent(); diamondWaveEffect.owner = owner; diamondWaveEffect.color = new Color(1f, 0.54f, 0.12f, 1f); diamondWaveEffect.maxRadius = 2f * playerScale; } } public class DiamondWaveEffect : MonoBehaviour { public Color color = new Color(1f, 0.54f, 0.12f, 1f); public Player owner; private float life = 0.65f; private float timer = 0f; public float maxRadius = 2f; private LineRenderer line; private void Start() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) line = ((Component)this).gameObject.AddComponent(); line.useWorldSpace = false; line.loop = true; line.startWidth = 0.25f; line.endWidth = 0.25f; ((Renderer)line).material = new Material(Shader.Find("Sprites/Default")); line.startColor = color; line.endColor = color; ((Renderer)line).sortingLayerName = "MostFront"; ((Renderer)line).sortingOrder = 50; line.positionCount = 4; UpdateDiamond(0.1f); } private void UpdateDiamond(float radius) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_006c: Unknown result type (might be due to invalid IL or missing references) line.SetPosition(0, new Vector3(0f, radius, 0f)); line.SetPosition(1, new Vector3(radius, 0f, 0f)); line.SetPosition(2, new Vector3(0f, 0f - radius, 0f)); line.SetPosition(3, new Vector3(0f - radius, 0f, 0f)); } private void Update() { //IL_00e6: 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) if ((Object)(object)owner != (Object)null && (Object)(object)owner.data != (Object)null && owner.data.dead) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } timer += Time.deltaTime; float num = timer / life; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float radius = Mathf.Lerp(0.1f, maxRadius, num); UpdateDiamond(radius); Color val = default(Color); ((Color)(ref val))..ctor(color.r, color.g, color.b, Mathf.Lerp(1f, 0f, num)); line.startColor = val; line.endColor = val; line.startWidth = Mathf.Lerp(0.25f, 0.04f, num); line.endWidth = line.startWidth; } } public class ThornShieldMono : MonoBehaviour { [CompilerGenerated] private sealed class d__19 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ThornShieldMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float EFFECT_DURATION = 3f; private const float BASE_COOLDOWN = 13f; private const float REFLECT_PERCENT = 0.1f; public int stackCount = 1; private Player player; private Block block; private CharacterData data; private float cooldownRemaining = 0f; private float effectEndTime = 0f; private bool isReady = true; private Action blockAction; private CooldownUI cooldownUI; private GameObject shieldVisual; private LineRenderer shieldLine; private static bool isReflecting; public bool IsEffectActive => Time.time < effectEndTime; public float ReflectPercent => 0.1f * (float)stackCount; private void Start() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("*", (Color?)new Color(0.4f, 0.8f, 0.4f)); } CreateShieldVisual(); GameModeManager.AddHook("PointStart", (Func)OnPointStart); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__19))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__19(0) { <>4__this = this, gm = gm }; } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null) { HideAllUI(); HideShieldVisual(); return; } if (data.dead) { HideAllUI(); HideShieldVisual(); return; } if (!isReady) { cooldownRemaining -= Time.deltaTime; if (cooldownRemaining <= 0f) { cooldownRemaining = 0f; isReady = true; } } UpdateShieldVisual(); if (data.view.IsMine) { UpdateUI(); } } private void OnDisable() { HideAllUI(); HideShieldVisual(); } private void HideAllUI() { CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } private void ResetState() { cooldownRemaining = 0f; effectEndTime = 0f; isReady = true; HideAllUI(); HideShieldVisual(); } private void OnBlock(BlockTriggerType triggerType) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Invalid comparison between Unknown and I4 if (!((Object)(object)data == (Object)null) && !data.dead && isReady && data.view.IsMine && (int)triggerType <= 0) { NetworkingManager.RPC(typeof(ThornShieldMono), "RPC_ActivateThornShield", new object[2] { player.playerID, 3f }); isReady = false; cooldownRemaining = 13f; } } [UnboundRPC] public static void RPC_ActivateThornShield(int playerID, float duration) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player x) => x.playerID == playerID)); if ((Object)(object)val != (Object)null) { ThornShieldMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)val.data != (Object)null && !val.data.dead) { component.ActivateEffect(duration); } } } private void ActivateEffect(float duration) { effectEndTime = Time.time + duration; } public void AddStack() { stackCount++; } public void RemoveStack() { stackCount = Mathf.Max(0, stackCount - 1); } public static void TryReflectDamage(Player victim, Vector2 damage, Player attacker) { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) if (isReflecting || (Object)(object)victim == (Object)null || (Object)(object)attacker == (Object)null || (Object)(object)victim == (Object)(object)attacker || !victim.data.view.IsMine) { return; } ThornShieldMono component = ((Component)victim).GetComponent(); if ((Object)(object)component == (Object)null || !component.IsEffectActive) { return; } float num = ((Vector2)(ref damage)).magnitude * component.ReflectPercent; if (num <= 0f) { return; } HealthHandler component2 = ((Component)attacker).GetComponent(); if ((Object)(object)component2 == (Object)null) { return; } isReflecting = true; try { Vector2 val = Vector2.down * num; ((Damagable)component2).CallTakeDamage(val, Vector2.op_Implicit(((Component)attacker).transform.position), ((Component)victim.data.weaponHandler.gun).gameObject, victim, true); NetworkingManager.RPC(typeof(ThornShieldMono), "RPC_ShowReflectEffect", new object[3] { attacker.playerID, ((Component)attacker).transform.position.x, ((Component)attacker).transform.position.y }); } finally { isReflecting = false; } } [UnboundRPC] public static void RPC_ShowReflectEffect(int attackerID, float posX, float posY) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player x) => x.playerID == attackerID)); if ((Object)(object)val != (Object)null) { SpawnReflectEffect(new Vector3(posX, posY, 0f), val); } } private static void SpawnReflectEffect(Vector3 position, Player target) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("ThornReflectEffect"); val.transform.position = position; ThornReflectEffectRunner thornReflectEffectRunner = val.AddComponent(); thornReflectEffectRunner.Initialize(target); } private void CreateShieldVisual() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0033: 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_00a2: Expected O, but got Unknown //IL_015f: 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_01bb: Unknown result type (might be due to invalid IL or missing references) shieldVisual = new GameObject("ThornShieldVisual"); shieldVisual.transform.SetParent(((Component)this).transform); shieldVisual.transform.localPosition = Vector3.zero; shieldLine = shieldVisual.AddComponent(); shieldLine.useWorldSpace = false; shieldLine.loop = true; ((Renderer)shieldLine).sortingLayerName = "MostFront"; ((Renderer)shieldLine).sortingOrder = 50; ((Renderer)shieldLine).material = new Material(Shader.Find("Sprites/Default")); shieldLine.startWidth = 0.1f; shieldLine.endWidth = 0.1f; int num = 10; float num2 = 1.1f; float num3 = 0.25f; int num4 = 3; int positionCount = num * num4; shieldLine.positionCount = positionCount; for (int i = 0; i < num; i++) { float num5 = (float)i / (float)num * MathF.PI * 2f; float num6 = ((float)i + 0.5f) / (float)num * MathF.PI * 2f; float num7 = ((float)i + 1f) / (float)num * MathF.PI * 2f; int num8 = i * num4; shieldLine.SetPosition(num8, new Vector3(Mathf.Cos(num5) * num2, Mathf.Sin(num5) * num2, 0f)); shieldLine.SetPosition(num8 + 1, new Vector3(Mathf.Cos(num6) * (num2 + num3), Mathf.Sin(num6) * (num2 + num3), 0f)); shieldLine.SetPosition(num8 + 2, new Vector3(Mathf.Cos(num7) * num2, Mathf.Sin(num7) * num2, 0f)); } shieldVisual.SetActive(false); } private void UpdateShieldVisual() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)shieldVisual == (Object)null)) { if (IsEffectActive && !data.dead) { shieldVisual.SetActive(true); Color color = player.GetTeamColors().color; float num = 0.8f + 0.2f * Mathf.Sin(Time.time * 5f); float num2 = effectEndTime - Time.time; float num3 = Mathf.Clamp01(num2 / 0.5f); Color val = default(Color); ((Color)(ref val))..ctor(color.r, color.g, color.b, 0.6f * num * num3); shieldLine.startColor = val; shieldLine.endColor = val; shieldVisual.transform.Rotate(Vector3.forward, Time.deltaTime * 30f); float x = ((Component)this).transform.localScale.x; shieldVisual.transform.localScale = Vector3.one * x * num; } else { shieldVisual.SetActive(false); } } } private void HideShieldVisual() { if ((Object)(object)shieldVisual != (Object)null) { shieldVisual.SetActive(false); } } private void UpdateUI() { //IL_0048: 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) if (!((Object)(object)cooldownUI == (Object)null)) { if (IsEffectActive) { float num = effectEndTime - Time.time; cooldownUI.SetIcon("⬡", (Color?)new Color(0.2f, 1f, 0.2f)); cooldownUI.ShowCooldown(num, 3f); } else if (!isReady && cooldownRemaining > 0f) { cooldownUI.SetIcon("⬡", (Color?)new Color(0.5f, 0.5f, 0.5f)); cooldownUI.ShowCooldown(cooldownRemaining, 13f); } else { cooldownUI.Hide(); } } } private void OnDestroy() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } if ((Object)(object)shieldVisual != (Object)null) { Object.Destroy((Object)(object)shieldVisual); } } } public class ThornReflectEffectRunner : MonoBehaviour { private float lifetime = 0.5f; private float timer = 0f; private List spikes = new List(); private Player target; private static Sprite cachedSpikeSprite; public void Initialize(Player targetPlayer) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_006d: 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_00ce: Unknown result type (might be due to invalid IL or missing references) target = targetPlayer; int num = 6; float num2 = 1.2f; for (int i = 0; i < num; i++) { float num3 = (float)i / (float)num * MathF.PI * 2f; GameObject val = new GameObject("Spike"); val.transform.SetParent(((Component)this).transform); float num4 = Mathf.Cos(num3) * num2; float num5 = Mathf.Sin(num3) * num2; val.transform.localPosition = new Vector3(num4, num5, 0f); val.transform.rotation = Quaternion.Euler(0f, 0f, num3 * 57.29578f - 90f); SpriteRenderer val2 = val.AddComponent(); val2.sprite = GetSpikeSprite(); val2.color = new Color(1f, 0.3f, 0.3f, 0.9f); ((Renderer)val2).sortingLayerName = "MostFront"; ((Renderer)val2).sortingOrder = 100; spikes.Add(val2); } } private Sprite GetSpikeSprite() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)cachedSpikeSprite != (Object)null) { return cachedSpikeSprite; } Texture2D val = new Texture2D(16, 32); Color[] array = (Color[])(object)new Color[512]; for (int i = 0; i < 32; i++) { for (int j = 0; j < 16; j++) { float num = (float)i / 32f; float num2 = (1f - num) * 8f; float num3 = 8f; if (Mathf.Abs((float)j - num3) <= num2) { array[i * 16 + j] = Color.white; } else { array[i * 16 + j] = Color.clear; } } } val.SetPixels(array); val.Apply(); cachedSpikeSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 32f), new Vector2(0.5f, 0f), 32f); return cachedSpikeSprite; } private void Update() { //IL_0074: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; if (timer >= lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if ((Object)(object)target != (Object)null && !target.data.dead) { ((Component)this).transform.position = ((Component)target).transform.position; } float num = timer / lifetime; foreach (SpriteRenderer spike in spikes) { if (!((Object)(object)spike == (Object)null)) { ((Component)spike).transform.localPosition = Vector3.Lerp(((Component)spike).transform.localPosition, Vector3.zero, Time.deltaTime * 8f); Color color = spike.color; color.a = Mathf.Lerp(0.9f, 0f, num); spike.color = color; ((Component)spike).transform.localScale = Vector3.one * Mathf.Lerp(1f, 0.3f, num); } } } } public class BlockCooldownEnforcer : MonoBehaviour { private float updateTimer = 0f; private const float UPDATE_INTERVAL = 1f; private Player player; private void Start() { player = ((Component)this).GetComponent(); } private void Update() { updateTimer += Time.deltaTime; if (updateTimer < 1f) { return; } updateTimer = 0f; if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.block == (Object)null)) { float num = (float)player.data.block.additionalBlocks * 0.2f + 1.5f; if (player.data.block.cooldown < num) { player.data.block.cooldown = num; } } } } public class ImmunizeMono : BlockCooldownEnforcer { } public class DominionMono : BlockCooldownEnforcer { } public static class TrailFirePool { private static Stack pool = new Stack(); private static Transform poolContainer; private const int INITIAL_POOL_SIZE = 30; private const int MAX_POOL_SIZE = 200; private static bool isInitialized = false; public static void EnsureInitialized() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (!isInitialized || !((Object)(object)poolContainer != (Object)null)) { GameObject val = new GameObject("TrailFirePool"); Object.DontDestroyOnLoad((Object)(object)val); poolContainer = val.transform; for (int i = 0; i < 30; i++) { TrailFire trailFire = CreateNew(); ((Component)trailFire).gameObject.SetActive(false); pool.Push(trailFire); } isInitialized = true; } } private static TrailFire CreateNew() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("TrailFire"); val.transform.SetParent(poolContainer); TrailFire trailFire = val.AddComponent(); trailFire.CreateVisuals(); return trailFire; } public static TrailFire Get() { EnsureInitialized(); TrailFire trailFire = ((pool.Count > 0) ? pool.Pop() : CreateNew()); ((Component)trailFire).gameObject.SetActive(true); return trailFire; } public static void Return(TrailFire fire) { if (!((Object)(object)fire == (Object)null)) { fire.Deactivate(); if (pool.Count < 200 && (Object)(object)poolContainer != (Object)null) { ((Component)fire).transform.SetParent(poolContainer); ((Component)fire).gameObject.SetActive(false); pool.Push(fire); } else { Object.Destroy((Object)(object)((Component)fire).gameObject); } } } public static void ReturnAllActive() { TrailFire[] array = Object.FindObjectsOfType(); TrailFire[] array2 = array; foreach (TrailFire trailFire in array2) { if ((Object)(object)trailFire != (Object)null && ((Component)trailFire).gameObject.activeInHierarchy) { Return(trailFire); } } TrailFire.ClearActiveFiresList(); } } public class TrailFire : MonoBehaviour { private static List activeFires = new List(); private Player owner; private int ownerID; private int ownerTeamID; private float duration; private float burnDuration; private float burnDamagePerTick; private float spawnTime; private float lastContactCheckTime; private bool isActive = false; public const float MERGE_RADIUS = 0.5f; private const float CONTACT_RADIUS = 0.9f; private const float CONTACT_CHECK_INTERVAL = 0.1f; private const int FLAME_COUNT = 4; private const int SPARK_COUNT = 4; private const float SIZE_MULT = 1.5f; private static readonly Collider2D[] _overlapBuf = (Collider2D[])(object)new Collider2D[16]; public static readonly Color FRIENDLY_COLOR = new Color(0f, 1f, 0.1f); public static readonly Color ENEMY_COLOR = new Color(0.6f, 0.15f, 1f); private static readonly Color GLOW_BASE_COLOR = new Color(1f, 0.3f, 0f, 0.6f); private static readonly Color SPARK_BASE_COLOR = new Color(1f, 0.8f, 0.2f, 0.8f); private Color currentGlowColor; private Color currentSparkColor; private SpriteRenderer glowSprite; private LineRenderer[] flameLines; private SpriteRenderer[] sparkSprites; private Transform[] sparkTransforms; private Transform glowTransform; private float[] flameOffsets; private float[] flameSpeeds; private float[] flameHeights; private float[] sparkPhases; private float[] sparkSpeeds; private float baseGlowSize; private float flameBaseOffsetMultiplier; private static Material sharedMaterial; private static Sprite circleSprite; public static TrailFire FindNearestFire(Vector3 position, float radius, int ownerID) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) TrailFire result = null; float num = radius * radius; for (int num2 = activeFires.Count - 1; num2 >= 0; num2--) { TrailFire trailFire = activeFires[num2]; if ((Object)(object)trailFire == (Object)null || !trailFire.isActive) { activeFires.RemoveAt(num2); } else if (trailFire.ownerID == ownerID) { Vector3 val = ((Component)trailFire).transform.position - position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; result = trailFire; } } } return result; } public static void ClearActiveFiresList() { activeFires.Clear(); } public void Reinforce() { spawnTime = Time.time; } public void ResetDuration() { spawnTime = Time.time; } public void Activate(Player owner, float duration, float burnDuration, float burnDamagePerTick = 0.025f) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) this.owner = owner; ownerID = (((Object)(object)owner != (Object)null) ? owner.playerID : (-1)); ownerTeamID = (((Object)(object)owner != (Object)null) ? owner.teamID : (-1)); this.duration = duration; this.burnDuration = burnDuration; this.burnDamagePerTick = burnDamagePerTick; spawnTime = Time.time; lastContactCheckTime = Time.time; isActive = true; if (!activeFires.Contains(this)) { activeFires.Add(this); } SetupVisuals(GetFireColorForLocalPlayer()); } public void Deactivate() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) isActive = false; owner = null; activeFires.Remove(this); ((Component)this).transform.SetParent((Transform)null); ((Component)this).transform.position = Vector3.zero; ((Component)this).transform.rotation = Quaternion.identity; ((Component)this).transform.localScale = Vector3.one; currentGlowColor = GLOW_BASE_COLOR; currentSparkColor = SPARK_BASE_COLOR; if ((Object)(object)glowSprite != (Object)null) { ((Renderer)glowSprite).enabled = false; } for (int i = 0; i < 4; i++) { if ((Object)(object)flameLines[i] != (Object)null) { ((Renderer)flameLines[i]).enabled = false; } } for (int j = 0; j < 4; j++) { if ((Object)(object)sparkSprites[j] != (Object)null) { ((Renderer)sparkSprites[j]).enabled = false; } } } private void Update() { if (!isActive) { return; } if ((Object)(object)GameManager.instance == (Object)null || !GameManager.instance.battleOngoing) { TrailFirePool.Return(this); return; } try { if ((Object)(object)((Component)this).transform.parent != (Object)null && !Object.op_Implicit((Object)(object)((Component)((Component)this).transform.parent).gameObject)) { TrailFirePool.Return(this); return; } } catch (MissingReferenceException) { TrailFirePool.Return(this); return; } float num = Time.time - spawnTime; if (num >= duration) { TrailFirePool.Return(this); return; } float num2 = duration - num; float fadeMultiplier = ((num2 >= 0.5f) ? 1f : (num2 / 0.5f)); UpdateGlow(fadeMultiplier); UpdateFlames(fadeMultiplier); UpdateSparks(fadeMultiplier); if (Time.time >= lastContactCheckTime + 0.1f) { CheckContactBurn(); lastContactCheckTime = Time.time; } } private void CheckContactBurn() { //IL_008f: 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_009a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null || (Object)(object)owner.data == (Object)null || owner.data.dead) { owner = FindPlayerByID(ownerID); if ((Object)(object)owner == (Object)null || (Object)(object)owner.data == (Object)null || owner.data.dead) { return; } } Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); int num = Physics2D.OverlapCircleNonAlloc(val, 0.9f, _overlapBuf); for (int i = 0; i < num; i++) { Collider2D val2 = _overlapBuf[i]; if (!((Object)(object)val2 == (Object)null)) { Player componentInParent = ((Component)val2).GetComponentInParent(); if (!((Object)(object)componentInParent == (Object)null) && !((Object)(object)componentInParent.data == (Object)null) && !componentInParent.data.dead && ((Component)componentInParent).gameObject.activeInHierarchy && componentInParent.playerID != ownerID && componentInParent.teamID != owner.teamID) { ApplyBurnEffect(componentInParent); } } } } private void ApplyBurnEffect(Player victim) { if (!((Object)(object)victim == (Object)null) && !((Object)(object)owner == (Object)null)) { NetworkingManager.RPC(typeof(TrailFire), "RPC_ApplyBurn", new object[4] { owner.playerID, victim.playerID, burnDuration, burnDamagePerTick }); } } [UnboundRPC] public static void RPC_ApplyBurn(int ownerID, int victimID, float burnDuration, float burnDamagePerTick) { List players = PlayerManager.instance.players; Player val = null; Player val2 = null; for (int i = 0; i < players.Count; i++) { if (!((Object)(object)players[i] == (Object)null)) { if (players[i].playerID == ownerID) { val = players[i]; } if (players[i].playerID == victimID) { val2 = players[i]; } } } if (!((Object)(object)val == (Object)null) && !((Object)(object)val2 == (Object)null)) { BurnEffect component = ((Component)val2).GetComponent(); if ((Object)(object)component != (Object)null) { component.RefreshDuration(burnDuration, burnDamagePerTick); return; } BurnEffect burnEffect = ((Component)val2).gameObject.AddComponent(); burnEffect.Apply(val, burnDuration, burnDamagePerTick); } } private static Player FindPlayerByID(int playerID) { if (playerID < 0 || (Object)(object)PlayerManager.instance == (Object)null) { return null; } List players = PlayerManager.instance.players; for (int i = 0; i < players.Count; i++) { if ((Object)(object)players[i] != (Object)null && players[i].playerID == playerID) { return players[i]; } } return null; } public void CreateVisuals() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_00b1: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) EnsureSharedResources(); GameObject val = new GameObject("Glow"); glowTransform = val.transform; glowTransform.SetParent(((Component)this).transform); glowTransform.localPosition = Vector3.zero; glowSprite = val.AddComponent(); glowSprite.sprite = circleSprite; glowSprite.color = GLOW_BASE_COLOR; ((Renderer)glowSprite).sortingOrder = -1; flameLines = (LineRenderer[])(object)new LineRenderer[4]; flameBaseOffsetMultiplier = 0.089999996f; for (int i = 0; i < 4; i++) { GameObject val2 = new GameObject($"F{i}"); val2.transform.SetParent(((Component)this).transform); val2.transform.localPosition = Vector3.zero; val2.transform.localRotation = Quaternion.identity; LineRenderer val3 = val2.AddComponent(); ((Renderer)val3).material = sharedMaterial; val3.positionCount = 5; val3.useWorldSpace = false; ((Renderer)val3).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val3).receiveShadows = false; ((Renderer)val3).sortingOrder = 1; flameLines[i] = val3; } sparkSprites = (SpriteRenderer[])(object)new SpriteRenderer[4]; sparkTransforms = (Transform[])(object)new Transform[4]; for (int j = 0; j < 4; j++) { GameObject val4 = new GameObject($"S{j}"); sparkTransforms[j] = val4.transform; sparkTransforms[j].SetParent(((Component)this).transform); sparkSprites[j] = val4.AddComponent(); sparkSprites[j].sprite = circleSprite; sparkSprites[j].color = SPARK_BASE_COLOR; ((Renderer)sparkSprites[j]).sortingOrder = 2; } flameOffsets = new float[4]; flameSpeeds = new float[4]; flameHeights = new float[4]; sparkPhases = new float[4]; sparkSpeeds = new float[4]; } private static void EnsureSharedResources() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } if (!((Object)(object)circleSprite == (Object)null)) { return; } Texture2D val = new Texture2D(32, 32); Color[] array = (Color[])(object)new Color[1024]; Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(16f, 16f); float num = 16f; for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { float num2 = (float)j - val2.x; float num3 = (float)i - val2.y; float num4 = Mathf.Clamp01(1f - Mathf.Sqrt(num2 * num2 + num3 * num3) / num); array[i * 32 + j] = new Color(1f, 1f, 1f, num4 * num4); } } val.SetPixels(array); val.Apply(); circleSprite = Sprite.Create(val, new Rect(0f, 0f, 32f, 32f), new Vector2(0.5f, 0.5f), 32f); } private void SetupVisuals(Color fireColor) { //IL_0029: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) baseGlowSize = 0.82500005f; glowTransform.localScale = new Vector3(baseGlowSize, baseGlowSize * 0.25f, 1f); ((Renderer)glowSprite).enabled = true; float num = default(float); float num2 = default(float); float num3 = default(float); Color.RGBToHSV(fireColor, ref num, ref num2, ref num3); Color val = default(Color); Color color = default(Color); if (num > 0.2f && num < 0.45f) { val = Color.HSVToRGB(num, 1f, 1f); color = val; } else { ((Color)(ref val))..ctor(0.8f, 0.3f, 1f); ((Color)(ref color))..ctor(1f, 0.5f, 1f); } val.a = 0.8f; glowSprite.color = val; float num4 = 0.21000001f; float num5 = 0.75f; Gradient colorGradient = CreateTeamFlameGradient(fireColor); for (int i = 0; i < 4; i++) { ((Renderer)flameLines[i]).enabled = true; flameOffsets[i] = Random.Range(0f, MathF.PI * 2f); flameSpeeds[i] = Random.Range(8f, 12f); flameHeights[i] = num5 * (0.8f + (float)i * 0.1f); flameLines[i].colorGradient = colorGradient; AnimationCurve val2 = new AnimationCurve(); val2.AddKey(0f, num4); val2.AddKey(0.3f, 0.15f); val2.AddKey(1f, 0f); flameLines[i].widthCurve = val2; } color.a = 1f; for (int j = 0; j < 4; j++) { ((Renderer)sparkSprites[j]).enabled = true; sparkSprites[j].color = color; sparkTransforms[j].localScale = Vector3.one * 0.05f * 1.5f; sparkPhases[j] = Random.Range(0f, MathF.PI * 2f); sparkSpeeds[j] = Random.Range(3f, 6f); } currentGlowColor = val; currentSparkColor = color; } private Gradient CreateTeamFlameGradient(Color teamColor) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_0107: Unknown result type (might be due to invalid IL or missing references) //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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) Gradient val = new Gradient(); float num = default(float); float num2 = default(float); float num3 = default(float); Color.RGBToHSV(teamColor, ref num, ref num2, ref num3); Color val3 = default(Color); Color val4 = default(Color); Color val5 = default(Color); Color val6 = default(Color); if (num > 0.2f && num < 0.45f) { Color val2 = Color.HSVToRGB(num, 1f, 1f); val3 = val2; val4 = val2; val5 = val2 * 0.75f; val6 = val2 * 0.3f; } else { ((Color)(ref val3))..ctor(1f, 0.4f, 1f); ((Color)(ref val4))..ctor(0.7f, 0.2f, 1f); ((Color)(ref val5))..ctor(0.4f, 0.1f, 0.8f); ((Color)(ref val6))..ctor(0.2f, 0.05f, 0.4f); } val.SetKeys((GradientColorKey[])(object)new GradientColorKey[4] { new GradientColorKey(val3, 0f), new GradientColorKey(val4, 0.25f), new GradientColorKey(val5, 0.6f), new GradientColorKey(val6, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.9f, 0.25f), new GradientAlphaKey(0.5f, 0.6f), new GradientAlphaKey(0f, 1f) }); return val; } private void UpdateGlow(float fadeMultiplier) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)glowSprite == (Object)null)) { Color color = currentGlowColor; color.a = 0.6f * fadeMultiplier; glowSprite.color = color; float num = 1f + Mathf.Sin(Time.time * 15f) * 0.1f; float num2 = baseGlowSize * fadeMultiplier * num; glowTransform.localScale = new Vector3(num2, num2 * 0.25f, 1f); } } private void UpdateFlames(float fadeMultiplier) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0135: 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) float num = 1.5f; for (int i = 0; i < 4; i++) { LineRenderer val = flameLines[i]; if (!((Object)(object)val == (Object)null) && ((Renderer)val).enabled) { float num2 = Time.time * flameSpeeds[i] + flameOffsets[i]; float num3 = flameHeights[i] * fadeMultiplier; float num4 = ((float)i - num) * flameBaseOffsetMultiplier + Mathf.Sin(num2 * 0.5f) * 0.015f * 1.5f; val.SetPosition(0, new Vector3(num4, 0.01f, 0f)); val.SetPosition(1, new Vector3(num4 + Mathf.Sin(num2) * 0.025f * 1.5f, num3 * 0.25f, 0f)); val.SetPosition(2, new Vector3(num4 + Mathf.Sin(num2 * 1.3f + 0.5f) * 0.04f * 1.5f, num3 * 0.5f, 0f)); val.SetPosition(3, new Vector3(num4 + Mathf.Sin(num2 * 1.1f + 1f) * 0.05f * 1.5f, num3 * 0.75f, 0f)); val.SetPosition(4, new Vector3(num4 + Mathf.Sin(num2 * 0.9f + 1.5f) * 0.03f * 1.5f, num3, 0f)); } } } private void UpdateSparks(float fadeMultiplier) { //IL_0092: 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_00a3: 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_00e7: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 4; i++) { SpriteRenderer val = sparkSprites[i]; if (!((Object)(object)val == (Object)null) && ((Renderer)val).enabled) { float num = Time.time * sparkSpeeds[i] + sparkPhases[i]; float num2 = num % 1.5f * 0.6667f; sparkTransforms[i].localPosition = new Vector3(Mathf.Sin(num * 3f) * 0.12f * 1.5f, num2 * 0.4f * fadeMultiplier * 1.5f + 0.02f, 0f); Color color = currentSparkColor; color.a = (1f - num2) * fadeMultiplier * 0.8f; val.color = color; float num3 = 0.06f * (1f - num2 * 0.5f); sparkTransforms[i].localScale = new Vector3(num3, num3, num3); } } } private Color GetFireColorForLocalPlayer() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_008a: 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) if ((Object)(object)PlayerManager.instance == (Object)null) { return ENEMY_COLOR; } List players = PlayerManager.instance.players; for (int i = 0; i < players.Count; i++) { Player val = players[i]; if ((Object)(object)val != (Object)null && (Object)(object)val.data != (Object)null && (Object)(object)val.data.view != (Object)null && val.data.view.IsMine) { return (val.teamID == ownerTeamID) ? FRIENDLY_COLOR : ENEMY_COLOR; } } return ENEMY_COLOR; } } public static class TextEffectPool where T : FloatingTextEffect { private static readonly Stack pool = new Stack(); private static Transform poolContainer = null; private const int MAX_POOL_SIZE = 10; public static int PoolSize => pool.Count; private static void EnsureContainer() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown if ((Object)(object)poolContainer == (Object)null) { GameObject val = new GameObject("TextEffectPool_" + typeof(T).Name); Object.DontDestroyOnLoad((Object)(object)val); poolContainer = val.transform; } } public static T Get() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown EnsureContainer(); T val; if (pool.Count > 0) { val = pool.Pop(); } else { GameObject val2 = new GameObject(typeof(T).Name); Object.DontDestroyOnLoad((Object)(object)val2); val = val2.AddComponent(); } ((Component)val).gameObject.SetActive(true); return val; } public static void Return(T effect) { if (!((Object)(object)effect == (Object)null)) { ((Component)effect).gameObject.SetActive(false); if (pool.Count < 10) { ((Component)effect).transform.SetParent(poolContainer); pool.Push(effect); } else { Object.Destroy((Object)(object)((Component)effect).gameObject); } } } public static void Show(Vector3 position) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) T val = Get(); val.Activate(position); } } public abstract class FloatingTextEffect : MonoBehaviour { protected TextMesh textMesh = null; protected MeshRenderer meshRenderer = null; protected TextMesh[] outlineTexts = null; protected GameObject[] outlineObjects = null; protected float timer = 0f; protected Vector3 startPosition; protected bool isActive = false; protected const int OUTLINE_COUNT = 8; protected abstract string DisplayText { get; } protected abstract Color MainColor { get; } protected abstract Color OutlineColor { get; } protected virtual Color EndColor => new Color(MainColor.r * 0.5f, MainColor.g * 0.5f, MainColor.b * 0.5f, 0f); protected virtual float Lifetime => 1.4f; protected virtual float FloatSpeed => 2.5f; protected virtual int FontSize => 48; protected virtual float CharacterSize => 0.15f; protected virtual float OutlineOffset => 0.015f; protected virtual float InitialScale => 0.3f; protected virtual float MaxRotation => 15f; protected virtual void Awake() { CreateOutlines(); CreateMainText(); } private void CreateOutlines() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) outlineTexts = (TextMesh[])(object)new TextMesh[8]; outlineObjects = (GameObject[])(object)new GameObject[8]; for (int i = 0; i < 8; i++) { outlineObjects[i] = new GameObject($"Outline_{i}"); outlineObjects[i].transform.SetParent(((Component)this).transform); float num = (float)i / 8f * MathF.PI * 2f; outlineObjects[i].transform.localPosition = new Vector3(Mathf.Cos(num) * OutlineOffset, Mathf.Sin(num) * OutlineOffset, 0.01f); outlineTexts[i] = outlineObjects[i].AddComponent(); outlineTexts[i].text = DisplayText; outlineTexts[i].fontSize = FontSize; outlineTexts[i].characterSize = CharacterSize; outlineTexts[i].anchor = (TextAnchor)4; outlineTexts[i].alignment = (TextAlignment)1; outlineTexts[i].color = OutlineColor; outlineTexts[i].fontStyle = (FontStyle)1; MeshRenderer component = outlineObjects[i].GetComponent(); if ((Object)(object)component != (Object)null) { ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 499; } } } private void CreateMainText() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) textMesh = ((Component)this).gameObject.AddComponent(); textMesh.text = DisplayText; textMesh.fontSize = FontSize; textMesh.characterSize = CharacterSize; textMesh.anchor = (TextAnchor)4; textMesh.alignment = (TextAlignment)1; textMesh.color = MainColor; textMesh.fontStyle = (FontStyle)1; meshRenderer = ((Component)this).GetComponent(); if ((Object)(object)meshRenderer != (Object)null) { ((Renderer)meshRenderer).sortingLayerName = "MostFront"; ((Renderer)meshRenderer).sortingOrder = 500; } } public virtual void Activate(Vector3 position) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.position = position; startPosition = position; timer = 0f; isActive = true; textMesh.color = MainColor; for (int i = 0; i < 8; i++) { outlineTexts[i].color = OutlineColor; } ((Component)this).transform.localScale = Vector3.one * InitialScale; ((Component)this).transform.rotation = Quaternion.Euler(0f, 0f, Random.Range(0f - MaxRotation, MaxRotation)); ((Component)this).gameObject.SetActive(true); } protected virtual void Update() { if (isActive) { timer += Time.deltaTime; float num = timer / Lifetime; if (num >= 1f) { Deactivate(); return; } UpdatePosition(num); UpdateScale(num); UpdateAlpha(num); ApplyExtraEffects(num); } } protected virtual void UpdatePosition(float progress) { //IL_0029: 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_003e: Unknown result type (might be due to invalid IL or missing references) float num = 1f - Mathf.Pow(1f - progress, 2f); float num2 = num * FloatSpeed; ((Component)this).transform.position = startPosition + new Vector3(0f, num2, 0f); } protected virtual void UpdateScale(float progress) { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) float num2; if (progress < 0.1f) { float num = progress / 0.1f; num2 = InitialScale + num * (1.5f - InitialScale); } else if (progress < 0.2f) { float num3 = (progress - 0.1f) / 0.1f; num2 = 1.5f - num3 * 0.3f; } else if (progress < 0.7f) { float num4 = Mathf.Sin((progress - 0.2f) * 20f) * 0.05f; num2 = 1.2f + num4; } else { float num5 = (progress - 0.7f) / 0.3f; num2 = 1.2f - num5 * 0.4f; } ((Component)this).transform.localScale = Vector3.one * num2; } protected virtual void UpdateAlpha(float progress) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0060: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) float num; if (progress < 0.6f) { num = 1f; } else { num = 1f - (progress - 0.6f) / 0.4f; num = Mathf.Pow(num, 0.5f); } Color color = Color.Lerp(MainColor, EndColor, progress * 0.7f); color.a = num; textMesh.color = color; Color outlineColor = OutlineColor; outlineColor.a = num * 0.8f; for (int i = 0; i < 8; i++) { outlineTexts[i].color = outlineColor; } } protected virtual void ApplyExtraEffects(float progress) { //IL_0028: 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_003d: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Sin(timer * 12f) * 0.08f * (1f - progress); Transform transform = ((Component)this).transform; transform.position += new Vector3(num, 0f, 0f); } protected virtual void Deactivate() { isActive = false; ((Component)this).gameObject.SetActive(false); } } public class MissTextEffect : FloatingTextEffect { protected override string DisplayText => "MISS!"; protected override Color MainColor => new Color(1f, 1f, 0.2f, 1f); protected override Color OutlineColor => new Color(0.1f, 0.1f, 0.1f, 1f); protected override Color EndColor => new Color(1f, 0.5f, 0f, 0f); protected override void ApplyExtraEffects(float progress) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) base.ApplyExtraEffects(progress); float num = Mathf.Sin(timer * 8f) * 5f * (1f - progress); ((Component)this).transform.rotation = Quaternion.Euler(0f, 0f, num + Random.Range(-0.5f, 0.5f)); } } public class ExecuteTextEffect : FloatingTextEffect { protected override string DisplayText => "EXECUTED!"; protected override Color MainColor => new Color(1f, 0.1f, 0.1f, 1f); protected override Color OutlineColor => new Color(0.2f, 0f, 0f, 1f); protected override Color EndColor => new Color(0.5f, 0f, 0f, 0f); protected override float Lifetime => 1.6f; protected override float FloatSpeed => 2f; protected override int FontSize => 52; protected override float OutlineOffset => 0.02f; protected override float InitialScale => 0.2f; protected override float MaxRotation => 10f; protected override void UpdateScale(float progress) { //IL_0093: 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) float num2; if (progress < 0.08f) { float num = progress / 0.08f; num2 = 0.2f + num * 1.6f; } else if (progress < 0.15f) { float num3 = (progress - 0.08f) / 0.07f; num2 = 1.8f - num3 * 0.5f; } else if (progress < 0.65f) { num2 = 1.3f; } else { float num4 = (progress - 0.65f) / 0.35f; num2 = 1.3f - num4 * 0.5f; } ((Component)this).transform.localScale = Vector3.one * num2; } protected override void ApplyExtraEffects(float progress) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (progress < 0.2f) { float num = (1f - progress / 0.2f) * 0.1f; Transform transform = ((Component)this).transform; transform.position += new Vector3(Random.Range(0f - num, num), Random.Range(0f - num, num), 0f); } } } public class ReviveTextEffect : FloatingTextEffect { protected override string DisplayText => "I'll be back!"; protected override Color MainColor => new Color(1f, 1f, 1f, 1f); protected override Color OutlineColor => new Color(0.7f, 0.85f, 1f, 1f); protected override void ApplyExtraEffects(float progress) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0093: 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) float num = Mathf.Sin(timer * 15f) * 0.1f + 0.9f; Color color = textMesh.color; color.r *= num; color.g *= num; color.b *= num; textMesh.color = color; float num2 = Mathf.Sin(timer * 12f) * 0.08f * (1f - progress); Transform transform = ((Component)this).transform; transform.position += new Vector3(num2, 0f, 0f); } } public class PhoenixSurgeTextEffect : FloatingTextEffect { protected override string DisplayText => "Run it back. Boom"; protected override Color MainColor => new Color(1f, 0.2f, 0.1f, 1f); protected override Color OutlineColor => new Color(0.4f, 0.05f, 0f, 1f); protected override Color EndColor => new Color(1f, 0.5f, 0f, 0f); protected override float Lifetime => 1.6f; protected override int FontSize => 44; protected override void ApplyExtraEffects(float progress) { //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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (progress < 0.15f) { float num = (1f - progress / 0.15f) * 0.12f; Transform transform = ((Component)this).transform; transform.position += new Vector3(Random.Range(0f - num, num), Random.Range(0f - num, num), 0f); } else { float num2 = Mathf.Sin(timer * 20f) * 0.15f + 0.85f; Color color = textMesh.color; color.r *= num2; textMesh.color = color; } } } public class HealTextEffect : FloatingTextEffect { private string displayText = "+0"; protected override string DisplayText => displayText; protected override Color MainColor => new Color(0.25f, 1f, 0.35f, 1f); protected override Color OutlineColor => new Color(0f, 0.25f, 0.05f, 1f); protected override Color EndColor => new Color(0.1f, 0.6f, 0.15f, 0f); protected override float FloatSpeed => 2f; protected override float Lifetime => 1.1f; protected override int FontSize => 42; protected override float CharacterSize => 0.13f; public void SetAmount(float amount) { displayText = $"+{Mathf.RoundToInt(amount)}"; } public override void Activate(Vector3 position) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)textMesh != (Object)null) { textMesh.text = displayText; } if (outlineTexts != null) { for (int i = 0; i < outlineTexts.Length; i++) { if ((Object)(object)outlineTexts[i] != (Object)null) { outlineTexts[i].text = displayText; } } } base.Activate(position); } public static void Show(Vector3 position, float amount) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) HealTextEffect healTextEffect = TextEffectPool.Get(); healTextEffect.SetAmount(amount); healTextEffect.Activate(position); } } public class ShieldEffect : MonoBehaviour { private static Dictionary activeShields = new Dictionary(); public static void PlayShieldEffect(Player player, Color color, float duration = 1f, float targetRadius = 0.8f) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0063: 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_00bb: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { if (activeShields.TryGetValue(player.playerID, out GameObject value) && (Object)(object)value != (Object)null) { Object.Destroy((Object)(object)value); } GameObject val = new GameObject("ShieldEffect"); val.transform.SetParent(((Component)player).transform); val.transform.localPosition = Vector3.zero; LineRenderer val2 = val.AddComponent(); val2.useWorldSpace = false; val2.loop = true; val2.startWidth = 0.1f; val2.endWidth = 0.1f; val2.positionCount = 36; ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); val2.startColor = color; val2.endColor = color; ((Renderer)val2).sortingLayerName = "UI"; ((Renderer)val2).sortingOrder = 10000; for (int i = 0; i < 36; i++) { float num = (float)i / 36f * MathF.PI * 2f; val2.SetPosition(i, new Vector3(Mathf.Cos(num), Mathf.Sin(num), 0f)); } ShieldAnimator shieldAnimator = val.AddComponent(); shieldAnimator.Init(val2, color, duration, targetRadius, player.playerID); activeShields[player.playerID] = val; } } public static void RemoveShield(int playerID) { activeShields.Remove(playerID); } } public class ShieldAnimator : MonoBehaviour { private LineRenderer line; private Color baseColor; private float duration; private float targetRadius; private int playerID; private float startTime; public void Init(LineRenderer lr, Color color, float dur, float radius, int pid) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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) line = lr; baseColor = color; duration = dur; targetRadius = radius; playerID = pid; startTime = Time.time; ((Component)this).transform.localScale = Vector3.zero; } private void Update() { //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) float num = Time.time - startTime; float num2 = num / duration; if (num2 >= 1f) { ShieldEffect.RemoveShield(playerID); Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num4; float num5; if (num2 < 0.2f) { float num3 = num2 / 0.2f; num4 = targetRadius * (1f - Mathf.Pow(1f - num3, 2f)); num5 = num3; } else if (num2 < 0.7f) { float num6 = (num2 - 0.2f) / 0.5f; float num7 = 1f + Mathf.Sin(num6 * MathF.PI * 4f) * 0.05f; num4 = targetRadius * num7; num5 = 1f; } else { float num8 = (num2 - 0.7f) / 0.3f; num4 = targetRadius * (1f + num8 * 0.1f); num5 = 1f - num8; } ((Component)this).transform.localScale = Vector3.one * num4; ((Component)this).transform.Rotate(0f, 0f, Time.deltaTime * 45f); Color val = baseColor; val.a = num5 * 0.85f; line.startColor = val; line.endColor = val; } } public class TeleportPathEffect : MonoBehaviour { private const int RingSegments = 40; private static Material sharedMaterial; private LineRenderer path; private LineRenderer startRing; private LineRenderer endRing; private SpriteRenderer traveler; private Vector3 start; private Vector3 end; private Player owner; private Color color; private float timer; private float life; private float radius; public static GameObject Create(Vector3 from, Vector3 to, Color effectColor, float playerScale = 1f, float duration = 0.45f, Player owner = null) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0014: 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_0016: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("TeleportPathEffect"); TeleportPathEffect teleportPathEffect = val.AddComponent(); teleportPathEffect.Setup(from, to, effectColor, playerScale, duration, owner); return val; } private void Setup(Vector3 from, Vector3 to, Color effectColor, float playerScale, float duration, Player owner) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) start = from; end = to; this.owner = owner; color = effectColor; life = Mathf.Max(0.1f, duration); radius = Mathf.Max(0.35f, 0.9f * Mathf.Abs(playerScale)); ((Component)this).transform.position = Vector3.zero; path = CreateLine("Path", loop: false, 0.14f); path.useWorldSpace = true; path.positionCount = 2; path.SetPosition(0, start); path.SetPosition(1, end); startRing = CreateLine("StartRing", loop: true, 0.12f); endRing = CreateLine("EndRing", loop: true, 0.12f); ((Component)startRing).transform.position = start; ((Component)endRing).transform.position = end; DrawRing(startRing, radius * 0.45f); DrawRing(endRing, radius * 0.25f); GameObject val = new GameObject("Traveler"); val.transform.SetParent(((Component)this).transform, false); traveler = val.AddComponent(); traveler.sprite = Sprite.Create(Texture2D.whiteTexture, new Rect(0f, 0f, 1f, 1f), new Vector2(0.5f, 0.5f), 1f); ((Renderer)traveler).material = GetMaterial(); traveler.color = color; ((Renderer)traveler).sortingLayerName = "MostFront"; ((Renderer)traveler).sortingOrder = 61; val.transform.position = start; val.transform.localScale = Vector3.one * Mathf.Max(0.16f, radius * 0.18f); } private LineRenderer CreateLine(string name, bool loop, float width) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0030: 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) GameObject val = new GameObject(name); val.transform.SetParent(((Component)this).transform, false); LineRenderer val2 = val.AddComponent(); ((Renderer)val2).material = GetMaterial(); val2.startColor = color; val2.endColor = color; val2.startWidth = width; val2.endWidth = width; val2.loop = loop; val2.useWorldSpace = false; ((Renderer)val2).sortingLayerName = "MostFront"; ((Renderer)val2).sortingOrder = 60; return val2; } private static Material GetMaterial() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } return sharedMaterial; } private static void DrawRing(LineRenderer line, float ringRadius) { //IL_0037: 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) line.positionCount = 40; for (int i = 0; i < 40; i++) { float num = (float)i / 40f * MathF.PI * 2f; line.SetPosition(i, new Vector3(Mathf.Cos(num), Mathf.Sin(num), 0f) * ringRadius); } } private void Update() { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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_019a: 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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner != (Object)null && (Object)(object)owner.data != (Object)null && owner.data.dead) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } timer += Time.deltaTime; float num = Mathf.Clamp01(timer / life); float num2 = 1f - Mathf.Pow(1f - num, 2f); float num3 = Mathf.Lerp(0.9f, 0f, num); Color val = default(Color); ((Color)(ref val))..ctor(color.r, color.g, color.b, num3); path.startColor = val; path.endColor = val; path.startWidth = Mathf.Lerp(0.14f, 0.03f, num); path.endWidth = path.startWidth; float ringRadius = Mathf.Lerp(radius * 0.45f, radius * 0.9f, num); float ringRadius2 = Mathf.Lerp(radius * 0.25f, radius * 1.15f, num2); DrawRing(startRing, ringRadius); DrawRing(endRing, ringRadius2); startRing.startColor = val; startRing.endColor = val; endRing.startColor = val; endRing.endColor = val; startRing.startWidth = Mathf.Lerp(0.12f, 0.03f, num); startRing.endWidth = startRing.startWidth; endRing.startWidth = startRing.startWidth; endRing.endWidth = startRing.startWidth; if ((Object)(object)traveler != (Object)null) { ((Component)traveler).transform.position = Vector3.Lerp(start, end, num2); traveler.color = new Color(color.r, color.g, color.b, Mathf.Lerp(1f, 0f, num)); } if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class TeleportPlayerGhostEffect : MonoBehaviour { private static Material sharedMaterial; private SpriteRenderer spriteRenderer; private Player owner; private Color color; private Vector3 initialScale; private float timer; private float life = 0.8f; public static GameObject Create(Player player, Vector3 position) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { return null; } SpriteRenderer componentInChildren = ((Component)player).GetComponentInChildren(); if ((Object)(object)componentInChildren == (Object)null) { return null; } GameObject val = new GameObject("TeleportPlayerGhost"); TeleportPlayerGhostEffect teleportPlayerGhostEffect = val.AddComponent(); teleportPlayerGhostEffect.Setup(player, componentInChildren, position); return val; } private void Setup(Player player, SpriteRenderer source, Vector3 position) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) owner = player; ((Component)this).transform.position = position; ((Component)this).transform.localScale = ((Component)player).transform.localScale; initialScale = ((Component)this).transform.localScale; color = player.GetTeamColors().color; spriteRenderer = ((Component)this).gameObject.AddComponent(); spriteRenderer.sprite = source.sprite; spriteRenderer.flipX = source.flipX; ((Renderer)spriteRenderer).material = GetMaterial(); spriteRenderer.color = new Color(color.r, color.g, color.b, 0.6f); ((Renderer)spriteRenderer).sortingLayerName = "MostFront"; ((Renderer)spriteRenderer).sortingOrder = 40; } private static Material GetMaterial() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } return sharedMaterial; } private void Update() { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null || (Object)(object)owner.data == (Object)null || owner.data.dead) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } timer += Time.deltaTime; float num = timer / life; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } spriteRenderer.color = new Color(color.r, color.g, color.b, Mathf.Lerp(0.6f, 0f, num)); ((Component)this).transform.localScale = initialScale * (1f + num * 0.3f); } } public static class NothingTimerManager { private class PlayerTimerData { public List timerStartTimes = new List(); public bool hasItBecomesAll = false; public bool isTransforming = false; public bool isInReplaceOperation = false; } [CompilerGenerated] private sealed class d__25 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; public CardInfo targetCard; public int count; private int 5__1; private CardInfo 5__2; private List.Enumerator <>s__3; private CardInfo 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__25(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>s__3 = default(List.Enumerator); 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; SetIsInReplaceOperation(player, value: true); 5__1 = 0; break; case 1: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; case 2: <>1__state = -1; 5__2 = null; 5__1++; break; } if (5__1 < count) { 5__2 = null; <>s__3 = player.data.currentCards.GetEnumerator(); try { while (<>s__3.MoveNext()) { 5__4 = <>s__3.Current; if (5__4.cardName == "Nothing") { 5__2 = 5__4; break; } 5__4 = null; } } finally { ((IDisposable)<>s__3).Dispose(); } <>s__3 = default(List.Enumerator); if (!((Object)(object)5__2 == (Object)null)) { <>2__current = Cards.instance.ReplaceCard(player, 5__2, targetCard, "", 0f, 0f, (SelectionType)1, true); <>1__state = 1; return true; } } SetIsInReplaceOperation(player, value: false); CardBarUtils.instance.ShowAtEndOfPhase(player, targetCard); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; public CardInfo nothingCard; public CardInfo targetCard; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; SetIsInReplaceOperation(player, value: true); <>2__current = Cards.instance.ReplaceCard(player, nothingCard, targetCard, "", 0f, 0f, (SelectionType)2, true); <>1__state = 1; return true; case 1: <>1__state = -1; SetIsInReplaceOperation(player, value: false); CardBarUtils.instance.ShowAtEndOfPhase(player, targetCard); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__21 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; public CardInfo nothingCard; public CardInfo targetCard; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__21(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; SetIsInReplaceOperation(player, value: true); <>2__current = Cards.instance.ReplaceCard(player, nothingCard, targetCard, "", 0f, 0f, (SelectionType)1, true); <>1__state = 1; return true; case 1: <>1__state = -1; SetIsInReplaceOperation(player, value: false); SetIsTransforming(player, value: false); CardBarUtils.instance.ShowAtEndOfPhase(player, targetCard); 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(); } } public const float TRANSFORMATION_TIME = 600f; private static Dictionary playerData = new Dictionary(); private static PlayerTimerData GetOrCreatePlayerData(int playerID) { if (!playerData.ContainsKey(playerID)) { playerData[playerID] = new PlayerTimerData(); } return playerData[playerID]; } public static bool IsNewNothingCard(Player player, int currentNothingCount) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); return currentNothingCount > orCreatePlayerData.timerStartTimes.Count; } public static void RegisterTimer(Player player) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); orCreatePlayerData.timerStartTimes.Add(Time.time); } public static float GetOldestTimerElapsed(Player player) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); if (orCreatePlayerData.timerStartTimes.Count == 0) { return -1f; } return Time.time - orCreatePlayerData.timerStartTimes[0]; } public static void RemoveOldestTimer(Player player) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); if (orCreatePlayerData.timerStartTimes.Count > 0) { orCreatePlayerData.timerStartTimes.RemoveAt(0); } } public static int GetTimerCount(Player player) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); return orCreatePlayerData.timerStartTimes.Count; } public static bool HasItBecomesAll(Player player) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); return orCreatePlayerData.hasItBecomesAll; } public static void SetHasItBecomesAll(Player player, bool value) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); orCreatePlayerData.hasItBecomesAll = value; } public static bool IsTransforming(Player player) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); return orCreatePlayerData.isTransforming; } public static void SetIsTransforming(Player player, bool value) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); orCreatePlayerData.isTransforming = value; } public static bool IsInReplaceOperation(Player player) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); return orCreatePlayerData.isInReplaceOperation; } public static void SetIsInReplaceOperation(Player player, bool value) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); orCreatePlayerData.isInReplaceOperation = value; } public static void ClearAllTimers(Player player) { PlayerTimerData orCreatePlayerData = GetOrCreatePlayerData(player.playerID); int count = orCreatePlayerData.timerStartTimes.Count; orCreatePlayerData.timerStartTimes.Clear(); orCreatePlayerData.isTransforming = false; } public static void ClearAll() { playerData.Clear(); } private static CardInfo FindHiddenCard(string cardName) { string cardName2 = cardName; if (MrFuntikMod.hiddenCards == null || MrFuntikMod.hiddenCards.Count == 0) { return null; } CardInfo val = MrFuntikMod.hiddenCards.Find((CardInfo c) => c.cardName == cardName2); if ((Object)(object)val != (Object)null) { return val; } val = MrFuntikMod.hiddenCards.Find((CardInfo c) => c.cardName.EndsWith(cardName2)); if ((Object)(object)val != (Object)null) { return val; } return null; } public static void TransformOldestNothing(Player player, string targetCardName) { if (IsTransforming(player)) { return; } bool flag = PhotonNetwork.OfflineMode; if (!flag && (Object)(object)player.data.view != (Object)null) { flag = player.data.view.IsMine; } if (flag) { SetIsTransforming(player, value: true); if (PhotonNetwork.OfflineMode) { TransformOldestNothingInternal(player.playerID, targetCardName); return; } NetworkingManager.RPC(typeof(NothingTimerManager), "RPCA_TransformOldestNothing", new object[2] { player.playerID, targetCardName }); } } [UnboundRPC] public static void RPCA_TransformOldestNothing(int playerID, string targetCardName) { TransformOldestNothingInternal(playerID, targetCardName); } private static void TransformOldestNothingInternal(int playerID, string targetCardName) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if ((Object)(object)val == (Object)null) { return; } RemoveOldestTimer(val); CardInfo val2 = null; foreach (CardInfo currentCard in val.data.currentCards) { if (currentCard.cardName == "Nothing") { val2 = currentCard; break; } } if ((Object)(object)val2 == (Object)null) { SetIsTransforming(val, value: false); return; } CardInfo val3 = FindHiddenCard(targetCardName); if ((Object)(object)val3 == (Object)null) { SetIsTransforming(val, value: false); } else { ((MonoBehaviour)Unbound.Instance).StartCoroutine(TransformOldestNothingCoroutine(val, val2, val3)); } } [IteratorStateMachine(typeof(d__21))] private static IEnumerator TransformOldestNothingCoroutine(Player player, CardInfo nothingCard, CardInfo targetCard) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__21(0) { player = player, nothingCard = nothingCard, targetCard = targetCard }; } public static void TransformAllNothingsToAll(Player player) { bool flag = PhotonNetwork.OfflineMode; if (!flag && (Object)(object)player.data.view != (Object)null) { flag = player.data.view.IsMine; } if (!flag) { return; } int timerCount = GetTimerCount(player); if (timerCount != 0) { if (PhotonNetwork.OfflineMode) { TransformAllNothingsToAllInternal(player.playerID, timerCount); return; } NetworkingManager.RPC(typeof(NothingTimerManager), "RPCA_TransformAllNothingsToAll", new object[2] { player.playerID, timerCount }); } } [UnboundRPC] public static void RPCA_TransformAllNothingsToAll(int playerID, int count) { TransformAllNothingsToAllInternal(playerID, count); } private static void TransformAllNothingsToAllInternal(int playerID, int count) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if (!((Object)(object)val == (Object)null)) { ClearAllTimers(val); CardInfo val2 = FindHiddenCard("All"); if (!((Object)(object)val2 == (Object)null)) { ((MonoBehaviour)Unbound.Instance).StartCoroutine(TransformAllNothingsSequential(val, val2, count)); } } } [IteratorStateMachine(typeof(d__25))] private static IEnumerator TransformAllNothingsSequential(Player player, CardInfo targetCard, int count) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__25(0) { player = player, targetCard = targetCard, count = count }; } public static void TransformImmediatelyToAll(Player player) { bool flag = PhotonNetwork.OfflineMode; if (!flag && (Object)(object)player.data.view != (Object)null) { flag = player.data.view.IsMine; } if (flag) { if (PhotonNetwork.OfflineMode) { TransformImmediatelyToAllInternal(player.playerID); return; } NetworkingManager.RPC(typeof(NothingTimerManager), "RPCA_TransformImmediatelyToAll", new object[1] { player.playerID }); } } [UnboundRPC] public static void RPCA_TransformImmediatelyToAll(int playerID) { TransformImmediatelyToAllInternal(playerID); } private static void TransformImmediatelyToAllInternal(int playerID) { Player player = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if ((Object)(object)player == (Object)null) { return; } CardInfo targetCard = FindHiddenCard("All"); if ((Object)(object)targetCard == (Object)null) { return; } ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)Unbound.Instance, 0.2f, (Action)delegate { CardInfo val = null; foreach (CardInfo currentCard in player.data.currentCards) { if (currentCard.cardName == "Nothing") { val = currentCard; break; } } if (!((Object)(object)val == (Object)null)) { ((MonoBehaviour)Unbound.Instance).StartCoroutine(TransformImmediatelyCoroutine(player, val, targetCard)); } }); } [IteratorStateMachine(typeof(d__29))] private static IEnumerator TransformImmediatelyCoroutine(Player player, CardInfo nothingCard, CardInfo targetCard) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { player = player, nothingCard = nothingCard, targetCard = targetCard }; } } } namespace MrFuntikMod.Cards { public class AegisCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AegisShieldMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Aegis"; } protected override string GetDescription() { return "Blocking grants invulnerability for 2s."; } protected override GameObject? GetCardArt() { return Assets.Aegis_Art; } 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 = "Ability Cooldown", amount = "15s", 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)0; } public override string GetModName() { return "BFRM"; } } public class AllCard : CustomCard { public const string CardName = "All"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 2f; statModifiers.movementSpeed = 1.3f; statModifiers.regen = 10f; gun.damage = 1.5f; gun.ammo = 3; gun.attackSpeed = 0.5f; gun.reloadTime = 0.5f; block.additionalBlocks = 1; block.cdMultiplier = 0.7f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override bool GetEnabled() { return false; } protected override string GetTitle() { return "All"; } protected override string GetDescription() { return "Worth It"; } protected override GameObject GetCardArt() { return Assets.AllCardArt; } 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_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0060: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00b0: 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_00b8: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_0194: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[9] { new CardInfoStat { positive = true, stat = "Health", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Regen", amount = "+10", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+3", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Additional Blocks", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block Cooldown", 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)7; } public override string GetModName() { return "IS"; } } public class AmmoDropCard : CustomCard { private static readonly string[] BonusCardNames = new string[7] { "Ammo +1", "Ammo +2", "Ammo +3", "Ammo +4", "Ammo +5", "Ammo +6", "Ammo +7" }; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)PlayerManager.instance == (Object)null) && PlayerManager.instance.players != null && PlayerManager.instance.players.Count != 0 && PlayerManager.instance.players.Contains(player) && (PhotonNetwork.OfflineMode || data.view.IsMine)) { int num = Random.Range(1, 8); if (PhotonNetwork.OfflineMode) { ApplyBonusCardLocal(player, num); return; } NetworkingManager.RPC(typeof(AmmoDropCard), "RPC_ApplyBonusCard", new object[2] { player.playerID, num }); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } [UnboundRPC] public static void RPC_ApplyBonusCard(int playerID, int ammoBonus) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null) && PhotonNetwork.IsMasterClient) { string cardName = BonusCardNames[ammoBonus - 1]; CardInfo bonusCard = GetBonusCard(cardName); if (!((Object)(object)bonusCard == (Object)null)) { Cards.instance.AddCardToPlayer(val, bonusCard, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(val, bonusCard); } } } private static void ApplyBonusCardLocal(Player player, int ammoBonus) { string cardName = BonusCardNames[ammoBonus - 1]; CardInfo bonusCard = GetBonusCard(cardName); if (!((Object)(object)bonusCard == (Object)null)) { Cards.instance.AddCardToPlayer(player, bonusCard, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(player, bonusCard); } } private static CardInfo GetBonusCard(string cardName) { string cardName2 = cardName; if (MrFuntikMod.hiddenCards != null) { CardInfo val = MrFuntikMod.hiddenCards.Find((CardInfo c) => c.cardName == cardName2); if ((Object)(object)val != (Object)null) { return val; } } ReadOnlyCollection hiddenCards = Cards.instance.HiddenCards; foreach (CardInfo item in hiddenCards) { if (item.cardName == cardName2) { return item; } } return null; } protected override string GetTitle() { return "Ammo Drop"; } protected override string GetDescription() { return "Gain a random ammo bonus between 1 and 7."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } public override string GetModName() { return "BFRM"; } } public abstract class AmmoDropBonusBase : CustomCard { protected abstract int AmmoAmount { get; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.ammo = AmmoAmount; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class AmmoDrop_Bonus_1 : AmmoDropBonusBase { protected override int AmmoAmount => 1; protected override string GetTitle() { return "Ammo +1"; } protected override string GetDescription() { return "Bonus ammo from Ammo Drop."; } 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 = "Ammo", amount = "+1", simepleAmount = (SimpleAmount)0 } }; } } public class AmmoDrop_Bonus_2 : AmmoDropBonusBase { protected override int AmmoAmount => 2; protected override string GetTitle() { return "Ammo +2"; } protected override string GetDescription() { return "Bonus ammo from Ammo Drop."; } 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 = "Ammo", amount = "+2", simepleAmount = (SimpleAmount)0 } }; } } public class AmmoDrop_Bonus_3 : AmmoDropBonusBase { protected override int AmmoAmount => 3; protected override string GetTitle() { return "Ammo +3"; } protected override string GetDescription() { return "Bonus ammo from Ammo Drop."; } 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 = "Ammo", amount = "+3", simepleAmount = (SimpleAmount)0 } }; } } public class AmmoDrop_Bonus_4 : AmmoDropBonusBase { protected override int AmmoAmount => 4; protected override string GetTitle() { return "Ammo +4"; } protected override string GetDescription() { return "Bonus ammo from Ammo Drop."; } 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 = "Ammo", amount = "+4", simepleAmount = (SimpleAmount)0 } }; } } public class AmmoDrop_Bonus_5 : AmmoDropBonusBase { protected override int AmmoAmount => 5; protected override string GetTitle() { return "Ammo +5"; } protected override string GetDescription() { return "Bonus ammo from Ammo Drop."; } 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 = "Ammo", amount = "+5", simepleAmount = (SimpleAmount)0 } }; } } public class AmmoDrop_Bonus_6 : AmmoDropBonusBase { protected override int AmmoAmount => 6; protected override string GetTitle() { return "Ammo +6"; } protected override string GetDescription() { return "Bonus ammo from Ammo Drop."; } 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 = "Ammo", amount = "+6", simepleAmount = (SimpleAmount)0 } }; } } public class AmmoDrop_Bonus_7 : AmmoDropBonusBase { protected override int AmmoAmount => 7; protected override string GetTitle() { return "Ammo +7"; } protected override string GetDescription() { return "Bonus ammo from Ammo Drop."; } 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 = "Ammo", amount = "+7", simepleAmount = (SimpleAmount)0 } }; } } public class ArcFieldCard : CustomCard { public static CardInfo cardInfoSelf; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ArcFieldCategory }; cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ArcFieldMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Arc Field"; } protected override string GetDescription() { return "Thunder Core + Planet\nStatic electricity arcs to nearby enemies, dealing 1% health every 0.15s."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Hidden", (CardThemeColor)null); } public override string GetModName() { return "BFRM"; } } public class AuraBloodRotCard : CustomCard { private const string AuraCardName = "Aura: Blood Rot"; private const string DebuffCardName = "Debuff: Blood Rot"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Blood Rot", "Debuff: Blood Rot"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Blood Rot"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject GetCardArt() { return Assets.AuraBloodRot_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "Regen", amount = "-10", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Healing Effect", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class BloodRotDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 0.7f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { float num = data.maxHealth / 0.7f; data.maxHealth = Mathf.Max(Mathf.Min(67f, num), data.maxHealth); data.health = Mathf.Min(data.health, data.maxHealth); WeakenedHealMono weakenedHealMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)weakenedHealMono == (Object)null) { weakenedHealMono = ((Component)player).gameObject.AddComponent(); } weakenedHealMono.AddStack(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { WeakenedHealMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && component.RemoveStack()) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Debuff: Blood Rot"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject GetCardArt() { return Assets.AuraBloodRot_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = false, stat = "Regen", amount = "-10", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Healing Effect", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class WeakenedHealMono : MonoBehaviour { private Player player; private HealthHandler healthHandler; private int stacks = 0; private const float HEAL_REDUCTION_PER_STACK = 0.1f; private const float REGEN_REDUCTION_PER_STACK = 10f; private float appliedRegenReduction = 0f; private bool initialized = false; private void Start() { player = ((Component)this).GetComponent(); healthHandler = ((Component)this).GetComponent(); if ((Object)(object)healthHandler != (Object)null) { initialized = true; ApplyRegenDebuff(); } } public void AddStack() { stacks++; if (initialized) { ApplyRegenDebuff(); } } public bool RemoveStack() { stacks--; if (stacks <= 0) { RestoreRegen(); return true; } ApplyRegenDebuff(); return false; } private void ApplyRegenDebuff() { if (!((Object)(object)healthHandler == (Object)null)) { HealthHandler obj = healthHandler; obj.regeneration += appliedRegenReduction; float num = 10f * (float)stacks; float regeneration = healthHandler.regeneration; appliedRegenReduction = Mathf.Min(num, regeneration); healthHandler.regeneration = regeneration - appliedRegenReduction; } } private void RestoreRegen() { if (!((Object)(object)healthHandler == (Object)null)) { HealthHandler obj = healthHandler; obj.regeneration += appliedRegenReduction; appliedRegenReduction = 0f; } } public float GetHealMultiplier() { float num = 1f - 0.1f * (float)stacks; return Mathf.Max(0.1f, num); } public int GetStacks() { return stacks; } private void OnDestroy() { RestoreRegen(); } } public class AuraBrokenBurstCard : CustomCard { private const string AuraCardName = "Aura: Broken Burst"; private const string DebuffCardName = "Debuff: Broken Burst"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Broken Burst", "Debuff: Broken Burst"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Broken Burst"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject? GetCardArt() { return Assets.AuraBrokenBurstRot_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "Bursts", amount = "-5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullets", amount = "-5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "-5", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class BrokenBurstDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.bursts = Mathf.Max(0, gun.bursts - 5); gun.numberOfProjectiles = Mathf.Max(1, gun.numberOfProjectiles - 5); int num = Mathf.Min(2, gunAmmo.maxAmmo); gunAmmo.maxAmmo = Mathf.Max(num, gunAmmo.maxAmmo - 5); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Debuff: Broken Burst"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject? GetCardArt() { return Assets.AuraBrokenBurstRot_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Bursts", amount = "-5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Bullets", amount = "-5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ammo", amount = "-5", 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)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class AuraColdWaterCard : CustomCard { private const string AuraCardName = "Aura: Cold Water"; private const string DebuffCardName = "Debuff: Cold Water"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Cold Water", "Debuff: Cold Water"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Cold Water"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject? GetCardArt() { return Assets.AuraColdWater_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "Decay", amount = "-5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Additional Blocks", amount = "-3", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block Cooldown", amount = "+1.5s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class ColdWaterDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.additionalBlocks = -3; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { int num = block.additionalBlocks + 3; block.additionalBlocks = Mathf.Max(Mathf.Min(0, num), block.additionalBlocks); block.cdAdd += 1.5f; player.data.stats.secondsToTakeDamageOver = Mathf.Max(0f, player.data.stats.secondsToTakeDamageOver - 5f); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Debuff: Cold Water"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject? GetCardArt() { return Assets.AuraColdWater_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Decay", amount = "-5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Additional Blocks", amount = "-3", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+1.5s", 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)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class AuraDeathSentenceCard : CustomCard { private const string AuraCardName = "Aura: Death Sentence"; private const string DebuffCardName = "Debuff: Death Sentence"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Death Sentence", "Debuff: Death Sentence"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Death Sentence"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject? GetCardArt() { return Assets.AuraDeathSentence_Art; } protected override Rarity GetRarity() { 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_002c: Expected O, but got Unknown //IL_002e: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0058: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0084: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Revives", amount = "-1" }, new CardInfoStat { positive = true, stat = "Jumps", amount = "-2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Gravity", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class DeathSentenceDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.gravity = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { player.data.stats.respawns = Mathf.Max(0, player.data.stats.respawns - 1); SlowStepEffect orAddComponent = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); orAddComponent.ApplyJumpPenalty(data, characterStats); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SlowStepEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveJumpPenalty(data, characterStats); Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Debuff: Death Sentence"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject? GetCardArt() { return Assets.AuraDeathSentence_Art; } 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_002c: Expected O, but got Unknown //IL_002e: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0058: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0084: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Revives", amount = "-1" }, new CardInfoStat { positive = false, stat = "Jumps", amount = "-2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Gravity", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class SlowStepEffect : MonoBehaviour { private const int JumpPenalty = 2; private const int MinJumps = 1; private int appliedJumpPenalty = 0; public void ApplyJumpPenalty(CharacterData data, CharacterStatModifiers stats) { if (!((Object)(object)data == (Object)null) && !((Object)(object)stats == (Object)null) && appliedJumpPenalty <= 0) { int num = Mathf.Min(2, Mathf.Max(0, data.jumps - 1)); if (num > 0) { data.jumps -= num; stats.numberOfJumps -= num; appliedJumpPenalty = num; } } } public void RemoveJumpPenalty(CharacterData data, CharacterStatModifiers stats) { if (!((Object)(object)data == (Object)null) && !((Object)(object)stats == (Object)null) && appliedJumpPenalty > 0) { data.jumps += appliedJumpPenalty; stats.numberOfJumps += appliedJumpPenalty; appliedJumpPenalty = 0; } } } public class AuraHeavyHandsCard : CustomCard { private const string AuraCardName = "Aura: Heavy Hands"; private const string DebuffCardName = "Debuff: Heavy Hands"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Heavy Hands", "Debuff: Heavy Hands"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Heavy Hands"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject? GetCardArt() { return Assets.AuraHeavyHands_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "Bullet Speed", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Projectile Speed", amount = "-35%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Spread", amount = "+0.05", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class HeavyHandsDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { float projectileSpeed = gun.projectileSpeed; gun.projectileSpeed *= 0.85f; gun.projectileSpeed = Mathf.Max(Mathf.Min(0.67f, projectileSpeed), gun.projectileSpeed); float projectielSimulatonSpeed = gun.projectielSimulatonSpeed; gun.projectielSimulatonSpeed *= 0.65f; gun.projectielSimulatonSpeed = Mathf.Max(Mathf.Min(0.67f, projectielSimulatonSpeed), gun.projectielSimulatonSpeed); gun.spread += 0.05f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Debuff: Heavy Hands"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject? GetCardArt() { return Assets.AuraHeavyHands_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Bullet Speed", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Projectile Speed", amount = "-35%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Bullet Spread", amount = "+0.05", 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)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class AuraOverheatedCard : CustomCard { private const string AuraCardName = "Aura: Overheated"; private const string DebuffCardName = "Debuff: Overheated"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Overheated", "Debuff: Overheated"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Overheated"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject? GetCardArt() { return Assets.AuraOverheated_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "Bullet Gravity", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "+1.5s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "-30%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class OverheatedDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.attackSpeedMultiplier = 1.3f; gun.reloadTimeAdd = 1.5f; gun.gravity = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Debuff: Overheated"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject? GetCardArt() { return Assets.AuraOverheated_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Bullet Gravity", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+1.5s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Attack Speed", 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)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class AuraSlowStepCard : CustomCard { private const string AuraCardName = "Aura: Slow Step"; private const string DebuffCardName = "Debuff: Slow Step"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Slow Step", "Debuff: Slow Step"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Slow Step"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject? GetCardArt() { return Assets.AuraSlowSleep_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "Size", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Lifesteal", amount = "-66%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "-30%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class SlowStepDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 0.7f; statModifiers.sizeMultiplier = 1.3f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { float num = characterStats.movementSpeed / 0.7f; characterStats.movementSpeed = Mathf.Max(Mathf.Min(0.67f, num), characterStats.movementSpeed); player.data.stats.lifeSteal = Mathf.Max(0f, player.data.stats.lifeSteal - 0.66f); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Debuff: Slow Step"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject? GetCardArt() { return Assets.AuraSlowSleep_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Size", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Lifesteal", amount = "-66%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Move Speed", 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)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class AuraSoftRicochetCard : CustomCard { private const string AuraCardName = "Aura: Soft Ricochet"; private const string DebuffCardName = "Debuff: Soft Ricochet"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Soft Ricochet", "Debuff: Soft Ricochet"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Soft Ricochet"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject? GetCardArt() { return Assets.AuraSoftRicochet_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "-5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage per Bounce", amount = "-50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Speed on Bounce", amount = "-50%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class SoftRicochetDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { float dmgMOnBounce = gun.dmgMOnBounce; gun.dmgMOnBounce *= 0.5f; gun.dmgMOnBounce = Mathf.Max(Mathf.Min(1f, dmgMOnBounce), gun.dmgMOnBounce); gun.reflects = Mathf.Max(0, gun.reflects - 5); float speedMOnBounce = gun.speedMOnBounce; gun.speedMOnBounce *= 0.5f; gun.speedMOnBounce = Mathf.Max(Mathf.Min(1f, speedMOnBounce), gun.speedMOnBounce); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Debuff: Soft Ricochet"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject? GetCardArt() { return Assets.AuraSoftRicochet_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Bounces", amount = "-5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Damage per Bounce", amount = "-50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Speed on Bounce", 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)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class AuraWeakeningCard : CustomCard { private const string AuraCardName = "Aura: Weakening"; private const string DebuffCardName = "Debuff: Weakened"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.AuraCards }; cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraHelper.ApplyDebuffsToEnemies(player, "Aura: Weakening", "Debuff: Weakened"); AuraMasterHelper.CheckUnlockAuraMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AuraMasterHelper.CheckLockAuraMaster(player); } protected override string GetTitle() { return "Aura: Weakening"; } protected override string GetDescription() { return "Debuffs enemies. Floors vary: 67% or base."; } protected override GameObject? GetCardArt() { return Assets.AuraWeakening_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Gravity", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage Growth", amount = "-30%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class WeakenedDebuffCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 0.7f; gun.gravity = 0.7f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { float num = gun.damage / 0.7f; gun.damage = Mathf.Max(Mathf.Min(0.67f, num), gun.damage); float num2 = gun.gravity / 0.7f; gun.gravity = Mathf.Max(Mathf.Min(0.67f, num2), gun.gravity); float damageAfterDistanceMultiplier = gun.damageAfterDistanceMultiplier; gun.damageAfterDistanceMultiplier = Mathf.Max(Mathf.Min(1f, damageAfterDistanceMultiplier), damageAfterDistanceMultiplier - 0.3f); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Debuff: Weakened"; } protected override string GetDescription() { return "Cursed effect."; } protected override GameObject? GetCardArt() { return Assets.AuraWeakening_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Damage", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Bullet Gravity", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Damage Growth", 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)4; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return false; } } public class BacktrackCard : CustomCard { public static CardInfo cardInfoSelf; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.jump = 1.2f; statModifiers.health = 1.1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BacktrackMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { BacktrackMono backtrackMono = ((Component)player).gameObject.AddComponent(); backtrackMono.stackCount = 1; } RollbackHelper.CheckUnlockRollback(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BacktrackMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } GravitySurgeHelper.CheckLockGravitySurgeOnStackRemove(player, isLastStack: false); } protected override string GetTitle() { return "Backtrack"; } protected override string GetDescription() { return "Block to return to your position up to 3s back."; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Jump Height", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "10s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } internal class BalanceBlock : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BalanceCard }; statModifiers.health = 0.75f; statModifiers.movementSpeed = 0.75f; block.cdMultiplier = 0.5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Balance: Block"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return Assets.BalanceBlock_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "HP", amount = "-25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movespeed", amount = "-25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block CD", amount = "-50%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "MFM"; } } internal class BalanceBullets : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BalanceCard }; gun.reloadTime = 0.7f; gun.projectileSpeed = 0.7f; gun.attackSpeed = 0.625f; gun.ammo = 6; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Balance: Bullets"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return Assets.BalanceBullets_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //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 = false, stat = "Bullet Speed", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+6", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+60%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)1; } public override string GetModName() { return "MFM"; } } internal class BalanceHitman : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BalanceCard }; statModifiers.health = 0.7f; gun.damage = 1.6f; gun.projectileSpeed = 1.6f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Balance: Hitman"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return Assets.BalanceHitman_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "HP", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "DMG", amount = "+60%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+60%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "MFM"; } } internal class BalanceMayhem : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BalanceCard }; gun.damage = 0.7f; gun.projectileSpeed = 1.7f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Add(gun); gun.reflects += 5; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Remove(gun); gun.reflects = Mathf.Max(0, gun.reflects - 5); } protected override string GetTitle() { return "Balance: Mayhem"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return Assets.BalanceMayhem_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "DMG", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bounce", amount = "+5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+70%", 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)4; } public override string GetModName() { return "MFM"; } } internal class BalanceReload : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BalanceCard }; gun.attackSpeed = 2f; gun.reloadTime = 0.5f; gun.ammo = 2; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Balance: Reload"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return Assets.BalanceReload_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "Attack Speed", amount = "-50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-60%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+2", 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 "MFM"; } } internal class BalanceSpeed : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BalanceCard }; gun.projectileSpeed = 0.8f; gun.attackSpeed = 1.25f; statModifiers.movementSpeed = 1.5f; statModifiers.numberOfJumps = 2; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Balance: Speed"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return Assets.BalanceSpeed_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //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 = false, stat = "Bullet Speed", amount = "-20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Attack Speed", amount = "-20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Movespeed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Jumps", amount = "+2", 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 "MFM"; } } internal class BalanceTank : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BalanceCard }; statModifiers.health = 2f; gun.damage = 0.7f; statModifiers.movementSpeed = 0.7f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Balance: Tank"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return Assets.BalanceTank_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = false, stat = "DMG", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movespeed", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "HP", amount = "+100%", 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)2; } public override string GetModName() { return "MFM"; } } internal class BerserkerCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.6f; gun.attackSpeed = 0.8f; statModifiers.health = 0.9f; statModifiers.movementSpeed = 1.1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Berserker"; } protected override string GetDescription() { return "Powerful attacks come with weakness."; } protected override GameObject? GetCardArt() { return Assets.Berserker_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //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 = "Damage", amount = "+60%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", 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)1; } public override string GetModName() { return "BFRM"; } } internal class BlackPillCard : CustomCard { private const string BlessingCardName = "Black Pill Blessing"; private const string CurseCardName = "Black Pill Curse"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)PlayerManager.instance == (Object)null) && PlayerManager.instance.players != null && PlayerManager.instance.players.Count != 0 && PlayerManager.instance.players.Contains(player) && (PhotonNetwork.OfflineMode || data.view.IsMine)) { float value = Random.value; bool flag = value >= 0.3f; if (PhotonNetwork.OfflineMode) { ApplyCardLocal(player, flag); return; } NetworkingManager.RPC(typeof(BlackPillCard), "RPC_ApplyCard", new object[2] { player.playerID, flag }); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } [UnboundRPC] public static void RPC_ApplyCard(int playerID, bool success) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if ((Object)(object)val == (Object)null) { MrFuntikMod.LogError($"[BlackPillCard] Player with ID {playerID} not found!"); } else if (PhotonNetwork.IsMasterClient) { string text = (success ? "Black Pill Blessing" : "Black Pill Curse"); CardInfo card = GetCard(text); if ((Object)(object)card == (Object)null) { MrFuntikMod.LogError("[BlackPillCard] Card '" + text + "' not found!"); return; } MrFuntikMod.Log($"[BlackPillCard] Found card: '{card.cardName}', adding to player {playerID}"); Cards.instance.AddCardToPlayer(val, card, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(val, card); } } private static void ApplyCardLocal(Player player, bool success) { string text = (success ? "Black Pill Blessing" : "Black Pill Curse"); CardInfo card = GetCard(text); if ((Object)(object)card == (Object)null) { MrFuntikMod.LogError("[BlackPillCard] LOCAL: Card '" + text + "' not found!"); return; } MrFuntikMod.Log("[BlackPillCard] LOCAL: Found card: '" + card.cardName + "'"); Cards.instance.AddCardToPlayer(player, card, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(player, card); } private static CardInfo GetCard(string cardName) { string cardName2 = cardName; if (MrFuntikMod.hiddenCards != null) { CardInfo val = MrFuntikMod.hiddenCards.Find((CardInfo c) => c.cardName == cardName2); if ((Object)(object)val != (Object)null) { return val; } } ReadOnlyCollection hiddenCards = Cards.instance.HiddenCards; foreach (CardInfo item in hiddenCards) { if (item.cardName == cardName2) { return item; } } return null; } protected override string GetTitle() { return "Black Pill"; } protected override string GetDescription() { return "Gain immense power, 30% chance: reload triple, ammo set to one."; } protected override GameObject GetCardArt() { return Assets.BlackPillArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+80%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-35%", 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 "IS"; } } public class BlackPillBlessingCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; gun.damage = 1.8f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.reloadTimeMultiplier *= 0.65f; gun.projectileSpeed *= 2f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.reloadTimeMultiplier /= 0.65f; gun.projectileSpeed /= 2f; } protected override string GetTitle() { return "Black Pill Blessing"; } protected override string GetDescription() { return "You got lucky."; } protected override GameObject GetCardArt() { return Assets.BlackPillArt; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } public override string GetModName() { return "IS"; } 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_0058: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0084: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+80%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+100%" }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-35%", simepleAmount = (SimpleAmount)0 } }; } public override bool GetEnabled() { return false; } } public class BlackPillCurseCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; gun.damage = 1.8f; gun.reloadTime = 3f; gun.ammo = -999; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Black Pill Curse"; } protected override string GetDescription() { return "Luck turned against you."; } protected override GameObject GetCardArt() { return Assets.BlackPillArt; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } public override string GetModName() { return "IS"; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+80%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+200%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ammo", amount = "Set 1", simepleAmount = (SimpleAmount)0 } }; } public override bool GetEnabled() { return false; } } public class BlazingTrailCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.3f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BlazingTrailEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.stackCount++; } else { BlazingTrailEffect blazingTrailEffect = ((Component)player).gameObject.AddComponent(); blazingTrailEffect.stackCount = 1; blazingTrailEffect.owner = player; } ScorchHelper.CheckUnlockScorch(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BlazingTrailEffect component = ((Component)player).gameObject.GetComponent(); bool flag = false; if ((Object)(object)component != (Object)null) { component.stackCount--; flag = component.stackCount <= 0; if (flag) { Object.Destroy((Object)(object)component); } } else { flag = true; } ScorchHelper.CheckLockScorchOnStackRemove(player, flag); } protected override string GetTitle() { return "Blazing Trail"; } protected override string GetDescription() { return "Leaves a fire trail. Enemies in contact burn for 10% health over 2s."; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { 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 = "Health", amount = "+30%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BlazingTrailEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BlazingTrailEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.effectEnabled = true; <>4__this.ResetTrailState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__24 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BlazingTrailEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__24(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.effectEnabled = false; TrailFirePool.ReturnAllActive(); 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(); } } public int stackCount = 1; public Player owner; private bool effectEnabled = false; private const float SPAWN_INTERVAL_STANDING = 0.25f; private const float MIN_MOVE_DISTANCE = 0.35f; private const int MAX_PARTICLES_PER_FRAME = 10; private const float BASE_FIRE_DURATION = 5f; private const float BURN_DURATION_BASE = 2f; private const float BURN_DURATION_PER_STACK = 2f; private const float BURN_DAMAGE_PER_TICK = 0.05f; private const float DURATION_MULT_PER_STACK = 1.25f; private const float BASE_SURFACE_CHECK_DISTANCE = 0.8f; private const float SIZE_CHECK_INTERVAL = 0.5f; private const float TELEPORT_THRESHOLD = 5f; private const float TELEPORT_THRESHOLD_SQR = 25f; private Vector3 lastSpawnPosition; private float standingTimer; private float currentSurfaceCheckDistance = 0.8f; private float lastSizeCheck = 0f; private static RaycastHit2D[] raycastHitCache = (RaycastHit2D[])(object)new RaycastHit2D[16]; private static readonly Vector2[] raycastDirections = (Vector2[])(object)new Vector2[8] { Vector2.down, new Vector2(-0.707f, -0.707f), new Vector2(0.707f, -0.707f), Vector2.left, Vector2.right, new Vector2(-0.707f, 0.707f), new Vector2(0.707f, 0.707f), Vector2.up }; private void Awake() { GameModeManager.AddHook("BattleStart", (Func)OnBattleStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } private void Start() { //IL_0079: 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) if ((Object)(object)owner != (Object)null && (Object)(object)owner.data != (Object)null && (Object)(object)owner.data.healthHandler != (Object)null) { HealthHandler healthHandler = owner.data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } lastSpawnPosition = ((Component)this).transform.position; TrailFirePool.EnsureInitialized(); } private void OnDestroy() { GameModeManager.RemoveHook("BattleStart", (Func)OnBattleStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)owner != (Object)null && (Object)(object)owner.data != (Object)null && (Object)(object)owner.data.healthHandler != (Object)null) { HealthHandler healthHandler = owner.data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } } [IteratorStateMachine(typeof(d__23))] private IEnumerator OnBattleStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__24))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__24(0) { <>4__this = this, gm = gm }; } private void ResetTrailState() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) lastSpawnPosition = ((Component)this).transform.position; standingTimer = 0f; } private void OnRevive() { ResetTrailState(); } private void Update() { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: 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_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) if (!effectEnabled || (Object)(object)GameManager.instance == (Object)null || !GameManager.instance.battleOngoing || (Object)(object)owner == (Object)null || (Object)(object)owner.data == (Object)null) { return; } bool dead = owner.data.dead; bool flag = (Object)(object)owner.data.healthHandler != (Object)null && owner.data.healthHandler.isRespawning; if (dead || flag) { return; } Vector3 position = ((Component)this).transform.position; if (Time.time - lastSizeCheck >= 0.5f) { UpdateSurfaceCheckDistance(); lastSizeCheck = Time.time; } Vector3 val = position - lastSpawnPosition; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude > 25f) { ResetTrailState(); return; } float num = 0.122499995f; if (sqrMagnitude >= num) { float num2 = Mathf.Sqrt(sqrMagnitude); int num3 = Mathf.Clamp(Mathf.CeilToInt(num2 / 0.35f), 1, 10); for (int i = 0; i < num3; i++) { float num4 = (float)(i + 1) / (float)num3; Vector3 position2 = lastSpawnPosition + val * num4; if (TryFindSurfaceAt(position2, out Vector3 surfacePoint, out Vector3 surfaceNormal, out Transform surfaceTransform, out string hitInfo)) { SpawnFireParticle(surfacePoint, surfaceNormal, surfaceTransform, hitInfo); } } lastSpawnPosition = position; standingTimer = 0f; return; } standingTimer += Time.deltaTime; if (standingTimer >= 0.25f) { if (TryFindSurfaceAt(position, out Vector3 surfacePoint2, out Vector3 surfaceNormal2, out Transform surfaceTransform2, out string hitInfo2)) { SpawnFireParticle(surfacePoint2, surfaceNormal2, surfaceTransform2, hitInfo2); } standingTimer = 0f; } } private void UpdateSurfaceCheckDistance() { //IL_005f: 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) if (!((Object)(object)owner == (Object)null) && !((Object)(object)owner.data == (Object)null)) { float num = 1f; CharacterStatModifiers stats = owner.data.stats; if ((Object)(object)stats != (Object)null) { num = stats.sizeMultiplier; } float num2 = Mathf.Max(((Component)this).transform.localScale.x, ((Component)this).transform.localScale.y); if (num2 > num) { num = num2; } currentSurfaceCheckDistance = 0.8f * num + 0.3f; currentSurfaceCheckDistance = Mathf.Clamp(currentSurfaceCheckDistance, 0.8f, 8f); } } private bool TryFindSurfaceAt(Vector3 position, out Vector3 surfacePoint, out Vector3 surfaceNormal, out Transform surfaceTransform, out string hitInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) surfacePoint = Vector3.zero; surfaceNormal = Vector3.up; surfaceTransform = null; hitInfo = ""; Vector2 val = Vector2.op_Implicit(position); float num = float.MaxValue; Vector2 val2 = Vector2.zero; Vector2 val3 = Vector2.up; Transform val4 = null; string text = ""; int num2 = -1; for (int i = 0; i < raycastDirections.Length; i++) { Vector2 val5 = raycastDirections[i]; int num3 = Physics2D.RaycastNonAlloc(val, val5, raycastHitCache, currentSurfaceCheckDistance); for (int j = 0; j < num3; j++) { ref RaycastHit2D reference = ref raycastHitCache[j]; if (IsValidSurface(ref reference)) { float num4 = Vector2.Dot(val5, ((RaycastHit2D)(ref reference)).normal); if (!(num4 >= 0f) && ((RaycastHit2D)(ref reference)).distance < num) { num = ((RaycastHit2D)(ref reference)).distance; val2 = ((RaycastHit2D)(ref reference)).point; val3 = ((RaycastHit2D)(ref reference)).normal; val4 = ((Component)((RaycastHit2D)(ref reference)).collider).transform; text = ((Object)((Component)((RaycastHit2D)(ref reference)).collider).gameObject).name; num2 = i; } } } } if (num2 >= 0) { surfacePoint = Vector2.op_Implicit(val2); surfaceNormal = Vector2.op_Implicit(val3); surfaceTransform = val4; hitInfo = $"dir={num2} dist={num:F3} normal=({val3.x:F2},{val3.y:F2}) obj={text}"; return true; } return false; } private bool IsValidSurface(ref RaycastHit2D hit) { //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) Collider2D collider = ((RaycastHit2D)(ref hit)).collider; if ((Object)(object)collider == (Object)null || collider.isTrigger) { return false; } GameObject gameObject = ((Component)collider).gameObject; int layer = gameObject.layer; string text = LayerMask.LayerToName(layer); if (text == "BackgroundObject") { return false; } if (((Object)gameObject).name.Contains("_BG")) { return false; } if ((Object)(object)((Component)collider).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponentInParent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponentInParent() != (Object)null) { return false; } if (text == "Projectile") { return false; } string text2 = ((Object)gameObject).name.ToLower(); if (text2.Contains("bullet") || text2.Contains("projectile") || text2.Contains("shot")) { return false; } Rigidbody2D attachedRigidbody = collider.attachedRigidbody; if ((Object)(object)attachedRigidbody != (Object)null) { Vector2 velocity = attachedRigidbody.velocity; if (((Vector2)(ref velocity)).sqrMagnitude > 100f) { return false; } } if ((Object)(object)((Component)collider).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponentInParent() != (Object)null) { return false; } return true; } private void SpawnFireParticle(Vector3 surfacePosition, Vector3 surfaceNormal, Transform surfaceTransform, string hitInfo) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) Vector3 position = surfacePosition + surfaceNormal * 0.02f; TrailFire trailFire = TrailFire.FindNearestFire(position, 0.5f, owner.playerID); if ((Object)(object)trailFire != (Object)null) { trailFire.Reinforce(); return; } float duration = 5f * Mathf.Pow(1.25f, (float)(stackCount - 1)); float burnDuration = 2f + 2f * (float)(stackCount - 1); float num = Mathf.Atan2(surfaceNormal.y, surfaceNormal.x) * 57.29578f - 90f; TrailFire trailFire2 = TrailFirePool.Get(); ((Component)trailFire2).transform.SetParent((Transform)null, false); ((Component)trailFire2).transform.localScale = Vector3.one; ((Component)trailFire2).transform.position = position; ((Component)trailFire2).transform.rotation = Quaternion.Euler(0f, 0f, num); if ((Object)(object)surfaceTransform != (Object)null) { ((Component)trailFire2).transform.SetParent(surfaceTransform, true); } trailFire2.Activate(owner, duration, burnDuration, 0.05f); } } public class BloodPactCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.9f; gun.damage = 1.75f; gun.projectileSpeed = 1.25f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { BloodPactMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Blood Pact"; } protected override string GetDescription() { return "Forge a Blood Pact: trade health for power and mark a prey."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+75%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BloodPactOfferingCard : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass12_0 { public Player player; internal IEnumerator b__1(IGameModeHandler gm) { return EndBloodPactPick(player); } internal IEnumerator b__0(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BloodPactPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class <>c__DisplayClass14_0 { public Player player; public Func <>9__0; internal bool b__0(int i) { return PlayerManager.instance.players[i].playerID == player.playerID; } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass12_0 <>8__1; private List 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass12_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { 5__2 = CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories; if (5__2.Contains(MrFuntikMod.BloodPactSubCards)) { 5__2.Add(MrFuntikMod.NonBloodPactCards); 5__2.Remove(MrFuntikMod.BloodPactSubCards); } GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndBloodPactPick(<>8__1.player))); 5__2 = null; } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BloodPactPick(<>8__1.player)); return new List().GetEnumerator(); }); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private List 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; 5__1 = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!5__1.Contains(MrFuntikMod.BloodPactSubCards)) { 5__1.Add(MrFuntikMod.BloodPactSubCards); 5__1.Remove(MrFuntikMod.NonBloodPactCards); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Player[] 5__1; private int 5__2; private <>c__DisplayClass14_0 <>8__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>8__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown int num; switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = PlayerManager.instance.players.ToArray(); 5__2 = 0; goto IL_0217; case 1: <>1__state = -1; 5__4 = (from i in Enumerable.Range(0, PlayerManager.instance.players.Count) where PlayerManager.instance.players[i].playerID == <>8__3.player.playerID select i).First(); CardChoiceVisuals.instance.Show(5__4, true); <>2__current = CardChoice.instance.DoPick(1, <>8__3.player.playerID, (PickerType)1); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = GameModeManager.TriggerHook("PlayerPickEnd"); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 5; return true; case 5: { <>1__state = -1; goto IL_01d6; } IL_01d6: if (<>8__3.player.data.stats.GetAdditionalData().bloodPactPickStacks > 0) { <>8__3.player.data.stats.GetAdditionalData().bloodPactPickStacks--; <>2__current = GameModeManager.TriggerHook("PlayerPickStart"); <>1__state = 1; return true; } <>8__3 = null; num = 5__2 + 1; 5__2 = num; goto IL_0217; IL_0217: if (5__2 < 5__1.Length) { <>8__3 = new <>c__DisplayClass14_0(); <>8__3.player = 5__1[5__2]; goto IL_01d6; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactClassCategory }; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; characterStats.GetAdditionalData().bloodPactPickStacks++; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BloodPactPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)characterStats != (Object)null) { CharacterStatModifiersAdditionalData additionalData = characterStats.GetAdditionalData(); additionalData.bloodPactPickStacks = Mathf.Max(0, additionalData.bloodPactPickStacks - 1); } } protected override string GetTitle() { return "Blood Pact: Offering"; } protected override string GetDescription() { return "Deepen the pact. Pick a Blood Pact card."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } [IteratorStateMachine(typeof(d__12))] public static IEnumerator BloodPactPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { player = player }; } [IteratorStateMachine(typeof(d__13))] public static IEnumerator EndBloodPactPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { player = player }; } [IteratorStateMachine(typeof(d__14))] internal static IEnumerator ExtraPicks() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0); } } public class BPHemorrhageCard : CustomCard { internal static CardInfo card; private static GameObject burnHitObject; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; gun.damage = 1.8f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BPBurnOnHitMono bPBurnOnHitMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)bPBurnOnHitMono == (Object)null) { bPBurnOnHitMono = ((Component)player).gameObject.AddComponent(); } if (bPBurnOnHitMono.StackCount == 0) { AddBurnHitEffect(gun); } bPBurnOnHitMono.AddStack(2f, 0.025f); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BPBurnOnHitMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); if (component.StackCount == 0) { RemoveBurnHitEffect(gun); Object.Destroy((Object)(object)component); } } } private static void AddBurnHitEffect(Gun gun) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown if (!((Object)(object)gun == (Object)null)) { if ((Object)(object)burnHitObject == (Object)null) { burnHitObject = new GameObject("BPBurnHitEffect", new Type[1] { typeof(BPBurnHitEffect) }); Object.DontDestroyOnLoad((Object)(object)burnHitObject); } List list = ((IEnumerable)(((object)gun.objectsToSpawn) ?? ((object)new ObjectsToSpawn[0]))).ToList(); if (!list.Any((ObjectsToSpawn spawn) => spawn != null && (Object)(object)spawn.AddToProjectile == (Object)(object)burnHitObject)) { list.Add(new ObjectsToSpawn { AddToProjectile = burnHitObject }); gun.objectsToSpawn = list.ToArray(); } } } private static void RemoveBurnHitEffect(Gun gun) { if (!((Object)(object)gun == (Object)null) && gun.objectsToSpawn != null && !((Object)(object)burnHitObject == (Object)null)) { List list = gun.objectsToSpawn.ToList(); int num = list.FindIndex((ObjectsToSpawn spawn) => spawn != null && (Object)(object)spawn.AddToProjectile == (Object)(object)burnHitObject); if (num >= 0) { list.RemoveAt(num); gun.objectsToSpawn = list.ToArray(); } } } protected override string GetTitle() { return "Blood Pact: Hemorrhage"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+80%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Burns", amount = "+2s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPSurgeCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; gun.projectileSpeed = 2f; gun.damageAfterDistanceMultiplier = 1.1f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Blood Pact: Surge"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage Growth", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPSwiftCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; statModifiers.movementSpeed = 1.3f; block.cdMultiplier = 0.75f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Blood Pact: Swift"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Move Speed", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block Cooldown", amount = "-25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPPredatorCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; statModifiers.lifeSteal = 0.75f; statModifiers.regen = 10f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Blood Pact: Predator"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Life Steal", amount = "+75%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Life Regen", amount = "+10", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPVolleyCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; gun.projectileSpeed = 1.2f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.numberOfProjectiles += 2; gun.spread += 0.03f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.numberOfProjectiles = Mathf.Max(1, gun.numberOfProjectiles - 2); gun.spread = Mathf.Max(0f, gun.spread - 0.03f); } protected override string GetTitle() { return "Blood Pact: Volley"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Bullets", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Bullet Spread", amount = "+0.03", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPRicochetCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Add(gun); gun.reflects += 5; gun.dmgMOnBounce *= 1.25f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Remove(gun); gun.reflects = Mathf.Max(0, gun.reflects - 5); gun.dmgMOnBounce /= 1.25f; } protected override string GetTitle() { return "Blood Pact: Ricochet"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bounces", amount = "+5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Dmg Per Bounce", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPTorrentCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; gun.attackSpeed = 0.8f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.reloadTime *= 0.75f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.reloadTime /= 0.75f; } protected override string GetTitle() { return "Blood Pact: Torrent"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Reload Time", amount = "-25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPPierceCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; gun.damage = 1.2f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.GetAdditionalData().piercingDamage += 0.5f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.GetAdditionalData().piercingDamage -= 0.5f; } protected override string GetTitle() { return "Blood Pact: Pierce"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Piercing Damage", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPBloodbathCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.bursts += 2; gun.slow += 0.5f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.bursts = Mathf.Max(0, gun.bursts - 2); gun.slow = Mathf.Max(0f, gun.slow - 0.5f); } protected override string GetTitle() { return "Blood Pact: Bloodbath"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bursts", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Slow", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPOverdrawCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BloodPactMono bloodPactMono = (((Object)(object)player != (Object)null) ? ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false) : null); if ((Object)(object)bloodPactMono != (Object)null) { bloodPactMono.HasOverdraw = true; } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BloodPactMono bloodPactMono = (((Object)(object)player != (Object)null) ? ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false) : null); if ((Object)(object)bloodPactMono != (Object)null) { bloodPactMono.HasOverdraw = true; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BloodPactMono bloodPactMono = (((Object)(object)player != (Object)null) ? ((Component)player).GetComponent() : null); if ((Object)(object)bloodPactMono != (Object)null) { bloodPactMono.HasOverdraw = false; } } protected override string GetTitle() { return "Blood Pact: Overdraw"; } protected override string GetDescription() { return "Survive lethal damage at 1 HP. Hit within 5s or die."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "10s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPFirstBloodCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).AddStack(); } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).AddStack(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { BPFirstBloodMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); } } } protected override string GetTitle() { return "Blood Pact: First Blood"; } protected override string GetDescription() { return "Hit prey for +50% damage and +25% attack speed for 5s."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPFocusCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { BPFocusMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Blood Pact: Focus"; } protected override string GetDescription() { return "Hit prey to stack +15% damage, up to 5. Other hits reset."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPExecuteCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasExecute = true; } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasExecute = true; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { BPExecuteMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.HasExecute = false; } } } protected override string GetTitle() { return "Blood Pact: Execute"; } protected override string GetDescription() { return "Kill prey yourself to fully heal and reload."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPBloodDebtCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasDebt = true; } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasDebt = true; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { BPBloodDebtMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.HasDebt = false; } } } protected override string GetTitle() { return "Blood Pact: Blood Debt"; } protected override string GetDescription() { return "If prey kills you, gain +60% damage next point."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPChainCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Blood Pact: Chain"; } protected override string GetDescription() { return "When prey dies, mark a new one."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Target Chain", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPSealCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasSeal = true; } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasSeal = true; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { BPSealMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.HasSeal = false; } } } protected override string GetTitle() { return "Blood Pact: Seal"; } protected override string GetDescription() { return "50% on hit: seal prey's block for 2s."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPBloodFrenzyCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasFrenzy = true; } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasFrenzy = true; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { BPBloodFrenzyMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.HasFrenzy = false; } } } protected override string GetTitle() { return "Blood Pact: Blood Frenzy"; } protected override string GetDescription() { return "As prey loses HP, gain up to +50% move and attack speed."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BPBloodTributeCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.BloodPactSubCards }; statModifiers.health = 0.9f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Blood Pact"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasTribute = true; } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player != (Object)null) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).HasTribute = true; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { BPBloodTributeMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.HasTribute = false; } } } protected override string GetTitle() { return "Blood Pact: Blood Tribute"; } protected override string GetDescription() { return "Kill prey to stack +25% damage, up to 4. Resets if prey kills you."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Health", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class BloodPactMono : WasDealtDamageTrigger { [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BloodPactMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.overdrawActive = false; <>4__this.overdrawTimer = 0f; <>4__this.overdrawCooldown = 0f; CooldownUI overdrawUI = <>4__this.overdrawUI; if (overdrawUI != null) { overdrawUI.Hide(); } <>4__this.targetsUsedThisPoint = 0; <>4__this.markedPlayerID = -1; <>4__this.ClearMarkVisual(); if (<>4__this.IsMine() && (Object)(object)<>4__this.player != (Object)null) { SendSetMarkedPrey(<>4__this.player.playerID, -1); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__45 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Transform parent; public Color color; public float maxScale; public float duration; private GameObject 5__1; private LineRenderer 5__2; private float 5__3; private int 5__4; private float 5__5; private float 5__6; private Color 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__45(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00de: 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) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = new GameObject("BloodPactPulse"); 5__1.transform.SetParent(parent, false); 5__1.transform.localPosition = Vector3.zero; 5__2 = 5__1.AddComponent(); 5__2.useWorldSpace = false; 5__2.loop = true; 5__2.positionCount = 40; 5__2.startWidth = 0.04f; 5__2.endWidth = 0.04f; ((Renderer)5__2).material = new Material(Shader.Find("Sprites/Default")); 5__2.startColor = color; 5__2.endColor = color; ((Renderer)5__2).sortingOrder = 210; 5__4 = 0; while (5__4 < 5__2.positionCount) { 5__5 = MathF.PI * 2f * (float)5__4 / (float)5__2.positionCount; 5__2.SetPosition(5__4, new Vector3(Mathf.Cos(5__5) * 0.42f, Mathf.Sin(5__5) * 0.42f, 0f)); 5__4++; } 5__3 = 0f; break; case 1: <>1__state = -1; break; } if (5__3 < duration && (Object)(object)5__1 != (Object)null) { 5__3 += Time.deltaTime; 5__6 = Mathf.Clamp01(5__3 / duration); 5__1.transform.localScale = Vector3.one * Mathf.Lerp(0.4f, maxScale, 5__6); 5__7 = color; 5__7.a = Mathf.Lerp(color.a, 0f, 5__6); 5__2.startColor = 5__7; 5__2.endColor = 5__7; <>2__current = null; <>1__state = 1; return true; } if ((Object)(object)5__1 != (Object)null) { Object.Destroy((Object)(object)5__1); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float OverdrawDuration = 5f; private const float OverdrawCooldownDuration = 10f; private Player player; private CharacterData data; private Gun gun; private GunAmmo gunAmmo; private CharacterStatModifiers stats; private HealthHandler health; private CooldownUI overdrawUI; private Action dealtDamageAction; private bool overdrawActive; private float overdrawTimer; private float overdrawCooldown; private int markedPlayerID = -1; private int targetsUsedThisPoint; private GameObject markVisual; private bool started; private bool hasOverdraw; public int MarkedPlayerID => markedPlayerID; public bool HasOverdraw { get { return hasOverdraw; } set { hasOverdraw = value; if (!hasOverdraw) { overdrawActive = false; overdrawTimer = 0f; overdrawCooldown = 0f; CooldownUI obj = overdrawUI; if (obj != null) { obj.Hide(); } } } } internal void ForceMark(int targetID) { if (!((Object)(object)player == (Object)null) && targetID != markedPlayerID) { markedPlayerID = targetID; targetsUsedThisPoint++; SendSetMarkedPrey(player.playerID, targetID); } } private void Start() { player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); gun = data?.weaponHandler?.gun; Gun obj = gun; gunAmmo = ((obj != null) ? ((Component)obj).GetComponentInChildren() : null); stats = data?.stats; health = data?.healthHandler; dealtDamageAction = OnDealtDamage; if ((Object)(object)stats != (Object)null) { stats.DealtDamageAction = (Action)Delegate.Combine(stats.DealtDamageAction, dealtDamageAction); } if (IsMine() && (Object)(object)data?.view != (Object)null) { overdrawUI = CooldownUI.Create(((Component)this).transform, 1f); } GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); started = true; if (IsMine()) { AssignRandomMark(); } } private void OnDestroy() { if ((Object)(object)stats != (Object)null && dealtDamageAction != null) { stats.DealtDamageAction = (Action)Delegate.Remove(stats.DealtDamageAction, dealtDamageAction); } GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)overdrawUI != (Object)null) { Object.Destroy((Object)(object)((Component)overdrawUI).gameObject); } ClearMarkVisual(); if (IsMine()) { SendSetMarkedPrey(((Object)(object)player != (Object)null) ? player.playerID : (-1), -1); } } public override void WasDealtDamage(Vector2 damage, bool selfDamage) { if (!(!HasOverdraw || overdrawCooldown > 0f || overdrawActive || selfDamage) && IsMine() && !((Object)(object)data == (Object)null) && !data.dead && !(data.health > 0f)) { data.health = 1f; overdrawActive = true; overdrawTimer = 5f; if ((Object)(object)player != (Object)null) { NetworkingManager.RPC(typeof(BloodPactMono), "RPCA_OverdrawEffect", new object[2] { player.playerID, true }); } } } private void Update() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if (!started) { return; } if (IsMine()) { UpdateMarkedPrey(); UpdateOverdraw(); } if ((Object)(object)overdrawUI != (Object)null) { if (overdrawActive) { overdrawUI.SetIcon("BPO", (Color?)new Color(1f, 0.1f, 0.1f)); overdrawUI.ShowActive(overdrawTimer); } else if (overdrawCooldown > 0f) { overdrawUI.SetIcon("BPCD", (Color?)new Color(0.4f, 0.65f, 1f)); overdrawUI.ShowActive(overdrawCooldown); } else { overdrawUI.Hide(); } } } [IteratorStateMachine(typeof(d__28))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this, gm = gm }; } private void OnDealtDamage(Vector2 damage, bool selfDamage) { if (!(!overdrawActive || selfDamage) && !(((Vector2)(ref damage)).magnitude <= 0f)) { overdrawActive = false; overdrawTimer = 0f; overdrawCooldown = 10f; if ((Object)(object)player != (Object)null && IsMine()) { NetworkingManager.RPC(typeof(BloodPactMono), "RPCA_OverdrawEffect", new object[2] { player.playerID, false }); } } } private void UpdateOverdraw() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) if (overdrawCooldown > 0f) { overdrawCooldown = Mathf.Max(0f, overdrawCooldown - Time.deltaTime); } if (!overdrawActive) { return; } overdrawTimer -= Time.deltaTime; if (!(overdrawTimer > 0f)) { overdrawActive = false; overdrawTimer = 0f; overdrawCooldown = 10f; if ((Object)(object)health != (Object)null && (Object)(object)data != (Object)null && !data.dead) { ((Damagable)health).TakeDamage(Vector2.up * Mathf.Max(500f, data.maxHealth + 100f), Vector2.op_Implicit(((Component)data).transform.position), Color.red, (GameObject)null, (Player)null, true, true); } } } private void UpdateMarkedPrey() { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null || data.dead) { return; } Player val = FindPlayer(markedPlayerID); if ((Object)(object)val == (Object)null || (Object)(object)val.data == (Object)null || val.data.dead) { int valueOrDefault = (player.data?.currentCards?.Count((CardInfo c) => (Object)(object)c == (Object)(object)BPChainCard.card)).GetValueOrDefault(); if (targetsUsedThisPoint <= valueOrDefault) { AssignRandomMark(); } else if (markedPlayerID != -1) { markedPlayerID = -1; SendSetMarkedPrey(player.playerID, -1); } } } private void AssignRandomMark() { if ((Object)(object)player == (Object)null) { return; } List list = PlayerManager.instance.players.Where((Player p) => (Object)(object)p != (Object)null && p.playerID != player.playerID && (Object)(object)p.data != (Object)null && !p.data.dead && p.teamID != player.teamID).ToList(); if (list.Count == 0) { list = PlayerManager.instance.players.Where((Player p) => (Object)(object)p != (Object)null && p.playerID != player.playerID && (Object)(object)p.data != (Object)null && !p.data.dead).ToList(); } int num = ((list.Count > 0) ? list[Random.Range(0, list.Count)].playerID : (-1)); if (num != markedPlayerID && num >= 0) { markedPlayerID = num; targetsUsedThisPoint++; SendSetMarkedPrey(player.playerID, num); } } private static void SendSetMarkedPrey(int ownerID, int targetID) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (ownerID >= 0) { Color markColorForOwner = GetMarkColorForOwner(ownerID); NetworkingManager.RPC(typeof(BloodPactMono), "RPCA_SetMarkedPrey", new object[6] { ownerID, targetID, markColorForOwner.r, markColorForOwner.g, markColorForOwner.b, markColorForOwner.a }); } } [UnboundRPC] public static void RPCA_SetMarkedPrey(int ownerID, int targetID, float r, float g, float b, float a) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) Player val = FindPlayer(ownerID); BloodPactMono bloodPactMono = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent() : null); if (!((Object)(object)bloodPactMono == (Object)null)) { bloodPactMono.markedPlayerID = targetID; bloodPactMono.ClearMarkVisual(); Player val2 = FindPlayer(targetID); if ((Object)(object)val2 != (Object)null) { bloodPactMono.CreateMarkVisual(val2, new Color(r, g, b, a), ownerID); } } } [UnboundRPC] public static void RPCA_OverdrawEffect(int playerID, bool active) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) Player val = FindPlayer(playerID); if (!((Object)(object)val == (Object)null)) { float maxScale = (active ? 1.35f : 1.05f); StartPulse(((Component)val).transform, new Color(1f, 0.05f, 0.05f, 0.85f), maxScale, 0.35f); } } private void CreateMarkVisual(Player target, Color markColor, int ownerID) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)target == (Object)null)) { GameObject val = new GameObject("BloodPactMarkedPrey_" + (((Object)(object)player != (Object)null) ? player.playerID.ToString() : "unknown")); val.transform.SetParent(((Component)target).transform, false); val.transform.localPosition = Vector3.zero; val.transform.localRotation = Quaternion.identity; val.transform.localScale = Vector3.one; SpriteRenderer componentInChildren = ((Component)target).GetComponentInChildren(); int sortingLayerID = (((Object)(object)componentInChildren != (Object)null) ? ((Renderer)componentInChildren).sortingLayerID : 0); int num = (((Object)(object)componentInChildren != (Object)null) ? (((Renderer)componentInChildren).sortingOrder + 10) : 10); Material material = new Material(Shader.Find("Sprites/Default")); markColor.a = 1f; Color color = default(Color); ((Color)(ref color))..ctor(0f, 0f, 0f, 0.95f); CreateMarkCircle(val.transform, material, color, sortingLayerID, num - 1); CreateMarkReticle(val.transform, material, color, sortingLayerID, num - 1, 0.13f); CreateMarkCircle(val.transform, material, markColor, sortingLayerID, num, 0.03f); CreateMarkReticle(val.transform, material, markColor, sortingLayerID, num); val.AddComponent().Init(markColor); markVisual = val; } } private static Color GetMarkColorForOwner(int ownerID) { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) Color playerVisualColor = default(Color); ((Color)(ref playerVisualColor))..ctor(1f, 0.04f, 0.04f, 1f); try { Player val = FindPlayer(ownerID); if ((Object)(object)val != (Object)null) { playerVisualColor = GetPlayerVisualColor(val); MrFuntikMod.Log($"[BPMark] owner playerID={val.playerID} teamID={val.teamID} color=#{ColorUtility.ToHtmlStringRGBA(playerVisualColor)}"); } } catch (Exception ex) { MrFuntikMod.LogWarning("[BPMark] exception: " + ex.Message); ((Color)(ref playerVisualColor))..ctor(1f, 0.04f, 0.04f, 1f); } playerVisualColor.a = 1f; return playerVisualColor; } private static Color GetPlayerVisualColor(Player owner) { //IL_011d: 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) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_00b6: 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) try { object obj = (Type.GetType("RWF.PlayerExtensions, RoundsWithFriends")?.GetMethod("GetAdditionalData", BindingFlags.Static | BindingFlags.Public))?.Invoke(null, new object[1] { owner }); object obj2 = obj?.GetType().GetField("character", BindingFlags.Instance | BindingFlags.Public)?.GetValue(obj); object obj3 = obj2?.GetType().GetField("colorID", BindingFlags.Instance | BindingFlags.Public)?.GetValue(obj2); if (obj3 is int) { int num = (int)obj3; if (num >= 0) { return GetCleanMarkColor(PlayerSkinBank.GetPlayerSkinColors(num).color); } } } catch (Exception ex) { MrFuntikMod.LogWarning("[BPMark] RWF colorID exception: " + ex.Message); } try { return GetCleanMarkColor(owner.GetTeamColors().color); } catch (Exception ex2) { MrFuntikMod.LogWarning("[BPMark] GetTeamColors exception: " + ex2.Message); } return GetCleanMarkColor(PlayerSkinBank.GetPlayerSkinColors(owner.playerID).color); } private static Color GetCleanMarkColor(Color source) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) float num = default(float); float num2 = default(float); float num3 = default(float); Color.RGBToHSV(source, ref num, ref num2, ref num3); num2 = Mathf.Max(num2, 0.85f); num3 = Mathf.Clamp(num3, 0.55f, 0.9f); Color result = Color.HSVToRGB(num, num2, num3); result.a = 1f; return result; } private static void CreateMarkCircle(Transform parent, Material material, Color color, int sortingLayerID, int sortingOrder, float width = 0.06f) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Circle"); val.transform.SetParent(parent, false); LineRenderer val2 = SetupMarkLine(val, material, color, sortingLayerID, sortingOrder, width, loop: true, 72); for (int i = 0; i < val2.positionCount; i++) { float num = MathF.PI * 2f * (float)i / (float)val2.positionCount; val2.SetPosition(i, new Vector3(Mathf.Cos(num) * 1.0296f, Mathf.Sin(num) * 1.0296f, 0f)); } } private static void CreateMarkReticle(Transform parent, Material material, Color color, int sortingLayerID, int sortingOrder, float width = 0.07f) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0130: 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_0155: Unknown result type (might be due to invalid IL or missing references) Vector3[][] array = new Vector3[4][] { (Vector3[])(object)new Vector3[2] { new Vector3(0f, 1.3156f, 0f), new Vector3(0f, 0.8866f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(0f, -1.3156f, 0f), new Vector3(0f, -0.8866f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(1.3156f, 0f, 0f), new Vector3(0.8866f, 0f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(-1.3156f, 0f, 0f), new Vector3(-0.8866f, 0f, 0f) } }; for (int i = 0; i < array.Length; i++) { GameObject val = new GameObject("ReticleTick_" + i); val.transform.SetParent(parent, false); LineRenderer val2 = SetupMarkLine(val, material, color, sortingLayerID, sortingOrder, width, loop: false, 2); val2.SetPosition(0, array[i][0]); val2.SetPosition(1, array[i][1]); } } private static LineRenderer SetupMarkLine(GameObject obj, Material material, Color color, int sortingLayerID, int sortingOrder, float width, bool loop, int points) { //IL_0042: 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_0056: Unknown result type (might be due to invalid IL or missing references) LineRenderer val = obj.AddComponent(); val.useWorldSpace = false; val.loop = loop; val.positionCount = points; val.startWidth = width; val.endWidth = width; ((Renderer)val).material = material; ((Renderer)val).material.color = Color.white; val.startColor = color; val.endColor = color; ((Renderer)val).sortingLayerID = sortingLayerID; ((Renderer)val).sortingOrder = sortingOrder; return val; } private void ClearMarkVisual() { if ((Object)(object)markVisual != (Object)null) { Object.Destroy((Object)(object)markVisual); } markVisual = null; } internal static void StartPulse(Transform parent, Color color, float maxScale, float duration) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)parent == (Object)null) && !((Object)(object)MrFuntikMod.instance == (Object)null)) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(PulseRoutine(parent, color, maxScale, duration)); } } [IteratorStateMachine(typeof(d__45))] private static IEnumerator PulseRoutine(Transform parent, Color color, float maxScale, float duration) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__45(0) { parent = parent, color = color, maxScale = maxScale, duration = duration }; } private bool IsMine() { return IsPlayerOwner(player); } private static bool IsPlayerOwner(Player player) { return PhotonNetwork.OfflineMode || (Object)(object)player?.data?.view == (Object)null || player.data.view.IsMine; } private static Player FindPlayer(int playerID) { if ((Object)(object)PlayerManager.instance == (Object)null) { return null; } return PlayerManager.instance.players.Find((Player p) => (Object)(object)p != (Object)null && p.playerID == playerID); } } public class BloodPactMarkVisual : MonoBehaviour { private LineRenderer[] lines; private Color[] lineBaseColors; private Color baseColor; private float seed; public void Init(Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) baseColor = color; seed = Random.Range(0f, MathF.PI * 2f); lines = ((Component)this).GetComponentsInChildren(); CacheLineColors(); } private void Update() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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) if (lines == null || lines.Length == 0) { lines = ((Component)this).GetComponentsInChildren(); CacheLineColors(); } float num = 0.92f + Mathf.Sin(Time.time * 3.5f + seed) * 0.05f; ((Component)this).transform.localScale = Vector3.one * num; float num2 = 0.88f + Mathf.Sin(Time.time * 5f + seed) * 0.1f; for (int i = 0; i < lines.Length; i++) { if (!((Object)(object)lines[i] == (Object)null)) { Color val = ((lineBaseColors != null && i < lineBaseColors.Length) ? lineBaseColors[i] : baseColor); val.a *= num2; lines[i].startColor = val; lines[i].endColor = val; } } } private void CacheLineColors() { //IL_0056: 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_005b: Unknown result type (might be due to invalid IL or missing references) if (lines == null) { lineBaseColors = null; return; } lineBaseColors = (Color[])(object)new Color[lines.Length]; for (int i = 0; i < lines.Length; i++) { lineBaseColors[i] = (((Object)(object)lines[i] != (Object)null) ? lines[i].startColor : baseColor); } } } public class BPBurnOnHitMono : MonoBehaviour { private Player owner; private int stackCount; private float burnDuration; private float burnDamageBase; public int StackCount => stackCount; private void Start() { owner = ((Component)this).GetComponent(); } public void AddStack(float duration, float damagePerTick) { stackCount++; burnDuration = duration; burnDamageBase = damagePerTick; } public void RemoveStack() { stackCount = Mathf.Max(0, stackCount - 1); } public void OnBulletHit(Player victim) { if (stackCount > 0 && !((Object)(object)victim == (Object)null) && !((Object)(object)owner == (Object)null) && victim.teamID != owner.teamID) { float damagePerTick = burnDamageBase * (float)stackCount; BurnEffect component = ((Component)victim).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RefreshDuration(burnDuration, damagePerTick); return; } component = ((Component)victim).gameObject.AddComponent(); component.Apply(owner, burnDuration, damagePerTick); } } } public class BPBurnHitEffect : RayHitEffect { public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0012: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hit.transform == (Object)null) { return (HasToReturn)1; } Player componentInParent = ((Component)hit.transform).GetComponentInParent(); if ((Object)(object)componentInParent == (Object)null) { return (HasToReturn)1; } ProjectileHit componentInParent2 = ((Component)this).GetComponentInParent(); if ((Object)(object)componentInParent2 == (Object)null || (Object)(object)componentInParent2.ownPlayer == (Object)null) { return (HasToReturn)1; } BPBurnOnHitMono component = ((Component)componentInParent2.ownPlayer).GetComponent(); if ((Object)(object)component == (Object)null) { return (HasToReturn)1; } if (PhotonNetwork.OfflineMode || componentInParent2.ownPlayer.data.view.IsMine) { NetworkingManager.RPC(typeof(BPBurnHitEffect), "RPCA_ApplyBurn", new object[2] { componentInParent2.ownPlayer.playerID, componentInParent.playerID }); } return (HasToReturn)1; } [UnboundRPC] public static void RPCA_ApplyBurn(int ownerID, int victimID) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == ownerID); Player val2 = PlayerManager.instance.players.Find((Player p) => p.playerID == victimID); if (!((Object)(object)val == (Object)null) && !((Object)(object)val2 == (Object)null)) { BPBurnOnHitMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.OnBulletHit(val2); } } } } public class BPFirstBloodMono : MonoBehaviour { [CompilerGenerated] private sealed class d__21 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BPFirstBloodMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__21(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.RevertBuff(); CooldownUI firstBloodUI = <>4__this.firstBloodUI; if (firstBloodUI != null) { firstBloodUI.Hide(); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float BuffDuration = 5f; private Player player; private Gun gun; private bool buffApplied; private float buffTimer; private float appliedDmgMult = 1f; private float appliedAtkMult = 1f; private CooldownUI firstBloodUI; private Color originalBulletColor; private ObjectsToSpawn trailSpawner; public int StackCount { get; private set; } public void AddStack() { StackCount++; } public void RemoveStack() { StackCount = Mathf.Max(0, StackCount - 1); } private void Start() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); CharacterData component = ((Component)this).GetComponent(); gun = component?.weaponHandler?.gun; GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if (IsMine() && (Object)(object)component?.view != (Object)null) { firstBloodUI = CooldownUI.Create(((Component)this).transform, 1f); firstBloodUI.SetIcon("BPFB", (Color?)new Color(1f, 0.4f, 0f)); } } private void OnDestroy() { RevertBuff(); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)firstBloodUI != (Object)null) { Object.Destroy((Object)(object)((Component)firstBloodUI).gameObject); } } private void Update() { if (buffApplied) { buffTimer -= Time.deltaTime; if (buffTimer <= 0f) { RevertBuff(); } } if ((Object)(object)firstBloodUI != (Object)null) { if (buffApplied) { firstBloodUI.ShowActive(buffTimer); } else { firstBloodUI.Hide(); } } } public void ActivateBuff() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown if ((Object)(object)gun == (Object)null || StackCount == 0) { return; } if (buffApplied) { buffTimer = 5f; return; } int stackCount = StackCount; appliedDmgMult = 1f + 0.5f * (float)stackCount; appliedAtkMult = 1f + 0.25f * (float)stackCount; Gun obj = gun; obj.damage *= appliedDmgMult; Gun obj2 = gun; obj2.attackSpeed /= appliedAtkMult; originalBulletColor = gun.projectileColor; gun.projectileColor = new Color(1f, 0.1f, 0.1f); if (trailSpawner == null) { ObjectsToSpawn val = new ObjectsToSpawn(); val.AddToProjectile = new GameObject("A_FBTrail", new Type[1] { typeof(BPFirstBloodTrailMono) }); trailSpawner = val; } List list = gun.objectsToSpawn.ToList(); list.Add(trailSpawner); gun.objectsToSpawn = list.ToArray(); buffApplied = true; buffTimer = 5f; if ((Object)(object)player != (Object)null) { NetworkingManager.RPC(typeof(BPFirstBloodMono), "RPCA_Pulse", new object[1] { player.playerID }); } } private void RevertBuff() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (buffApplied && !((Object)(object)gun == (Object)null)) { Gun obj = gun; obj.damage /= appliedDmgMult; Gun obj2 = gun; obj2.attackSpeed *= appliedAtkMult; appliedDmgMult = 1f; appliedAtkMult = 1f; gun.projectileColor = originalBulletColor; if (trailSpawner != null) { List list = gun.objectsToSpawn.ToList(); list.Remove(trailSpawner); gun.objectsToSpawn = list.ToArray(); } buffApplied = false; buffTimer = 0f; } } [IteratorStateMachine(typeof(d__21))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__21(0) { <>4__this = this, gm = gm }; } private bool IsMine() { return PhotonNetwork.OfflineMode || (Object)(object)player?.data?.view == (Object)null || player.data.view.IsMine; } [UnboundRPC] public static void RPCA_Pulse(int playerID) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) Player val = PlayerManager.instance?.players?.Find((Player pl) => pl != null && pl.playerID == playerID); if ((Object)(object)val != (Object)null) { BloodPactMono.StartPulse(((Component)val).transform, new Color(1f, 0.25f, 0f, 0.9f), 1.35f, 0.3f); } } } public class BPFirstBloodTrailMono : MonoBehaviour { private void Awake() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0065: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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) TrailRenderer val = ((Component)this).gameObject.AddComponent(); val.time = 0.14f; val.startWidth = 0.18f; val.endWidth = 0f; ((Renderer)val).material = new Material(Shader.Find("Sprites/Default")); Gradient val2 = new Gradient(); val2.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(new Color(1f, 0.55f, 0.05f), 0f), new GradientColorKey(new Color(0.9f, 0.05f, 0.05f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey(0.85f, 0f), new GradientAlphaKey(0f, 1f) }); val.colorGradient = val2; ((Renderer)val).sortingOrder = 5; } } public class BPFocusMono : MonoBehaviour { [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BPFocusMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.RevertMultiplier(); CooldownUI stacksUI = <>4__this.stacksUI; if (stacksUI != null) { stacksUI.Hide(); } 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 int MaxStacks = 5; private const float DamagePerStack = 0.15f; private Player player; private Gun gun; private int stacks; private float currentMultiplier = 1f; private CooldownUI stacksUI; private int lastFocusStacks = -1; private void Start() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); CharacterData component = ((Component)this).GetComponent(); gun = component?.weaponHandler?.gun; GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if (IsMine() && (Object)(object)component?.view != (Object)null) { stacksUI = CooldownUI.Create(((Component)this).transform, 1f); stacksUI.SetIcon("BPF", (Color?)new Color(1f, 0.6f, 0f)); } } private void OnDestroy() { RevertMultiplier(); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)stacksUI != (Object)null) { Object.Destroy((Object)(object)((Component)stacksUI).gameObject); } } private void Update() { //IL_0091: 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) if ((Object)(object)stacksUI == (Object)null) { return; } if (stacks > 0) { if (stacks != lastFocusStacks) { stacksUI.SetIcon("BPF", (Color?)new Color(1f, 0.6f, 0f)); lastFocusStacks = stacks; } stacksUI.ShowText(stacks.ToString(), new Color(1f, 0.6f, 0f)); } else { lastFocusStacks = -1; stacksUI.Hide(); } } public void AddStack() { if (!((Object)(object)gun == (Object)null) && stacks < 5) { Gun obj = gun; obj.damage /= currentMultiplier; stacks++; currentMultiplier = 1f + (float)stacks * 0.15f; Gun obj2 = gun; obj2.damage *= currentMultiplier; } } public void ResetStacks() { if (stacks != 0) { RevertMultiplier(); } } private void RevertMultiplier() { if (stacks != 0 && !((Object)(object)gun == (Object)null)) { Gun obj = gun; obj.damage /= currentMultiplier; stacks = 0; currentMultiplier = 1f; } } [IteratorStateMachine(typeof(d__14))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { <>4__this = this, gm = gm }; } private bool IsMine() { return PhotonNetwork.OfflineMode || (Object)(object)player?.data?.view == (Object)null || player.data.view.IsMine; } } public class BPExecuteMono : MonoBehaviour { private Player player; public bool HasExecute { get; set; } private void Start() { player = ((Component)this).GetComponent(); } public bool IsMine() { return PhotonNetwork.OfflineMode || (Object)(object)player?.data?.view == (Object)null || player.data.view.IsMine; } [UnboundRPC] public static void RPCA_ApplyExecuteReward(int playerID) { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) Player val = PlayerManager.instance?.players?.Find((Player pl) => (Object)(object)pl != (Object)null && pl.playerID == playerID); if ((Object)(object)val == (Object)null || (Object)(object)val.data == (Object)null) { return; } val.data.health = val.data.maxHealth; WeaponHandler weaponHandler = val.data.weaponHandler; if (weaponHandler != null) { Gun gun = weaponHandler.gun; if (gun != null) { GunAmmo componentInChildren = ((Component)gun).GetComponentInChildren(); if (componentInChildren != null) { componentInChildren.ReloadAmmo(false); } } } BloodPactMono.StartPulse(((Component)val).transform, new Color(0.6f, 0f, 0.1f, 0.85f), 1.4f, 0.3f); BloodPactMono.StartPulse(((Component)val).transform, new Color(0.15f, 0.95f, 0.3f, 0.9f), 1.9f, 0.55f); } } public class BPBloodDebtMono : MonoBehaviour { [CompilerGenerated] private sealed class d__19 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BPBloodDebtMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.RevertBuff(); <>4__this.LastAttackerID = -1; <>4__this.debtTargetID = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__18 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BPBloodDebtMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__18(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (<>4__this.debtActive && !<>4__this.buffApplied && <>4__this.IsMine() && (Object)(object)<>4__this.gun != (Object)null) { Gun gun = <>4__this.gun; gun.damage *= 1.6f; Gun gun2 = <>4__this.gun; gun2.projectileSpeed *= 1.6f; <>4__this.buffApplied = true; <>4__this.speedBuffApplied = true; if (<>4__this.debtTargetID >= 0) { Player player = <>4__this.player; if (player != null) { ((Component)player).GetComponent()?.ForceMark(<>4__this.debtTargetID); } } if ((Object)(object)<>4__this.player != (Object)null) { NetworkingManager.RPC(typeof(BPBloodDebtMono), "RPCA_Pulse", new object[1] { <>4__this.player.playerID }); } } <>4__this.debtActive = false; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float DebtDamageMultiplier = 1.6f; private Player player; private Gun gun; private bool debtActive; private bool buffApplied; private bool speedBuffApplied; private int debtTargetID = -1; public bool HasDebt { get; set; } public int LastAttackerID { get; set; } = -1; private void Start() { player = ((Component)this).GetComponent(); gun = ((Component)this).GetComponent()?.weaponHandler?.gun; GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } private void OnDestroy() { RevertBuff(); GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); } public void ActivateDebt(int targetID) { debtActive = true; debtTargetID = targetID; } [IteratorStateMachine(typeof(d__18))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__18(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__19))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__19(0) { <>4__this = this, gm = gm }; } private void RevertBuff() { if (buffApplied && !((Object)(object)gun == (Object)null)) { Gun obj = gun; obj.damage /= 1.6f; if (speedBuffApplied) { Gun obj2 = gun; obj2.projectileSpeed /= 1.6f; speedBuffApplied = false; } buffApplied = false; } } private bool IsMine() { return PhotonNetwork.OfflineMode || (Object)(object)player?.data?.view == (Object)null || player.data.view.IsMine; } [UnboundRPC] public static void RPCA_Pulse(int playerID) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) Player val = PlayerManager.instance?.players?.Find((Player pl) => pl != null && pl.playerID == playerID); if ((Object)(object)val != (Object)null) { BloodPactMono.StartPulse(((Component)val).transform, new Color(0.8f, 0f, 0.15f, 0.9f), 2.2f, 0.7f); BloodPactMono.StartPulse(((Component)val).transform, new Color(1f, 0.3f, 0f, 0.85f), 1.6f, 0.4f); } } } public class BPSealMono : MonoBehaviour { private Player player; public bool HasSeal { get; set; } private void Start() { player = ((Component)this).GetComponent(); } [UnboundRPC] public static void RPCA_ApplySeal(int victimID) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) Player val = PlayerManager.instance?.players?.Find((Player p) => p != null && p.playerID == victimID); if (!((Object)(object)val == (Object)null)) { ExtensionMethods.GetOrAddComponent(((Component)val).gameObject, false).ApplySeal(2f); BloodPactMono.StartPulse(((Component)val).transform, new Color(0.5f, 0f, 0.8f, 0.8f), 1.5f, 0.45f); } } } public class BPSealedMono : MonoBehaviour { private float sealTimer; private GameObject sealVisual; public bool IsSealed => sealTimer > 0f; public void ApplySeal(float duration) { sealTimer = duration; EnsureSealVisual(); } private void Update() { if (sealTimer > 0f) { sealTimer = Mathf.Max(0f, sealTimer - Time.deltaTime); if (sealTimer <= 0f) { DestroySealVisual(); } } } private void OnDestroy() { DestroySealVisual(); } private void EnsureSealVisual() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_01ca: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)sealVisual != (Object)null)) { sealVisual = new GameObject("BPSealVisual"); sealVisual.transform.SetParent(((Component)this).transform, false); sealVisual.transform.localPosition = Vector3.zero; SpriteRenderer componentInChildren = ((Component)this).GetComponentInChildren(); int sortingLayerID = (((Object)(object)componentInChildren != (Object)null) ? ((Renderer)componentInChildren).sortingLayerID : 0); int sortingOrder = (((Object)(object)componentInChildren != (Object)null) ? (((Renderer)componentInChildren).sortingOrder + 5) : 5); GameObject val = new GameObject("SealCircle"); val.transform.SetParent(sealVisual.transform, false); LineRenderer val2 = val.AddComponent(); val2.useWorldSpace = false; val2.loop = true; int num2 = (val2.positionCount = 48); val2.startWidth = 0.07f; val2.endWidth = 0.07f; ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); val2.startColor = new Color(0.6f, 0f, 1f, 0.9f); val2.endColor = new Color(0.6f, 0f, 1f, 0.9f); ((Renderer)val2).sortingLayerID = sortingLayerID; ((Renderer)val2).sortingOrder = sortingOrder; for (int i = 0; i < num2; i++) { float num3 = MathF.PI * 2f * (float)i / (float)num2; val2.SetPosition(i, new Vector3(Mathf.Cos(num3) * 1.15f, Mathf.Sin(num3) * 1.15f, 0f)); } sealVisual.AddComponent().Init(new Color(0.6f, 0f, 1f, 0.9f)); } } private void DestroySealVisual() { if ((Object)(object)sealVisual != (Object)null) { Object.Destroy((Object)(object)sealVisual); } sealVisual = null; } } public class BPSealVisualPulse : MonoBehaviour { private LineRenderer[] lines; private Color baseColor; private float seed; public void Init(Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) baseColor = color; seed = Random.Range(0f, MathF.PI * 2f); lines = ((Component)this).GetComponentsInChildren(); } private void Update() { //IL_00d0: 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) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) if (lines == null || lines.Length == 0) { lines = ((Component)this).GetComponentsInChildren(); } Transform parent = ((Component)this).transform.parent; float num = 0.95f + Mathf.Sin(Time.time * 6f + seed) * 0.05f; if ((Object)(object)parent != (Object)null) { Vector3 lossyScale = parent.lossyScale; float num2 = 1f / Mathf.Max(0.001f, Mathf.Abs(lossyScale.x)); float num3 = 1f / Mathf.Max(0.001f, Mathf.Abs(lossyScale.y)); ((Component)this).transform.localScale = new Vector3(num * num2, num * num3, 1f); } else { ((Component)this).transform.localScale = Vector3.one * num; } Color val = baseColor; val.a = baseColor.a * (0.65f + Mathf.Sin(Time.time * 9f + seed) * 0.25f); for (int i = 0; i < lines.Length; i++) { if (!((Object)(object)lines[i] == (Object)null)) { lines[i].startColor = val; lines[i].endColor = val; } } } } public class BPBloodFrenzyMono : MonoBehaviour { [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public BPBloodFrenzyMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.RevertSpeed(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Player player; private CharacterStatModifiers stats; private Gun gun; private BloodPactMono bpm; private float appliedSpeedMult = 1f; private float appliedAtkMult = 1f; private bool hasFrenzy; public bool HasFrenzy { get { return hasFrenzy; } set { if (!value && hasFrenzy) { RevertSpeed(); } hasFrenzy = value; } } private void Start() { player = ((Component)this).GetComponent(); CharacterData component = ((Component)this).GetComponent(); stats = component?.stats; gun = component?.weaponHandler?.gun; bpm = ((Component)this).GetComponent(); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } private void OnDestroy() { RevertSpeed(); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); } private void Update() { if (!hasFrenzy || (Object)(object)stats == (Object)null || !IsMine()) { return; } if ((Object)(object)bpm == (Object)null) { bpm = ((Component)this).GetComponent(); } float num = 1f; if ((Object)(object)bpm != (Object)null) { Player val = PlayerManager.instance?.players?.Find((Player p) => p?.playerID == bpm.MarkedPlayerID); if ((Object)(object)val != (Object)null && (Object)(object)val.data != (Object)null && !val.data.dead && val.data.maxHealth > 0f) { float num2 = Mathf.Clamp01(1f - val.data.health / val.data.maxHealth); num = 1f + num2 * 0.5f; } } if (Mathf.Abs(num - appliedSpeedMult) > 0.001f) { CharacterStatModifiers obj = stats; obj.movementSpeed /= appliedSpeedMult; if ((Object)(object)gun != (Object)null) { Gun obj2 = gun; obj2.attackSpeed *= appliedAtkMult; } appliedSpeedMult = num; appliedAtkMult = num; CharacterStatModifiers obj3 = stats; obj3.movementSpeed *= appliedSpeedMult; if ((Object)(object)gun != (Object)null) { Gun obj4 = gun; obj4.attackSpeed /= appliedAtkMult; } } } private void RevertSpeed() { if ((Object)(object)stats != (Object)null && Mathf.Abs(appliedSpeedMult - 1f) > 0.001f) { CharacterStatModifiers obj = stats; obj.movementSpeed /= appliedSpeedMult; } if ((Object)(object)gun != (Object)null && Mathf.Abs(appliedAtkMult - 1f) > 0.001f) { Gun obj2 = gun; obj2.attackSpeed *= appliedAtkMult; } appliedSpeedMult = 1f; appliedAtkMult = 1f; } [IteratorStateMachine(typeof(d__14))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { <>4__this = this, gm = gm }; } private bool IsMine() { return PhotonNetwork.OfflineMode || (Object)(object)player?.data?.view == (Object)null || player.data.view.IsMine; } } public class BPBloodTributeMono : MonoBehaviour { private const int MaxStacks = 4; private const float DamagePerStack = 0.25f; private Player player; private Gun gun; private int stacks; private float appliedDmgMult = 1f; private bool hasTribute; private CooldownUI stacksUI; public bool HasTribute { get { return hasTribute; } set { if (!value && hasTribute) { RevertStacks(); } hasTribute = value; } } public bool IsMine() { return PhotonNetwork.OfflineMode || (Object)(object)player?.data?.view == (Object)null || player.data.view.IsMine; } private void Start() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); CharacterData component = ((Component)this).GetComponent(); gun = component?.weaponHandler?.gun; if (IsMine() && (Object)(object)component?.view != (Object)null) { stacksUI = CooldownUI.Create(((Component)this).transform, 1f); stacksUI.SetIcon("BPBT", (Color?)new Color(0.9f, 0.6f, 0f)); } } private void Update() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)stacksUI == (Object)null)) { if (stacks > 0) { stacksUI.ShowText(stacks.ToString(), new Color(0.9f, 0.6f, 0f)); } else { stacksUI.Hide(); } } } private void OnDestroy() { RevertStacks(); if ((Object)(object)stacksUI != (Object)null) { Object.Destroy((Object)(object)((Component)stacksUI).gameObject); } } public void AddStack() { if (hasTribute && !((Object)(object)gun == (Object)null) && stacks < 4) { Gun obj = gun; obj.damage /= appliedDmgMult; stacks++; appliedDmgMult = 1f + (float)stacks * 0.25f; Gun obj2 = gun; obj2.damage *= appliedDmgMult; if ((Object)(object)player != (Object)null) { NetworkingManager.RPC(typeof(BPBloodTributeMono), "RPCA_StackPulse", new object[2] { player.playerID, stacks }); } } } public void ResetStacks() { if (stacks != 0 && !((Object)(object)gun == (Object)null)) { RevertStacks(); if ((Object)(object)player != (Object)null) { NetworkingManager.RPC(typeof(BPBloodTributeMono), "RPCA_ResetPulse", new object[1] { player.playerID }); } } } private void RevertStacks() { if (!((Object)(object)gun == (Object)null) && stacks != 0) { Gun obj = gun; obj.damage /= appliedDmgMult; stacks = 0; appliedDmgMult = 1f; } } [UnboundRPC] public static void RPCA_StackPulse(int playerID, int newStacks) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) Player val = PlayerManager.instance?.players?.Find((Player pl) => pl != null && pl.playerID == playerID); if ((Object)(object)val != (Object)null) { BloodPactMono.StartPulse(((Component)val).transform, new Color(0.9f, 0.7f, 0f, 0.9f), 1.2f + (float)newStacks * 0.1f, 0.3f); } } [UnboundRPC] public static void RPCA_ResetPulse(int playerID) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) Player val = PlayerManager.instance?.players?.Find((Player pl) => pl != null && pl.playerID == playerID); if ((Object)(object)val != (Object)null) { BloodPactMono.StartPulse(((Component)val).transform, new Color(0.5f, 0f, 0f, 0.9f), 1.5f, 0.5f); } } } [HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")] internal static class BPMarkHitPatch { public static void Postfix(ProjectileHit __instance, Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID, int colliderID, bool wasBlocked) { if (viewID == -1 || wasBlocked || (Object)(object)__instance.ownPlayer == (Object)null || (!PhotonNetwork.OfflineMode && !__instance.ownPlayer.data.view.IsMine)) { return; } PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); if ((Object)(object)photonView == (Object)null) { return; } Player component = ((Component)photonView).GetComponent(); if ((Object)(object)component == (Object)null || component.data.dead) { return; } BloodPactMono component2 = ((Component)__instance.ownPlayer).GetComponent(); if ((Object)(object)component2 == (Object)null) { return; } bool flag = component.playerID == component2.MarkedPlayerID; BPFirstBloodMono component3 = ((Component)__instance.ownPlayer).GetComponent(); if ((Object)(object)component3 != (Object)null && flag) { component3.ActivateBuff(); } BPFocusMono component4 = ((Component)__instance.ownPlayer).GetComponent(); if ((Object)(object)component4 != (Object)null) { if (flag) { component4.AddStack(); } else { component4.ResetStacks(); } } if (flag && Random.value < 0.5f) { BPSealMono component5 = ((Component)__instance.ownPlayer).GetComponent(); if ((Object)(object)component5 != (Object)null && component5.HasSeal) { NetworkingManager.RPC(typeof(BPSealMono), "RPCA_ApplySeal", new object[1] { component.playerID }); } } } } [HarmonyPatch(typeof(HealthHandler), "DoDamage")] internal static class BPLastAttackerPatch { internal static readonly Dictionary LastHitBy = new Dictionary(); public static void Prefix(HealthHandler __instance, Vector2 damage, Vector2 position, Color blinkColor, GameObject damagingWeapon, Player damagingPlayer) { if ((Object)(object)damagingPlayer == (Object)null) { return; } Player component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { LastHitBy[component.playerID] = damagingPlayer.playerID; BPBloodDebtMono component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 != (Object)null && component2.HasDebt) { component2.LastAttackerID = damagingPlayer.playerID; } } } } [HarmonyPatch(typeof(HealthHandler), "RPCA_Die")] internal static class BPDeathEffectsPatch { public static void Prefix(HealthHandler __instance, Vector2 deathDirection) { Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null || (Object)(object)PlayerManager.instance == (Object)null) { return; } BPLastAttackerPatch.LastHitBy.TryGetValue(component.playerID, out var value); foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || (Object)(object)player == (Object)(object)component) { continue; } BPExecuteMono component2 = ((Component)player).GetComponent(); if (!((Object)(object)component2 == (Object)null) && component2.HasExecute && component2.IsMine()) { BloodPactMono component3 = ((Component)player).GetComponent(); if (!((Object)(object)component3 == (Object)null) && component3.MarkedPlayerID == component.playerID && value == player.playerID) { NetworkingManager.RPC(typeof(BPExecuteMono), "RPCA_ApplyExecuteReward", new object[1] { player.playerID }); } } } BPBloodDebtMono component4 = ((Component)component).GetComponent(); BloodPactMono component5 = ((Component)component).GetComponent(); if ((Object)(object)component4 != (Object)null && component4.HasDebt && (Object)(object)component5 != (Object)null && component4.LastAttackerID >= 0 && component4.LastAttackerID == component5.MarkedPlayerID) { component4.ActivateDebt(component5.MarkedPlayerID); } foreach (Player player2 in PlayerManager.instance.players) { if ((Object)(object)player2 == (Object)null || (Object)(object)player2.data == (Object)null || (Object)(object)player2 == (Object)(object)component) { continue; } BPBloodTributeMono component6 = ((Component)player2).GetComponent(); if (!((Object)(object)component6 == (Object)null) && component6.HasTribute && component6.IsMine()) { BloodPactMono component7 = ((Component)player2).GetComponent(); if (!((Object)(object)component7 == (Object)null) && component7.MarkedPlayerID == component.playerID && value == player2.playerID) { component6.AddStack(); } } } BPBloodTributeMono component8 = ((Component)component).GetComponent(); if ((Object)(object)component8 != (Object)null && component8.HasTribute && component8.IsMine() && (Object)(object)component5 != (Object)null && value >= 0 && value == component5.MarkedPlayerID) { component8.ResetStacks(); } } } [HarmonyPatch(typeof(Block), "DoBlock")] internal static class BPSealBlockPatch { public static bool Prefix(Block __instance) { Player component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } BPSealedMono component2 = ((Component)component).GetComponent(); return (Object)(object)component2 == (Object)null || !component2.IsSealed; } } internal class BloodPactClass : ClassHandler { [CompilerGenerated] private sealed class d__0 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BloodPactClass <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if ((Object)(object)BloodPactCard.card == (Object)null || (Object)(object)BloodPactOfferingCard.card == (Object)null || (Object)(object)BPHemorrhageCard.card == (Object)null || (Object)(object)BPSurgeCard.card == (Object)null || (Object)(object)BPSwiftCard.card == (Object)null || (Object)(object)BPPredatorCard.card == (Object)null || (Object)(object)BPVolleyCard.card == (Object)null || (Object)(object)BPRicochetCard.card == (Object)null || (Object)(object)BPTorrentCard.card == (Object)null || (Object)(object)BPPierceCard.card == (Object)null || (Object)(object)BPBloodbathCard.card == (Object)null || (Object)(object)BPOverdrawCard.card == (Object)null || (Object)(object)BPFirstBloodCard.card == (Object)null || (Object)(object)BPFocusCard.card == (Object)null || (Object)(object)BPExecuteCard.card == (Object)null || (Object)(object)BPBloodDebtCard.card == (Object)null || (Object)(object)BPChainCard.card == (Object)null || (Object)(object)BPSealCard.card == (Object)null || (Object)(object)BPBloodFrenzyCard.card == (Object)null || (Object)(object)BPBloodTributeCard.card == (Object)null) { <>2__current = null; <>1__state = 1; return true; } ClassesRegistry.Register(BloodPactCard.card, (CardType)1, 0); ClassesRegistry.Register(BloodPactOfferingCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPHemorrhageCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPSurgeCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPSwiftCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPPredatorCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPVolleyCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPRicochetCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPTorrentCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPPierceCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPBloodbathCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPOverdrawCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPFirstBloodCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPFocusCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPExecuteCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPBloodDebtCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPChainCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPSealCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPBloodFrenzyCard.card, (CardType)16, BloodPactCard.card, 0); ClassesRegistry.Register(BPBloodTributeCard.card, (CardType)16, BloodPactCard.card, 0); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [IteratorStateMachine(typeof(d__0))] public override IEnumerator Init() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__0(0) { <>4__this = this }; } } internal class BounceConverter : CustomCard { private float buff_value = 0.1f; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { IEnumerable first = ((ObservableCollection)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToList(); List second = (List)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); ObjectsToSpawn item = new List(((Component)(from card in first.Concat(second).ToList() where ((Object)((Component)card).gameObject).name == "TargetBounce" select card).ToList()[0]).GetComponent().objectsToSpawn).Where((ObjectsToSpawn objectToSpawn) => (Object)(object)objectToSpawn.AddToProjectile.GetComponent() != (Object)null).ToList()[0]; List list = gun.objectsToSpawn.ToList(); list.Add(item); gun.objectsToSpawn = list.ToArray(); Debug.Log((object)$"reflects before: {gun.reflects}. DMG: {gun.damage}, HP: {characterStats.health}, BS: {gun.projectileSpeed}"); if (gun.reflects < 1) { gun.reflects += 5; Debug.Log((object)$"reflects after 1: {gun.reflects}. DMG: {gun.damage}, HP: {characterStats.health}, BS: {gun.projectileSpeed}"); } else if (gun.reflects > 0 && gun.reflects < 11) { characterStats.health *= 1f + buff_value * (float)gun.reflects; gun.damage *= 1f + buff_value * (float)gun.reflects; gun.projectileSpeed *= 1f + buff_value * (float)gun.reflects; gun.reflects = 0; Debug.Log((object)$"reflects after 2: {gun.reflects}. DMG: {gun.damage}, HP: {characterStats.health}, BS: {gun.projectileSpeed}"); } else { characterStats.health *= 2f; gun.damage *= 2f; gun.projectileSpeed *= 2f; gun.reflects = 0; Debug.Log((object)$"reflects after 3: {gun.reflects}. DMG: {gun.damage}, HP: {characterStats.health}, BS: {gun.projectileSpeed}"); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Bounce Converter"; } protected override string GetDescription() { return "If you have no bounces, +5 bounces. Otherwise, sets bounces to zero and gives +10% to DMG, HP and Bullet Speed for each bounce (max bonus at 10 bounces)."; } protected override GameObject GetCardArt() { return Assets.BounceConverter_Art; } 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() { return null; } 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)0; } public override string GetModName() { return "MFM"; } } public class BounceSplitCard : CustomCard { public const float SPLIT_ANGLE = 30f; internal static GameObject BounceSplitEffectPrefab; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown ScreenEdgeBounceHelper.Add(gun); gun.reflects += 10; if ((Object)(object)BounceSplitEffectPrefab == (Object)null) { BounceSplitEffectPrefab = new GameObject("BounceSplitEffect", new Type[1] { typeof(BounceSplitEffect) }); Object.DontDestroyOnLoad((Object)(object)BounceSplitEffectPrefab); } List list = gun.objectsToSpawn.ToList(); list.Add(new ObjectsToSpawn { AddToProjectile = BounceSplitEffectPrefab }); gun.objectsToSpawn = list.ToArray(); BounceSplitTracker orAddComponent = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); orAddComponent.stackCount++; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Remove(gun); gun.reflects -= 10; List list = gun.objectsToSpawn.ToList(); ObjectsToSpawn val = ((IEnumerable)list).FirstOrDefault((Func)((ObjectsToSpawn o) => (Object)(object)o.AddToProjectile != (Object)null && ((Object)o.AddToProjectile).name == "BounceSplitEffect")); if (val != null) { list.Remove(val); } gun.objectsToSpawn = list.ToArray(); BounceSplitTracker component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.stackCount--; if (component.stackCount <= 0) { Object.Destroy((Object)(object)component); } } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //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: Expected O, but got Unknown ScreenEdgeBounceHelper.Add(gun); gun.reflects += 10; if ((Object)(object)BounceSplitEffectPrefab != (Object)null) { List list = gun.objectsToSpawn.ToList(); list.Add(new ObjectsToSpawn { AddToProjectile = BounceSplitEffectPrefab }); gun.objectsToSpawn = list.ToArray(); } } protected override string GetTitle() { return "Bounce Split"; } protected override string GetDescription() { return "Each bounce spawns an extra bullet from the wall with remaining bounces. Stacks add more bullets per bounce."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Bounces", amount = "+10", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "MFM"; } } public class BounceSplitTracker : MonoBehaviour { public int stackCount = 0; } public class SplitBulletMarker : MonoBehaviour { } public class BounceSplitEffect : MonoBehaviour { private ProjectileHit projectileHit; private RayHitReflect rayHitReflect; private MoveTransform move; private void Awake() { projectileHit = ((Component)this).GetComponentInParent(); rayHitReflect = ((Component)this).GetComponentInParent(); move = ((Component)this).GetComponentInParent(); } private void Start() { if ((Object)(object)projectileHit == (Object)null) { projectileHit = ((Component)this).GetComponentInParent(); } if ((Object)(object)rayHitReflect == (Object)null) { rayHitReflect = ((Component)this).GetComponentInParent(); } if ((Object)(object)move == (Object)null) { move = ((Component)this).GetComponentInParent(); } if ((Object)(object)rayHitReflect != (Object)null) { RayHitReflect obj = rayHitReflect; obj.reflectAction = (Action)Delegate.Combine(obj.reflectAction, new Action(OnBulletReflect)); } } private void OnDestroy() { if ((Object)(object)rayHitReflect != (Object)null) { RayHitReflect obj = rayHitReflect; obj.reflectAction = (Action)Delegate.Remove(obj.reflectAction, new Action(OnBulletReflect)); } } private void OnBulletReflect(HitInfo hit) { //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: 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_018c: 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_0192: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectileHit == (Object)null || (Object)(object)move == (Object)null || (Object)(object)rayHitReflect == (Object)null) { return; } Player ownPlayer = projectileHit.ownPlayer; if ((Object)(object)ownPlayer == (Object)null || (!PhotonNetwork.OfflineMode && !ownPlayer.data.view.IsMine) || (Object)(object)((Component)this).GetComponentInParent() != (Object)null) { return; } BounceSplitTracker component = ((Component)ownPlayer).GetComponent(); if ((Object)(object)component == (Object)null || component.stackCount <= 0) { return; } float magnitude = ((Vector3)(ref move.velocity)).magnitude; if (!(magnitude < 0.001f)) { float num = ((rayHitReflect.speedM > 0.001f) ? rayHitReflect.speedM : 1f); float num2 = magnitude * num; Vector2 val = Vector2.Reflect(Vector2.op_Implicit(((Vector3)(ref move.velocity)).normalized), hit.normal); Vector2 normalized = ((Vector2)(ref val)).normalized; int stackCount = component.stackCount; float num3 = (float)(stackCount - 1) * 30f * 0.5f; for (int i = 0; i < stackCount; i++) { float degrees = 0f - num3 + (float)i * 30f; Vector2 val2 = RotateVector(normalized, degrees); Vector2 position = hit.point + val2 * 0.15f; SpawnEchoBullet(ownPlayer, position, val2 * num2); } } } private static void SpawnEchoBullet(Player owner, Vector2 position, Vector2 velocity) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_0183: 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) Holding component = ((Component)owner).GetComponent(); if ((Object)(object)component?.holdable == (Object)null) { return; } Gun component2 = ((Component)component.holdable).GetComponent(); if ((Object)(object)component2 == (Object)null || component2.projectiles == null || component2.projectiles.Length == 0) { return; } string name = ((Object)component2.projectiles[0].objectToSpawn.gameObject).name; Vector3 velocity2 = default(Vector3); ((Vector3)(ref velocity2))..ctor(velocity.x, velocity.y, 0f); Vector3 val = ((((Vector3)(ref velocity2)).magnitude > 0.001f) ? ((Vector3)(ref velocity2)).normalized : Vector3.forward); GameObject val2 = PhotonNetwork.Instantiate(name, new Vector3(position.x, position.y, 0f), Quaternion.LookRotation(val, Vector3.forward), (byte)0, (object[])null); float num = Random.Range(0f, 1f); if (PhotonNetwork.OfflineMode) { component2.BulletInit(val2, 1, 1f, num, false); } else { val2.GetComponent().RPC("RPCA_Init_noAmmoUse", (RpcTarget)0, new object[4] { owner.data.view.OwnerActorNr, 1, 1f, num }); } val2.AddComponent(); MoveTransform component3 = val2.GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.DontRunStart = true; component3.velocity = velocity2; } if (PhotonNetwork.OfflineMode) { RayHitReflect component4 = val2.GetComponent(); if ((Object)(object)component4 != (Object)null) { component4.reflects = 1; } } } private static Vector2 RotateVector(Vector2 v, float degrees) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_003e: 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) float num = degrees * (MathF.PI / 180f); float num2 = Mathf.Cos(num); float num3 = Mathf.Sin(num); return new Vector2(v.x * num2 - v.y * num3, v.x * num3 + v.y * num2); } } public class BulletTeleporterCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.cdAdd = 0.5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BulletTeleporterMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BulletTeleporterMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Bullet Teleporter"; } protected override string GetDescription() { return "Block to charge: +100% bullet speed, teleport to impact location."; } protected override GameObject GetCardArt() { return Assets.BulletTeleporterArt; } protected override Rarity GetRarity() { 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 = false, stat = "Block Cooldown", amount = "+0.5s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)8; } public override string GetModName() { return "DRON"; } } internal class CalibrateCard : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__1(IGameModeHandler gm) { return EndResetPick(player); } internal IEnumerator b__0(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(ResetPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class <>c__DisplayClass12_0 { public Player player; public Func <>9__0; internal bool b__0(int i) { return PlayerManager.instance.players[i].playerID == player.playerID; } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private List 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; 5__1 = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!5__1.Contains(MrFuntikMod.ResetCards)) { 5__1.Add(MrFuntikMod.ResetCards); 5__1.Remove(MrFuntikMod.NonResetCards); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Player[] 5__1; private int 5__2; private <>c__DisplayClass12_0 <>8__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>8__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown int num; switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = PlayerManager.instance.players.ToArray(); 5__2 = 0; goto IL_0217; case 1: <>1__state = -1; 5__4 = (from i in Enumerable.Range(0, PlayerManager.instance.players.Count) where PlayerManager.instance.players[i].playerID == <>8__3.player.playerID select i).First(); CardChoiceVisuals.instance.Show(5__4, true); <>2__current = CardChoice.instance.DoPick(1, <>8__3.player.playerID, (PickerType)1); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = GameModeManager.TriggerHook("PlayerPickEnd"); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 5; return true; case 5: { <>1__state = -1; goto IL_01d6; } IL_01d6: if (<>8__3.player.data.stats.GetAdditionalData().calibrateStacks > 0) { <>8__3.player.data.stats.GetAdditionalData().calibrateStacks--; <>2__current = GameModeManager.TriggerHook("PlayerPickStart"); <>1__state = 1; return true; } <>8__3 = null; num = 5__2 + 1; 5__2 = num; goto IL_0217; IL_0217: if (5__2 < 5__1.Length) { <>8__3 = new <>c__DisplayClass12_0(); <>8__3.player = 5__1[5__2]; goto IL_01d6; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; private List 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { 5__2 = CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories; if (5__2.Contains(MrFuntikMod.ResetCards)) { 5__2.Add(MrFuntikMod.NonResetCards); 5__2.Remove(MrFuntikMod.ResetCards); } GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndResetPick(<>8__1.player))); 5__2 = null; } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(ResetPick(<>8__1.player)); return new List().GetEnumerator(); }); } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; characterStats.GetAdditionalData().calibrateStacks++; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(ResetPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (characterStats.GetAdditionalData().calibrateStacks > 0) { characterStats.GetAdditionalData().calibrateStacks--; } } protected override string GetTitle() { return "Calibrate"; } protected override string GetDescription() { return "Pick a stat to calibrate back to base"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator ResetPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] public static IEnumerator EndResetPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { player = player }; } [IteratorStateMachine(typeof(d__12))] internal static IEnumerator ExtraPicks() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0); } } internal class CalibrateBulletSpreadCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.spread = 0f; gun.evenSpread = 0f; gun.multiplySpread = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Bullet Spread"; } protected override string GetDescription() { return "Resets bullet spread to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateSizeCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.sizeMultiplier = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Size"; } protected override string GetDescription() { return "Resets size to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateBouncesCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.reflects = 0; gun.smartBounce = 0; gun.randomBounces = 0; gun.speedMOnBounce = 1f; gun.dmgMOnBounce = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Bounces"; } protected override string GetDescription() { return "Resets bounces, bounce damage, bounce speed to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateMovementSpeedCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.movementSpeed = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Movement Speed"; } protected override string GetDescription() { return "Resets movement speed to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateDamageCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.damage = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Damage"; } protected override string GetDescription() { return "Resets damage to base (55 damage)."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateAmmoCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.maxAmmo = 3; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Ammo"; } protected override string GetDescription() { return "Resets ammo to base (3)."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateBulletRangeCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.destroyBulletAfter = 0f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Bullet Range"; } protected override string GetDescription() { return "Resets bullet range to base (unlimited)."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateBulletSpeedCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.projectileSpeed = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Bullet Speed"; } protected override string GetDescription() { return "Resets bullet speed to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateReloadSpeedCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.reloadTime = 1f; gun.reloadTimeAdd = 0f; gunAmmo.reloadTime = 1.5f; gunAmmo.reloadTimeMultiplier = 1f; gunAmmo.reloadTimeAdd = 0f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Reload Speed"; } protected override string GetDescription() { return "Resets reload speed to base (1.5s)."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateBlockCooldownCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { block.cooldown = 4f; block.cdAdd = 0f; block.cdMultiplier = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Block Cooldown"; } protected override string GetDescription() { return "Resets block cooldown to base (4s)."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateBulletGravityCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.gravity = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Bullet Gravity"; } protected override string GetDescription() { return "Resets bullet gravity to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateJumpHeightCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.jump = 1f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Jump Height"; } protected override string GetDescription() { return "Resets jump height to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateHPCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { data.maxHealth = 100f; data.health = Mathf.Min(data.health, 100f); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Health"; } protected override string GetDescription() { return "Resets max health to base (100)."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateAttackSpeedCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.attackSpeed = 0.3f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Attack Speed"; } protected override string GetDescription() { return "Resets attack speed to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class CalibrateGravityCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("ResetCards") }; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { float defaultGravityForce = CharacterStatModifiersExtension.GetAdditionalData(characterStats).defaultGravityForce; gravity.gravityForce = defaultGravityForce; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Calibrate: Gravity"; } protected override string GetDescription() { return "Resets player gravity to base."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } public override string GetModName() { return "BFRM"; } } internal class ChessBishopCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) ScreenEdgeBounceHelper.Add(gun); gun.reflects += 2; gun.projectileColor = new Color(1f, 0.05f, 0f, 1f); gun.projectileSpeed *= 2.25f; if (gun.slow > 0f) { gun.slow *= 1.5f; } else { gun.slow += 0.5f; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Remove(gun); gun.reflects = Mathf.Max(0, gun.reflects - 2); } protected override string GetTitle() { return "CHESS BISHOP"; } protected override string GetDescription() { return "Bullets slow the target when hit it." + Environment.NewLine + "Chess Battle Advanced!"; } protected override GameObject GetCardArt() { return Assets.CHESS_BISHOP_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+125%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bounce", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Slow", 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)0; } public override string GetModName() { return "MFM"; } } internal class ChessKnightCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 1.5f; gun.damage = 1.15f; statModifiers.numberOfJumps = 1; card = cardInfo; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ChessKnightMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "CHESS KNIGHT"; } protected override string GetDescription() { return "Blocking pushes you forward.\nChess Battle Advanced!"; } protected override GameObject GetCardArt() { return Assets.CHESS_KNIGHT_Art; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Move Speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Jump", amount = "+1", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } public override string GetModName() { return "MFM"; } } public class ChessKnightMono : MonoBehaviour { private CharacterData data; private Block block; private void Start() { data = ((Component)this).GetComponentInParent(); Block val = (block = ((Component)this).GetComponentInParent()); val.SuperFirstBlockAction = (Action)Delegate.Combine(val.SuperFirstBlockAction, new Action(DoBlock)); } private void OnDestroy() { if ((Object)(object)block != (Object)null) { block.SuperFirstBlockAction = (Action)Delegate.Remove(block.SuperFirstBlockAction, new Action(DoBlock)); } } public void DoBlock(BlockTriggerType trigger) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)data == (Object)null) && !data.dead) { data.healthHandler.TakeForce(Vector2.op_Implicit(data.aimDirection * 8500f), (ForceMode2D)1, true, true, 0f); } } } public class ChessPawn : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.1f; gun.damage = 1.1f; gun.attackSpeed = 0.9090909f; gun.ammo = 2; card = cardInfo; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "CHESS PAWN"; } protected override string GetDescription() { return "Chess Battle Advanced!"; } protected override GameObject GetCardArt() { return Assets.CHESS_PAWN_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //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 = "HP", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "DMG", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+2", 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 "MFM"; } } public class ChessQueenCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.cdMultiplier = 1.5f; statModifiers.health = 1.25f; gun.projectileSpeed = 1.25f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0073: 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_0103: Unknown result type (might be due to invalid IL or missing references) characterStats.GetAdditionalData().piercingDamage += (float)((1.0 - (double)characterStats.GetAdditionalData().piercingDamage) * 0.5); HealthBasedEffect val = ((Component)player).gameObject.AddComponent(); ((ReversibleEffect)val).gunStatModifier.damage_mult = 1.25f; val.SetPercThresholdMax(0.75f); val.SetColor(new Color(1f, 0.45f, 0f, 1f)); HealthBasedEffect val2 = ((Component)player).gameObject.AddComponent(); ((ReversibleEffect)val2).gunStatModifier.damage_mult = 1.25f; val2.SetPercThresholdMax(0.5f); val2.SetColor(new Color(1f, 0.05f, 0f, 1f)); HealthBasedEffect val3 = ((Component)player).gameObject.AddComponent(); ((ReversibleEffect)val3).gunStatModifier.damage_mult = 1.25f; val3.SetPercThresholdMax(0.25f); val3.SetColor(new Color(0.67f, 0.05f, 1f, 1f)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Chess Queen"; } protected override string GetDescription() { return "Every 25% HP lost increases your damage by 25%. Chess Battle Advanced!"; } protected override GameObject GetCardArt() { return Assets.CHESS_QUEEN_Art; } 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 //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 = "Piercing DMG", amount = "+50%", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "DMG scale on HP", amount = "Add", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "HP & Bullet Speed", amount = "+25%", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+50%", simepleAmount = (SimpleAmount)3 } }; } 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 "MFM"; } } internal class ChessRookCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.3f; block.cdMultiplier = 0.8f; card = cardInfo; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "CHESS ROOK"; } protected override string GetDescription() { return "Blocking heals 12% of your max HP." + Environment.NewLine + "Chess Battle Advanced!"; } protected override GameObject GetCardArt() { return Assets.CHESS_ROOK_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Health", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block Cooldown", amount = "-20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "5s", 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)2; } public override string GetModName() { return "MFM"; } } public class ChessRookMono : ReversibleEffect { [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ChessRookMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float COOLDOWN = 5f; private float startTime; private Action blockAction; private CooldownUI cooldownUI; public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnStart() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) startTime = Time.time - 5f; blockAction = OnBlock; base.block.BlockAction = (Action)Delegate.Combine(base.block.BlockAction, blockAction); if (base.data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("R", (Color?)new Color(0.3f, 0.7f, 1f)); } GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)base.data.healthHandler != (Object)null) { HealthHandler healthHandler = base.data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnBlock(BlockTriggerType blockTrigger) { if (base.data.view.IsMine && !(Time.time < startTime + 5f)) { startTime = Time.time; NetworkingManager.RPC(typeof(ChessRookMono), "RPCA_ApplyHeal", new object[2] { base.player.playerID, base.data.maxHealth * 0.12f }); } } [UnboundRPC] public static void RPCA_ApplyHeal(int playerID, float healAmount) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == playerID)); if (!((Object)(object)val == (Object)null) && !((Object)(object)val.data == (Object)null) && !val.data.dead && !((Object)(object)val.data.healthHandler == (Object)null)) { val.data.healthHandler.Heal(healAmount); ChessRookMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.SpawnHealParticles(); } } } private void SpawnHealParticles() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0024: 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_003c: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown GameObject val = new GameObject("ChessRookHealBurst"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; ParticleSystem val2 = val.AddComponent(); MainModule main = val2.main; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.5f, 1f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(4f, 9f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.07f, 0.16f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.2f, 1f, 0.6f, 1f), new Color(0.3f, 0.8f, 1f, 1f)); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)0; ((MainModule)(ref main)).maxParticles = 120; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(-0.3f); ((MainModule)(ref main)).loop = false; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).enabled = true; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ((EmissionModule)(ref emission)).SetBursts((Burst[])(object)new Burst[1] { new Burst(0f, (short)80, (short)100) }); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).enabled = true; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10; ((ShapeModule)(ref shape)).radius = 0.6f; ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(0.5f, 1f, 0.7f), 0f), new GradientColorKey(new Color(0.2f, 0.8f, 1f), 0.5f), new GradientColorKey(new Color(0.1f, 0.4f, 0.8f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.6f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); ParticleSystemRenderer component = val.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 100; ((Renderer)component).material = new Material(Shader.Find("Sprites/Default")); val2.Play(); Object.Destroy((Object)(object)val, 1.5f); } private void Update() { if ((Object)(object)base.data == (Object)null || (Object)(object)base.player == (Object)null) { return; } if (base.data.dead) { CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } else { UpdateUI(); } } private void UpdateUI() { if (!((Object)(object)cooldownUI == (Object)null)) { float num = startTime + 5f - Time.time; if (num > 0f) { cooldownUI.ShowCooldown(num, 5f); } else { cooldownUI.Hide(); } } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__12))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { <>4__this = this, gm = gm }; } private void ResetState() { startTime = Time.time - 5f; CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } public override void OnOnDestroy() { if ((Object)(object)base.block != (Object)null && blockAction != null) { base.block.BlockAction = (Action)Delegate.Remove(base.block.BlockAction, blockAction); } if ((Object)(object)base.data != (Object)null && (Object)(object)base.data.healthHandler != (Object)null) { HealthHandler healthHandler = base.data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } } public class ComeToMeCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.15f; statModifiers.jump = 1.1f; gun.reloadTime = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ComeToMeMono orAddComponent = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); orAddComponent.Initialize(player, block); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ComeToMeMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.Cleanup(); Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Come to me"; } protected override string GetDescription() { return "Teleports the nearest player to you after 2s delay."; } protected override GameObject GetCardArt() { return Assets.ComeToMeArt; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Jump Height", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "5s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)8; } public override string GetModName() { return "DRON"; } } public class DancerCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 1.1f; statModifiers.health = 1.1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { DancerMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.AddStack(); return; } DancerMono dancerMono = ((Component)player).gameObject.AddComponent(); dancerMono.stackCount = 1; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { DancerMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); if (component.stackCount <= 0) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Dancer"; } protected override string GetDescription() { return "Each copy increases your chance to dodge bullets (up to 60%)."; } protected override GameObject? GetCardArt() { return Assets.Dancer_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Dodge Chance", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", amount = "+10%", 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)2; } public override string GetModName() { return "BFRM"; } } public class DeathDefyCard : CustomCard { private static bool hooksRegistered; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; if (!hooksRegistered) { DeathDefyHandler.RegisterHooks(); hooksRegistered = true; } } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { DeathDefyMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.AddStack(); } else { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { DeathDefyMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); if (component.stackCount <= 0) { component.ClearTempRespawns(); Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Defy Death"; } protected override string GetDescription() { return "Chance -50% each time, resets each point. Stacks up to 60%."; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Revive Chance", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class DestroyerCard : CustomCard { private const float BASE_MAX_SPAWN_DISTANCE = 2f; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.reloadTimeAdd = 0.25f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.damage *= 1.5f; gun.projectileSpeed *= 1.5f; gun.ShootPojectileAction = (Action)Delegate.Combine(gun.ShootPojectileAction, new Action(OnShoot)); } private void OnShoot(GameObject projectile) { //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) ProjectileHit projectileHit = projectile.GetComponent(); if ((Object)(object)projectileHit == (Object)null) { return; } Player ownPlayer = projectileHit.ownPlayer; if ((Object)(object)ownPlayer == (Object)null || (Object)(object)ownPlayer.data == (Object)null) { return; } GameObject ownWeapon = projectileHit.ownWeapon; Gun val = ((ownWeapon != null) ? ownWeapon.GetComponent() : null); if ((Object)(object)val == (Object)null) { return; } Gun val2 = ownPlayer.data.weaponHandler?.gun; if ((Object)(object)val2 == (Object)null || (Object)(object)val != (Object)(object)val2) { return; } if ((Object)(object)val2.shootPosition != (Object)null) { float playerSizeMultiplier = GetPlayerSizeMultiplier(ownPlayer); float num = 2f * playerSizeMultiplier; float num2 = Vector3.Distance(projectile.transform.position, val2.shootPosition.position); if (num2 > num) { return; } } projectileHit.AddHitActionWithData((Action)delegate(HitInfo hitInfo) { OnBulletHit(hitInfo, projectileHit); }); } private static float GetPlayerSizeMultiplier(Player player) { //IL_005b: 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) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return 1f; } float num = 1f; if ((Object)(object)player.data.stats != (Object)null) { num = player.data.stats.sizeMultiplier; } float num2 = Mathf.Max(((Component)player).transform.localScale.x, ((Component)player).transform.localScale.y); if (num2 > num) { num = num2; } return Mathf.Max(1f, num); } private void OnBulletHit(HitInfo hitInfo, ProjectileHit projectileHit) { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) Transform transform = hitInfo.transform; if ((Object)(object)((transform != null) ? ((Component)transform).GetComponent() : null) != (Object)null || (Object)(object)hitInfo.collider == (Object)null || (Object)(object)((Component)hitInfo.collider).gameObject == (Object)null) { return; } Player ownPlayer = projectileHit.ownPlayer; if ((Object)(object)ownPlayer == (Object)null || (Object)(object)ownPlayer.data == (Object)null) { return; } GameObject ownWeapon = projectileHit.ownWeapon; Gun val = ((ownWeapon != null) ? ownWeapon.GetComponent() : null); if (!((Object)(object)val == (Object)null)) { float num = val.damage * val.bulletDamageMultiplier * 55f; if (num > 400f) { val.projectileColor = Color.red; MapUtils.DestroyMapObject(((Component)hitInfo.collider).gameObject); } } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.ShootPojectileAction = (Action)Delegate.Remove(gun.ShootPojectileAction, new Action(OnShoot)); } protected override string GetTitle() { return "Destroyer"; } protected override string GetDescription() { return "If you have more than 400 damage (727%) you will gain the ability to destroy objects with your bullets"; } protected override GameObject GetCardArt() { return Assets.DestroyerArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+0.25s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "DRON"; } } internal class DominionCard : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__1(IGameModeHandler gm) { return EndBalancePick(player); } internal IEnumerator b__0(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class <>c__DisplayClass11_0 { public Player player; public Func <>9__0; internal bool b__0(int i) { return PlayerManager.instance.players[i].playerID == player.playerID; } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; private List 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { 5__2 = CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories; if (5__2.Contains(MrFuntikMod.AuraCards)) { 5__2.Add(MrFuntikMod.NonAuraCards); 5__2.Remove(MrFuntikMod.AuraCards); } GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndBalancePick(<>8__1.player))); 5__2 = null; } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(<>8__1.player)); return new List().GetEnumerator(); }); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private List 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; 5__1 = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!5__1.Contains(MrFuntikMod.AuraCards)) { 5__1.Add(MrFuntikMod.AuraCards); 5__1.Remove(MrFuntikMod.NonAuraCards); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Player[] 5__1; private int 5__2; private <>c__DisplayClass11_0 <>8__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>8__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown int num; switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = PlayerManager.instance.players.ToArray(); 5__2 = 0; goto IL_0217; case 1: <>1__state = -1; 5__4 = (from i in Enumerable.Range(0, PlayerManager.instance.players.Count) where PlayerManager.instance.players[i].playerID == <>8__3.player.playerID select i).First(); CardChoiceVisuals.instance.Show(5__4, true); <>2__current = CardChoice.instance.DoPick(1, <>8__3.player.playerID, (PickerType)1); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = GameModeManager.TriggerHook("PlayerPickEnd"); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 5; return true; case 5: { <>1__state = -1; goto IL_01d6; } IL_01d6: if (<>8__3.player.data.stats.GetAdditionalData().shuffles > 0) { <>8__3.player.data.stats.GetAdditionalData().shuffles--; <>2__current = GameModeManager.TriggerHook("PlayerPickStart"); <>1__state = 1; return true; } <>8__3 = null; num = 5__2 + 1; 5__2 = num; goto IL_0217; IL_0217: if (5__2 < 5__1.Length) { <>8__3 = new <>c__DisplayClass11_0(); <>8__3.player = 5__1[5__2]; goto IL_01d6; } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; characterStats.GetAdditionalData().shuffles++; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Dominion"; } protected override string GetDescription() { return "Pick a dominion aura to debuff enemies."; } protected override GameObject? GetCardArt() { return Assets.Dominion_Art; } 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() { 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)4; } public override string GetModName() { return "BFRM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator BalancePick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] internal static IEnumerator ExtraPicks() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0); } [IteratorStateMachine(typeof(d__12))] public static IEnumerator EndBalancePick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { player = player }; } } internal class DrillHands : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.projectileSpeed *= 1.5f; block.cdMultiplier = 1.35f; characterStats.GetAdditionalData().piercingDamage += (float)((1.0 - (double)characterStats.GetAdditionalData().piercingDamage) * 0.5); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Drill Hands"; } protected override string GetDescription() { return "Shield-build enjoyers, what's up?"; } protected override GameObject GetCardArt() { return Assets.DrillHands_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Piercing DMG", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+35%", 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)6; } public override string GetModName() { return "MFM"; } } public class DuplicateCard : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass2_0 { public CardCategory[] excluded; internal bool b__0(CardInfo c) { return (Object)(object)c != (Object)null && c.cardName != "Duplicate" && (c.sourceCard ?? c).allowMultiple && !(c.sourceCard ?? c).categories.Intersect(excluded).Any(); } } [CompilerGenerated] private sealed class d__2 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; public DuplicateCard <>4__this; private <>c__DisplayClass2_0 <>8__1; private List 5__2; private CardInfo 5__3; private CardInfo 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass2_0(); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>8__1.excluded = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("NoRandom") }; 5__2 = player.data.currentCards.Where((CardInfo c) => (Object)(object)c != (Object)null && c.cardName != "Duplicate" && (c.sourceCard ?? c).allowMultiple && !(c.sourceCard ?? c).categories.Intersect(<>8__1.excluded).Any()).ToList(); if (5__2.Count == 0) { return false; } 5__3 = 5__2[Random.Range(0, 5__2.Count)]; 5__4 = 5__3.sourceCard ?? 5__3; if (PhotonNetwork.OfflineMode) { GiveCard(player.playerID, ((Object)5__4).name); } else { NetworkingManager.RPC(typeof(DuplicateCard), "RPCA_GiveCard", new object[2] { player.playerID, ((Object)5__4).name }); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (PhotonNetwork.OfflineMode || PhotonNetwork.IsMasterClient) { ((MonoBehaviour)Unbound.Instance).StartCoroutine(GiveDuplicatedCard(player)); } } [IteratorStateMachine(typeof(d__2))] private IEnumerator GiveDuplicatedCard(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0) { <>4__this = this, player = player }; } [UnboundRPC] public static void RPCA_GiveCard(int playerID, string cardObjectName) { GiveCard(playerID, cardObjectName); } private static void GiveCard(int playerID, string cardObjectName) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if (!((Object)(object)val == (Object)null)) { CardInfo cardWithObjectName = Cards.instance.GetCardWithObjectName(cardObjectName); if ((Object)(object)cardWithObjectName == (Object)null) { MrFuntikMod.LogWarning("[Duplicate] Card not found by object name: '" + cardObjectName + "'"); return; } Cards.instance.AddCardToPlayer(val, cardWithObjectName, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(val, cardWithObjectName); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Duplicate"; } protected override string GetDescription() { return "Duplicates a random stackable card from your deck."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } 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)3; } public override string GetModName() { return "BFRM"; } } public class EarthspearsCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.3f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { EarthspearsEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.stackCount++; return; } EarthspearsEffect earthspearsEffect = ((Component)player).gameObject.AddComponent(); earthspearsEffect.stackCount = 1; earthspearsEffect.owner = player; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { EarthspearsEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Earthspears"; } protected override string GetDescription() { return "Hard landings spike enemies in 1.7m. Damage scales with fall speed, +20% per copy."; } protected override GameObject? GetCardArt() { return Assets.EarthSpears_Art; } protected override Rarity GetRarity() { 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 = "Health", amount = "+30%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class EarthspearsEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public EarthspearsEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.effectWarmup = false; <>4__this.effectEnabled = true; <>4__this.hooksTriggered = true; <>4__this.maxFallSpeed = 0f; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public EarthspearsEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.effectEnabled = false; <>4__this.effectWarmup = true; <>4__this.maxFallSpeed = 0f; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public EarthspearsEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.effectEnabled = false; <>4__this.effectWarmup = true; <>4__this.hooksTriggered = true; <>4__this.maxFallSpeed = 0f; 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(); } } public int stackCount = 1; public Player owner; private const float MIN_FALL_SPEED = 8f; private const float BASE_DAMAGE = 1f; private const float DAMAGE_PER_SPEED = 0.7f; private const float BASE_RADIUS = 1.7f; private const float RADIUS_PER_SPEED = 0.11f; private const float DAMAGE_MULT_PER_STACK = 1.2f; private const float RADIUS_MULT_PER_STACK = 1.2f; private const float MIN_AIR_TIME = 0.2f; private const float IMPACT_COOLDOWN = 0.5f; private static Dictionary lastImpactTimeByPlayer = new Dictionary(); private float maxFallSpeed = 0f; private bool isSubscribed = false; private bool effectEnabled = false; private bool effectWarmup = true; private bool hooksTriggered = false; private CharacterData data; private PlayerVelocity playerVel; private int playerId = -1; private static FieldInfo velocityField; private static Material sharedMaterial; private static Sprite cachedCircleSprite; private static Sprite cachedSpikeSprite; private static bool spritesInitialized = false; private void Awake() { GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("BattleStart", (Func)OnBattleStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } private void Start() { data = owner?.data; playerVel = data?.playerVel; playerId = owner?.playerID ?? (-1); if (velocityField == null) { velocityField = typeof(PlayerVelocity).GetField("velocity", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } InitializeSprites(); if ((Object)(object)data != (Object)null && !isSubscribed) { CharacterData obj = data; obj.TouchGroundAction = (Action)Delegate.Combine(obj.TouchGroundAction, new Action(OnTouchGround)); isSubscribed = true; } if (!lastImpactTimeByPlayer.ContainsKey(playerId)) { lastImpactTimeByPlayer[playerId] = -10f; } } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("BattleStart", (Func)OnBattleStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data != (Object)null && isSubscribed) { CharacterData obj = data; obj.TouchGroundAction = (Action)Delegate.Remove(obj.TouchGroundAction, new Action(OnTouchGround)); isSubscribed = false; } } [IteratorStateMachine(typeof(d__28))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__29))] private IEnumerator OnBattleStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__30))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this, gm = gm }; } private void InitializeSprites() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown if (!spritesInitialized) { if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } if ((Object)(object)cachedCircleSprite == (Object)null) { cachedCircleSprite = CreateCircleSprite(); } if ((Object)(object)cachedSpikeSprite == (Object)null) { cachedSpikeSprite = CreateSpikeSprite(); } spritesInitialized = true; } } private Vector2 GetVelocity() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)playerVel == (Object)null || velocityField == null) { return Vector2.zero; } return (Vector2)velocityField.GetValue(playerVel); } private void Update() { //IL_00ac: 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_00bf: 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 (!hooksTriggered && (Object)(object)GameManager.instance != (Object)null && GameManager.instance.battleOngoing && !effectEnabled) { effectEnabled = true; effectWarmup = false; maxFallSpeed = 0f; } if (!effectEnabled || effectWarmup || (Object)(object)owner == (Object)null || (Object)(object)data == (Object)null || (Object)(object)playerVel == (Object)null || data.dead) { return; } Vector2 velocity = GetVelocity(); if (!data.isGrounded && velocity.y < -1f) { float num = Mathf.Abs(velocity.y); if (num > maxFallSpeed) { maxFallSpeed = num; } } } private void OnTouchGround(float sinceGrounded, Vector3 groundPos, Vector3 groundNormal, Transform groundTransform) { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0185: 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_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_01f4: Unknown result type (might be due to invalid IL or missing references) if (!effectEnabled || effectWarmup || (Object)(object)owner == (Object)null || (Object)(object)data == (Object)null || data.dead || sinceGrounded < 0.2f) { return; } float num = (lastImpactTimeByPlayer.ContainsKey(playerId) ? lastImpactTimeByPlayer[playerId] : (-10f)); if (Time.time < num + 0.5f) { return; } if (maxFallSpeed < 8f) { maxFallSpeed = 0f; return; } float num2 = maxFallSpeed; maxFallSpeed = 0f; lastImpactTimeByPlayer[playerId] = Time.time; float playerSizeMultiplier = GetPlayerSizeMultiplier(); Vector3 val = CorrectGroundPosition(groundPos, playerSizeMultiplier); Collider2D groundCollider = null; FindPlatformBounds(val, groundTransform, playerSizeMultiplier, out float leftBound, out float rightBound, out groundCollider); if (!((Object)(object)groundCollider == (Object)null)) { float num3 = Mathf.Pow(1.2f, (float)(stackCount - 1)); float num4 = Mathf.Pow(1.2f, (float)(stackCount - 1)); float num5 = num2 - 8f; float damage = (1f + num5 * 0.7f) * num3; float num6 = (1.7f + num5 * 0.11f) * num4; float num7 = val.x - leftBound; float num8 = rightBound - val.x; float num9 = Mathf.Min(num6, num7); float num10 = Mathf.Min(num6, num8); if (num9 < 0.3f) { num9 = 0.3f; } if (num10 < 0.3f) { num10 = 0.3f; } GameObject val2 = new GameObject("EarthspearsEffect"); EarthspearsEffectRunner earthspearsEffectRunner = val2.AddComponent(); earthspearsEffectRunner.StartEffect(val, num9, num10, num2, leftBound, rightBound, owner, damage, stackCount, cachedCircleSprite, cachedSpikeSprite, sharedMaterial, playerSizeMultiplier, groundCollider); } } private float GetPlayerSizeMultiplier() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null || (Object)(object)data == (Object)null) { return 1f; } float num = 1f; CharacterStatModifiers stats = data.stats; if ((Object)(object)stats != (Object)null) { num = stats.sizeMultiplier; } float num2 = Mathf.Max(((Component)owner).transform.localScale.x, ((Component)owner).transform.localScale.y); if (num2 > num) { num = num2; } return Mathf.Max(1f, num); } private Vector3 CorrectGroundPosition(Vector3 groundPos, float playerSize) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) float num = 0.5f + playerSize * 0.5f; Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(groundPos.x, groundPos.y + 0.2f); RaycastHit2D[] array = Physics2D.RaycastAll(val, Vector2.down, num); RaycastHit2D[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit2D hit = array2[i]; if (!((Object)(object)((RaycastHit2D)(ref hit)).collider == (Object)null) && !((RaycastHit2D)(ref hit)).collider.isTrigger && !((Object)(object)((Component)((RaycastHit2D)(ref hit)).collider).GetComponentInParent() != (Object)null) && IsValidSurface(hit)) { return new Vector3(groundPos.x, ((RaycastHit2D)(ref hit)).point.y, groundPos.z); } } return groundPos; } private void FindPlatformBounds(Vector3 groundPos, Transform groundTransform, float playerSize, out float leftBound, out float rightBound, out Collider2D groundCollider) { //IL_0003: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) leftBound = groundPos.x - 20f; rightBound = groundPos.x + 20f; groundCollider = null; if ((Object)(object)groundTransform != (Object)null) { Collider2D component = ((Component)groundTransform).GetComponent(); if ((Object)(object)component != (Object)null && !component.isTrigger && IsValidSurfaceCollider(component)) { Bounds bounds = component.bounds; leftBound = ((Bounds)(ref bounds)).min.x; rightBound = ((Bounds)(ref bounds)).max.x; groundCollider = component; return; } } float num = 0.1f + (playerSize - 1f) * 0.2f; float num2 = 0.5f + (playerSize - 1f) * 0.3f; Vector2 val = Vector2.op_Implicit(groundPos + Vector3.up * num); RaycastHit2D[] array = Physics2D.RaycastAll(val, Vector2.down, num2); RaycastHit2D[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit2D hit = array2[i]; if (!((Object)(object)((RaycastHit2D)(ref hit)).collider == (Object)null) && !((RaycastHit2D)(ref hit)).collider.isTrigger && !((Object)(object)((Component)((RaycastHit2D)(ref hit)).collider).GetComponentInParent() != (Object)null) && IsValidSurface(hit)) { Bounds bounds2 = ((RaycastHit2D)(ref hit)).collider.bounds; leftBound = ((Bounds)(ref bounds2)).min.x; rightBound = ((Bounds)(ref bounds2)).max.x; groundCollider = ((RaycastHit2D)(ref hit)).collider; break; } } } private bool IsValidSurfaceCollider(Collider2D collider) { if ((Object)(object)collider == (Object)null || collider.isTrigger) { return false; } GameObject gameObject = ((Component)collider).gameObject; string text = LayerMask.LayerToName(gameObject.layer); if (text == "BackgroundObject") { return false; } if (((Object)gameObject).name.Contains("_BG")) { return false; } if ((Object)(object)((Component)collider).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponentInParent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponentInParent() != (Object)null) { return false; } if (text == "Projectile") { return false; } return true; } public static bool IsValidSurface(RaycastHit2D hit) { //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) Collider2D collider = ((RaycastHit2D)(ref hit)).collider; if ((Object)(object)collider == (Object)null || collider.isTrigger) { return false; } GameObject gameObject = ((Component)collider).gameObject; int layer = gameObject.layer; string text = LayerMask.LayerToName(layer); if (text == "BackgroundObject") { return false; } if (((Object)gameObject).name.Contains("_BG")) { return false; } if ((Object)(object)((Component)collider).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponentInParent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponentInParent() != (Object)null) { return false; } if (text == "Projectile") { return false; } string text2 = ((Object)gameObject).name.ToLower(); if (text2.Contains("bullet") || text2.Contains("projectile") || text2.Contains("shot")) { return false; } Rigidbody2D attachedRigidbody = collider.attachedRigidbody; if ((Object)(object)attachedRigidbody != (Object)null) { Vector2 velocity = attachedRigidbody.velocity; if (((Vector2)(ref velocity)).sqrMagnitude > 100f) { return false; } } if ((Object)(object)((Component)collider).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)collider).GetComponentInParent() != (Object)null) { return false; } return true; } private static Sprite CreateCircleSprite() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_00e1: 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) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(64, 64, (TextureFormat)4, false); Color[] array = (Color[])(object)new Color[4096]; float num = 32f; float num2 = 32f; for (int i = 0; i < 64; i++) { for (int j = 0; j < 64; j++) { float num3 = (float)j - num; float num4 = (float)i - num; float num5 = Mathf.Sqrt(num3 * num3 + num4 * num4); float num6 = Mathf.Clamp01(1f - num5 / num2); num6 *= num6; array[i * 64 + j] = new Color(1f, 1f, 1f, num6); } } val.SetPixels(array); val.Apply(); ((Texture)val).filterMode = (FilterMode)1; return Sprite.Create(val, new Rect(0f, 0f, 64f, 64f), new Vector2(0.5f, 0.5f), 64f); } private static Sprite CreateSpikeSprite() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(32, 64, (TextureFormat)4, false); Color[] array = (Color[])(object)new Color[2048]; for (int i = 0; i < array.Length; i++) { array[i] = Color.clear; } float num = 16f; for (int j = 0; j < 64; j++) { float num2 = (float)j / 64f; float num3 = 16f * (1f - num2); for (int k = 0; k < 32; k++) { float num4 = Mathf.Abs((float)k - num); if (num4 <= num3) { float num5 = 1f - num4 / Mathf.Max(1f, num3); float num6 = 0.7f + num5 * 0.3f; num6 *= 0.6f + num2 * 0.4f; float num7 = Mathf.Clamp01((num3 - num4) * 2f); array[j * 32 + k] = new Color(num6, num6, num6, num7); } } } val.SetPixels(array); val.Apply(); ((Texture)val).filterMode = (FilterMode)1; return Sprite.Create(val, new Rect(0f, 0f, 32f, 64f), new Vector2(0.5f, 0f), 64f); } } public class EarthspearsEffectRunner : MonoBehaviour { private class SpikeInfo { public GameObject obj; public SpriteRenderer sprite; public float targetHeight; public float width; public float delay; } private class ParticleInfo { public GameObject obj; public SpriteRenderer sprite; public Vector2 velocity; } [CompilerGenerated] private sealed class d__4 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Vector3 impactPos; public float leftRadius; public float rightRadius; public float fallSpeed; public float leftBound; public float rightBound; public Player owner; public float damage; public int stackCount; public Sprite circleSprite; public Sprite spikeSprite; public Material material; public Collider2D groundCollider; public EarthspearsEffectRunner <>4__this; private float 5__1; private Vector3 5__2; private float 5__3; private List 5__4; private GameObject 5__5; private SpriteRenderer 5__6; private List 5__7; private int 5__8; private int 5__9; private float 5__10; private float 5__11; private Vector2 5__12; private Vector2 5__13; private float 5__14; private float 5__15; private List 5__16; private int 5__17; private float 5__18; private float 5__19; private float 5__20; private float 5__21; private float 5__22; private float 5__23; private int 5__24; private float 5__25; private float 5__26; private float 5__27; private Vector2 5__28; private Vector2 5__29; private float 5__30; private float 5__31; private float 5__32; private int 5__33; private float 5__34; private float 5__35; private float 5__36; private Vector2 5__37; private Vector2 5__38; private float 5__39; private float 5__40; private float 5__41; private int 5__42; private GameObject 5__43; private SpriteRenderer 5__44; private float 5__45; private float 5__46; private float 5__47; private float 5__48; private float 5__49; private Color 5__50; private List.Enumerator <>s__51; private SpikeInfo 5__52; private float 5__53; private float 5__54; private float 5__55; private Color 5__56; private float

5__57; private float

5__58; private List.Enumerator <>s__59; private ParticleInfo

5__60; private float 5__61; private Color 5__62; private List.Enumerator <>s__63; private GameObject 5__64; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__4 = null; 5__5 = null; 5__6 = null; 5__7 = null; 5__16 = null; 5__43 = null; 5__44 = null; <>s__51 = default(List.Enumerator); 5__52 = null; <>s__59 = default(List.Enumerator);

5__60 = null; <>s__63 = default(List.Enumerator); 5__64 = null; <>1__state = -2; } private bool MoveNext() { //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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_0099: 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_0117: 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_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0204: 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_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_0932: Unknown result type (might be due to invalid IL or missing references) //IL_0944: Unknown result type (might be due to invalid IL or missing references) //IL_0949: Unknown result type (might be due to invalid IL or missing references) //IL_096c: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Expected O, but got Unknown //IL_0654: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_07af: Unknown result type (might be due to invalid IL or missing references) //IL_07ba: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_0a0e: Unknown result type (might be due to invalid IL or missing references) //IL_0b6e: Unknown result type (might be due to invalid IL or missing references) //IL_0b85: Unknown result type (might be due to invalid IL or missing references) //IL_0b8a: Unknown result type (might be due to invalid IL or missing references) //IL_0bac: Unknown result type (might be due to invalid IL or missing references) //IL_0c3c: Unknown result type (might be due to invalid IL or missing references) //IL_0c41: Unknown result type (might be due to invalid IL or missing references) //IL_0c4b: Unknown result type (might be due to invalid IL or missing references) //IL_0c55: Unknown result type (might be due to invalid IL or missing references) //IL_0c5a: Unknown result type (might be due to invalid IL or missing references) //IL_0c5f: Unknown result type (might be due to invalid IL or missing references) //IL_0c75: Unknown result type (might be due to invalid IL or missing references) //IL_0c80: Unknown result type (might be due to invalid IL or missing references) //IL_0c85: Unknown result type (might be due to invalid IL or missing references) //IL_0c8f: Unknown result type (might be due to invalid IL or missing references) //IL_0c94: Unknown result type (might be due to invalid IL or missing references) //IL_0cc4: Unknown result type (might be due to invalid IL or missing references) //IL_0cc9: Unknown result type (might be due to invalid IL or missing references) //IL_0ceb: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = (fallSpeed - 8f) / 20f; 5__2 = impactPos + Vector3.up * 0.05f; 5__3 = Mathf.Max(leftRadius, rightRadius); 5__4 = new List(); 5__5 = new GameObject("EarthspearsFlash"); 5__5.transform.position = 5__2; 5__6 = 5__5.AddComponent(); 5__6.sprite = circleSprite; ((Renderer)5__6).material = material; 5__6.color = new Color(1f, 0.6f, 0.2f, 1f); ((Renderer)5__6).sortingOrder = 110; 5__5.transform.localScale = Vector3.one * 0.1f; 5__4.Add(5__5); 5__7 = new List(); 5__8 = Mathf.Max(2, (int)(leftRadius * 4f)); 5__9 = Mathf.Max(2, (int)(rightRadius * 4f)); 5__10 = 0.6f + 5__1 * 1f; 5__11 = -9999f; if (<>4__this.TryFindSurfaceAt(impactPos.x, impactPos.y, -9999f, groundCollider, out 5__12, out 5__13)) { 5__23 = 5__10 * Random.Range(0.9f, 1.1f); <>4__this.CreateSpike(5__12, 5__13, 5__23, 5__1, 0f, spikeSprite, material, 5__4, 5__7); 5__11 = 5__12.y; } 5__14 = ((5__11 > -9999f) ? 5__11 : impactPos.y); 5__24 = 0; while (5__24 < 5__8) { 5__25 = (float)(5__24 + 1) / (float)5__8; 5__26 = (0f - leftRadius) * 5__25; 5__27 = impactPos.x + 5__26; if (!(5__27 < leftBound + 0.1f) && !<>4__this.HasObstacleBetween(impactPos, 5__27) && <>4__this.TryFindSurfaceAt(5__27, impactPos.y, 5__14, groundCollider, out 5__28, out 5__29)) { 5__30 = Mathf.Abs(5__26) / Mathf.Max(0.1f, leftRadius); 5__31 = 1f - 5__30 * 5__30; 5__32 = 5__10 * Mathf.Max(0.15f, 5__31) * Random.Range(0.85f, 1.15f); <>4__this.CreateSpike(5__28, 5__29, 5__32, 5__1, 5__30, spikeSprite, material, 5__4, 5__7); 5__14 = 5__28.y; } 5__24++; } 5__15 = ((5__11 > -9999f) ? 5__11 : impactPos.y); 5__33 = 0; while (5__33 < 5__9) { 5__34 = (float)(5__33 + 1) / (float)5__9; 5__35 = rightRadius * 5__34; 5__36 = impactPos.x + 5__35; if (!(5__36 > rightBound - 0.1f) && !<>4__this.HasObstacleBetween(impactPos, 5__36) && <>4__this.TryFindSurfaceAt(5__36, impactPos.y, 5__15, groundCollider, out 5__37, out 5__38)) { 5__39 = Mathf.Abs(5__35) / Mathf.Max(0.1f, rightRadius); 5__40 = 1f - 5__39 * 5__39; 5__41 = 5__10 * Mathf.Max(0.15f, 5__40) * Random.Range(0.85f, 1.15f); <>4__this.CreateSpike(5__37, 5__38, 5__41, 5__1, 5__39, spikeSprite, material, 5__4, 5__7); 5__15 = 5__37.y; } 5__33++; } 5__16 = new List(); 5__17 = 8 + (int)(5__1 * 10f); 5__42 = 0; while (5__42 < 5__17) { 5__43 = new GameObject($"Debris_{5__42}"); 5__43.transform.position = 5__2 + new Vector3(Random.Range(-0.5f, 0.5f), 0.1f, 0f); 5__44 = 5__43.AddComponent(); 5__44.sprite = circleSprite; ((Renderer)5__44).material = material; 5__44.color = new Color(0.6f, 0.5f, 0.4f, 1f); ((Renderer)5__44).sortingOrder = 115; 5__45 = Random.Range(0.04f, 0.1f); 5__43.transform.localScale = Vector3.one * 5__45; 5__46 = Random.Range(30f, 150f) * (MathF.PI / 180f); 5__47 = Random.Range(2f, 5f) * (1f + 5__1 * 0.5f); 5__4.Add(5__43); 5__16.Add(new ParticleInfo { obj = 5__43, sprite = 5__44, velocity = new Vector2(Mathf.Cos(5__46), Mathf.Sin(5__46)) * 5__47 }); 5__43 = null; 5__44 = null; 5__42++; } <>4__this.DealDamage(impactPos, damage, 5__3, owner); 5__18 = 0.08f; 5__19 = 0.35f; 5__20 = 0.15f; 5__21 = 5__18 + 5__19 + 5__20 + 0.05f; 5__22 = 0f; break; case 1: <>1__state = -1; break; } if (5__22 < 5__21 && !((Object)(object)GameManager.instance == (Object)null) && GameManager.instance.battleOngoing) { 5__22 += Time.deltaTime; if ((Object)(object)5__5 != (Object)null) { 5__48 = Mathf.Clamp01(5__22 / 0.15f); 5__49 = Mathf.Sin(5__48 * MathF.PI) * (0.8f + 5__1 * 0.6f); 5__5.transform.localScale = new Vector3(5__49 * 2f, 5__49 * 0.5f, 1f); 5__50 = 5__6.color; 5__50.a = 1f - 5__48; 5__6.color = 5__50; } <>s__51 = 5__7.GetEnumerator(); try { while (<>s__51.MoveNext()) { 5__52 = <>s__51.Current; if ((Object)(object)5__52.obj == (Object)null) { continue; } 5__53 = 5__22 - 5__52.delay; if (5__53 < 0f) { 5__52.obj.transform.localScale = new Vector3(5__52.width, 0.01f, 1f); continue; } 5__55 = 1f; if (5__53 < 5__18) {

5__57 = 5__53 / 5__18;

5__57 = 1f - Mathf.Pow(1f -

5__57, 3f); 5__54 = 5__52.targetHeight *

5__57; } else if (5__53 < 5__18 + 5__19) { 5__54 = 5__52.targetHeight; } else {

5__58 = (5__53 - 5__18 - 5__19) / 5__20;

5__58 = Mathf.Clamp01(

5__58);

5__58 *=

5__58; 5__54 = 5__52.targetHeight * (1f -

5__58); 5__55 = 1f -

5__58 * 0.5f; } 5__52.obj.transform.localScale = new Vector3(5__52.width, Mathf.Max(0.01f, 5__54), 1f); 5__56 = 5__52.sprite.color; 5__56.a = 5__55; 5__52.sprite.color = 5__56; 5__52 = null; } } finally { ((IDisposable)<>s__51).Dispose(); } <>s__51 = default(List.Enumerator); <>s__59 = 5__16.GetEnumerator(); try { while (<>s__59.MoveNext()) {

5__60 = <>s__59.Current; if (!((Object)(object)

5__60.obj == (Object)null)) { ParticleInfo particleInfo =

5__60; particleInfo.velocity += Vector2.down * 15f * Time.deltaTime; Transform transform =

5__60.obj.transform; transform.position += Vector2.op_Implicit(

5__60.velocity) * Time.deltaTime; 5__61 = 1f - 5__22 / 5__21; 5__62 =

5__60.sprite.color; 5__62.a = 5__61;

5__60.sprite.color = 5__62;

5__60 = null; } } } finally { ((IDisposable)<>s__59).Dispose(); } <>s__59 = default(List.Enumerator); <>2__current = null; <>1__state = 1; return true; } <>s__63 = 5__4.GetEnumerator(); try { while (<>s__63.MoveNext()) { 5__64 = <>s__63.Current; if ((Object)(object)5__64 != (Object)null) { Object.Destroy((Object)(object)5__64); } 5__64 = null; } } finally { ((IDisposable)<>s__63).Dispose(); } <>s__63 = default(List.Enumerator); Object.Destroy((Object)(object)((Component)<>4__this).gameObject); 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 float playerSize = 1f; public void StartEffect(Vector3 impactPos, float leftRadius, float rightRadius, float fallSpeed, float leftBound, float rightBound, Player owner, float damage, int stackCount, Sprite circleSprite, Sprite spikeSprite, Material material, float playerSize, Collider2D groundCollider) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) this.playerSize = playerSize; ((MonoBehaviour)this).StartCoroutine(RunEffect(impactPos, leftRadius, rightRadius, fallSpeed, leftBound, rightBound, owner, damage, stackCount, circleSprite, spikeSprite, material, groundCollider)); } private bool HasObstacleBetween(Vector3 impactPos, float spikeX) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) float num = 0.5f + (playerSize - 1f) * 0.2f; Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(impactPos.x, impactPos.y + num); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(spikeX, impactPos.y + num); Vector2 val3 = val2 - val; Vector2 normalized = ((Vector2)(ref val3)).normalized; float num2 = Mathf.Abs(spikeX - impactPos.x); if (num2 < 0.1f) { return false; } RaycastHit2D[] array = Physics2D.RaycastAll(val, normalized, num2); RaycastHit2D[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit2D val4 = array2[i]; if (!((Object)(object)((RaycastHit2D)(ref val4)).collider == (Object)null) && !((RaycastHit2D)(ref val4)).collider.isTrigger && !((Object)(object)((Component)((RaycastHit2D)(ref val4)).collider).GetComponentInParent() != (Object)null)) { string text = LayerMask.LayerToName(((Component)((RaycastHit2D)(ref val4)).collider).gameObject.layer); if (!(text == "BackgroundObject") && !((Object)((Component)((RaycastHit2D)(ref val4)).collider).gameObject).name.Contains("_BG") && !(Mathf.Abs(((RaycastHit2D)(ref val4)).normal.x) < 0.7f)) { return true; } } } return false; } private bool TryFindSurfaceAt(float spikeX, float groundY, float lastFoundY, Collider2D targetCollider, out Vector2 surfacePoint, out Vector2 surfaceNormal) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //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_00b6: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) surfacePoint = Vector2.zero; surfaceNormal = Vector2.up; if ((Object)(object)targetCollider == (Object)null) { return false; } float num = ((lastFoundY > -9999f) ? lastFoundY : groundY); float num2 = 1.5f + (playerSize - 1f) * 0.5f; float num3 = 3f + (playerSize - 1f) * 0.5f; Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(spikeX, num + num2); Vector2[] obj = new Vector2[3] { Vector2.down, default(Vector2), default(Vector2) }; Vector2 val2 = new Vector2(-0.3f, -1f); obj[1] = ((Vector2)(ref val2)).normalized; val2 = new Vector2(0.3f, -1f); obj[2] = ((Vector2)(ref val2)).normalized; Vector2[] array = (Vector2[])(object)obj; Vector2[] array2 = array; foreach (Vector2 val3 in array2) { RaycastHit2D[] array3 = Physics2D.RaycastAll(val, val3, num3); RaycastHit2D[] array4 = array3; for (int j = 0; j < array4.Length; j++) { RaycastHit2D val4 = array4[j]; if (!((Object)(object)((RaycastHit2D)(ref val4)).collider == (Object)null) && !((RaycastHit2D)(ref val4)).collider.isTrigger && !((Object)(object)((RaycastHit2D)(ref val4)).collider != (Object)(object)targetCollider) && !(((RaycastHit2D)(ref val4)).normal.y < 0.25f)) { surfacePoint = ((RaycastHit2D)(ref val4)).point; surfaceNormal = ((RaycastHit2D)(ref val4)).normal; return true; } } } return false; } [IteratorStateMachine(typeof(d__4))] private IEnumerator RunEffect(Vector3 impactPos, float leftRadius, float rightRadius, float fallSpeed, float leftBound, float rightBound, Player owner, float damage, int stackCount, Sprite circleSprite, Sprite spikeSprite, Material material, Collider2D groundCollider) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__4(0) { <>4__this = this, impactPos = impactPos, leftRadius = leftRadius, rightRadius = rightRadius, fallSpeed = fallSpeed, leftBound = leftBound, rightBound = rightBound, owner = owner, damage = damage, stackCount = stackCount, circleSprite = circleSprite, spikeSprite = spikeSprite, material = material, groundCollider = groundCollider }; } private void CreateSpike(Vector2 position, Vector2 normal, float targetHeight, float intensity, float distFromCenter, Sprite spikeSprite, Material material, List allObjects, List spikes) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Spike"); val.transform.position = new Vector3(position.x, position.y + 0.01f, 0f); float num = Mathf.Atan2(normal.y, normal.x) * 57.29578f - 90f; num += Random.Range(-6f, 6f); val.transform.rotation = Quaternion.Euler(0f, 0f, num); SpriteRenderer val2 = val.AddComponent(); val2.sprite = spikeSprite; ((Renderer)val2).material = material; ((Renderer)val2).sortingOrder = 105; float num2 = Random.Range(-0.1f, 0.1f); val2.color = new Color(0.55f + num2, 0.45f + num2, 0.35f + num2, 1f); float num3 = 0.18f + intensity * 0.08f; val.transform.localScale = new Vector3(num3, 0.01f, 1f); allObjects.Add(val); spikes.Add(new SpikeInfo { obj = val, sprite = val2, targetHeight = targetHeight, width = num3, delay = distFromCenter * 0.04f }); } private void DealDamage(Vector3 impactPos, float damage, float radius, Player owner) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b8: Unknown result type (might be due to invalid IL or missing references) List players = PlayerManager.instance.players; for (int i = 0; i < players.Count; i++) { Player val = players[i]; if (!((Object)(object)val == (Object)null) && !((Object)(object)val == (Object)(object)owner) && !val.data.dead && ((Component)val).gameObject.activeInHierarchy) { Vector2 playerFeetPosition = GetPlayerFeetPosition(val); float num = Vector2.Distance(Vector2.op_Implicit(impactPos), playerFeetPosition); if (num <= radius) { float num2 = 1f - num / radius; float num3 = damage * num2; Vector2 val2 = playerFeetPosition - Vector2.op_Implicit(impactPos); Vector2 normalized = ((Vector2)(ref val2)).normalized; ((Damagable)val.data.healthHandler).CallTakeDamage(normalized * num3, Vector2.op_Implicit(impactPos), (GameObject)null, owner, true); } } } } private Vector2 GetPlayerFeetPosition(Player player) { //IL_0007: 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) //IL_0011: 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_0069: 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_009d: 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_00a6: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); float num = 1f; if ((Object)(object)player.data != (Object)null && (Object)(object)player.data.stats != (Object)null) { num = player.data.stats.sizeMultiplier; } float num2 = Mathf.Max(((Component)player).transform.localScale.x, ((Component)player).transform.localScale.y); if (num2 > num) { num = num2; } float num3 = 0.5f * num; return new Vector2(val.x, val.y - num3); } } public class ElasticCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.5f; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.DestroyImmediate((Object)(object)component); } } protected override string GetTitle() { return "Elastic"; } protected override string GetDescription() { return $"On hit: gain boost +{25f:0}% move speed, +{50f:0}% damage."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Boost Duration", amount = $"{5f}s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticChargeCard : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass12_0 { public Player player; internal IEnumerator b__1(IGameModeHandler gm) { return EndElasticPick(player); } internal IEnumerator b__0(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(ElasticPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class <>c__DisplayClass14_0 { public Player player; public Func <>9__0; internal bool b__0(int i) { return PlayerManager.instance.players[i].playerID == player.playerID; } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass12_0 <>8__1; private List 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass12_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { 5__2 = CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories; if (5__2.Contains(MrFuntikMod.ElasticSubCards)) { 5__2.Add(MrFuntikMod.NonElasticCards); 5__2.Remove(MrFuntikMod.ElasticSubCards); } GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndElasticPick(<>8__1.player))); 5__2 = null; } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(ElasticPick(<>8__1.player)); return new List().GetEnumerator(); }); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private List 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; 5__1 = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!5__1.Contains(MrFuntikMod.ElasticSubCards)) { 5__1.Add(MrFuntikMod.ElasticSubCards); 5__1.Remove(MrFuntikMod.NonElasticCards); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Player[] 5__1; private int 5__2; private <>c__DisplayClass14_0 <>8__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>8__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown int num; switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = PlayerManager.instance.players.ToArray(); 5__2 = 0; goto IL_0217; case 1: <>1__state = -1; 5__4 = (from i in Enumerable.Range(0, PlayerManager.instance.players.Count) where PlayerManager.instance.players[i].playerID == <>8__3.player.playerID select i).First(); CardChoiceVisuals.instance.Show(5__4, true); <>2__current = CardChoice.instance.DoPick(1, <>8__3.player.playerID, (PickerType)1); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = GameModeManager.TriggerHook("PlayerPickEnd"); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 5; return true; case 5: { <>1__state = -1; goto IL_01d6; } IL_01d6: if (<>8__3.player.data.stats.GetAdditionalData().elasticPickStacks > 0) { <>8__3.player.data.stats.GetAdditionalData().elasticPickStacks--; <>2__current = GameModeManager.TriggerHook("PlayerPickStart"); <>1__state = 1; return true; } <>8__3 = null; num = 5__2 + 1; 5__2 = num; goto IL_0217; IL_0217: if (5__2 < 5__1.Length) { <>8__3 = new <>c__DisplayClass14_0(); <>8__3.player = 5__1[5__2]; goto IL_01d6; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticClassCategory }; card = cardInfo; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; characterStats.GetAdditionalData().elasticPickStacks++; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(ElasticPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Elastic: Charge"; } protected override string GetDescription() { return "Pick an Elastic sub-card."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } [IteratorStateMachine(typeof(d__12))] public static IEnumerator ElasticPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { player = player }; } [IteratorStateMachine(typeof(d__13))] public static IEnumerator EndElasticPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { player = player }; } [IteratorStateMachine(typeof(d__14))] internal static IEnumerator ExtraPicks() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0); } } public class ElasticPainFuelCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; statModifiers.health = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.painFuelStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.painFuelStacks = Mathf.Max(0, component.painFuelStacks - 1); } } protected override string GetTitle() { return "Elastic: Pain Fuel"; } protected override string GetDescription() { return "More pain, longer boost."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Boost Duration", amount = $"+{2f}s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticRecoupCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; statModifiers.health = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.hasRecoup = true; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.hasRecoup = false; } } protected override string GetTitle() { return "Elastic: Recoup"; } protected override string GetDescription() { return $"On hit: restore {25f:0}% of damage taken as health."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticReflexCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.damage = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.reflexStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.reflexStacks = Mathf.Max(0, component.reflexStacks - 1); } } protected override string GetTitle() { return "Elastic: Reflex"; } protected override string GetDescription() { return $"Next shot deals bonus +{50f:0}% damage."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Damage", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticParryCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; block.cdMultiplier = 0.8f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.parryStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.parryStacks = Mathf.Max(0, component.parryStacks - 1); } } protected override string GetTitle() { return "Elastic: Parry"; } protected override string GetDescription() { return $"Each hit: -{10f:0}% block cooldown until point ends.\nMax: -{Mathf.RoundToInt(80f)}%"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Block Cooldown", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticCadenceCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.reloadTime = 0.8f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.cadenceStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.cadenceStacks = Mathf.Max(0, component.cadenceStacks - 1); } } protected override string GetTitle() { return "Elastic: Cadence"; } protected override string GetDescription() { return $"Each hit: -{10f:0}% reload time until point ends.\nMax: -{Mathf.RoundToInt(80f)}%"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Reload Time", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticPressureCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.damage = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.pressureStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.pressureStacks = Mathf.Max(0, component.pressureStacks - 1); } } protected override string GetTitle() { return "Elastic: Pressure"; } protected override string GetDescription() { return $"Each hit: +{20f:0}% damage until point ends.\nMax: +{Mathf.RoundToInt(100f)}%"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Damage", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticFrenzyCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; statModifiers.health = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.frenzyStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.frenzyStacks = Mathf.Max(0, component.frenzyStacks - 1); } } protected override string GetTitle() { return "Elastic: Frenzy"; } protected override string GetDescription() { return $"Each hit: +{1f}s boost duration until point ends.\nMax: +{5f}s"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticAccelerateCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; statModifiers.movementSpeed = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.accelerateStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.accelerateStacks = Mathf.Max(0, component.accelerateStacks - 1); } } protected override string GetTitle() { return "Elastic: Accelerate"; } protected override string GetDescription() { return $"Each hit: +{10f:0}% move speed until point ends.\nMax: +{Mathf.RoundToInt(79.99999f)}%"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Move Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticQuickenCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.attackSpeed = 0.8f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.quickenStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.quickenStacks = Mathf.Max(0, component.quickenStacks - 1); } } protected override string GetTitle() { return "Elastic: Quicken"; } protected override string GetDescription() { return $"Each hit: +{10f:0}% attack speed until point ends.\nMax: +{Mathf.RoundToInt(80f)}%"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticRapidCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.projectileSpeed = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.rapidStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.rapidStacks = Mathf.Max(0, component.rapidStacks - 1); } } protected override string GetTitle() { return "Elastic: Rapid"; } protected override string GetDescription() { return $"Each hit: +{10f:0}% bullet speed until point ends.\nMax: +{Mathf.RoundToInt(100f)}%"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticDevourCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; statModifiers.lifeSteal = 0.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.devourStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.devourStacks = Mathf.Max(0, component.devourStacks - 1); } } protected override string GetTitle() { return "Elastic: Devour"; } protected override string GetDescription() { return $"Each hit: +{10f:0}% lifesteal until point ends.\nMax: +{100}%"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Life Steal", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticFuryCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.damage = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.furyStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.furyStacks = Mathf.Max(0, component.furyStacks - 1); } } protected override string GetTitle() { return "Elastic: Fury"; } protected override string GetDescription() { return $"While boosted: +{25f:0}% damage."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Damage", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticHasteCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.attackSpeed = 0.8f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.hasteStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.hasteStacks = Mathf.Max(0, component.hasteStacks - 1); } } protected override string GetTitle() { return "Elastic: Haste"; } protected override string GetDescription() { return $"While boosted: +{25f:0}% attack speed."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticSurgeCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.projectileSpeed = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.surgeStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.surgeStacks = Mathf.Max(0, component.surgeStacks - 1); } } protected override string GetTitle() { return "Elastic: Surge"; } protected override string GetDescription() { return $"While boosted: +{50f:0}% bullet speed."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticZenCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; statModifiers.health = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.zenStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.zenStacks = Mathf.Max(0, component.zenStacks - 1); } } protected override string GetTitle() { return "Elastic: Zen"; } protected override string GetDescription() { return $"While boosted: +{10f:0} health/s."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticBloodrushCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; statModifiers.lifeSteal = 0.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.bloodrushStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.bloodrushStacks = Mathf.Max(0, component.bloodrushStacks - 1); } } protected override string GetTitle() { return "Elastic: Bloodrush"; } protected override string GetDescription() { return $"While boosted: +{25f:0}% lifesteal."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Life Steal", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticTempoCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; gun.reloadTime = 0.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.tempoStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.tempoStacks = Mathf.Max(0, component.tempoStacks - 1); } } protected override string GetTitle() { return "Elastic: Tempo"; } protected override string GetDescription() { return $"While boosted: -{25f:0}% reload time."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Reload Time", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticAegisCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; block.cdMultiplier = 0.8f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.aegisStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.aegisStacks = Mathf.Max(0, component.aegisStacks - 1); } } protected override string GetTitle() { return "Elastic: Aegis"; } protected override string GetDescription() { return $"While boosted: -{25f:0}% block cooldown."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Block Cooldown", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } public class ElasticRushCard : CustomCard { internal static CardInfo card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { card = cardInfo; cardInfo.allowMultiple = true; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ElasticSubCards }; statModifiers.movementSpeed = 1.2f; } public override void Callback() { ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false).className = "Elastic"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.rushStacks++; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PainFuelMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.rushStacks = Mathf.Max(0, component.rushStacks - 1); } } protected override string GetTitle() { return "Elastic: Rush"; } protected override string GetDescription() { return $"While boosted: +{25f:0}% move speed."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Move Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } public override string GetModName() { return "BFRM"; } } internal class ElasticClass : ClassHandler { [CompilerGenerated] private sealed class d__0 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public ElasticClass <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if ((Object)(object)ElasticCard.card == (Object)null || (Object)(object)ElasticChargeCard.card == (Object)null || (Object)(object)ElasticPainFuelCard.card == (Object)null || (Object)(object)ElasticRecoupCard.card == (Object)null || (Object)(object)ElasticReflexCard.card == (Object)null || (Object)(object)ElasticParryCard.card == (Object)null || (Object)(object)ElasticCadenceCard.card == (Object)null || (Object)(object)ElasticPressureCard.card == (Object)null || (Object)(object)ElasticFuryCard.card == (Object)null || (Object)(object)ElasticHasteCard.card == (Object)null || (Object)(object)ElasticSurgeCard.card == (Object)null || (Object)(object)ElasticZenCard.card == (Object)null || (Object)(object)ElasticFrenzyCard.card == (Object)null || (Object)(object)ElasticBloodrushCard.card == (Object)null || (Object)(object)ElasticAccelerateCard.card == (Object)null || (Object)(object)ElasticQuickenCard.card == (Object)null || (Object)(object)ElasticRapidCard.card == (Object)null || (Object)(object)ElasticDevourCard.card == (Object)null || (Object)(object)ElasticTempoCard.card == (Object)null || (Object)(object)ElasticAegisCard.card == (Object)null || (Object)(object)ElasticRushCard.card == (Object)null) { <>2__current = null; <>1__state = 1; return true; } ClassesRegistry.Register(ElasticCard.card, (CardType)1, 0); ClassesRegistry.Register(ElasticChargeCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticPainFuelCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticRecoupCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticReflexCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticParryCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticCadenceCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticPressureCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticFuryCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticHasteCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticSurgeCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticZenCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticFrenzyCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticBloodrushCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticAccelerateCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticQuickenCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticRapidCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticDevourCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticTempoCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticAegisCard.card, (CardType)16, ElasticCard.card, 0); ClassesRegistry.Register(ElasticRushCard.card, (CardType)16, ElasticCard.card, 0); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [IteratorStateMachine(typeof(d__0))] public override IEnumerator Init() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__0(0) { <>4__this = this }; } } public class ExecutionerCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.attackSpeed = 0.8f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.reloadTimeMultiplier *= 0.8f; ExecutionerMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.AddStack(); return; } ExecutionerMono executionerMono = ((Component)player).gameObject.AddComponent(); executionerMono.stackCount = 1; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.reloadTimeMultiplier /= 0.8f; ExecutionerMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); if (component.stackCount <= 0) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Executioner"; } protected override string GetDescription() { return "Your bullets have a small chance to instantly execute enemies."; } protected override GameObject? GetCardArt() { return Assets.ExecutionerArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Execute Chance", amount = "+2%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+20%", 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)4; } public override string GetModName() { return "BFRM"; } } public class ExtendedGuardCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { health.regeneration += 3f; ExtendedGuardMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.AddStack(); return; } ExtendedGuardMono extendedGuardMono = ((Component)player).gameObject.AddComponent(); extendedGuardMono.stackCount = 1; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { health.regeneration -= 3f; ExtendedGuardMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); if (component.stackCount <= 0) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Extended Guard"; } protected override string GetDescription() { return "Your blocks have a chance to last twice as long."; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Crit Block Chance", amount = "25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Life Regen", 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)2; } public override string GetModName() { return "BFRM"; } } public class FadeoutCard : CustomCard { public static GameObject objectToSpawn; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.damage = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown gun.projectileSpeed *= 1.75f; if ((Object)(object)objectToSpawn == (Object)null) { objectToSpawn = new GameObject("FadeoutBulletModifier", new Type[1] { typeof(FadeoutBulletModifier) }); Object.DontDestroyOnLoad((Object)(object)objectToSpawn); } List list = gun.objectsToSpawn.ToList(); list.Add(new ObjectsToSpawn { AddToProjectile = objectToSpawn }); gun.objectsToSpawn = list.ToArray(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Fadeout"; } protected override string GetDescription() { return "Shots have a 50% chance to blind enemies for 3s."; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Damage", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+75%", 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)4; } public override string GetModName() { return "BFRM"; } } public class FadeoutBulletModifier : RayHitEffect { private const float TRIGGER_CHANCE = 0.5f; private const float EFFECT_DURATION = 3f; private ProjectileHit projectileHit = null; private bool chanceRolled = false; private bool willTrigger = false; private SpriteRenderer bulletSprite = null; private TrailRenderer bulletTrail = null; private static readonly Color FADEOUT_COLOR = new Color(0.6f, 0.2f, 0.8f, 1f); private void Awake() { } private void Start() { projectileHit = ((Component)this).GetComponentInParent(); RollChance(); } private void RollChance() { if (chanceRolled) { return; } chanceRolled = true; PhotonView componentInParent = ((Component)this).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && !componentInParent.IsMine) { return; } float value = Random.value; willTrigger = value <= 0.5f; if (willTrigger) { ApplyBulletColor(); if ((Object)(object)componentInParent != (Object)null) { NetworkingManager.RPC(typeof(FadeoutBulletModifier), "RPC_ColorBullet", new object[1] { componentInParent.ViewID }); } } } [UnboundRPC] public static void RPC_ColorBullet(int viewId) { if (viewId < 0) { return; } PhotonView val = PhotonView.Find(viewId); if (!((Object)(object)val == (Object)null)) { FadeoutBulletModifier componentInChildren = ((Component)val).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.willTrigger = true; componentInChildren.ApplyBulletColor(); } } } private void ApplyBulletColor() { //IL_0053: 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_00e5: Unknown result type (might be due to invalid IL or missing references) bulletSprite = ((Component)this).GetComponentInParent(); if ((Object)(object)bulletSprite == (Object)null) { Transform parent = ((Component)this).transform.parent; bulletSprite = ((parent != null) ? ((Component)parent).GetComponentInChildren() : null); } if ((Object)(object)bulletSprite != (Object)null) { bulletSprite.color = FADEOUT_COLOR; } bulletTrail = ((Component)this).GetComponentInParent(); if ((Object)(object)bulletTrail == (Object)null) { Transform parent2 = ((Component)this).transform.parent; bulletTrail = ((parent2 != null) ? ((Component)parent2).GetComponentInChildren() : null); } if ((Object)(object)bulletTrail != (Object)null) { bulletTrail.startColor = FADEOUT_COLOR; bulletTrail.endColor = new Color(FADEOUT_COLOR.r, FADEOUT_COLOR.g, FADEOUT_COLOR.b, 0f); } } public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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) if ((Object)(object)hit.transform == (Object)null) { return (HasToReturn)1; } string tag = ((Component)hit.transform).gameObject.tag; if (tag.Contains("Bullet")) { return (HasToReturn)1; } Player val = ((Component)hit.transform).GetComponent(); if ((Object)(object)val == (Object)null) { val = ((Component)hit.transform).GetComponentInParent(); } if ((Object)(object)val == (Object)null) { return (HasToReturn)1; } if ((Object)(object)projectileHit == (Object)null) { projectileHit = ((Component)this).GetComponentInParent(); } if ((Object)(object)projectileHit == (Object)null || (Object)(object)projectileHit.ownPlayer == (Object)null) { return (HasToReturn)1; } PhotonView componentInParent = ((Component)this).GetComponentInParent(); if ((!((Object)(object)componentInParent != (Object)null) || componentInParent.IsMine) && willTrigger) { ApplyFadeoutEffectSynced(val.playerID, 3f); } return (HasToReturn)1; } private void ApplyFadeoutEffectSynced(int targetPlayerId, float duration) { NetworkingManager.RPC(typeof(FadeoutBulletModifier), "RPCA_ApplyFadeoutEffect", new object[2] { targetPlayerId, duration }); } private static Player GetPlayerByID(int playerID) { foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && player.playerID == playerID) { return player; } } return null; } [UnboundRPC] public static void RPCA_ApplyFadeoutEffect(int targetPlayerId, float duration) { Player playerByID = GetPlayerByID(targetPlayerId); if (!((Object)(object)playerByID == (Object)null)) { FadeoutVisionEffect orAddComponent = ExtensionMethods.GetOrAddComponent(((Component)playerByID).gameObject, false); if (!((Object)(object)orAddComponent == (Object)null)) { orAddComponent.ApplyEffect(duration); } } } public void Destroy() { Object.Destroy((Object)(object)this); } } public class FadeoutStatusEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public FadeoutStatusEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ClearEffect(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public FadeoutStatusEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ClearEffect(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public FadeoutStatusEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ClearEffect(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float EFFECT_HEIGHT = 0f; private const float EFFECT_BASE_SIZE = 0.45f; private const float EFFECT_SCALE_MULTIPLIER = 3f; private const float EFFECT_SIZE = 1.3499999f; private const float SCALE_IN_TIME = 0.15f; private const float SCALE_OUT_TIME = 0.2f; private static readonly Color ICON_COLOR = new Color(0.85f, 0.3f, 1f, 1f); private static readonly Color OUTLINE_COLOR = new Color(0.05f, 0f, 0.1f, 1f); private Player player; private CharacterData data; private GameObject effectRoot; private SpriteRenderer iconRenderer; private SpriteRenderer outlineRenderer; private static Texture2D eyeTexture; private static Sprite eyeSprite; private float effectTimer = 0f; private float currentScale = 0f; private float targetScale = 0f; private bool effectActive = false; private void Awake() { player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); GameModeManager.AddHook("GameStart", (Func)OnGameStart); } private void Start() { CreateVisual(); } private static void CreateSharedTexture() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0056: 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) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)eyeTexture != (Object)null) { return; } int num = 64; eyeTexture = new Texture2D(num, num, (TextureFormat)4, false); Color val = default(Color); ((Color)(ref val))..ctor(0f, 0f, 0f, 0f); for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { eyeTexture.SetPixel(j, i, val); } } float num2 = (float)num / 2f; float num3 = (float)num / 2f; float num4 = (float)num * 0.4f; float num5 = (float)num * 0.2f; float num6 = (float)num * 0.12f; float num7 = (float)num * 0.06f; for (int k = 0; k < num; k++) { for (int l = 0; l < num; l++) { float num8 = ((float)l - num2) / num4; float num9 = ((float)k - num3) / num5; float num10 = Mathf.Abs(num8) + num9 * num9; if (num10 > 0.7f && num10 < 1f) { float num11 = 1f - Mathf.Abs(num10 - 0.85f) / 0.15f; SetPixelBlend(l, k, Mathf.Clamp01(num11)); } float num12 = Mathf.Sqrt(((float)l - num2) * ((float)l - num2) + ((float)k - num3) * ((float)k - num3)); if (num12 < num6) { float alpha = 1f - num12 / num6 * 0.3f; SetPixelBlend(l, k, alpha); } } } float num13 = -MathF.PI / 4f; float num14 = Mathf.Cos(num13); float num15 = Mathf.Sin(num13); for (int m = 0; m < num; m++) { for (int n = 0; n < num; n++) { float num16 = (float)n - num2; float num17 = (float)m - num3; float num18 = (0f - num16) * num15 + num17 * num14; float num19 = Mathf.Abs(num18); if (num19 < num7) { float num20 = num16 * num14 + num17 * num15; if (Mathf.Abs(num20) < (float)num * 0.38f) { float num21 = 1f - num19 / num7; num21 = Mathf.Pow(num21, 0.5f); SetPixelBlend(n, m, num21); } } } } eyeTexture.Apply(); ((Texture)eyeTexture).filterMode = (FilterMode)1; ((Texture)eyeTexture).wrapMode = (TextureWrapMode)1; eyeSprite = Sprite.Create(eyeTexture, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), (float)num); } private static void SetPixelBlend(int x, int y, float alpha) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) Color pixel = eyeTexture.GetPixel(x, y); float num = Mathf.Max(pixel.a, alpha); eyeTexture.SetPixel(x, y, new Color(1f, 1f, 1f, num)); } private void CreateVisual() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)effectRoot != (Object)null) && !((Object)(object)player == (Object)null)) { CreateSharedTexture(); if (!((Object)(object)eyeSprite == (Object)null)) { effectRoot = new GameObject($"FadeoutEffect_P{player.playerID}"); effectRoot.transform.SetParent(((Component)this).transform); effectRoot.transform.localPosition = new Vector3(0f, 0f, 0f); effectRoot.transform.localScale = Vector3.zero; GameObject val = new GameObject("Outline"); val.transform.SetParent(effectRoot.transform); val.transform.localPosition = Vector3.zero; val.transform.localScale = Vector3.one * 1.62f; outlineRenderer = val.AddComponent(); outlineRenderer.sprite = eyeSprite; outlineRenderer.color = OUTLINE_COLOR; ((Renderer)outlineRenderer).sortingLayerName = "MostFront"; ((Renderer)outlineRenderer).sortingOrder = 999; GameObject val2 = new GameObject("Icon"); val2.transform.SetParent(effectRoot.transform); val2.transform.localPosition = Vector3.zero; val2.transform.localScale = Vector3.one * 1.3499999f; iconRenderer = val2.AddComponent(); iconRenderer.sprite = eyeSprite; iconRenderer.color = ICON_COLOR; ((Renderer)iconRenderer).sortingLayerName = "MostFront"; ((Renderer)iconRenderer).sortingOrder = 1000; effectRoot.SetActive(false); } } } public void ApplyEffect(float duration) { if ((Object)(object)player == (Object)null) { player = ((Component)this).GetComponent(); } if ((Object)(object)data == (Object)null) { data = ((Component)this).GetComponent(); } if ((Object)(object)player == (Object)null || ((Object)(object)data != (Object)null && data.dead)) { return; } if ((Object)(object)effectRoot == (Object)null) { CreateVisual(); } if (!((Object)(object)effectRoot == (Object)null)) { effectTimer = Mathf.Max(effectTimer, duration); targetScale = 1f; if (!effectActive) { effectActive = true; effectRoot.SetActive(true); } } } private void Update() { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)effectRoot == (Object)null) { return; } if ((Object)(object)data != (Object)null && data.dead) { if (effectActive) { ClearEffect(); } return; } if (effectActive && effectTimer > 0f) { effectTimer -= Time.deltaTime; if (effectTimer <= 0f) { effectTimer = 0f; targetScale = 0f; } } float num = ((targetScale > currentScale) ? 6.6666665f : 5f); currentScale = Mathf.MoveTowards(currentScale, targetScale, num * Time.deltaTime); effectRoot.transform.localScale = Vector3.one * currentScale; if (currentScale <= 0.01f && targetScale <= 0f) { effectActive = false; effectRoot.SetActive(false); currentScale = 0f; } } public void ClearEffect() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) effectTimer = 0f; targetScale = 0f; currentScale = 0f; effectActive = false; if ((Object)(object)effectRoot != (Object)null) { effectRoot.transform.localScale = Vector3.zero; effectRoot.SetActive(false); } } public bool IsActive() { return effectActive; } public float GetRemainingTime() { return effectTimer; } [IteratorStateMachine(typeof(d__29))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__30))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__31))] private IEnumerator OnGameStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { <>4__this = this, gm = gm }; } private void OnDisable() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)effectRoot != (Object)null) { effectRoot.transform.localScale = Vector3.zero; } ClearEffect(); } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); GameModeManager.RemoveHook("GameStart", (Func)OnGameStart); if ((Object)(object)effectRoot != (Object)null) { Object.Destroy((Object)(object)effectRoot); } } } public class FadeoutVisionEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public FadeoutVisionEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ClearEffect(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public FadeoutVisionEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ClearEffect(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public FadeoutVisionEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ClearEffect(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float CLEAR_RADIUS = 5f; private const float FADE_WIDTH = 3f; private const float SPRITE_SIZE = 500f; private const float FADE_IN_TIME = 0.3f; private const float FADE_OUT_TIME = 0.5f; private const float MAX_OPACITY = 1f; private Player player; private CharacterData data; private GameObject vignetteObject; private SpriteRenderer vignetteRenderer; private Texture2D vignetteTexture; private FadeoutStatusEffect statusEffect; private float effectTimer = 0f; private float currentIntensity = 0f; private float targetIntensity = 0f; private bool effectActive = false; private bool isInitialized = false; private void Awake() { player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); GameModeManager.AddHook("GameStart", (Func)OnGameStart); if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } statusEffect = ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false); } private void OnRevive() { ClearEffect(); } private void Start() { if ((Object)(object)player != (Object)null && (Object)(object)player.data != (Object)null && (Object)(object)player.data.view != (Object)null && player.data.view.IsMine) { CreateVignetteVisual(); } else { isInitialized = true; } } private void CreateVignetteVisual() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)vignetteObject != (Object)null) && !((Object)(object)player == (Object)null)) { if ((Object)(object)player.data == (Object)null || (Object)(object)player.data.view == (Object)null || !player.data.view.IsMine) { isInitialized = true; return; } vignetteObject = new GameObject($"FadeoutVignette_Player{player.playerID}"); vignetteRenderer = vignetteObject.AddComponent(); int num = 256; vignetteTexture = CreateVignetteTexture(num); float num2 = (float)num / 500f; Sprite sprite = Sprite.Create(vignetteTexture, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), num2); vignetteRenderer.sprite = sprite; ((Renderer)vignetteRenderer).sortingLayerName = "MostFront"; ((Renderer)vignetteRenderer).sortingOrder = 30000; Color color = vignetteRenderer.color; color.a = 0f; vignetteRenderer.color = color; vignetteObject.SetActive(false); isInitialized = true; } } private Texture2D CreateVignetteTexture(int size) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(size, size, (TextureFormat)4, false); float num = (float)size / 2f; float num2 = (float)size / 500f; float num3 = 5f * num2; float num4 = 8f * num2; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num5 = (float)j - num; float num6 = (float)i - num; float num7 = Mathf.Sqrt(num5 * num5 + num6 * num6); float num8; if (num7 <= num3) { num8 = 0f; } else if (num7 <= num4) { float num9 = (num7 - num3) / (num4 - num3); num8 = num9 * num9 * (3f - 2f * num9); } else { num8 = 1f; } val.SetPixel(j, i, new Color(0.01f, 0.01f, 0.03f, num8)); } } val.Apply(); ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; return val; } public void ApplyEffect(float duration) { //IL_0175: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { player = ((Component)this).GetComponent(); } if ((Object)(object)data == (Object)null) { data = ((Component)this).GetComponent(); } if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || (Object)(object)player.data.view == (Object)null || ((Object)(object)data != (Object)null && data.dead)) { return; } effectTimer = Mathf.Max(effectTimer, duration); targetIntensity = 1f; effectActive = true; if ((Object)(object)statusEffect == (Object)null) { statusEffect = ExtensionMethods.GetOrAddComponent(((Component)this).gameObject, false); } if ((Object)(object)statusEffect != (Object)null) { statusEffect.ApplyEffect(duration); } if (player.data.view.IsMine) { if (!isInitialized) { CreateVignetteVisual(); } if ((Object)(object)vignetteObject != (Object)null) { vignetteObject.SetActive(true); vignetteObject.transform.position = ((Component)this).transform.position; } } } private void Update() { //IL_018a: 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_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || (Object)(object)player.data.view == (Object)null || !player.data.view.IsMine || !isInitialized || (Object)(object)vignetteRenderer == (Object)null) { return; } if ((Object)(object)data != (Object)null && data.dead) { HideVignette(); } else { if (!effectActive && currentIntensity <= 0.01f) { return; } if (effectActive && effectTimer > 0f) { effectTimer -= Time.deltaTime; if (effectTimer <= 0f) { effectTimer = 0f; targetIntensity = 0f; effectActive = false; } } float num = ((targetIntensity > currentIntensity) ? 3.3333333f : 2f); currentIntensity = Mathf.MoveTowards(currentIntensity, targetIntensity, num * Time.deltaTime); if ((Object)(object)vignetteRenderer != (Object)null) { Color color = vignetteRenderer.color; color.a = currentIntensity * 1f; vignetteRenderer.color = color; } if (currentIntensity <= 0.01f && !effectActive) { HideVignette(); } if ((Object)(object)vignetteObject != (Object)null && vignetteObject.activeSelf) { vignetteObject.transform.position = ((Component)this).transform.position; } } } private void HideVignette() { if ((Object)(object)vignetteObject != (Object)null && vignetteObject.activeSelf) { vignetteObject.SetActive(false); } } public void ClearEffect() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) effectTimer = 0f; targetIntensity = 0f; effectActive = false; currentIntensity = 0f; if ((Object)(object)vignetteRenderer != (Object)null) { Color color = vignetteRenderer.color; color.a = 0f; vignetteRenderer.color = color; } HideVignette(); if ((Object)(object)statusEffect != (Object)null) { statusEffect.ClearEffect(); } } public bool IsActive() { return effectActive && currentIntensity > 0.1f; } public float GetRemainingTime() { return effectTimer; } [IteratorStateMachine(typeof(d__28))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__29))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__30))] private IEnumerator OnGameStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this, gm = gm }; } private void OnDestroy() { if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); GameModeManager.RemoveHook("GameStart", (Func)OnGameStart); if ((Object)(object)vignetteObject != (Object)null) { Object.Destroy((Object)(object)vignetteObject); } if ((Object)(object)vignetteTexture != (Object)null) { Object.Destroy((Object)(object)vignetteTexture); } } private void OnDisable() { ClearEffect(); } } public class FalloffForceCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.ammo = 5; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown gun.numberOfProjectiles++; gun.spread += 0.05f; gun.projectileColor = new Color(1f, 0.5f, 0.1f, 1f); List list = gun.objectsToSpawn.ToList(); ObjectsToSpawn val = new ObjectsToSpawn(); val.AddToProjectile = new GameObject("A_FalloffForce", new Type[1] { typeof(FalloffForceMono) }); list.Add(val); gun.objectsToSpawn = list.ToArray(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { List list = gun.objectsToSpawn.ToList(); ObjectsToSpawn val = ((IEnumerable)list).FirstOrDefault((Func)((ObjectsToSpawn o) => (Object)(object)o.AddToProjectile != (Object)null && ((Object)o.AddToProjectile).name == "A_FalloffForce")); if (val != null) { list.Remove(val); } gun.objectsToSpawn = list.ToArray(); } protected override string GetTitle() { return "Falloff Force"; } protected override string GetDescription() { return "Bullets slow down as they fall."; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } protected override GameObject GetCardArt() { return null; } public override string GetModName() { return "BFRM"; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bullets", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Bullet Spread", amount = "+0.05", simepleAmount = (SimpleAmount)0 } }; } } public class FalloffForceMono : MonoBehaviour { private MoveTransform move; private float startTime; private const float updateDelay = 0.1f; private const float fallDecel = 2f; private const float minSpeed = 1f; private void Start() { move = ((Component)this).GetComponentInParent(); ResetTimer(); } private void Update() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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: 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) if (Time.time < startTime + 0.1f || (Object)(object)((Component)this).transform.parent == (Object)null) { return; } ResetTimer(); Vector3 val = move.velocity; val.z = 0f; if (val.y < 0f) { float magnitude = ((Vector3)(ref val)).magnitude; if (magnitude > 1f) { float num = Mathf.Abs(val.y) / magnitude; float num2 = Mathf.Max(magnitude / Mathf.Lerp(1f, 2f, num), 1f); val *= num2 / magnitude; } } move.velocity = val; } private void ResetTimer() { startTime = Time.time; } } internal class FinisherCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FinisherEffect.AddStack(player); if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FinisherEffect.RemoveStack(player); } protected override string GetTitle() { return "Finisher"; } protected override string GetDescription() { return "Gives buffs when there is an enemy with 50% HP or lower."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Move Speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+100%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } public override string GetModName() { return "BFRM"; } } public class FinisherEffect : ReversibleEffect { [CompilerGenerated] private sealed class d__16 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public FinisherEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; ClearAllStacks(); 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 static Dictionary playerStacks = new Dictionary(); private bool visualActive; private ParticleSystem bloodParticles; private ParticleSystem glowParticles; private GameObject bloodParticlesObj; private float checkTimer; private const float CHECK_INTERVAL = 0.1f; private bool anyEnemyLowHP; private bool firstCheckDone; private int CurrentStacks => GetStacks(base.player); public static void AddStack(Player player) { if (!((Object)(object)player == (Object)null)) { if (!playerStacks.ContainsKey(player.playerID)) { playerStacks[player.playerID] = 0; } playerStacks[player.playerID]++; } } public static void RemoveStack(Player player) { if (!((Object)(object)player == (Object)null) && playerStacks.ContainsKey(player.playerID)) { playerStacks[player.playerID]--; if (playerStacks[player.playerID] <= 0) { playerStacks.Remove(player.playerID); } } } public static int GetStacks(Player player) { if ((Object)(object)player == (Object)null) { return 0; } int value; return playerStacks.TryGetValue(player.playerID, out value) ? value : 0; } public static void ClearAllStacks() { playerStacks.Clear(); } public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); GameModeManager.AddHook("GameEnd", (Func)OnGameEnd); } [IteratorStateMachine(typeof(d__16))] private IEnumerator OnGameEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__16(0) { <>4__this = this, gm = gm }; } public override void OnStart() { base.applyImmediately = false; visualActive = false; anyEnemyLowHP = false; firstCheckDone = false; checkTimer = 0f; CreateBloodParticles(); } public override void OnOnEnable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } RemoveVisuals(); visualActive = false; anyEnemyLowHP = false; firstCheckDone = false; checkTimer = 0f; } public override void OnUpdate() { if ((Object)(object)base.data == (Object)null || CurrentStacks <= 0) { return; } checkTimer += TimeHandler.deltaTime; if (checkTimer >= 0.1f) { checkTimer = 0f; anyEnemyLowHP = CheckAnyEnemyLowHP(); firstCheckDone = true; } if (!firstCheckDone) { return; } if (anyEnemyLowHP) { if (!((ReversibleEffect)this).modifiersActive) { SetupModifiers(); ((ReversibleEffect)this).ApplyModifiers(); } if (!visualActive) { ApplyVisuals(); visualActive = true; } } else { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } if (visualActive) { RemoveVisuals(); visualActive = false; } } } private bool CheckAnyEnemyLowHP() { if ((Object)(object)base.player == (Object)null || (Object)(object)PlayerManager.instance == (Object)null) { return false; } for (int i = 0; i < PlayerManager.instance.players.Count; i++) { Player val = PlayerManager.instance.players[i]; if (!((Object)(object)val == (Object)null) && val.teamID != base.player.teamID && !((Object)(object)val.data == (Object)null) && !val.data.dead && ((Component)val).gameObject.activeInHierarchy && val.data.maxHealth > 0f && val.data.health > 0f) { float num = val.data.health / val.data.maxHealth; if (num < 0.5f) { return true; } } } return false; } private void SetupModifiers() { int currentStacks = CurrentStacks; if (currentStacks > 0) { base.characterStatModifiersModifier.movementSpeed_mult = 1f + 0.25f * (float)currentStacks; base.gunStatModifier.damage_mult = 1f + 1f * (float)currentStacks; base.gunStatModifier.projectileSpeed_mult = 1f + 1f * (float)currentStacks; base.gunAmmoStatModifier.maxAmmo_mult = 1 + currentStacks; } } private static Texture2D CreateSoftCircleTexture() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_002c: 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_006b: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(32, 32, (TextureFormat)4, false); float num = 16f; for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { float num2 = Vector2.Distance(new Vector2((float)j + 0.5f, (float)i + 0.5f), new Vector2(num, num)) / num; float num3 = Mathf.Clamp01(1f - num2); num3 *= num3; val.SetPixel(j, i, new Color(1f, 1f, 1f, num3)); } } val.Apply(); return val; } private void CreateBloodParticles() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_0125: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: 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) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Expected O, but got Unknown //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Expected O, but got Unknown //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Expected O, but got Unknown //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Expected O, but got Unknown //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f1: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)bloodParticlesObj != (Object)null)) { bloodParticlesObj = new GameObject("FinisherBloodParticles"); bloodParticlesObj.transform.SetParent(((Component)base.player).transform); bloodParticlesObj.transform.localPosition = Vector3.zero; float x = ((Component)base.player).transform.localScale.x; float radius = 0.58f * x; float num = 0.25f * x; float num2 = 0.6f * x; float num3 = 0.18f * x; float num4 = 0.45f * x; Texture2D mainTexture = CreateSoftCircleTexture(); Material val = new Material(Shader.Find("Sprites/Default")); val.mainTexture = (Texture)(object)mainTexture; Material val2 = (((Object)(object)Shader.Find("Particles/Additive") != (Object)null) ? new Material(Shader.Find("Particles/Additive")) : new Material(Shader.Find("Sprites/Default"))); val2.mainTexture = (Texture)(object)mainTexture; GameObject val3 = new GameObject("Glow"); val3.transform.SetParent(bloodParticlesObj.transform); val3.transform.localPosition = Vector3.zero; glowParticles = val3.AddComponent(); MainModule main = glowParticles.main; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.5f, 0.9f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(num3, num4); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.18f * x, 0.35f * x); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 0.7f, 0.4f, 1f), new Color(1f, 0.9f, 0.7f, 1f)); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).maxParticles = 80; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(-0.1f); EmissionModule emission = glowParticles.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(30f); ShapeModule shape = glowParticles.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10; ((ShapeModule)(ref shape)).radius = radius; ColorOverLifetimeModule colorOverLifetime = glowParticles.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val4 = new Gradient(); val4.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(1f, 0.9f, 0.6f), 0f), new GradientColorKey(new Color(1f, 0.5f, 0.2f), 0.4f), new GradientColorKey(new Color(0.6f, 0.1f, 0f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(0.8f, 0f), new GradientAlphaKey(0.5f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val4); SizeOverLifetimeModule sizeOverLifetime = glowParticles.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; AnimationCurve val5 = new AnimationCurve(); val5.AddKey(0f, 0.5f); val5.AddKey(0.3f, 1f); val5.AddKey(1f, 0f); ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, val5); ParticleSystemRenderer component = val3.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 99; ((Renderer)component).material = val2; GameObject val6 = new GameObject("Color"); val6.transform.SetParent(bloodParticlesObj.transform); val6.transform.localPosition = Vector3.zero; bloodParticles = val6.AddComponent(); MainModule main2 = bloodParticles.main; ((MainModule)(ref main2)).startLifetime = new MinMaxCurve(0.5f, 1f); ((MainModule)(ref main2)).startSpeed = new MinMaxCurve(num, num2); ((MainModule)(ref main2)).startSize = new MinMaxCurve(0.09f * x, 0.22f * x); ((MainModule)(ref main2)).startColor = new MinMaxGradient(new Color(0.8f, 0.05f, 0.05f, 1f), new Color(1f, 0.2f, 0.1f, 1f)); ((MainModule)(ref main2)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main2)).maxParticles = 120; ((MainModule)(ref main2)).gravityModifier = MinMaxCurve.op_Implicit(-0.15f); EmissionModule emission2 = bloodParticles.emission; ((EmissionModule)(ref emission2)).enabled = true; ((EmissionModule)(ref emission2)).rateOverTime = MinMaxCurve.op_Implicit(45f); ShapeModule shape2 = bloodParticles.shape; ((ShapeModule)(ref shape2)).enabled = true; ((ShapeModule)(ref shape2)).shapeType = (ParticleSystemShapeType)10; ((ShapeModule)(ref shape2)).radius = radius; SizeOverLifetimeModule sizeOverLifetime2 = bloodParticles.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime2)).enabled = true; AnimationCurve val7 = new AnimationCurve(); val7.AddKey(0f, 0.5f); val7.AddKey(0.3f, 1f); val7.AddKey(1f, 0f); ((SizeOverLifetimeModule)(ref sizeOverLifetime2)).size = new MinMaxCurve(1f, val7); ColorOverLifetimeModule colorOverLifetime2 = bloodParticles.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime2)).enabled = true; Gradient val8 = new Gradient(); val8.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(1f, 0.2f, 0.1f), 0f), new GradientColorKey(new Color(0.8f, 0.05f, 0f), 0.5f), new GradientColorKey(new Color(0.4f, 0f, 0f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(0.9f, 0f), new GradientAlphaKey(0.6f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime2)).color = MinMaxGradient.op_Implicit(val8); ParticleSystemRenderer component2 = val6.GetComponent(); ((Renderer)component2).sortingLayerName = "MostFront"; ((Renderer)component2).sortingOrder = 100; ((Renderer)component2).material = val; bloodParticlesObj.SetActive(false); } } private void ApplyVisuals() { if ((Object)(object)bloodParticlesObj != (Object)null) { bloodParticlesObj.SetActive(true); } if ((Object)(object)bloodParticles != (Object)null && !bloodParticles.isPlaying) { bloodParticles.Play(true); } } private void RemoveVisuals() { if ((Object)(object)bloodParticles != (Object)null) { bloodParticles.Stop(true, (ParticleSystemStopBehavior)0); bloodParticles.Clear(true); } if ((Object)(object)glowParticles != (Object)null) { glowParticles.Stop(true, (ParticleSystemStopBehavior)0); glowParticles.Clear(true); } if ((Object)(object)bloodParticlesObj != (Object)null) { bloodParticlesObj.SetActive(false); } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } RemoveVisuals(); visualActive = false; anyEnemyLowHP = false; } public override void OnOnDestroy() { RemoveVisuals(); if ((Object)(object)bloodParticlesObj != (Object)null) { Object.Destroy((Object)(object)bloodParticlesObj); bloodParticlesObj = null; bloodParticles = null; glowParticles = null; } GameModeManager.RemoveHook("GameEnd", (Func)OnGameEnd); } } internal class FragileStrengthCard : CustomCard { internal const string CardName = "Fragile Strength"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Fragile Strength"; } protected override string GetDescription() { return "Gives you great strength, but if you get hit, it's gone.\nAt full hp:"; } protected override GameObject GetCardArt() { return Assets.FragileStrengthArt; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Damage", amount = "+75%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+75%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+100%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } public override string GetModName() { return "IS"; } } public class MaxHealthEffect : ReversibleEffect { [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public MaxHealthEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (((ReversibleEffect)<>4__this).modifiersActive) { ((ReversibleEffect)<>4__this).ClearModifiers(true); } if (<>4__this.visualActive) { <>4__this.RemoveColorEffect(); <>4__this.visualActive = false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private bool visualActive; private ColorEffect colorEffect; private readonly Color effectColor = new Color(1f, 1f, 1f, 0.3f); private int CurrentStacks { get { if ((Object)(object)base.player == (Object)null || (Object)(object)base.player.data == (Object)null || base.player.data.currentCards == null) { return 0; } int num = 0; List currentCards = base.player.data.currentCards; for (int i = 0; i < currentCards.Count; i++) { if ((Object)(object)currentCards[i] != (Object)null && currentCards[i].cardName == "Fragile Strength") { num++; } } return num; } } public override void OnAwake() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); GameModeManager.AddHook("BattleStart", (Func)OnBattleStart); } [IteratorStateMachine(typeof(d__6))] private IEnumerator OnBattleStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { <>4__this = this, gm = gm }; } public override void OnStart() { base.applyImmediately = false; visualActive = false; } public override void OnUpdate() { if ((Object)(object)base.data == (Object)null) { return; } if (CurrentStacks <= 0) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } if (visualActive) { RemoveColorEffect(); visualActive = false; } } else if (!base.player.data.isPlaying) { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } if (visualActive) { RemoveColorEffect(); visualActive = false; } } else if (HealthIsFull()) { if (!((ReversibleEffect)this).modifiersActive) { SetupModifiers(); ((ReversibleEffect)this).ApplyModifiers(); } if (!visualActive) { ApplyColorEffect(); visualActive = true; } } else { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } if (visualActive) { RemoveColorEffect(); visualActive = false; } } } private void SetupModifiers() { int currentStacks = CurrentStacks; if (currentStacks > 0) { base.gunStatModifier.damage_mult = 1f + 0.75f * (float)currentStacks; base.gunStatModifier.attackSpeed_mult = 1f / (1f + 0.5f * (float)currentStacks); base.gunStatModifier.projectileSpeed_mult = 1f + 0.75f * (float)currentStacks; base.gunAmmoStatModifier.maxAmmo_mult = 1 + currentStacks; } } private bool HealthIsFull() { return (Object)(object)base.data != (Object)null && base.data.health >= base.data.maxHealth * 0.999f; } private void ApplyColorEffect() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)colorEffect == (Object)null) { colorEffect = ((Component)base.player).gameObject.AddComponent(); colorEffect.SetColor(effectColor); } } private void RemoveColorEffect() { if ((Object)(object)colorEffect != (Object)null) { Object.Destroy((Object)(object)colorEffect); colorEffect = null; } } public override void OnOnDisable() { if (((ReversibleEffect)this).modifiersActive) { ((ReversibleEffect)this).ClearModifiers(true); } RemoveColorEffect(); visualActive = false; } public override void OnOnDestroy() { RemoveColorEffect(); GameModeManager.RemoveHook("BattleStart", (Func)OnBattleStart); } } public class FriendlyBounceCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.2f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Add(gun); gun.reflects++; FriendlyBulletsDealtDamageEffect orAddComponent = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); orAddComponent.multiplier *= 0.6f; characterStats.WasUpdated(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Remove(gun); gun.reflects = Mathf.Max(0, gun.reflects - 1); } protected override string GetTitle() { return "Friendly Bounce"; } protected override string GetDescription() { return null; } protected override GameObject GetCardArt() { return Assets.FriendlyBounceArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Friendly Fire", amount = "-40%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bounce", 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)5; } public override string GetModName() { return "DRON"; } } public class GravitySurgeCard : CustomCard { public static CardInfo cardInfoSelf; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.GravitySurgeCategory }; cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.health *= 1.5f; if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.health /= 1.5f; GravitySurgeMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Gravity Surge"; } protected override string GetDescription() { return "Requires Planet\nBlock to unleash a massive gravitational pull within a 30m radius for 0.5s."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "15s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Hidden", (CardThemeColor)null); } public override string GetModName() { return "BFRM"; } } internal class GymBossCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.damage = 1.5f; gun.projectileSpeed = 2f; gun.reloadTimeAdd = 3f; statModifiers.health = 1.75f; statModifiers.movementSpeed = 0.5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { block.cdAdd += 3f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Gym Boss"; } protected override string GetDescription() { return "You become the boss of this gym."; } protected override GameObject GetCardArt() { return Assets.GymBossArt; } 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 //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[6] { new CardInfoStat { positive = true, stat = "Damage", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", amount = "+75%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+3s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldawn", amount = "+3s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Move 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)0; } public override string GetModName() { return "IS"; } } internal class HealMeCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 0.65f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Heal me"; } protected override string GetDescription() { return null; } protected override GameObject GetCardArt() { return Assets.HealMeArt; } 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 = "Life Regen", amount = "+20", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-35%", 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)5; } public override string GetModName() { return "DRON"; } } public class ImmunityAntiRadarCard : CustomCard { private static readonly Dictionary _immunityCache = new Dictionary(); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardCategory val = CustomCardCategories.instance.CardCategory("ImmunityCards"); cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { val }; cardInfo.allowMultiple = false; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { _immunityCache[player.playerID] = true; ImmunityHelper.CheckUnlockImmunityMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { _immunityCache.Remove(player.playerID); ImmunityHelper.CheckLockImmunityMaster(player); } protected override string GetTitle() { return "Immunity: Anti Radar"; } protected override string GetDescription() { return "Ignored by homing and tracking.\nAuto-Targeting Immunity"; } protected override GameObject GetCardArt() { return Assets.AntiRadar_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)2; } public override string GetModName() { return "DRON"; } public static bool HasImmunity(Player player) { if ((Object)(object)player == (Object)null) { return false; } if (_immunityCache.TryGetValue(player.playerID, out var value)) { return value; } if (player.data?.currentCards == null) { return false; } bool flag = player.data.currentCards.Any((CardInfo c) => (Object)(object)c != (Object)null && c.cardName == "Anti Radar"); _immunityCache[player.playerID] = flag; return flag; } public static void ClearCache() { _immunityCache.Clear(); } } internal class ImmunityBorderlineCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardCategory val = CustomCardCategories.instance.CardCategory("ImmunityCards"); cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { val }; cardInfo.allowMultiple = false; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } ImmunityHelper.CheckUnlockImmunityMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { OobImmunityMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } ImmunityHelper.CheckLockImmunityMaster(player); } protected override string GetTitle() { return "Immunity: Borderline"; } protected override string GetDescription() { return "The edge of the screen can't hurt you.\nBorder Damage Immunity"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } public class ImmunityControlledFireCard : CustomCard { public static CardInfo cardInfoSelf; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ImmunityMasterCategory }; cardInfo.allowMultiple = false; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SafemodeEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Immunity: Controlled Fire"; } protected override string GetDescription() { return "Any Immunity + Any Immunity\nYou are unaffected by your own fire.\nBullet Self Damage Immunity"; } protected override GameObject GetCardArt() { return Assets.ControlledFire_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Hidden", (CardThemeColor)null); } public override string GetModName() { return "BFRM"; } } public class SafemodeEffect : MonoBehaviour { } [HarmonyPatch(typeof(HealthHandler))] public class SafemodePatch { private static float lastEffectTime; private const float EFFECT_COOLDOWN = 0.15f; [HarmonyPrefix] [HarmonyPriority(600)] [HarmonyPatch("CallTakeDamage")] private static bool CallTakeDamage_BlockBulletSelfDamage(HealthHandler __instance, Vector2 damage, Vector2 position, GameObject damagingWeapon, Player damagingPlayer, bool lethal, Player ___player) { if ((Object)(object)damagingPlayer == (Object)null) { return true; } if ((Object)(object)damagingPlayer != (Object)(object)___player) { return true; } if ((Object)(object)damagingWeapon == (Object)null) { return true; } SafemodeEffect component = ((Component)___player).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } PlayResistEffect(___player); return false; } private static void PlayResistEffect(Player player) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!(Time.time - lastEffectTime < 0.15f)) { lastEffectTime = Time.time; Color color = default(Color); ((Color)(ref color))..ctor(1f, 0.8f, 0.3f, 1f); ShieldEffect.PlayShieldEffect(player, color, 0.8f); } } } public class ImmunityMomentumCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardCategory val = CustomCardCategories.instance.CardCategory("ImmunityCards"); cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { val }; cardInfo.allowMultiple = false; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } ImmunityHelper.CheckUnlockImmunityMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AntiSlowMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } ImmunityHelper.CheckLockImmunityMaster(player); } protected override string GetTitle() { return "Immunity: Momentum"; } protected override string GetDescription() { return "Nothing can slow you down.\nSlow Immunity"; } protected override GameObject? GetCardArt() { return Assets.Momentum_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } public class ImmunityRootedCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardCategory val = CustomCardCategories.instance.CardCategory("ImmunityCards"); cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { val }; cardInfo.allowMultiple = false; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } ImmunityHelper.CheckUnlockImmunityMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AntiKnockbackMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } ImmunityHelper.CheckLockImmunityMaster(player); } protected override string GetTitle() { return "Immunity: Rooted"; } protected override string GetDescription() { return "Forces cannot push you back.\nKnockback Immunity"; } protected override GameObject? GetCardArt() { return Assets.Rooted_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } public class ImmunitySafetyDetonatorCard : CustomCard { public static CardInfo cardInfoSelf; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardCategory val = CustomCardCategories.instance.CardCategory("ImmunityCards"); cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { val }; cardInfo.allowMultiple = false; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } ImmunityHelper.CheckUnlockImmunityMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExplosionImmunityEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } ImmunityHelper.CheckLockImmunityMaster(player); } protected override string GetTitle() { return "Immunity: Safety Detonator"; } protected override string GetDescription() { return "You are unaffected by your own blasts.\nExplosion Self Damage Immunity"; } protected override GameObject GetCardArt() { return Assets.SaferyDetonator_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } public class ExplosionImmunityEffect : MonoBehaviour { } public static class ExplosionDamageContext { [ThreadStatic] private static bool _isExplosionDamage; [ThreadStatic] private static Player _explosionOwner; public static bool IsExplosionDamage => _isExplosionDamage; public static Player ExplosionOwner => _explosionOwner; public static void SetExplosionContext(Player owner) { _isExplosionDamage = true; _explosionOwner = owner; } public static void ClearContext() { _isExplosionDamage = false; _explosionOwner = null; } } [HarmonyPatch(typeof(Explosion))] public class ExplosionContextPatch { [HarmonyPrefix] [HarmonyPriority(800)] [HarmonyPatch("DoExplosionEffects")] private static void DoExplosionEffects_SetContext(Explosion __instance) { SpawnedAttack component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.spawner != (Object)null) { ExplosionDamageContext.SetExplosionContext(component.spawner); } } [HarmonyFinalizer] [HarmonyPatch("DoExplosionEffects")] private static void DoExplosionEffects_ClearContext() { ExplosionDamageContext.ClearContext(); } } [HarmonyPatch(typeof(HealthHandler))] public class ExplosionImmunityDamagePatch { private static float lastEffectTime; private const float EFFECT_COOLDOWN = 0.15f; [HarmonyPrefix] [HarmonyPriority(601)] [HarmonyPatch("CallTakeDamage")] private static bool CallTakeDamage_BlockExplosionSelfDamage(HealthHandler __instance, Vector2 damage, Vector2 position, GameObject damagingWeapon, Player damagingPlayer, bool lethal, Player ___player) { if (!ExplosionDamageContext.IsExplosionDamage) { return true; } Player explosionOwner = ExplosionDamageContext.ExplosionOwner; if ((Object)(object)explosionOwner == (Object)null) { return true; } if ((Object)(object)___player != (Object)(object)explosionOwner) { return true; } ExplosionImmunityEffect component = ((Component)explosionOwner).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } PlayResistEffect(explosionOwner); return false; } private static void PlayResistEffect(Player player) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!(Time.time - lastEffectTime < 0.15f)) { lastEffectTime = Time.time; Color color = default(Color); ((Color)(ref color))..ctor(1f, 0.5f, 0.2f, 1f); ShieldEffect.PlayShieldEffect(player, color); } } } public class ImmunitySonicRiotCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardCategory val = CustomCardCategories.instance.CardCategory("ImmunityCards"); cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { val }; cardInfo.allowMultiple = false; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } ImmunityHelper.CheckUnlockImmunityMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AntiSilenceMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } ImmunityHelper.CheckLockImmunityMaster(player); } protected override string GetTitle() { return "Immunity: Sonic Riot"; } protected override string GetDescription() { return "You cannot be muted.\nSilence Immunity"; } protected override GameObject? GetCardArt() { return Assets.SonicRiot_Art; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } internal class ImmunityUnstoppableCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardCategory val = CustomCardCategories.instance.CardCategory("ImmunityCards"); cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { val }; cardInfo.allowMultiple = false; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } ImmunityHelper.CheckUnlockImmunityMaster(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { AntiStunMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } ImmunityHelper.CheckLockImmunityMaster(player); } protected override string GetTitle() { return "Immunity: Unstoppable"; } protected override string GetDescription() { return "You cannot be forced to stop.\nStun Immunity"; } protected override GameObject? GetCardArt() { return Assets.Unstoppable_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } internal class ImmunizeCard : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__1(IGameModeHandler gm) { return EndBalancePick(player); } internal IEnumerator b__0(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class <>c__DisplayClass11_0 { public Player player; public Func <>9__0; internal bool b__0(int i) { return PlayerManager.instance.players[i].playerID == player.playerID; } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; private List 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { 5__2 = CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories; if (5__2.Contains(MrFuntikMod.ImmunityCards)) { 5__2.Add(MrFuntikMod.NonImmunityCards); 5__2.Remove(MrFuntikMod.ImmunityCards); } GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndBalancePick(<>8__1.player))); 5__2 = null; } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(<>8__1.player)); return new List().GetEnumerator(); }); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private List 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; 5__1 = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; if (!5__1.Contains(MrFuntikMod.ImmunityCards)) { 5__1.Add(MrFuntikMod.ImmunityCards); 5__1.Remove(MrFuntikMod.NonImmunityCards); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Player[] 5__1; private int 5__2; private <>c__DisplayClass11_0 <>8__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>8__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown int num; switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = PlayerManager.instance.players.ToArray(); 5__2 = 0; goto IL_0217; case 1: <>1__state = -1; 5__4 = (from i in Enumerable.Range(0, PlayerManager.instance.players.Count) where PlayerManager.instance.players[i].playerID == <>8__3.player.playerID select i).First(); CardChoiceVisuals.instance.Show(5__4, true); <>2__current = CardChoice.instance.DoPick(1, <>8__3.player.playerID, (PickerType)1); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = GameModeManager.TriggerHook("PlayerPickEnd"); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 5; return true; case 5: { <>1__state = -1; goto IL_01d6; } IL_01d6: if (<>8__3.player.data.stats.GetAdditionalData().shuffles > 0) { <>8__3.player.data.stats.GetAdditionalData().shuffles--; <>2__current = GameModeManager.TriggerHook("PlayerPickStart"); <>1__state = 1; return true; } <>8__3 = null; num = 5__2 + 1; 5__2 = num; goto IL_0217; IL_0217: if (5__2 < 5__1.Length) { <>8__3 = new <>c__DisplayClass11_0(); <>8__3.player = 5__1[5__2]; goto IL_01d6; } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; characterStats.GetAdditionalData().shuffles++; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Immunize"; } protected override string GetDescription() { return "Pick an immunity to gain protection."; } protected override GameObject? GetCardArt() { return Assets.Immunize_Art; } 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() { 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)2; } public override string GetModName() { return "BFRM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator BalancePick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] internal static IEnumerator ExtraPicks() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0); } [IteratorStateMachine(typeof(d__12))] public static IEnumerator EndBalancePick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { player = player }; } } public class ItBecomesAllCard : CustomCard { public const string CardName = "It Becomes ALL"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)PlayerManager.instance == (Object)null || PlayerManager.instance.players == null || PlayerManager.instance.players.Count == 0 || !PlayerManager.instance.players.Contains(player)) { return; } if (NothingTimerManager.HasItBecomesAll(player)) { MrFuntikMod.Log($"[ItBecomesAllCard] Player {player.playerID}: reinventarization, skipping"); return; } MrFuntikMod.Log($"[ItBecomesAllCard] Player {player.playerID}: first time adding card"); NothingTimerManager.SetHasItBecomesAll(player, value: true); int timerCount = NothingTimerManager.GetTimerCount(player); if (timerCount > 0) { MrFuntikMod.Log($"[ItBecomesAllCard] Player {player.playerID}: transforming {timerCount} existing Nothing cards to All"); NothingTimerManager.TransformAllNothingsToAll(player); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (NothingTimerManager.IsInReplaceOperation(player)) { MrFuntikMod.Log($"[ItBecomesAllCard] Player {player.playerID}: OnRemoveCard during replace operation, keeping flag"); return; } NothingTimerManager.SetHasItBecomesAll(player, value: false); MrFuntikMod.Log($"[ItBecomesAllCard] Player {player.playerID}: card removed, flag reset"); } protected override string GetTitle() { return "It Becomes ALL"; } protected override string GetDescription() { return "Transform all 'Nothing' cards into 'All' cards."; } protected override GameObject GetCardArt() { return Assets.ItBecomesAllArt; } 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 = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "IS"; } } internal class JumperCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.15f; statModifiers.movementSpeed = 1.2f; statModifiers.jump = 1.4f; statModifiers.gravity = 1.4f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Jumper"; } protected override string GetDescription() { return "Jump to the sky!"; } protected override GameObject GetCardArt() { return Assets.JumperArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //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 = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Jump Height", amount = "+40%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Gravity", amount = "+40%", 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)6; } public override string GetModName() { return "DRON"; } } public class KamikazeCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; statModifiers.health = 1.25f; statModifiers.movementSpeed = 1.25f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.damage *= 1.25f; ((Component)player).gameObject.AddComponent(); PhoenixSurgeHelper.CheckUnlockPhoenixSurge(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.damage /= 1.25f; PhoenixSurgeHelper.CheckLockPhoenixSurge(player); } protected override string GetTitle() { return "Kamikaze"; } protected override string GetDescription() { return "Explode on Death within 15m radius."; } protected override GameObject GetCardArt() { return Assets.KamikazeArt; } 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 //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 = "Health", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", 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)0; } public override string GetModName() { return "DRON"; } } public class KineticArmorCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.lifeSteal += 0.1f; KineticArmorMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.AddStack(); return; } KineticArmorMono kineticArmorMono = ((Component)player).gameObject.AddComponent(); kineticArmorMono.stackCount = 1; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.lifeSteal -= 0.1f; KineticArmorMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); if (component.stackCount <= 0) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Kinetic Armor"; } protected override string GetDescription() { return "Take damage to charge next shot (max 100% bonus damage). 25% charge rate. (+15% per copy)"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Life Steal", amount = "10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } public class LastChanceCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.damage *= 1.25f; gun.destroyBulletAfter = 0f; LastChanceMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.damage /= 1.25f; LastChanceMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Last Chance"; } protected override string GetDescription() { return "Bullets within 3m that drift 5m away return with homing for 0.5s."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Bullet Range", amount = "Reset", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+25%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class MinigunCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.ammo = 20; gun.reloadTimeAdd = 5f; gun.damage = 0.15f; gun.attackSpeed = 0.1f; gun.gravity = 0f; gun.projectileSpeed = 2f; gun.spread += 0.05f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Minigun"; } protected override string GetDescription() { return null; } protected override GameObject GetCardArt() { return Assets.MinigunArt; } 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 //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[7] { new CardInfoStat { positive = true, stat = "Ammo", amount = "+20", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+900%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Gravity", amount = "Zero", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Bullet Spread", amount = "+0.05", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-85%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+5s", 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)1; } public override string GetModName() { return "DRON"; } } internal class NARCISSISM : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.3f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false).multiplier /= 5f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "NARCISSISM"; } protected override string GetDescription() { return "Be careful: bullets effects still apply"; } protected override GameObject GetCardArt() { return Assets.Narcissism_Art; } 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 = "Friendly Fire", amount = "-80%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "HP", 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 "MFM"; } } internal class Necronomicon_I : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__0(IGameModeHandler gm) { return EndNecroCardsPick(player); } internal IEnumerator b__1(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(MrFuntikMod.NecroCard2)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(MrFuntikMod.NecroCard2); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NonNecroCard); return false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Add(MrFuntikMod.NonNecroCard); CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NecroCard2); GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndNecroCardsPick(<>8__1.player))); } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(<>8__1.player)); return new List().GetEnumerator(); }); } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Necronomicon"; } protected override string GetDescription() { return "Will you risk taking the side of true evil?"; } protected override GameObject GetCardArt() { return Assets.NecroCardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Transforming", amount = "Start", 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)4; } public override string GetModName() { return "MFM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator NecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] public static IEnumerator EndNecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { player = player }; } } internal class Necronomicon_II_b : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__0(IGameModeHandler gm) { return EndNecroCardsPick(player); } internal IEnumerator b__1(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(MrFuntikMod.NecroCard3)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(MrFuntikMod.NecroCard3); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NonNecroCard); return false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Add(MrFuntikMod.NonNecroCard); CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NecroCard3); GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndNecroCardsPick(<>8__1.player))); } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(<>8__1.player)); return new List().GetEnumerator(); }); } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard2 }; statModifiers.movementSpeed = 1.2f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Dark: Haste"; } protected override string GetDescription() { return "Darkness begins to flow through your veins..."; } protected override GameObject GetCardArt() { return Assets.Necro2CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+20%", 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)4; } public override string GetModName() { return "MFM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator NecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] public static IEnumerator EndNecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { player = player }; } } internal class Necronomicon_II_c : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__0(IGameModeHandler gm) { return EndNecroCardsPick(player); } internal IEnumerator b__1(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(MrFuntikMod.NecroCard3)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(MrFuntikMod.NecroCard3); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NonNecroCard); return false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Add(MrFuntikMod.NonNecroCard); CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NecroCard3); GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndNecroCardsPick(<>8__1.player))); } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(<>8__1.player)); return new List().GetEnumerator(); }); } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard2 }; gun.damage = 1.3f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Dark: Fury"; } protected override string GetDescription() { return "Darkness begins to flow through your veins..."; } protected override GameObject GetCardArt() { return Assets.Necro2CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", 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)4; } public override string GetModName() { return "MFM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator NecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] public static IEnumerator EndNecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { player = player }; } } internal class Necronomicon_II_d : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__0(IGameModeHandler gm) { return EndNecroCardsPick(player); } internal IEnumerator b__1(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(MrFuntikMod.NecroCard3)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(MrFuntikMod.NecroCard3); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NonNecroCard); return false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Add(MrFuntikMod.NonNecroCard); CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NecroCard3); GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndNecroCardsPick(<>8__1.player))); } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(<>8__1.player)); return new List().GetEnumerator(); }); } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard2 }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; gun.attackSpeed *= 0.71428573f; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Dark: Impatience"; } protected override string GetDescription() { return "Darkness begins to flow through your veins..."; } protected override GameObject GetCardArt() { return Assets.Necro2CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+40%", 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)4; } public override string GetModName() { return "MFM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator NecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] public static IEnumerator EndNecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { player = player }; } } internal class Necronomicon_II_e : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__0(IGameModeHandler gm) { return EndNecroCardsPick(player); } internal IEnumerator b__1(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(MrFuntikMod.NecroCard3)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(MrFuntikMod.NecroCard3); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NonNecroCard); return false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Add(MrFuntikMod.NonNecroCard); CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NecroCard3); GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndNecroCardsPick(<>8__1.player))); } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(<>8__1.player)); return new List().GetEnumerator(); }); } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard2 }; block.cdMultiplier = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Dark: Block"; } protected override string GetDescription() { return "Darkness begins to flow through your veins..."; } protected override GameObject GetCardArt() { return Assets.Necro2CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block CD", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)4; } public override string GetModName() { return "MFM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator NecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] public static IEnumerator EndNecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { player = player }; } } internal class Necronomicon_II : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__0(IGameModeHandler gm) { return EndNecroCardsPick(player); } internal IEnumerator b__1(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(MrFuntikMod.NecroCard3)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(MrFuntikMod.NecroCard3); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NonNecroCard); return false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Add(MrFuntikMod.NonNecroCard); CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NecroCard3); GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndNecroCardsPick(<>8__1.player))); } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(<>8__1.player)); return new List().GetEnumerator(); }); } 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(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard2 }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; gunAmmo.reloadTimeMultiplier *= 0.6f; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(NecroCardsPick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Dark: Reload"; } protected override string GetDescription() { return "Darkness begins to flow through your veins..."; } protected override GameObject GetCardArt() { return Assets.Necro2CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Speed", amount = "+40%", 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)4; } public override string GetModName() { return "MFM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator NecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] public static IEnumerator EndNecroCardsPick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { player = player }; } } internal class Necronomicon_III_b : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; statModifiers.movementSpeed = 1.2f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard3 }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.respawns++; ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Evil: Haste"; } protected override string GetDescription() { return "Become the embodiment of true evil"; } protected override GameObject GetCardArt() { return Assets.Necro3CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } 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 = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Devil Trigger", amount = "Add", 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)4; } public override string GetModName() { return "MFM"; } } internal class Necronomicon_III_c : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.3f; cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard3 }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.respawns++; ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Evil: Fury"; } protected override string GetDescription() { return "Become the embodiment of true evil"; } protected override GameObject GetCardArt() { return Assets.Necro3CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } 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 = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "DMG", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Devil Trigger", amount = "Add", 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)4; } public override string GetModName() { return "MFM"; } } internal class Necronomicon_III_d : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard3 }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.attackSpeed *= 0.71428573f; characterStats.respawns++; ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Evil: Impatience"; } protected override string GetDescription() { return "Become the embodiment of true evil"; } protected override GameObject GetCardArt() { return Assets.Necro3CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } 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 = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+40%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Devil Trigger", amount = "Add", 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)4; } public override string GetModName() { return "MFM"; } } internal class Necronomicon_III_e : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.cdMultiplier = 0.85f; cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard3 }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.respawns++; ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Evil: Block"; } protected override string GetDescription() { return "Become the embodiment of true evil"; } protected override GameObject GetCardArt() { return Assets.Necro3CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } 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 = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block CD", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Devil Trigger", amount = "Add", 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)4; } public override string GetModName() { return "MFM"; } } internal class Necronomicon_III : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.NecroCard3 }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.reloadTimeMultiplier *= 0.6f; characterStats.respawns++; ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Word of Evil: Reload"; } protected override string GetDescription() { return "Become the embodiment of true evil"; } protected override GameObject GetCardArt() { return Assets.Necro3CardArt; } protected override Rarity GetRarity() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("NecroCards"); } 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 = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Speed", amount = "+40%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Devil Trigger", amount = "Add", 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)4; } public override string GetModName() { return "MFM"; } } public class NothingCard : CustomCard { public const string CardName = "Nothing"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)PlayerManager.instance == (Object)null || PlayerManager.instance.players == null || PlayerManager.instance.players.Count == 0 || !PlayerManager.instance.players.Contains(player)) { return; } if (NothingTimerManager.IsInReplaceOperation(player)) { MrFuntikMod.Log($"[NothingCard] Player {player.playerID}: inside replace operation, skipping"); if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } return; } int currentNothingCount = CountNothingCards(player) + 1; if (!NothingTimerManager.IsNewNothingCard(player, currentNothingCount)) { MrFuntikMod.Log($"[NothingCard] Player {player.playerID}: reinventarization, skipping all logic"); if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } return; } NothingTimerManager.RegisterTimer(player); MrFuntikMod.Log($"[NothingCard] Player {player.playerID}: new Nothing card, timer registered"); if (NothingTimerManager.HasItBecomesAll(player)) { MrFuntikMod.Log($"[NothingCard] Player {player.playerID} has ItBecomesAll - transforming immediately to All"); NothingTimerManager.RemoveOldestTimer(player); NothingTimerManager.TransformImmediatelyToAll(player); } else if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { int num = CountNothingCards(player); if (num <= 1) { NothingMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public static int CountNothingCards(Player player) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.currentCards == null) { return 0; } return player.data.currentCards.Count((CardInfo c) => c.cardName == "Nothing"); } protected override string GetTitle() { return "Nothing"; } protected override string GetDescription() { return "Nothing now, but give it ten minutes and it will shine."; } protected override GameObject GetCardArt() { return Assets.NothingArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Nothing", amount = "+0.16%/s", 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 "IS"; } } public class OneCutCard : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass11_0 { public Player player; public Func <>9__0; internal bool b__0(int i) { return PlayerManager.instance.players[i].playerID == player.playerID; } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Player[] 5__1; private int 5__2; private <>c__DisplayClass11_0 <>8__3; private int 5__4; private bool 5__5; private CardInfo[] 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>8__3 = null; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Expected O, but got Unknown int num; switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = PlayerManager.instance.players.ToArray(); 5__2 = 0; goto IL_02a5; case 1: <>1__state = -1; OneCutManager.InitSession(<>8__3.player); 5__4 = (from i in Enumerable.Range(0, PlayerManager.instance.players.Count) where PlayerManager.instance.players[i].playerID == <>8__3.player.playerID select i).First(); 5__5 = false; goto IL_020f; case 2: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; CardChoice.instance.cards = 5__6; if (OneCutManager.NeedsNextPage) { OneCutManager.NeedsNextPage = false; MrFuntikMod.Log("[OneCut] Advancing to next page"); } else { OneCutManager.ForceEndSelection(); 5__5 = true; } 5__6 = null; goto IL_020f; case 4: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 5; return true; case 5: { <>1__state = -1; goto IL_0260; } IL_0260: if (<>8__3.player.data.stats.GetAdditionalData().oneCutPending > 0) { <>8__3.player.data.stats.GetAdditionalData().oneCutPending--; <>2__current = GameModeManager.TriggerHook("PlayerPickStart"); <>1__state = 1; return true; } <>8__3 = null; num = 5__2 + 1; 5__2 = num; goto IL_02a5; IL_020f: if (!5__5) { 5__6 = CardChoice.instance.cards; OneCutManager.UpdateCardChoiceCards(); CardChoiceVisuals.instance.Show(5__4, true); <>2__current = CardChoice.instance.DoPick(1, <>8__3.player.playerID, (PickerType)1); <>1__state = 2; return true; } <>2__current = GameModeManager.TriggerHook("PlayerPickEnd"); <>1__state = 4; return true; IL_02a5: if (5__2 < 5__1.Length) { <>8__3 = new <>c__DisplayClass11_0(); <>8__3.player = 5__1[5__2]; goto IL_0260; } 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(); } } 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[1] { CustomCardCategories.instance.CardCategory("CardManipulation") }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.GetAdditionalData().oneCutPending++; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "One Cut"; } protected override string GetDescription() { return "Remove one of your cards."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)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 = "Remove card", amount = "Choose", 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)0; } public override string GetModName() { return "BFRM"; } public override bool GetEnabled() { return true; } [IteratorStateMachine(typeof(d__11))] internal static IEnumerator ExtraPicks() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0); } } public class OneCutNextCard : CustomCard { public static CardInfo CardInfoInstance; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { MrFuntikMod.LogWarning("[OneCut] OneCutNextCard.OnAddCard was called - this should not happen!"); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "One Cut Next"; } protected override string GetDescription() { return "Show more cards..."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Next Page", amount = "→", 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 "MFM"; } public override bool GetEnabled() { return false; } } [HarmonyPatch(typeof(ApplyCardStats), "Pick")] internal class OneCutApplyCardStatsPatch { private static bool Prefix(ApplyCardStats __instance, int pickerID) { if (!OneCutManager.IsActive) { return true; } CardInfo component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } MrFuntikMod.Log("[OneCut] Card picked: " + component.cardName); if (OneCutManager.IsNextPageCard(component)) { MrFuntikMod.Log("[OneCut] NextPage selected"); Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == pickerID); if ((Object)(object)val != (Object)null) { OneCutManager.GoToNextPage(val); } return false; } OneCutManager.HandleCardSelection(component, pickerID); return false; } } internal class OneShotManCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "One-Shot Man"; } protected override string GetDescription() { return "Blocking increases DMG of the next shot by 50%.\nYup, its stacking"; } protected override GameObject GetCardArt() { return Assets.OneShotMan_Art; } 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 = false, stat = "Ability Cooldown", amount = "0.5s", 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)0; } public override string GetModName() { return "MFM"; } } public class OneShotManMono : MonoBehaviour { [CompilerGenerated] private sealed class d__22 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public OneShotManMono <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float COOLDOWN = 0.5f; private int buffs_nums; private CharacterData data; private Block block; private Player player; private Gun gun; private Action basic; private Action goon; private SoundEvent soundSpawn; private SoundEvent soundShoot; public bool Active; public bool Failsafe; public bool rain; private float startTime; public int numcheck; private CooldownUI cooldownUI; public void Start() { //IL_012f: Unknown result type (might be due to invalid IL or missing references) data = ((Component)this).GetComponentInParent(); player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); gun = data.weaponHandler.gun; basic = block.FirstBlockActionThatDelaysOthers; goon = gun.ShootPojectileAction; startTime = Time.time - 0.5f; Block val = block; val.BlockAction = (Action)Delegate.Combine(val.BlockAction, new Action(GetDoBlockAction(player, block, data).Invoke)); Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(Attack)); Failsafe = false; Active = false; rain = false; if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("!", (Color?)new Color(1f, 0.5f, 0.1f)); } GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void Attack(GameObject projectile) { if (!rain) { ((Component)this).GetComponents(); if (Active) { SoundManager.Instance.PlayAtPosition(soundShoot, SoundManager.Instance.GetTransform(), ((Component)this).transform); Failsafe = false; Active = false; } } } public Action GetDoBlockAction(Player player, Block block, CharacterData data) { return delegate { if (!(Time.time < startTime + 0.5f)) { startTime = Time.time; numcheck = 0; ((Component)((Component)this.player).transform).gameObject.AddComponent(); buffs_nums++; Active = true; Failsafe = true; } }; } private void Update() { if ((Object)(object)data == (Object)null || (Object)(object)player == (Object)null) { return; } if (data.dead) { CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } else { UpdateUI(); } } private void UpdateUI() { if (!((Object)(object)cooldownUI == (Object)null)) { float num = startTime + 0.5f - Time.time; if (num > 0f) { cooldownUI.ShowCooldown(num, 0.5f); } else { cooldownUI.Hide(); } } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__22))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__22(0) { <>4__this = this, gm = gm }; } private void ResetState() { startTime = Time.time - 0.5f; Active = false; Failsafe = false; CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } public void Destroy() { Object.Destroy((Object)(object)this); } public void OnDestroy() { block.BlockAction = basic; Failsafe = false; Active = false; GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } } public class OneShotManBlockMono : ReversibleEffect { private readonly Color color = Color.red; private ReversibleColorEffect colorEffect; public OneShotManMono effect; public GameObject epo; private readonly float updateDelay = 0.1f; private float startTime; public override void OnOnEnable() { if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); } } public override void OnStart() { //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) GunStatModifier gunStatModifier = base.gunStatModifier; gunStatModifier.damage_mult *= 1.5f; base.gunStatModifier.projectileColor = new Color(1f, 0.05f, 0f, 1f); effect = ((Component)base.player).GetComponent(); ResetTimer(); } public override void OnUpdate() { if (!((double)Time.time < (double)startTime + (double)updateDelay)) { ResetTimer(); if (!effect.Failsafe || !effect.Active) { ((ReversibleEffect)this).Destroy(); ((ColorEffect)colorEffect).Destroy(); } if (((Component)this).GetComponent().data.dead || !((double)((Component)this).GetComponent().data.health > 0.0) || !((Component)((Component)this).GetComponent()).gameObject.activeInHierarchy) { ResetTimer(); ((ReversibleEffect)this).Destroy(); } } } public override void OnOnDisable() { if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); } } public override void OnOnDestroy() { if ((Object)(object)colorEffect != (Object)null) { ((ColorEffect)colorEffect).Destroy(); effect.Active = false; } } private void ResetTimer() { startTime = Time.time; } } public class PhenomenalBalance : CustomCard { [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public Player player; internal IEnumerator b__0(IGameModeHandler gm) { return EndBalancePick(player); } internal IEnumerator b__1(IGameModeHandler gm) { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(player)); return new List().GetEnumerator(); } } [CompilerGenerated] private sealed class <>c__DisplayClass11_0 { public Player player; internal bool b__0(int i) { return PlayerManager.instance.players[i].playerID == player.playerID; } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; private <>c__DisplayClass10_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass10_0(); <>8__1.player = player; break; case 1: <>1__state = -1; break; } if (!CardChoice.instance.IsPicking) { <>2__current = null; <>1__state = 1; return true; } if (CardChoice.instance.pickrID == <>8__1.player.playerID) { if (CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Contains(MrFuntikMod.BalanceCard)) { CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Add(MrFuntikMod.NonBalanceCard); CharacterStatModifiersExtension.GetAdditionalData(<>8__1.player.data.stats).blacklistedCategories.Remove(MrFuntikMod.BalanceCard); } GameModeManager.AddOnceHook("PlayerPickEnd", (Func)((IGameModeHandler gm) => EndBalancePick(<>8__1.player))); } else { GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(<>8__1.player)); return new List().GetEnumerator(); }); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(MrFuntikMod.BalanceCard)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(MrFuntikMod.BalanceCard); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(MrFuntikMod.NonBalanceCard); return false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Player[] 5__1; private int 5__2; private <>c__DisplayClass11_0 <>8__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>8__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Expected O, but got Unknown //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Expected O, but got Unknown int num; switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = PlayerManager.instance.players.ToArray(); 5__2 = 0; goto IL_01ee; case 1: <>1__state = -1; CardChoiceVisuals.instance.Show((from i in Enumerable.Range(0, PlayerManager.instance.players.Count) where PlayerManager.instance.players[i].playerID == <>8__3.player.playerID select i).First(), true); <>2__current = CardChoice.instance.DoPick(1, <>8__3.player.playerID, (PickerType)1); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = GameModeManager.TriggerHook("PlayerPickEnd"); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = (object)new WaitForSecondsRealtime(0.1f); <>1__state = 5; return true; case 5: { <>1__state = -1; goto IL_01ad; } IL_01ee: if (5__2 < 5__1.Length) { <>8__3 = new <>c__DisplayClass11_0(); <>8__3.player = 5__1[5__2]; goto IL_01ad; } 5__1 = null; return false; IL_01ad: if (<>8__3.player.data.stats.GetAdditionalData().shuffles > 0) { <>8__3.player.data.stats.GetAdditionalData().shuffles--; <>2__current = GameModeManager.TriggerHook("PlayerPickStart"); <>1__state = 1; return true; } <>8__3 = null; num = 5__2 + 1; 5__2 = num; goto IL_01ee; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; characterStats.GetAdditionalData().shuffles++; GameModeManager.AddOnceHook("PlayerPickStart", (Func)delegate { ((MonoBehaviour)MrFuntikMod.instance).StartCoroutine(BalancePick(player2)); return new List().GetEnumerator(); }); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Phenomenal Balance"; } protected override string GetDescription() { return "Tune yourself to your desire!"; } protected override GameObject GetCardArt() { return Assets.PhenomenalBalance_Art; } 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 = "Balancing", amount = "Start", 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)1; } public override string GetModName() { return "MFM"; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator BalancePick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { player = player }; } [IteratorStateMachine(typeof(d__11))] internal static IEnumerator ExtraPicks() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0); } [IteratorStateMachine(typeof(d__12))] public static IEnumerator EndBalancePick(Player player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { player = player }; } } internal class PhoenixCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.35f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.respawns += 2; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Phoenix 2.0"; } protected override string GetDescription() { return "Need mooore revives!"; } protected override GameObject GetCardArt() { return Assets.PhoenixArt; } 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 //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 = "Revives", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-65%", 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)2; } public override string GetModName() { return "DRON"; } } public class PhoenixSurgeCard : CustomCard { private static bool hooksRegistered; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.PhoenixSurgeCategory }; cardInfo.allowMultiple = false; statModifiers.health = 0.5f; if (!hooksRegistered) { PhoenixSurgeHandler.RegisterHooks(); hooksRegistered = true; } } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PhoenixSurgeMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PhoenixSurgeMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.ClearTempRespawn(); Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Phoenix Surge"; } protected override string GetDescription() { return "Requires Kamikaze\nOnce per round, revive with an explosion within 15m radius."; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "Revive", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-50%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Hidden", (CardThemeColor)null); } public override string GetModName() { return "BFRM"; } } public class PlanetCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.sizeMultiplier = 1.15f; statModifiers.health = 1.5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { GravityFieldMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { component = ((Component)player).gameObject.AddComponent(); } else { component.AddStack(); } PlanetRegenMono planetRegenMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)planetRegenMono == (Object)null) { planetRegenMono = ((Component)player).gameObject.AddComponent(); planetRegenMono.player = player; } planetRegenMono.stackCount++; ArcFieldHelper.CheckUnlockArcField(player); GravitySurgeHelper.CheckUnlockGravitySurge(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { GravityFieldMono component = ((Component)player).gameObject.GetComponent(); bool flag = false; if ((Object)(object)component != (Object)null) { flag = component.RemoveStack(); if (flag) { Object.Destroy((Object)(object)component); } } else { flag = true; } PlanetRegenMono component2 = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.stackCount--; if (component2.stackCount <= 0) { Object.Destroy((Object)(object)component2); } } ArcFieldHelper.CheckLockArcField(player, "Planet"); GravitySurgeHelper.CheckLockGravitySurgeOnStackRemove(player, flag); } protected override string GetTitle() { return "Planet"; } protected override string GetDescription() { return "Your gravitational pull affects everything within a 30m radius."; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Health", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Regen", amount = "+1%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Size", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)8; } public override string GetModName() { return "BFRM"; } } public class RandomTeleportCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.movementSpeed = 1.2f; statModifiers.jump = 1.2f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.damage *= 1.2f; RandomTeleportMono orAddComponent = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); orAddComponent.Initialize(player, block); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { RandomTeleportMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.Cleanup(); Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Random Teleport"; } protected override string GetDescription() { return "Press block to teleport to a random location on the map."; } protected override GameObject GetCardArt() { return Assets.RandomTeleportArt; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //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 = "Damage", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Movement Speed", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Jump Height", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "4s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)8; } public override string GetModName() { return "DRON"; } } public class ReaperCard : CustomCard { public const float HP_STEAL_PERCENT = 0.15f; internal static GameObject ReaperHitEffectObject; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.ammo = 2; gun.attackSpeed = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown gunAmmo.reloadTimeMultiplier *= 0.85f; if ((Object)(object)ReaperHitEffectObject == (Object)null) { ReaperHitEffectObject = new GameObject("ReaperHitEffect", new Type[1] { typeof(ReaperHitEffect) }); Object.DontDestroyOnLoad((Object)(object)ReaperHitEffectObject); } List list = gun.objectsToSpawn.ToList(); list.Add(new ObjectsToSpawn { AddToProjectile = ReaperHitEffectObject }); gun.objectsToSpawn = list.ToArray(); ReaperSoulTracker orAddComponent = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); orAddComponent.cardCount++; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gunAmmo.reloadTimeMultiplier /= 0.85f; ReaperSoulTracker component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.cardCount--; if (component.cardCount <= 0) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Reaper"; } protected override string GetDescription() { return $"Bullets steal {15.000001f:0}% enemy HP and deal it as {15.000001f:0}% bonus damage. (+{15.000001f:0}% per copy)"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Ammo", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Speed", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class ReaperHitEffect : RayHitEffect { private ProjectileHit projectileHit; private void Awake() { projectileHit = ((Component)this).GetComponentInParent(); } private void Start() { if ((Object)(object)projectileHit == (Object)null) { projectileHit = ((Component)this).GetComponentInParent(); } } public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: 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_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: 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) if ((Object)(object)hit.transform == (Object)null) { return (HasToReturn)1; } if ((Object)(object)projectileHit == (Object)null) { projectileHit = ((Component)this).GetComponentInParent(); if ((Object)(object)projectileHit == (Object)null) { return (HasToReturn)1; } } Player ownPlayer = projectileHit.ownPlayer; if ((Object)(object)ownPlayer == (Object)null) { return (HasToReturn)1; } CharacterData component = ((Component)hit.transform).GetComponent(); if ((Object)(object)component == (Object)null) { return (HasToReturn)1; } Player player = component.player; if ((Object)(object)player == (Object)null || (Object)(object)player == (Object)(object)ownPlayer) { return (HasToReturn)1; } if (player.teamID == ownPlayer.teamID) { return (HasToReturn)1; } if (component.dead || !component.isPlaying) { return (HasToReturn)1; } if ((Object)(object)((Component)hit.transform).GetComponent() == (Object)null) { return (HasToReturn)1; } ReaperSoulEffect.SpawnEffect(((Component)player).transform.position, ((Component)ownPlayer).transform.position); if (!PhotonNetwork.OfflineMode && !ownPlayer.data.view.IsMine) { return (HasToReturn)1; } float health = component.health; float num = Mathf.Max(health * 0.15f, 1f); ownPlayer.data.view.RPC("RPCA_MFM_ReaperSteal", (RpcTarget)0, new object[1] { num }); Vector2 val = Vector2.op_Implicit(((Component)player).transform.position - ((Component)ownPlayer).transform.position); Vector2 normalized = ((Vector2)(ref val)).normalized; ((Damagable)component.healthHandler).CallTakeDamage(normalized * num, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, ownPlayer, true); return (HasToReturn)1; } } public class ReaperSoulTracker : MonoBehaviour { [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ReaperSoulTracker <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = null; <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.ApplyReset(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ReaperSoulTracker <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ApplyReset(); if ((Object)(object)<>4__this.data != (Object)null) { <>4__this.baseMaxHP = <>4__this.data.maxHealth; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ReaperSoulTracker <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = null; <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.ApplyReset(); 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(); } } public int cardCount = 0; private Player player; private CharacterData data; private float totalStolenHP = 0f; private const float STEAL_CAP_MULTIPLIER = 2f; private float baseMaxHP = 0f; private bool savedThisPoint = false; private CooldownUI cooldownUI; private static readonly Color SOUL_COLOR = new Color(0.9f, 0.2f, 0.2f); private float StealCap => (baseMaxHP > 0f) ? (baseMaxHP * 2f) : float.MaxValue; private void Start() { //IL_007f: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); data = ((Component)this).GetComponent(); GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); GameModeManager.AddHook("RoundEnd", (Func)OnRoundEnd); cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("☠", (Color?)SOUL_COLOR); } [IteratorStateMachine(typeof(d__12))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__13))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__14))] private IEnumerator OnRoundEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { <>4__this = this, gm = gm }; } [PunRPC] public void RPCA_MFM_ReaperSteal(float steal) { if (!((Object)(object)data == (Object)null)) { steal = ClampSteal(steal); if (!(steal <= 0f)) { CharacterData obj = data; obj.maxHealth += steal; typeof(CharacterStatModifiers).InvokeMember("ConfigureMassAndSize", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, data.stats, new object[0]); AddStolenHP(steal); } } } public float ClampSteal(float steal) { float stealCap = StealCap; if (totalStolenHP >= stealCap) { return 0f; } return Mathf.Min(steal, stealCap - totalStolenHP); } public void AddStolenHP(float steal) { savedThisPoint = true; totalStolenHP += steal; UpdateUI(); } public void ApplyReset() { if (savedThisPoint && (Object)(object)data != (Object)null && totalStolenHP > 0f) { CharacterData obj = data; obj.maxHealth -= totalStolenHP; if (data.maxHealth < 1f) { data.maxHealth = 1f; } if (data.health > data.maxHealth) { data.health = data.maxHealth; } typeof(CharacterStatModifiers).InvokeMember("ConfigureMassAndSize", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, data.stats, new object[0]); } savedThisPoint = false; totalStolenHP = 0f; if ((Object)(object)cooldownUI != (Object)null) { cooldownUI.Hide(); } } private void UpdateUI() { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)cooldownUI == (Object)null)) { if (((Object)(object)data != (Object)null && data.dead) || totalStolenHP <= 0f) { cooldownUI.Hide(); return; } bool flag = totalStolenHP >= StealCap - 0.5f; string text = (flag ? $"+{Mathf.RoundToInt(totalStolenHP)} MAX" : $"+{Mathf.RoundToInt(totalStolenHP)}"); cooldownUI.ShowText(text, flag ? Color.red : SOUL_COLOR); } } private void Update() { if ((Object)(object)player == (Object)null) { Cleanup(); } else if ((Object)(object)data != (Object)null && data.dead) { if ((Object)(object)cooldownUI != (Object)null) { cooldownUI.Hide(); } } else if (totalStolenHP > 0f) { UpdateUI(); } } private void Cleanup() { ApplyReset(); GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); GameModeManager.RemoveHook("RoundEnd", (Func)OnRoundEnd); if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); cooldownUI = null; } } private void OnDestroy() { Cleanup(); } } public class ReaperSoulEffect : MonoBehaviour { private Vector3 startPos; private Vector3 endPos; private float duration = 0.4f; private float elapsed = 0f; private LineRenderer lineRenderer; private List particles = new List(); private static readonly Color SOUL_START_COLOR = new Color(0.95f, 0.15f, 0.15f, 0.9f); private static readonly Color SOUL_END_COLOR = new Color(0.5f, 0.05f, 0.05f, 0f); public static void SpawnEffect(Vector3 from, Vector3 to) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0014: 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) GameObject val = new GameObject("ReaperSoulDrainEffect"); ReaperSoulEffect reaperSoulEffect = val.AddComponent(); reaperSoulEffect.Initialize(from, to); } public void Initialize(Vector3 from, Vector3 to) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown startPos = from; endPos = to; lineRenderer = ((Component)this).gameObject.AddComponent(); lineRenderer.positionCount = 2; lineRenderer.SetPosition(0, startPos); lineRenderer.SetPosition(1, startPos); lineRenderer.startWidth = 0.15f; lineRenderer.endWidth = 0.05f; lineRenderer.startColor = SOUL_START_COLOR; lineRenderer.endColor = SOUL_END_COLOR; ((Renderer)lineRenderer).material = new Material(Shader.Find("Sprites/Default")); ((Renderer)lineRenderer).sortingLayerName = "MostFront"; ((Renderer)lineRenderer).sortingOrder = 50; for (int i = 0; i < 5; i++) { CreateParticle((float)i * 0.06f); } } private void CreateParticle(float delay) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0081: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("SoulParticle"); val.transform.SetParent(((Component)this).transform); val.transform.position = startPos; SpriteRenderer val2 = val.AddComponent(); val2.sprite = CreateCircleSprite(); val2.color = SOUL_START_COLOR; ((Renderer)val2).sortingLayerName = "MostFront"; ((Renderer)val2).sortingOrder = 51; float num = Random.Range(0.08f, 0.15f); val.transform.localScale = Vector3.one * num; SoulParticleMover soulParticleMover = val.AddComponent(); soulParticleMover.Initialize(startPos, endPos, duration, delay, SOUL_START_COLOR); particles.Add(val); } private Sprite CreateCircleSprite() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) int num = 32; Texture2D val = new Texture2D(num, num); Color[] array = (Color[])(object)new Color[num * num]; Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor((float)num / 2f, (float)num / 2f); float num2 = (float)num / 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num3 = Vector2.Distance(new Vector2((float)j, (float)i), val2); if (num3 < num2) { float num4 = 1f - num3 / num2; array[i * num + j] = new Color(1f, 1f, 1f, num4 * num4); } else { array[i * num + j] = Color.clear; } } } val.SetPixels(array); val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), (float)num); } private void Update() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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) elapsed += Time.deltaTime; float num = Mathf.Clamp01(elapsed / duration); if ((Object)(object)lineRenderer != (Object)null) { lineRenderer.SetPosition(1, Vector3.Lerp(startPos, endPos, num)); Color sOUL_START_COLOR = SOUL_START_COLOR; Color sOUL_END_COLOR = SOUL_END_COLOR; sOUL_START_COLOR.a *= 1f - num; sOUL_END_COLOR.a *= 1f - num; lineRenderer.startColor = sOUL_START_COLOR; lineRenderer.endColor = sOUL_END_COLOR; } if (elapsed >= duration + 0.3f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void OnDestroy() { foreach (GameObject particle in particles) { if ((Object)(object)particle != (Object)null) { Object.Destroy((Object)(object)particle); } } particles.Clear(); } } public class SoulParticleMover : MonoBehaviour { private Vector3 startPos; private Vector3 endPos; private float duration; private float delay; private float elapsed = 0f; private SpriteRenderer spriteRenderer; private Color baseColor; private Vector3 offset; public void Initialize(Vector3 from, Vector3 to, float dur, float del, Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) startPos = from; endPos = to; duration = dur; delay = del; baseColor = color; spriteRenderer = ((Component)this).GetComponent(); offset = new Vector3(Random.Range(-0.3f, 0.3f), Random.Range(-0.3f, 0.3f), 0f); if ((Object)(object)spriteRenderer != (Object)null) { spriteRenderer.color = new Color(baseColor.r, baseColor.g, baseColor.b, 0f); } } private void Update() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_007a: 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_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) elapsed += Time.deltaTime; if (!(elapsed < delay)) { float num = Mathf.Clamp01((elapsed - delay) / duration); Vector3 b = (startPos + endPos) / 2f + offset; ((Component)this).transform.position = QuadraticBezier(startPos, b, endPos, num); if ((Object)(object)spriteRenderer != (Object)null) { float num2 = ((num < 0.3f) ? (num / 0.3f) : ((!(num > 0.7f)) ? 1f : ((1f - num) / 0.3f))); spriteRenderer.color = new Color(baseColor.r, baseColor.g, baseColor.b, num2 * 0.8f); } ((Component)this).transform.localScale = Vector3.one * Mathf.Lerp(1f, 0.3f, num) * 0.12f; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private Vector3 QuadraticBezier(Vector3 a, Vector3 b, Vector3 c, float t) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //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) //IL_000a: 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) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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) return Vector3.Lerp(Vector3.Lerp(a, b, t), Vector3.Lerp(b, c, t), t); } } public class RicochetPowerCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.dmgMOnBounce = 1.3f; gun.reflects = 1; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Add(gun); gun.projectileSpeed *= 1.5f; gun.projectielSimulatonSpeed *= 0.5f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Remove(gun); } protected override string GetTitle() { return "Ricochet Power"; } protected override string GetDescription() { return ""; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Damage per Bounce", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bounces", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Projectile 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)1; } public override string GetModName() { return "BFRM"; } } public class RollbackCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.RollbackCategory }; cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(MrFuntikMod.RollbackCategory)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(MrFuntikMod.RollbackCategory); } RollbackMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { RollbackMono rollbackMono = ((Component)player).gameObject.AddComponent(); rollbackMono.stackCount = 1; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { RollbackMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Rollback"; } protected override string GetDescription() { return "Requires Backtrack\nBlock to restore your health up to 3s back."; } protected override GameObject? GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "25s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Hidden", (CardThemeColor)null); } public override string GetModName() { return "BFRM"; } } public class ScorchCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { MrFuntikMod.ScorchCategory }; cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown ScorchEffect component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component != (Object)null)) { ScorchEffect scorchEffect = ((Component)player).gameObject.AddComponent(); scorchEffect.owner = player; List list = new List(gun.objectsToSpawn); ObjectsToSpawn val = new ObjectsToSpawn(); val.AddToProjectile = new GameObject("ScorchHitEffect", new Type[1] { typeof(ScorchHitEffect) }); list.Add(val); val = new ObjectsToSpawn(); val.AddToProjectile = new GameObject("ScorchBulletVisual", new Type[1] { typeof(ScorchBulletVisual) }); list.Add(val); gun.objectsToSpawn = list.ToArray(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScorchEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Scorch"; } protected override string GetDescription() { return "Requires Blazing Trail\nBullets become fireballs that scatter 5 flames.\n(per Blazing Trail: +2s burn)"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Hidden", (CardThemeColor)null); } public override string GetModName() { return "BFRM"; } } public class ScorchBulletVisual : MonoBehaviour { private ProjectileHit projectile; private Player owner; private int ownerTeamID = -1; private LineRenderer[] flameLines; private const int FLAME_COUNT = 6; private static Material sharedMaterial; private float[] phaseOffsets; private float[] speeds; private float[] baseAngles; private float updateTimer = 0f; private const float UPDATE_INTERVAL = 0.03f; private bool isFriendly; private void Start() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown projectile = ((Component)this).GetComponentInParent(); if (!((Object)(object)projectile == (Object)null)) { owner = projectile.ownPlayer; if ((Object)(object)owner != (Object)null) { ownerTeamID = owner.teamID; } if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } isFriendly = IsFriendlyForLocalPlayer(); ColorBullet(); CreateFlameEffect(); } } private void ColorBullet() { //IL_0058: 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) SpriteRenderer componentInParent = ((Component)this).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null) { if (isFriendly) { componentInParent.color = new Color(0f, 1f, 0.1f, 1f); } else { componentInParent.color = new Color(1f, 0.4f, 1f, 1f); } } } private void CreateFlameEffect() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown flameLines = (LineRenderer[])(object)new LineRenderer[6]; phaseOffsets = new float[6]; speeds = new float[6]; baseAngles = new float[6]; Gradient colorGradient = CreateFlameGradient(); float num = 60f; for (int i = 0; i < 6; i++) { GameObject val = new GameObject($"Flame_{i}"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; LineRenderer val2 = val.AddComponent(); ((Renderer)val2).material = sharedMaterial; val2.positionCount = 4; val2.useWorldSpace = false; val2.colorGradient = colorGradient; ((Renderer)val2).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val2).receiveShadows = false; ((Renderer)val2).sortingOrder = 5; AnimationCurve val3 = new AnimationCurve(); val3.AddKey(0f, 0.21f); val3.AddKey(0.5f, 0.115f); val3.AddKey(1f, 0.029f); val2.widthCurve = val3; flameLines[i] = val2; baseAngles[i] = (float)i * num * (MathF.PI / 180f); phaseOffsets[i] = (float)i * 0.5f; speeds[i] = 8f + (float)(i % 3) * 2f; } } private Gradient CreateFlameGradient() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0030: 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_003c: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0136: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) Gradient val = new Gradient(); Color val3 = default(Color); Color val4 = default(Color); Color val5 = default(Color); Color val6 = default(Color); if (isFriendly) { Color val2 = default(Color); ((Color)(ref val2))..ctor(0f, 1f, 0.1f); val3 = val2; val4 = val2; val5 = val2 * 0.75f; val6 = val2 * 0.3f; } else { ((Color)(ref val3))..ctor(1f, 0.4f, 1f); ((Color)(ref val4))..ctor(0.7f, 0.2f, 1f); ((Color)(ref val5))..ctor(0.4f, 0.1f, 0.8f); ((Color)(ref val6))..ctor(0.2f, 0.05f, 0.4f); } val.SetKeys((GradientColorKey[])(object)new GradientColorKey[4] { new GradientColorKey(val3, 0f), new GradientColorKey(val4, 0.25f), new GradientColorKey(val5, 0.6f), new GradientColorKey(val6, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.9f, 0.25f), new GradientAlphaKey(0.5f, 0.6f), new GradientAlphaKey(0f, 1f) }); return val; } private bool IsFriendlyForLocalPlayer() { if ((Object)(object)PlayerManager.instance == (Object)null) { return false; } List players = PlayerManager.instance.players; for (int i = 0; i < players.Count; i++) { Player val = players[i]; if ((Object)(object)val != (Object)null && (Object)(object)val.data != (Object)null && (Object)(object)val.data.view != (Object)null && val.data.view.IsMine) { return val.teamID == ownerTeamID; } } return false; } private void Update() { if ((Object)(object)owner == (Object)null || flameLines == null) { return; } updateTimer += Time.deltaTime; if (updateTimer < 0.03f) { return; } updateTimer = 0f; float time = Time.time; for (int i = 0; i < 6; i++) { if (!((Object)(object)flameLines[i] == (Object)null)) { UpdateFlamePositions(i, time); } } } private void UpdateFlamePositions(int index, float time) { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) LineRenderer val = flameLines[index]; float num = baseAngles[index]; float num2 = phaseOffsets[index]; float num3 = speeds[index]; float num4 = Mathf.Sin(time * num3 * 0.5f + num2) * 0.26f; float num5 = num + num4; float num6 = Mathf.Cos(num5); float num7 = Mathf.Sin(num5); float num8 = 0.36f + Mathf.Sin(time * num3 + num2) * 0.144f; for (int i = 0; i < 4; i++) { float num9 = (float)i / 3f; float num10 = num9 * num8; float num11 = Mathf.Sin(time * num3 * 1.5f + num2 + num9 * 2f) * 0.072f * num9; float num12 = num6 * num10 - num7 * num11; float num13 = num7 * num10 + num6 * num11; val.SetPosition(i, new Vector3(num12, num13, 0f)); } } private void OnDestroy() { if (flameLines == null) { return; } for (int i = 0; i < flameLines.Length; i++) { if ((Object)(object)flameLines[i] != (Object)null && (Object)(object)((Component)flameLines[i]).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)flameLines[i]).gameObject); } } } } public class ScorchEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ScorchEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; TrailFirePool.ReturnAllActive(); ScorchScatterPool.ReturnAllActive(); 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(); } } public Player owner; private const float BASE_FIRE_DURATION = 5f; private const float BURN_DURATION_BASE = 2f; private const float BURN_DAMAGE_PER_TICK = 0.05f; private void Start() { TrailFirePool.EnsureInitialized(); ScorchScatterPool.EnsureInitialized(); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); } [IteratorStateMachine(typeof(d__6))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { <>4__this = this, gm = gm }; } public float GetFireDuration() { return 5f; } public float GetBurnDuration() { Player obj = owner; BlazingTrailEffect blazingTrailEffect = ((obj != null) ? ((Component)obj).GetComponent() : null); if ((Object)(object)blazingTrailEffect != (Object)null) { return 2f + 2f * (float)(blazingTrailEffect.stackCount - 1); } return 2f; } public float GetBurnDamagePerTick() { return 0.05f; } } public class ScorchHitEffect : RayHitEffect { private const int FIRE_COUNT = 5; private const float SCATTER_RADIUS = 1.5f; private const float RAYCAST_DISTANCE = 2f; public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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) _ = hit.point; if (false) { return (HasToReturn)1; } if ((Object)(object)hit.transform != (Object)null && (Object)(object)((Component)hit.transform).GetComponent() != (Object)null) { return (HasToReturn)1; } ProjectileHit componentInParent = ((Component)this).GetComponentInParent(); if ((Object)(object)componentInParent == (Object)null || (Object)(object)componentInParent.ownPlayer == (Object)null) { return (HasToReturn)1; } Player ownPlayer = componentInParent.ownPlayer; ScorchEffect component = ((Component)ownPlayer).GetComponent(); if ((Object)(object)component == (Object)null) { return (HasToReturn)1; } Vector2 point = hit.point; Vector2 val = ((((Vector2)(ref hit.normal)).sqrMagnitude > 0.001f) ? hit.normal : Vector2.up); int num = Random.Range(0, int.MaxValue); NetworkingManager.RPC(typeof(ScorchHitEffect), "RPC_SpawnScatteredFire", new object[7] { ownPlayer.playerID, point, val, component.GetFireDuration(), component.GetBurnDuration(), component.GetBurnDamagePerTick(), num }); return (HasToReturn)1; } [UnboundRPC] public static void RPC_SpawnScatteredFire(int ownerID, Vector2 position, Vector2 normal, float duration, float burnDuration, float burnDamagePerTick, int seed) { //IL_0028: 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_0084: 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_0088: Unknown result type (might be due to invalid IL or missing references) //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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) Player val = FindPlayerByID(ownerID); if ((Object)(object)val == (Object)null) { return; } TrailFirePool.EnsureInitialized(); Random random = new Random(seed); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(0f - normal.y, normal.x); for (int i = 0; i < 5; i++) { float num = ((float)i - 2f) / 2f; float num2 = (float)(random.NextDouble() * 2.0 - 1.0) * 0.3f; float num3 = (num + num2) * 1.5f; Vector2 origin = position + val2 * num3 + normal * 0.5f; if (TryFindSurface(origin, -normal, out var hitPoint, out var hitNormal)) { SpawnSingleFire(val, ownerID, position, hitPoint, hitNormal, duration, burnDuration, burnDamagePerTick); } else if (TryFindSurface(origin, Vector2.down, out hitPoint, out hitNormal)) { SpawnSingleFire(val, ownerID, position, hitPoint, hitNormal, duration, burnDuration, burnDamagePerTick); } } } private static bool TryFindSurface(Vector2 origin, Vector2 direction, out Vector2 hitPoint, out Vector2 hitNormal) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) hitPoint = Vector2.zero; hitNormal = Vector2.up; RaycastHit2D[] array = Physics2D.RaycastAll(origin, direction, 2f); for (int i = 0; i < array.Length; i++) { RaycastHit2D val = array[i]; if ((Object)(object)((RaycastHit2D)(ref val)).collider == (Object)null || ((RaycastHit2D)(ref val)).collider.isTrigger || (Object)(object)((Component)((RaycastHit2D)(ref val)).collider).GetComponent() != (Object)null || (Object)(object)((Component)((RaycastHit2D)(ref val)).collider).GetComponentInParent() != (Object)null) { continue; } string name = ((Object)((Component)((RaycastHit2D)(ref val)).collider).gameObject).name; if (name.Contains("Fire") || name.Contains("Flame") || name.Contains("Scorch")) { continue; } if ((Object)(object)((RaycastHit2D)(ref val)).transform.parent != (Object)null) { string name2 = ((Object)((Component)((RaycastHit2D)(ref val)).transform.parent).gameObject).name; if (name2.Contains("Fire") || name2.Contains("Flame") || name2.Contains("Scorch")) { continue; } } if ((Object)(object)((Component)((RaycastHit2D)(ref val)).collider).GetComponent() != (Object)null || (Object)(object)((Component)((RaycastHit2D)(ref val)).collider).GetComponentInParent() != (Object)null) { continue; } hitPoint = ((RaycastHit2D)(ref val)).point; hitNormal = ((RaycastHit2D)(ref val)).normal; return true; } return false; } private static void SpawnSingleFire(Player owner, int ownerID, Vector2 hitPoint, Vector2 position, Vector2 normal, float duration, float burnDuration, float burnDamagePerTick) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0050: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector2.op_Implicit(position) + Vector2.op_Implicit(normal) * 0.02f; ScorchScatterPool.ShowLine(hitPoint, Vector2.op_Implicit(val), owner); TrailFire trailFire = TrailFire.FindNearestFire(val, 0.5f, ownerID); if ((Object)(object)trailFire != (Object)null) { trailFire.Reinforce(); return; } float num = Mathf.Atan2(normal.y, normal.x) * 57.29578f - 90f; TrailFire trailFire2 = TrailFirePool.Get(); ((Component)trailFire2).transform.SetParent((Transform)null, false); ((Component)trailFire2).transform.localScale = Vector3.one; ((Component)trailFire2).transform.position = val; ((Component)trailFire2).transform.rotation = Quaternion.Euler(0f, 0f, num); trailFire2.Activate(owner, duration, burnDuration, burnDamagePerTick); } private static Player FindPlayerByID(int playerID) { if (playerID < 0 || (Object)(object)PlayerManager.instance == (Object)null) { return null; } List players = PlayerManager.instance.players; for (int i = 0; i < players.Count; i++) { if ((Object)(object)players[i] != (Object)null && players[i].playerID == playerID) { return players[i]; } } return null; } } public static class ScorchScatterPool { private static Stack pool = new Stack(); private static Transform poolContainer; private const int INITIAL_POOL_SIZE = 15; private const int MAX_POOL_SIZE = 50; private static bool isInitialized = false; public static void EnsureInitialized() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (!isInitialized || !((Object)(object)poolContainer != (Object)null)) { GameObject val = new GameObject("ScorchScatterPool"); Object.DontDestroyOnLoad((Object)(object)val); poolContainer = val.transform; for (int i = 0; i < 15; i++) { ScorchScatterLine scorchScatterLine = CreateNewLine(); ((Component)scorchScatterLine).gameObject.SetActive(false); pool.Push(scorchScatterLine); } isInitialized = true; } } private static ScorchScatterLine CreateNewLine() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("ScorchScatterLine"); val.transform.SetParent(poolContainer); ScorchScatterLine scorchScatterLine = val.AddComponent(); scorchScatterLine.Initialize(); return scorchScatterLine; } public static void ShowLine(Vector2 from, Vector2 to, Player owner) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) EnsureInitialized(); ScorchScatterLine scorchScatterLine = ((pool.Count <= 0) ? CreateNewLine() : pool.Pop()); ((Component)scorchScatterLine).gameObject.SetActive(true); scorchScatterLine.Play(from, to, owner); } public static void Return(ScorchScatterLine line) { if (!((Object)(object)line == (Object)null)) { if (pool.Count < 50 && (Object)(object)poolContainer != (Object)null) { ((Component)line).transform.SetParent(poolContainer); ((Component)line).gameObject.SetActive(false); pool.Push(line); } else { Object.Destroy((Object)(object)((Component)line).gameObject); } } } public static void ReturnAllActive() { ScorchScatterLine[] array = Object.FindObjectsOfType(); ScorchScatterLine[] array2 = array; foreach (ScorchScatterLine scorchScatterLine in array2) { if ((Object)(object)scorchScatterLine != (Object)null && ((Component)scorchScatterLine).gameObject.activeInHierarchy) { Return(scorchScatterLine); } } } } public class ScorchScatterLine : MonoBehaviour { private LineRenderer lineRenderer; private static Material sharedMaterial; private const float DURATION = 0.18f; private const float START_WIDTH = 0.12f; private const float END_WIDTH = 0.04f; private Vector3 startPoint; private Vector3 endPoint; private float startTime; private bool isPlaying = false; private static readonly Color FRIENDLY_COLOR = new Color(0f, 1f, 0.1f); private static readonly Color ENEMY_COLOR = new Color(1f, 0.4f, 1f); public void Initialize() { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } lineRenderer = ((Component)this).gameObject.AddComponent(); ((Renderer)lineRenderer).material = sharedMaterial; lineRenderer.positionCount = 2; lineRenderer.useWorldSpace = true; ((Renderer)lineRenderer).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)lineRenderer).receiveShadows = false; ((Renderer)lineRenderer).sortingOrder = 10; lineRenderer.numCapVertices = 3; AnimationCurve val = new AnimationCurve(); val.AddKey(0f, 0.12f); val.AddKey(1f, 0.04f); lineRenderer.widthCurve = val; } public void Play(Vector2 from, Vector2 to, Player owner) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00ac: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) startPoint = Vector2.op_Implicit(from); endPoint = Vector2.op_Implicit(to); startTime = Time.time; isPlaying = true; Color val = (IsFriendlyForLocalPlayer(owner) ? FRIENDLY_COLOR : ENEMY_COLOR); Gradient val2 = new Gradient(); val2.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(val, 0f), new GradientColorKey(val * 0.8f, 0.5f), new GradientColorKey(val * 0.5f, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.7f, 0.5f), new GradientAlphaKey(0.3f, 1f) }); lineRenderer.colorGradient = val2; lineRenderer.SetPosition(0, startPoint); lineRenderer.SetPosition(1, startPoint); ((Renderer)lineRenderer).enabled = true; } private void Update() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) if (isPlaying) { float num = Time.time - startTime; float num2 = num / 0.18f; if (num2 >= 1f) { isPlaying = false; ((Renderer)lineRenderer).enabled = false; ScorchScatterPool.Return(this); return; } float num3 = Mathf.Clamp01(num2 * 1.5f); float num4 = Mathf.Clamp01((num2 - 0.2f) * 1.5f); Vector3 val = Vector3.Lerp(startPoint, endPoint, num3); Vector3 val2 = Vector3.Lerp(startPoint, endPoint, num4); lineRenderer.SetPosition(0, val2); lineRenderer.SetPosition(1, val); float a = 1f - num2 * 0.5f; Color val3 = lineRenderer.colorGradient.Evaluate(0f); val3.a = a; } } private bool IsFriendlyForLocalPlayer(Player owner) { if ((Object)(object)owner == (Object)null || (Object)(object)PlayerManager.instance == (Object)null) { return false; } int teamID = owner.teamID; List players = PlayerManager.instance.players; for (int i = 0; i < players.Count; i++) { Player val = players[i]; if ((Object)(object)val != (Object)null && (Object)(object)val.data != (Object)null && (Object)(object)val.data.view != (Object)null && val.data.view.IsMine) { return val.teamID == teamID; } } return false; } } public class SidePortalCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.numberOfJumps = 2; statModifiers.gravity = 0.9f; statModifiers.health = 1.35f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { SidePortalEffect sidePortalEffect = ((Component)player).gameObject.AddComponent(); sidePortalEffect.ownerPlayer = player; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SidePortalEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Side Portal"; } protected override string GetDescription() { return "Screen borders act as portals, but they may be unstable — use with caution"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Health", amount = "+35%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Jumps", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Gravity", amount = "-10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "HP per portal", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)8; } public override string GetModName() { return "BFRM"; } } public class SmallButToughCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.35f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.sizeMultiplier *= 0.65f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Small But Tough"; } protected override string GetDescription() { return null; } protected override GameObject GetCardArt() { return Assets.SmallButToughArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+35%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Size", amount = "-35%", 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 "DRON"; } } public class SomethingCard : CustomCard { public const string CardName = "Something"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.15f; statModifiers.movementSpeed = 1.15f; gun.damage = 1.15f; gun.attackSpeed = 0.85f; gun.reloadTime = 0.85f; block.cdMultiplier = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override bool GetEnabled() { return false; } protected override string GetTitle() { return "Something"; } protected override string GetDescription() { return "Your 'Nothing' hatched into 'Something'!"; } protected override GameObject GetCardArt() { return Assets.SomethingArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[6] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block Cooldown", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "IS"; } } public class SoulPiercerCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.damage = 1.5f; gun.attackSpeed = 0.75f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.projectileSpeed *= 1.25f; SoulPiercerMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.AddStack(); } else { ((Component)player).gameObject.AddComponent().stackCount = 1; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SoulPiercerMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); if (component.stackCount <= 0) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Soul Piercer"; } protected override string GetDescription() { return "Your bullets pierce through enemies, dealing damage as they pass."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+25%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } internal class SpeedDemonCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 1.3f; statModifiers.jump = 0.8f; statModifiers.health = 1.15f; gun.damage = 1.15f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Speed Demon"; } protected override string GetDescription() { return null; } protected override GameObject GetCardArt() { return Assets.SpeedDemonArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Move Speed", amount = "+30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Jump Height", amount = "-20%", 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)4; } public override string GetModName() { return "DRON"; } } internal class SprayCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) gun.ammo = 36; gun.reloadTime = 1.5f; gun.projectileColor = Color.cyan; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.damage *= 0.05f; gun.attackSpeed *= 0.02f; gun.spread += 0.2f; gun.gravity *= 0.8f; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } private void OnTakingDamage(HealthHandler health, float amount) { } protected override string GetTitle() { return "Spray 2.0"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return Assets.SprayArt; } 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 //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[5] { new CardInfoStat { positive = true, stat = "Ammo", amount = "+36", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+300%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullets", amount = "+2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Gravity", amount = "-20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-95%", 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)1; } public override string GetModName() { return "DRON"; } } internal class StepBackCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.forceToAdd = -15f; statModifiers.health = 1.35f; statModifiers.movementSpeed = 1.1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Step Back"; } protected override string GetDescription() { return "Push yourself back when you block"; } protected override GameObject GetCardArt() { return Assets.StepBackArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+35%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+10%", 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 "IS"; } } public class SurpriseGiftCard : CustomCard { [CompilerGenerated] private sealed class d__3 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Player player; public Gun gun; public GunAmmo gunAmmo; public CharacterData data; public HealthHandler health; public Gravity gravity; public Block block; public CharacterStatModifiers characterStats; public SurpriseGiftCard <>4__this; private int 5__1; private Rarity 5__2; private CardInfo 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__3(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0058: 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_0072: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = Random.Range(1, 101); if (5__1 <= 33) { 5__2 = (Rarity)2; } else if (5__1 <= 66) { 5__2 = (Rarity)1; } else { 5__2 = (Rarity)0; } 5__3 = <>4__this.GetRandomCardWithRarity(player, gun, gunAmmo, data, health, gravity, block, characterStats, 5__2); if ((Object)(object)5__3 == (Object)null) { 5__3 = <>4__this.GetRandomCardWithRarity(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Rarity)0); } if ((Object)(object)5__3 == (Object)null) { return false; } if (PhotonNetwork.OfflineMode) { GiveCardToPlayer(player.playerID, ((Object)5__3).name); } else { NetworkingManager.RPC(typeof(SurpriseGiftCard), "RPCA_GiveCard", new object[2] { player.playerID, ((Object)5__3).name }); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } 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) { cardInfo.allowMultiple = true; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCardCategories.instance.CardCategory("CardManipulation") }; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (PhotonNetwork.OfflineMode || PhotonNetwork.IsMasterClient) { ((MonoBehaviour)Unbound.Instance).StartCoroutine(HostSelectAndGiveCard(player, gun, gunAmmo, data, health, gravity, block, characterStats)); } } [IteratorStateMachine(typeof(d__3))] private IEnumerator HostSelectAndGiveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__3(0) { <>4__this = this, player = player, gun = gun, gunAmmo = gunAmmo, data = data, health = health, gravity = gravity, block = block, characterStats = characterStats }; } [UnboundRPC] public static void RPCA_GiveCard(int playerID, string cardName) { GiveCardToPlayer(playerID, cardName); } private static void GiveCardToPlayer(int playerID, string cardName) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if (!((Object)(object)val == (Object)null)) { CardInfo cardWithObjectName = Cards.instance.GetCardWithObjectName(cardName); if (!((Object)(object)cardWithObjectName == (Object)null)) { Cards.instance.AddCardToPlayer(val, cardWithObjectName, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(val, cardWithObjectName); } } } private CardInfo GetRandomCardWithRarity(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats, Rarity rarity) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) CardInfo val = Cards.instance.NORARITY_GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func)((CardInfo c, Player p, Gun g, GunAmmo ga, CharacterData d, HealthHandler h, Gravity gr, Block b, CharacterStatModifiers s) => CheckCardCondition(c, rarity)), 1000); if ((Object)(object)val != (Object)null) { return val; } try { ObservableCollection source = (ObservableCollection)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); List second = (List)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); CardInfo[] array = source.ToList().Concat(second).ToArray(); val = Cards.instance.DrawRandomCardWithCondition(array, player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func)((CardInfo c, Player p, Gun g, GunAmmo ga, CharacterData d, HealthHandler h, Gravity gr, Block b, CharacterStatModifiers s) => CheckCardCondition(c, rarity)), 1000); } catch { } return val; } private bool CheckCardCondition(CardInfo card, Rarity rarity) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (card.rarity != rarity) { return false; } if (card.categories.Intersect(noLotteryCategories).Any()) { return false; } if (!CardCheck.IsFromAllowedMod(card)) { return false; } return true; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Surprise Gift"; } protected override string GetDescription() { return "Gives a random card from BFRM, MFM, IS, or DRON."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } 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)8; } public override string GetModName() { return "BFRM"; } } public class SwapStrikeCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.3f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SwapStrikeMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Swap Strike"; } protected override string GetDescription() { return "Block to charge: +100% bullet speed, swap positions with the target on hit."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { 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 = "Health", amount = "+30%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } internal class TakeAimCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.useCharge = true; gun.chargeSpeedTo = 10f; gun.chargeSpreadTo = 0f; gun.multiplySpread = 0f; gun.chargeDamageMultiplier = 2.7f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Take Aim"; } protected override string GetDescription() { return "Hold down your mouse button to charge fast and accurate shot \nOn charge:"; } protected override GameObject GetCardArt() { return Assets.TakeAimArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+1000%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Spread", amount = "-100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+170%", 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 "IS"; } } internal class TankCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 3f; block.cdMultiplier = 3f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Tank 2.0"; } protected override string GetDescription() { return "Need mooore HP!"; } protected override GameObject GetCardArt() { return Assets.TankArt; } 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 //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+200%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+200%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)8; } public override string GetModName() { return "DRON"; } } public class ThornShieldCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ThornShieldMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { ((Component)player).gameObject.AddComponent(); } else { component.AddStack(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ThornShieldMono component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveStack(); if (component.stackCount <= 0) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Thorn Shield"; } protected override string GetDescription() { return "Block to activate Thorns, reflecting 10% damage back to attackers."; } protected override GameObject GetCardArt() { return Assets.ThornShieldArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage Reflect", amount = "10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Effect Duration", amount = "3s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "10s", 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)2; } public override string GetModName() { return "DRON"; } } public class ThunderCoreCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damageAfterDistanceMultiplier = 1.1f; gun.reflects = 3; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //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) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown ScreenEdgeBounceHelper.Add(gun); gun.projectileColor = new Color(0.5f, 0.8f, 1f, 1f); ElectricBulletEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.stackCount++; } else { ElectricBulletEffect electricBulletEffect = ((Component)player).gameObject.AddComponent(); electricBulletEffect.stackCount = 1; List list = gun.objectsToSpawn.ToList(); ObjectsToSpawn val = new ObjectsToSpawn(); val.AddToProjectile = new GameObject("A_ElectricBullet", new Type[1] { typeof(ElectricBulletMono) }); list.Add(val); gun.objectsToSpawn = list.ToArray(); } ArcFieldHelper.CheckUnlockArcField(player); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ScreenEdgeBounceHelper.Remove(gun); ElectricBulletEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } ArcFieldHelper.CheckLockArcField(player, "ThunderCore"); } protected override string GetTitle() { return "Thunder Core"; } protected override string GetDescription() { return "Shots arc lightning in 3m, dealing 3% dmg every 0.05s. (+3% dmg, +10% radius per copy)"; } protected override GameObject? GetCardArt() { return Assets.ThunderCode_Art; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Bounces", amount = "+3", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage Growth", amount = "+10%", 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 "BFRM"; } } public class ElectricBulletEffect : MonoBehaviour { public int stackCount = 1; } public class LightningArcAutoDestroy : MonoBehaviour { public float lifetime = 0.15f; private float timer = 0f; private LineRenderer lineRenderer; private Color startColorInitial; private Color endColorInitial; private void Start() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) lineRenderer = ((Component)this).GetComponent(); if ((Object)(object)lineRenderer != (Object)null) { startColorInitial = lineRenderer.startColor; endColorInitial = lineRenderer.endColor; } } private void Update() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; if ((Object)(object)lineRenderer != (Object)null) { float num = 1f - timer / lifetime; lineRenderer.startColor = new Color(startColorInitial.r, startColorInitial.g, startColorInitial.b, startColorInitial.a * num); lineRenderer.endColor = new Color(endColorInitial.r, endColorInitial.g, endColorInitial.b, endColorInitial.a * num); } if (timer >= lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class ElectricBulletMono : MonoBehaviour { private ProjectileHit projectile; private Player owner; private int stackCount = 1; private float baseDamageRadius = 3f; private float damageRadius = 3f; private float tickInterval = 0.05f; private float baseDamageMultiplier = 0.03f; private float damageMultiplier = 0.03f; private bool isActive = false; private float activationDistance = 1f; private float distanceTraveled = 0f; private float nextTickTime = 0f; private float arcDuration = 0.7f; private LineRenderer ambientArc; private float ambientArcTimer = 0f; private float ambientArcChangeInterval = 0.1f; private static Material sharedMaterial; private Player[] cachedPlayers; private Vector3 lastPosition; private static int wallLayerMask = -1; private void Start() { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) projectile = ((Component)this).GetComponentInParent(); if ((Object)(object)projectile != (Object)null) { owner = projectile.ownPlayer; if ((Object)(object)owner != (Object)null) { ElectricBulletEffect component = ((Component)owner).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { stackCount = component.stackCount; damageRadius = baseDamageRadius * Mathf.Pow(1.1f, (float)(stackCount - 1)); damageMultiplier = baseDamageMultiplier * (float)stackCount; } } } if ((Object)(object)sharedMaterial == (Object)null) { sharedMaterial = new Material(Shader.Find("Sprites/Default")); } if (wallLayerMask == -1) { wallLayerMask = LayerMask.GetMask(new string[3] { "Default", "Obstacle", "IgnorePlayer" }); if (wallLayerMask == 0) { wallLayerMask = ~LayerMask.GetMask(new string[2] { "Player", "PlayerObjectCollider" }); } } cachedPlayers = PlayerManager.instance.players.ToArray(); lastPosition = ((Component)this).transform.position; nextTickTime = Time.time + tickInterval; CreateAmbientElectricEffect(); } private void Update() { if (!((Object)(object)owner == (Object)null)) { UpdateDistanceTraveled(); if (!isActive && distanceTraveled >= damageRadius + activationDistance) { ActivateElectricEffect(); } if (isActive && Time.time >= nextTickTime) { DischargeElectricity(); nextTickTime = Time.time + tickInterval; } UpdateAmbientEffect(); } } private void UpdateDistanceTraveled() { //IL_0007: 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) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; float num = Vector3.Distance(lastPosition, position); distanceTraveled += num; lastPosition = position; } private void ActivateElectricEffect() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) isActive = true; if ((Object)(object)ambientArc != (Object)null) { ambientArc.startColor = new Color(0.5f, 0.8f, 1f, 0.8f); ambientArc.endColor = new Color(1f, 1f, 1f, 0.6f); } } private void DischargeElectricity() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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) float num = 55f; if ((Object)(object)projectile != (Object)null && projectile.damage > 0f) { num = projectile.damage; } float num2 = num * damageMultiplier; Vector3 position = ((Component)this).transform.position; for (int i = 0; i < cachedPlayers.Length; i++) { Player val = cachedPlayers[i]; if (!((Object)(object)val == (Object)null) && !val.data.dead && ((Component)val).gameObject.activeInHierarchy) { Vector3 position2 = ((Component)val).transform.position; float num3 = Vector2.Distance(Vector2.op_Implicit(position), Vector2.op_Implicit(position2)); if (num3 <= damageRadius && HasLineOfSight(position, position2)) { Vector3 val2 = position2 - position; Vector2 val3 = Vector2.op_Implicit(((Vector3)(ref val2)).normalized); ((Damagable)val.data.healthHandler).CallTakeDamage(val3 * num2, Vector2.op_Implicit(position), (GameObject)null, owner, true); CreateLightningArc(val, position); } } } } private bool HasLineOfSight(Vector3 from, Vector3 to) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(to - from); float magnitude = ((Vector2)(ref val)).magnitude; RaycastHit2D val2 = Physics2D.Raycast(Vector2.op_Implicit(from), ((Vector2)(ref val)).normalized, magnitude, wallLayerMask); return (Object)(object)((RaycastHit2D)(ref val2)).collider == (Object)null; } private void CreateLightningArc(Player target, Vector3 sourcePosition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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) GameObject val = new GameObject($"ElectricArc_{target.playerID}"); val.transform.position = sourcePosition; LineRenderer val2 = val.AddComponent(); val2.startWidth = 0.1f; val2.endWidth = 0.05f; val2.positionCount = 5; ((Renderer)val2).material = sharedMaterial; val2.startColor = new Color(0.5f, 0.8f, 1f, 1f); val2.endColor = new Color(1f, 1f, 1f, 0.7f); ((Renderer)val2).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val2).receiveShadows = false; Vector3 position = ((Component)target).transform.position; val2.SetPosition(0, sourcePosition); for (int i = 1; i < val2.positionCount - 1; i++) { float num = (float)i / (float)(val2.positionCount - 1); Vector3 val3 = Vector3.Lerp(sourcePosition, position, num); val3 += Vector2.op_Implicit(Random.insideUnitCircle) * 0.25f; val2.SetPosition(i, val3); } val2.SetPosition(val2.positionCount - 1, position); LightningArcAutoDestroy lightningArcAutoDestroy = val.AddComponent(); lightningArcAutoDestroy.lifetime = arcDuration; } private void OnDestroy() { if ((Object)(object)ambientArc != (Object)null) { Object.Destroy((Object)(object)((Component)ambientArc).gameObject); } } private void CreateAmbientElectricEffect() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0024: 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_00ba: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("AmbientElectricArc"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; ambientArc = val.AddComponent(); ambientArc.startWidth = 0.08f; ambientArc.endWidth = 0.04f; ambientArc.positionCount = 4; ((Renderer)ambientArc).material = sharedMaterial; ambientArc.startColor = new Color(0.5f, 0.8f, 1f, 0.3f); ambientArc.endColor = new Color(1f, 1f, 1f, 0.2f); ((Renderer)ambientArc).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)ambientArc).receiveShadows = false; } private void UpdateAmbientEffect() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ambientArc == (Object)null) { return; } ambientArcTimer += Time.deltaTime; if (ambientArcTimer >= ambientArcChangeInterval) { ambientArcTimer = 0f; float num = (isActive ? 0.4f : 0.2f); if (stackCount > 1) { num *= Mathf.Pow(1.05f, (float)(stackCount - 1)); } Vector3 position = ((Component)this).transform.position; Vector3 val = default(Vector3); for (int i = 0; i < ambientArc.positionCount; i++) { float num2 = Random.Range(0f, 360f) * (MathF.PI / 180f); float num3 = Random.Range(num * 0.5f, num); ((Vector3)(ref val))..ctor(Mathf.Cos(num2) * num3, Mathf.Sin(num2) * num3, 0f); ambientArc.SetPosition(i, position + val); } } } } public class TrafficLightCard : CustomCard { public const float PENALTY_PER_HIT = 0.5f; public const int AFFECTED_BLOCKS = 3; public const int MAX_STACKS = 3; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.damage = 1.25f; } public override void OnAddCard(Player player, Gun gun, GunAmmo ammo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers stats) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown gun.projectileSpeed *= 1.25f; ammo.maxAmmo += 2; TrafficLightOwnerEffect trafficLightOwnerEffect = ((Component)player).gameObject.GetComponent(); if ((Object)(object)trafficLightOwnerEffect == (Object)null) { trafficLightOwnerEffect = ((Component)player).gameObject.AddComponent(); List list = gun.objectsToSpawn.ToList(); ObjectsToSpawn val = new ObjectsToSpawn(); val.AddToProjectile = new GameObject("TrafficLight_Debuff", new Type[1] { typeof(TrafficLightProjectile) }); list.Add(val); gun.objectsToSpawn = list.ToArray(); } trafficLightOwnerEffect.cardCount++; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo ammo, CharacterData d, HealthHandler h, Gravity g, Block b, CharacterStatModifiers s) { gun.projectileSpeed /= 1.5f; ammo.maxAmmo -= 2; TrafficLightOwnerEffect component = ((Component)player).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.cardCount--; if (component.cardCount <= 0) { Object.Destroy((Object)(object)component); } } } protected override string GetTitle() { return "Traffic Light"; } protected override string GetDescription() { return "Each hit delays enemy blocks by 0.5s. Affects next 3 blocks, stacks up to 1.5s."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+2", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } public override string GetModName() { return "BFRM"; } } public class TrafficLightOwnerEffect : MonoBehaviour { public int cardCount = 0; } public class TrafficLightProjectile : RayHitEffect { private Player owner; private static readonly Color EFFECT_COLOR = new Color(0.6f, 0.2f, 0.8f, 1f); private void Start() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) ProjectileHit componentInParent = ((Component)this).GetComponentInParent(); if (!((Object)(object)componentInParent == (Object)null)) { owner = componentInParent.ownPlayer; if (!((Object)(object)owner == (Object)null)) { ColorizeProjectile(componentInParent, EFFECT_COLOR); } } } private void ColorizeProjectile(ProjectileHit projectile, Color c) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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) if (!((Object)(object)projectile == (Object)null)) { projectile.projectileColor = c; SpriteRenderer componentInChildren = ((Component)projectile).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.color = c; } TrailRenderer componentInChildren2 = ((Component)projectile).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { componentInChildren2.startColor = c; componentInChildren2.endColor = new Color(c.r, c.g, c.b, 0.2f); } LineRenderer componentInChildren3 = ((Component)projectile).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren3 != (Object)null) { componentInChildren3.startColor = c; componentInChildren3.endColor = c; } } } public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0014: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hit.transform)) { return (HasToReturn)1; } Player component = ((Component)hit.transform).GetComponent(); if ((Object)(object)component == (Object)null || component.data.dead) { return (HasToReturn)1; } if ((Object)(object)owner != (Object)null && owner.data.view.IsMine) { NetworkingManager.RPC(typeof(TrafficLightProjectile), "RPC_ApplyTrafficLightDebuff", new object[1] { component.playerID }); } return (HasToReturn)1; } [UnboundRPC] public static void RPC_ApplyTrafficLightDebuff(int targetPlayerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == targetPlayerID)); if (!((Object)(object)val == (Object)null)) { TrafficLightDebuff component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.AddCurse(3, 0.5f); return; } component = ((Component)val).gameObject.AddComponent(); component.Initialize(val); } } } [HarmonyPatch(typeof(Block), "blocked")] public class TrafficLightBlockedPatch { public static void Postfix(Block __instance, GameObject projectile) { if ((Object)(object)projectile == (Object)null) { return; } TrafficLightProjectile componentInChildren = projectile.GetComponentInChildren(); if ((Object)(object)componentInChildren == (Object)null) { return; } ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component == (Object)null) { return; } Player ownPlayer = component.ownPlayer; if (!((Object)(object)ownPlayer == (Object)null)) { Player component2 = ((Component)__instance).GetComponent(); if (!((Object)(object)component2 == (Object)null) && !component2.data.dead && ownPlayer.data.view.IsMine) { NetworkingManager.RPC(typeof(TrafficLightProjectile), "RPC_ApplyTrafficLightDebuff", new object[1] { component2.playerID }); } } } } [HarmonyPatch(typeof(Block), "TryBlock")] public class TrafficLightTryBlockPatch { public static bool Prefix(Block __instance, ref bool __state) { __state = false; TrafficLightDebuff component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } if (component.IsDelaying) { return false; } if (component.HasPenalty() && __instance.counter >= __instance.Cooldown()) { Player component2 = ((Component)__instance).GetComponent(); if ((Object)(object)component2 != (Object)null && component2.data.view.IsMine) { __state = true; } } return true; } public static void Postfix(Block __instance, bool __state) { if (__state) { TrafficLightDebuff component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.StartPostBlockDelay(__instance); } } } } public class TrafficLightDebuff : MonoBehaviour { [CompilerGenerated] private sealed class d__33 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject dot; public bool callCleanupAfter; public TrafficLightDebuff <>4__this; private float 5__1; private float 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__33(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0.2f; 5__2 = 0f; break; case 1: <>1__state = -1; break; } if (5__2 < 5__1) { if ((Object)(object)dot == (Object)null) { return false; } 5__2 += Time.deltaTime; 5__3 = Mathf.Clamp01(5__2 / 5__1); dot.transform.localScale = new Vector3(1f - 5__3, 1f - 5__3, 1f); <>2__current = null; <>1__state = 1; return true; } if ((Object)(object)dot != (Object)null) { Object.Destroy((Object)(object)dot); } if ((Object)(object)<>4__this.pendingDestroyDot == (Object)(object)dot) { <>4__this.pendingDestroyDot = null; } if (callCleanupAfter) { <>4__this.CleanupAfterLastBlock(); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__36 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public TrafficLightDebuff <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__36(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.Cleanup(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__37 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public TrafficLightDebuff <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__37(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.Cleanup(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__27 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Block block; public float penalty; public TrafficLightDebuff <>4__this; private float 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__27(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; break; case 1: <>1__state = -1; break; } if (5__1 < penalty) { 5__1 += TimeHandler.deltaTime; if ((Object)(object)block != (Object)null) { block.counter = 0f; } <>2__current = null; <>1__state = 1; return true; } <>4__this.IsDelaying = false; NetworkingManager.RPC(typeof(TrafficLightDebuff), "RPC_RemovePenalty", new object[1] { <>4__this.target.playerID }); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float penalty; public TrafficLightDebuff <>4__this; private float 5__1; private float 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; break; case 1: <>1__state = -1; break; } if (5__1 < penalty) { 5__1 += TimeHandler.deltaTime; 5__2 = Mathf.Clamp01(5__1 / penalty); <>4__this.UpdateArcProgress(5__2); <>2__current = null; <>1__state = 1; return true; } <>4__this.UpdateArcProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Player target; private CharacterData data; private List blockPenalties = new List(); private bool active = false; private Coroutine delayCoroutine; private Coroutine visualDelayCoroutine; private float currentArcProgress = 0f; private GameObject pendingDestroyDot; private const float DOT_SPACING = 0.38f; private const float Y_OFFSET = 1.6f; private const int SECTOR_RESOLUTION = 36; private const float SECTOR_RADIUS = 0.19f; private static readonly Color[] STACK_COLORS = (Color[])(object)new Color[3] { new Color(0.25f, 0.72f, 0.32f, 0.85f), new Color(0.92f, 0.84f, 0.38f, 0.85f), new Color(0.82f, 0.28f, 0.28f, 0.9f) }; private static readonly Color SHADOW_COLOR = new Color(0.1f, 0f, 0.1f, 0.6f); private static readonly Color[] SECTOR_FILL_COLORS = (Color[])(object)new Color[3] { new Color(0.05f, 0.32f, 0.09f, 0.95f), new Color(0.45f, 0.38f, 0.06f, 0.95f), new Color(0.38f, 0.05f, 0.05f, 0.95f) }; private GameObject uiContainer; private List dotObjects = new List(); private Transform wobbleTransform; private GameObject clockContainer; private Mesh clockFillMesh; public bool IsDelaying { get; private set; } = false; public void Initialize(Player t) { target = t; data = t.data; if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("RoundStart", (Func)OnRoundStart); active = true; CreateUI(); AddCurse(3, 0.5f); UpdateUIPosition(); } public bool HasPenalty() { return active && blockPenalties.Count > 0; } public void StartPostBlockDelay(Block block) { if (!IsDelaying && blockPenalties.Count != 0) { IsDelaying = true; float num = blockPenalties[0]; NetworkingManager.RPC(typeof(TrafficLightDebuff), "RPC_StartDelay", new object[2] { target.playerID, num }); delayCoroutine = ((MonoBehaviour)this).StartCoroutine(PostBlockDelayCoroutine(block, num)); } } [IteratorStateMachine(typeof(d__27))] private IEnumerator PostBlockDelayCoroutine(Block block, float penalty) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__27(0) { <>4__this = this, block = block, penalty = penalty }; } [UnboundRPC] public static void RPC_StartDelay(int targetPlayerID, float penalty) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == targetPlayerID)); if (!((Object)(object)val == (Object)null)) { TrafficLightDebuff component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.StartVisualDelay(penalty); } } } public void StartVisualDelay(float penalty) { currentArcProgress = 0f; IsDelaying = true; if (visualDelayCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(visualDelayCoroutine); visualDelayCoroutine = null; } UpdateUI(); visualDelayCoroutine = ((MonoBehaviour)this).StartCoroutine(VisualDelayCoroutine(penalty)); } [IteratorStateMachine(typeof(d__30))] private IEnumerator VisualDelayCoroutine(float penalty) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this, penalty = penalty }; } [UnboundRPC] public static void RPC_RemovePenalty(int targetPlayerID) { Player val = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player p) => p.playerID == targetPlayerID)); if (!((Object)(object)val == (Object)null)) { TrafficLightDebuff component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.RemoveFirstPenalty(); } } } private void RemoveFirstPenalty() { IsDelaying = false; if (visualDelayCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(visualDelayCoroutine); visualDelayCoroutine = null; } UpdateArcProgress(1f); if (blockPenalties.Count > 0) { blockPenalties.RemoveAt(0); } bool flag = blockPenalties.Count == 0; GameObject val = null; if (dotObjects.Count > 0) { val = dotObjects[0]; dotObjects.RemoveAt(0); clockContainer = null; clockFillMesh = null; } UpdateUI(); if ((Object)(object)val != (Object)null) { pendingDestroyDot = val; ((MonoBehaviour)this).StartCoroutine(DotDisappearCoroutine(val, flag)); } else if (flag) { CleanupAfterLastBlock(); } } [IteratorStateMachine(typeof(d__33))] private IEnumerator DotDisappearCoroutine(GameObject dot, bool callCleanupAfter) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__33(0) { <>4__this = this, dot = dot, callCleanupAfter = callCleanupAfter }; } private void OnRevive() { Cleanup(); } public void AddCurse(int blocksAffected, float penalty) { float num = 1.5f; for (int i = 0; i < blocksAffected; i++) { if (i < blockPenalties.Count) { blockPenalties[i] = Mathf.Min(blockPenalties[i] + penalty, num); } else { blockPenalties.Add(penalty); } } UpdateUI(); } [IteratorStateMachine(typeof(d__36))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__36(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(d__37))] private IEnumerator OnRoundStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__37(0) { <>4__this = this, gm = gm }; } private void CleanupAfterLastBlock() { active = false; if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("RoundStart", (Func)OnRoundStart); DestroyUI(); Object.Destroy((Object)(object)this); } private void Update() { if ((Object)(object)target == (Object)null) { Cleanup(); return; } if ((Object)(object)data != (Object)null && data.dead) { HideUI(); return; } ShowUI(); UpdateUIPosition(); } private void OnDisable() { HideUI(); } private void HideUI() { if ((Object)(object)uiContainer != (Object)null) { uiContainer.SetActive(false); } } private void ShowUI() { if ((Object)(object)uiContainer != (Object)null && !uiContainer.activeSelf) { uiContainer.SetActive(true); } } private void CreateUI() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown PlayerWobblePosition componentInChildren = ((Component)target).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { wobbleTransform = ((Component)componentInChildren).transform; } uiContainer = new GameObject("TrafficLightDebuffUI"); if ((Object)(object)wobbleTransform != (Object)null) { uiContainer.transform.SetParent(wobbleTransform, false); } else { uiContainer.transform.SetParent(((Component)target).transform, false); } } private void UpdateUI() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject dotObject in dotObjects) { if ((Object)(object)dotObject != (Object)null) { Object.Destroy((Object)(object)dotObject); } } dotObjects.Clear(); DestroyArcTimer(); if (blockPenalties.Count == 0 || (Object)(object)uiContainer == (Object)null) { return; } float num = (float)(blockPenalties.Count - 1) * 0.38f; float num2 = (0f - num) / 2f; for (int i = 0; i < blockPenalties.Count; i++) { float xOffset = num2 + (float)i * 0.38f; int num3 = Mathf.RoundToInt(blockPenalties[i] / 0.5f); int num4 = Mathf.Clamp(num3 - 1, 0, STACK_COLORS.Length - 1); Color color = STACK_COLORS[num4]; GameObject val = CreateDot(xOffset, color); dotObjects.Add(val); if (i == 0) { CreateArcTimer(val.transform, num4); if (IsDelaying && currentArcProgress > 0f) { UpdateArcProgress(currentArcProgress); } } } } private void CreateArcTimer(Transform parentDot, int colorIndex) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown clockContainer = new GameObject("ArcTimer"); clockContainer.transform.SetParent(parentDot, false); clockContainer.transform.localPosition = Vector3.zero; GameObject val = new GameObject("ArcFill"); val.transform.SetParent(clockContainer.transform, false); MeshFilter val2 = val.AddComponent(); MeshRenderer val3 = val.AddComponent(); ((Renderer)val3).sortingLayerName = "MostFront"; ((Renderer)val3).sortingOrder = 102; Material val4 = new Material(Shader.Find("Sprites/Default")); val4.color = SECTOR_FILL_COLORS[Mathf.Clamp(colorIndex, 0, SECTOR_FILL_COLORS.Length - 1)]; ((Renderer)val3).material = val4; clockFillMesh = new Mesh { name = "FillSector" }; val2.mesh = clockFillMesh; } private void UpdateArcProgress(float progress) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) currentArcProgress = progress; if ((Object)(object)clockFillMesh == (Object)null) { return; } if (progress <= 0f) { clockFillMesh.Clear(); return; } int num = ((progress >= 1f) ? 36 : Mathf.Max(1, Mathf.RoundToInt(progress * 36f))); float num2 = Mathf.Min(progress, 1f) * 360f; Vector3[] array = (Vector3[])(object)new Vector3[num + 2]; int[] array2 = new int[num * 3]; array[0] = Vector3.zero; for (int i = 0; i <= num; i++) { float num3 = (float)i / (float)num; float num4 = 90f - num3 * num2; float num5 = num4 * (MathF.PI / 180f); array[i + 1] = new Vector3(Mathf.Cos(num5), Mathf.Sin(num5), 0f) * 0.19f; } for (int j = 0; j < num; j++) { array2[j * 3] = 0; array2[j * 3 + 1] = j + 1; array2[j * 3 + 2] = j + 2; } clockFillMesh.Clear(); clockFillMesh.vertices = array; clockFillMesh.triangles = array2; clockFillMesh.RecalculateBounds(); } private void DestroyArcTimer() { clockFillMesh = null; if ((Object)(object)clockContainer != (Object)null) { Object.Destroy((Object)(object)clockContainer); clockContainer = null; } } private static Mesh BuildCircleMesh(float radius, int segments) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown Vector3[] array = (Vector3[])(object)new Vector3[segments + 2]; int[] array2 = new int[segments * 3]; array[0] = Vector3.zero; for (int i = 0; i <= segments; i++) { float num = 90f - (float)i / (float)segments * 360f; float num2 = num * (MathF.PI / 180f); array[i + 1] = new Vector3(Mathf.Cos(num2), Mathf.Sin(num2), 0f) * radius; } for (int j = 0; j < segments; j++) { array2[j * 3] = 0; array2[j * 3 + 1] = j + 1; array2[j * 3 + 2] = j + 2; } Mesh val = new Mesh { name = "Circle" }; val.vertices = array; val.triangles = array2; val.RecalculateBounds(); return val; } private GameObject CreateDot(float xOffset, Color color) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0073: 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_00b2: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_0102: 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_0147: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Dot"); val.transform.SetParent(uiContainer.transform, false); val.transform.localPosition = new Vector3(xOffset, 0f, 0f); GameObject val2 = new GameObject("Shadow"); val2.transform.SetParent(val.transform, false); val2.transform.localPosition = new Vector3(0.018f, -0.018f, 0.1f); MeshFilter val3 = val2.AddComponent(); MeshRenderer val4 = val2.AddComponent(); ((Renderer)val4).sortingLayerName = "MostFront"; ((Renderer)val4).sortingOrder = 99; Material val5 = new Material(Shader.Find("Sprites/Default")); val5.color = SHADOW_COLOR; ((Renderer)val4).material = val5; val3.mesh = BuildCircleMesh(0.19f, 36); GameObject val6 = new GameObject("Circle"); val6.transform.SetParent(val.transform, false); val6.transform.localPosition = Vector3.zero; MeshFilter val7 = val6.AddComponent(); MeshRenderer val8 = val6.AddComponent(); ((Renderer)val8).sortingLayerName = "MostFront"; ((Renderer)val8).sortingOrder = 100; Material val9 = new Material(Shader.Find("Sprites/Default")); val9.color = color; ((Renderer)val8).material = val9; val7.mesh = BuildCircleMesh(0.19f, 36); return val; } private void UpdateUIPosition() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)uiContainer == (Object)null) && !((Object)(object)target == (Object)null)) { uiContainer.transform.localPosition = new Vector3(0f, 1.6f, 0f); } } private void DestroyUI() { foreach (GameObject dotObject in dotObjects) { if ((Object)(object)dotObject != (Object)null) { Object.Destroy((Object)(object)dotObject); } } dotObjects.Clear(); DestroyArcTimer(); if ((Object)(object)uiContainer != (Object)null) { Object.Destroy((Object)(object)uiContainer); uiContainer = null; } } private void Cleanup() { if (active) { active = false; if (delayCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(delayCoroutine); delayCoroutine = null; } if (visualDelayCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(visualDelayCoroutine); visualDelayCoroutine = null; } IsDelaying = false; if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } blockPenalties.Clear(); GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("RoundStart", (Func)OnRoundStart); DestroyUI(); Object.Destroy((Object)(object)this); } } private void OnDestroy() { if (delayCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(delayCoroutine); } if (visualDelayCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(visualDelayCoroutine); } if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("RoundStart", (Func)OnRoundStart); if ((Object)(object)pendingDestroyDot != (Object)null) { Object.Destroy((Object)(object)pendingDestroyDot); pendingDestroyDot = null; } DestroyUI(); } } internal class UnstableGunCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 0.7f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) gun.projectileColor = new Color(1f, 0f, 0f, 1f); Random random = new Random(); int num = random.Next(3, 5); gun.damage *= (float)num * 1f; int num2 = random.Next(3, 5); gun.projectileSpeed *= (float)num2 * 1f; gunAmmo.reloadTimeMultiplier *= 2.5f; int maxAmmo = random.Next(1, 3); gunAmmo.maxAmmo = maxAmmo; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "unstable gun"; } protected override string GetDescription() { return "Careful! It's extremely unstable."; } protected override GameObject GetCardArt() { return Assets.unstable_gun_Art; } 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 //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[5] { new CardInfoStat { positive = true, stat = "DMG", amount = "+200-300%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet Speed", amount = "+200-300%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload Time", amount = "+150%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Max Ammo", amount = "1-2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Move Speed", 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)0; } public override string GetModName() { return "MFM"; } } internal class VampireCastleCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent()); } protected override string GetTitle() { return "Vampire Castle"; } protected override string GetDescription() { return "Blocking gives you +25% DMG, Health, Projectile Speed and +75% Lifesteel."; } protected override GameObject GetCardArt() { return Assets.VampireCastleArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Ability Duration", amount = "5s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "10s", 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)4; } public override string GetModName() { return "MFM"; } } public class VampireCastleMono : ReversibleEffect { private GameObject effectsRoot; public override void OnStart() { base.characterStatModifiersModifier.lifeSteal_add = 0.75f; CharacterDataModifier characterDataModifier = base.characterDataModifier; characterDataModifier.maxHealth_mult *= 1.25f; GunStatModifier gunStatModifier = base.gunStatModifier; gunStatModifier.projectileSpeed_mult *= 1.25f; GunStatModifier gunStatModifier2 = base.gunStatModifier; gunStatModifier2.damage_mult *= 1.25f; ApplyVisuals(); } private void ApplyVisuals() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0185: 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_01a5: 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_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: 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) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Expected O, but got Unknown //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)effectsRoot != (Object)null)) { effectsRoot = new GameObject("VampireCastleEffects"); effectsRoot.transform.SetParent(((Component)base.player).transform); effectsRoot.transform.localPosition = Vector3.zero; float x = ((Component)base.player).transform.localScale.x; Material val = (((Object)(object)Shader.Find("Particles/Additive") != (Object)null) ? new Material(Shader.Find("Particles/Additive")) : new Material(Shader.Find("Sprites/Default"))); val.mainTexture = (Texture)(object)CreateSoftCircleTexture(); GameObject val2 = new GameObject("Rain"); val2.transform.SetParent(effectsRoot.transform); val2.transform.localPosition = new Vector3(0f, 1.5f, 0f); ParticleSystem val3 = val2.AddComponent(); MainModule main = val3.main; ((MainModule)(ref main)).loop = true; ((MainModule)(ref main)).playOnAwake = false; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.5f, 0.8f); ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(0f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.2f * x, 0.35f * x); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.6f, 0f, 0.9f, 1f), new Color(1f, 0.3f, 1f, 1f)); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(1.5f); ((MainModule)(ref main)).maxParticles = 300; EmissionModule emission = val3.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(120f); ShapeModule shape = val3.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10; ((ShapeModule)(ref shape)).rotation = new Vector3(-90f, 0f, 0f); ((ShapeModule)(ref shape)).radius = 0.8f * x; SizeOverLifetimeModule sizeOverLifetime = val3.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; AnimationCurve val4 = new AnimationCurve((Keyframe[])(object)new Keyframe[4] { new Keyframe(0f, 0f), new Keyframe(0.15f, 1f), new Keyframe(0.85f, 1f), new Keyframe(1f, 0.2f) }); ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, val4); ColorOverLifetimeModule colorOverLifetime = val3.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val5 = new Gradient(); val5.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(1f, 0.4f, 1f), 0f), new GradientColorKey(new Color(0.6f, 0f, 0.8f), 0.5f), new GradientColorKey(new Color(0.3f, 0f, 0.4f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(0f, 0f), new GradientAlphaKey(0.9f, 0.15f), new GradientAlphaKey(0.8f, 0.7f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val5); ParticleSystemRenderer component = val2.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = -100; ((Renderer)component).material = val; val3.Play(); } } private static Texture2D CreateSoftCircleTexture() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_002c: 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_006b: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(32, 32, (TextureFormat)4, false); float num = 16f; for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { float num2 = Vector2.Distance(new Vector2((float)j + 0.5f, (float)i + 0.5f), new Vector2(num, num)) / num; float num3 = Mathf.Clamp01(1f - num2); num3 *= num3; val.SetPixel(j, i, new Color(1f, 1f, 1f, num3)); } } val.Apply(); return val; } private void RemoveVisuals() { if ((Object)(object)effectsRoot != (Object)null) { Object.Destroy((Object)(object)effectsRoot); effectsRoot = null; } } public override void OnOnDisable() { ((ReversibleEffect)this).Destroy(); } public override void OnOnDestroy() { RemoveVisuals(); } } public class VampireCastleOnBlock : MonoBehaviour { [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public VampireCastleOnBlock <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.ResetState(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const float COOLDOWN = 10f; private const float DURATION = 5f; private float startTime; private Player player; private Block block; private CharacterData data; private CooldownUI cooldownUI; private Action blockAction; private void Start() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); data = ((Component)this).GetComponentInParent(); block = data.block; startTime = Time.time - 10f; blockAction = OnBlock; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, blockAction); if (data.view.IsMine) { cooldownUI = CooldownUI.Create(((Component)this).transform, 1f); cooldownUI.SetIcon("V", (Color?)new Color(0.6f, 0.2f, 0.8f)); } GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnRevive)); } } private void OnBlock(BlockTriggerType blockTrigger) { if (!(Time.time < startTime + 10f) && (Object)(object)((Component)player).GetComponent() == (Object)null && CardCheck.Amount(player, "Vampire Castle") > 0) { startTime = Time.time; VampireCastleMono vampireCastleMono = ((Component)player).gameObject.AddComponent(); Object.Destroy((Object)(object)vampireCastleMono, 5f); } } private void Update() { if ((Object)(object)data == (Object)null || (Object)(object)player == (Object)null) { return; } if (data.dead) { CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } else { UpdateUI(); } } private void UpdateUI() { if ((Object)(object)cooldownUI == (Object)null) { return; } if ((Object)(object)((Component)player).GetComponent() != (Object)null) { float num = Mathf.Max(0f, startTime + 5f - Time.time); cooldownUI.ShowActive(num); return; } float num2 = startTime + 10f - Time.time; if (num2 > 0f) { cooldownUI.ShowCooldown(num2, 10f); } else { cooldownUI.Hide(); } } private void OnRevive() { ResetState(); } [IteratorStateMachine(typeof(d__13))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this, gm = gm }; } private void ResetState() { startTime = Time.time - 10f; CooldownUI obj = cooldownUI; if (obj != null) { obj.Hide(); } } private void OnDestroy() { if ((Object)(object)block != (Object)null && blockAction != null) { block.BlockAction = (Action)Delegate.Remove(block.BlockAction, blockAction); } if ((Object)(object)data != (Object)null && (Object)(object)data.healthHandler != (Object)null) { HealthHandler healthHandler = data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnRevive)); } GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)cooldownUI != (Object)null) { Object.Destroy((Object)(object)((Component)cooldownUI).gameObject); } } } public class VengefulSparkCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.secondsToTakeDamageOver += 1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { health.regeneration += 5f; VengefulSparkEffect orAddComponent = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); orAddComponent.Initialize(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { health.regeneration -= 5f; VengefulSparkEffect component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Vengeful Spark"; } protected override string GetDescription() { return $"When hit, fires a copy of the attacker's bullet back at {30.000002f:0}% damage."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Life Regen", amount = "+5", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Decay", amount = "+1s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Heal Effects", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ability Cooldown", amount = "0.5s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)2; } public override string GetModName() { return "BFRM"; } } public class MFMBalanceMono : MonoBehaviour { private CardInfo[] newCards; private float updateDelay = 0.1f; private Player player; private void Start() { player = ((Component)this).GetComponent(); } public void Update() { updateDelay += Time.deltaTime; if (!((double)updateDelay < 1.0)) { float num = (float)((double)player.data.block.additionalBlocks * 0.20000000298023224 + 1.5); if ((double)player.data.block.cooldown <= (double)num) { player.data.block.cooldown = num; } updateDelay = 0f; } } } public static class BurnEffectManager { [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; private List 5__1; private List.Enumerator <>s__2; private BurnEffect 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>s__2 = default(List.Enumerator); 5__3 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; 5__1 = new List(activeBurns); <>s__2 = 5__1.GetEnumerator(); try { while (<>s__2.MoveNext()) { 5__3 = <>s__2.Current; if ((Object)(object)5__3 != (Object)null) { 5__3.StopBurn(); Object.Destroy((Object)(object)5__3); } 5__3 = null; } } finally { ((IDisposable)<>s__2).Dispose(); } <>s__2 = default(List.Enumerator); activeBurns.Clear(); 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 static readonly HashSet activeBurns = new HashSet(); private static bool hooksRegistered = false; public static void EnsureInitialized() { if (!hooksRegistered) { hooksRegistered = true; GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } } public static void Register(BurnEffect burn) { EnsureInitialized(); activeBurns.Add(burn); } public static void Unregister(BurnEffect burn) { activeBurns.Remove(burn); } [IteratorStateMachine(typeof(d__5))] private static IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__5(0) { gm = gm }; } public static void ClearAll() { List list = new List(activeBurns); foreach (BurnEffect item in list) { if ((Object)(object)item != (Object)null) { Object.Destroy((Object)(object)item); } } activeBurns.Clear(); } } public class BurnEffect : MonoBehaviour { private Player owner; private int ownerID; private Player victim; private float burnEndTime; private float lastDamageTime; private bool isActive = true; private const float BURN_DURATION = 2f; private const float BURN_DAMAGE_INTERVAL = 1f; private float burnDamagePerTick = 0.025f; private ParticleSystem fireParticles; private GameObject particlesObj; public void Apply(Player attacker, float duration = 2f, float damagePerTick = 0.025f) { owner = attacker; ownerID = (((Object)(object)attacker != (Object)null) ? attacker.playerID : (-1)); victim = ((Component)this).GetComponent(); burnEndTime = Time.time + duration; lastDamageTime = Time.time; isActive = true; burnDamagePerTick = damagePerTick; BurnEffectManager.Register(this); CreateParticles(); } public void RefreshDuration(float duration = 2f, float damagePerTick = 0.025f) { burnEndTime = Time.time + duration; burnDamagePerTick = damagePerTick; if ((Object)(object)particlesObj != (Object)null && !particlesObj.activeSelf) { particlesObj.SetActive(true); } if ((Object)(object)fireParticles != (Object)null && !fireParticles.isPlaying) { fireParticles.Play(); } } public void StopBurn() { isActive = false; StopParticles(); } private void CreateParticles() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Expected O, but got Unknown if (!((Object)(object)particlesObj != (Object)null)) { particlesObj = new GameObject("BurnParticles"); particlesObj.transform.SetParent(((Component)this).transform); particlesObj.transform.localPosition = Vector3.zero; fireParticles = particlesObj.AddComponent(); MainModule main = fireParticles.main; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.4f, 0.8f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(1.2f, 2.5f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.08f, 0.18f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 0.4f, 0f, 1f), new Color(1f, 0.8f, 0.1f, 1f)); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).maxParticles = 40; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(-0.5f); ((MainModule)(ref main)).loop = true; EmissionModule emission = fireParticles.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(20f); ShapeModule shape = fireParticles.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10; ((ShapeModule)(ref shape)).radius = 0.25f; ColorOverLifetimeModule colorOverLifetime = fireParticles.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val = new Gradient(); val.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(1f, 0.9f, 0.2f), 0f), new GradientColorKey(new Color(1f, 0.4f, 0f), 0.4f), new GradientColorKey(new Color(0.5f, 0.1f, 0f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.7f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val); SizeOverLifetimeModule sizeOverLifetime = fireParticles.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; AnimationCurve val2 = new AnimationCurve(); val2.AddKey(0f, 0.3f); val2.AddKey(0.4f, 1f); val2.AddKey(1f, 0f); ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, val2); ParticleSystemRenderer component = particlesObj.GetComponent(); ((Renderer)component).sortingLayerName = "MostFront"; ((Renderer)component).sortingOrder = 50; ((Renderer)component).material = new Material(Shader.Find("Sprites/Default")); fireParticles.Play(); } } private void StopParticles() { if ((Object)(object)fireParticles != (Object)null) { fireParticles.Stop(true, (ParticleSystemStopBehavior)0); } } private void Update() { if (!isActive || (Object)(object)GameManager.instance == (Object)null || !GameManager.instance.battleOngoing) { return; } if ((Object)(object)victim == (Object)null || (Object)(object)victim.data == (Object)null || victim.data.dead) { Object.Destroy((Object)(object)this); return; } if ((Object)(object)owner == (Object)null || (Object)(object)owner.data == (Object)null || owner.data.dead) { owner = FindPlayerByID(ownerID); if ((Object)(object)owner == (Object)null || (Object)(object)owner.data == (Object)null || owner.data.dead) { Object.Destroy((Object)(object)this); return; } } if (Time.time >= lastDamageTime + 1f) { DealBurnDamage(); lastDamageTime = Time.time; } if (Time.time >= burnEndTime) { Object.Destroy((Object)(object)this); } } private void DealBurnDamage() { //IL_00a0: 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_00b6: 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) if (!((Object)(object)victim == (Object)null) && !((Object)(object)victim.data == (Object)null) && !victim.data.dead && !((Object)(object)owner == (Object)null) && !((Object)(object)owner.data == (Object)null) && !owner.data.dead) { float num = victim.data.maxHealth * burnDamagePerTick; ((Damagable)victim.data.healthHandler).CallTakeDamage(Vector2.up * num, Vector2.op_Implicit(((Component)victim).transform.position), (GameObject)null, owner, true); } } private Player FindPlayerByID(int playerID) { if (playerID < 0) { return null; } foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && player.playerID == playerID) { return player; } } return null; } private void OnDestroy() { StopParticles(); if ((Object)(object)particlesObj != (Object)null) { particlesObj.transform.SetParent((Transform)null); Object.Destroy((Object)(object)particlesObj, 0.8f); particlesObj = null; } BurnEffectManager.Unregister(this); } } public class NecronomiconBuffMono : ReversibleEffect { private bool setColor; private bool setStats; private float startTime; private ColorEffect colorEffect; private Color color = Color.red; public void SetColor(Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) this.color = color; } public override void OnStart() { ResetTimer(); setColor = true; } public override void OnUpdate() { if (setColor) { ApplyColor(); setColor = false; } if (setStats) { ((ReversibleEffect)this).ApplyModifiers(); } } private void ApplyColor() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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) if (color != Color.clear) { colorEffect = ((Component)base.player).gameObject.AddComponent(); colorEffect.SetColor(color); } } private void ResetTimer() { startTime = Time.time; } public override void OnOnDisable() { ((ReversibleEffect)this).ClearModifiers(false); Object.Destroy((Object)(object)colorEffect); } public override void OnOnDestroy() { ((ReversibleEffect)this).ClearModifiers(false); Object.Destroy((Object)(object)colorEffect); } } public class NecronomiconMono : MonoBehaviour { private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0.5f, (UpdateMode)0); public static SoundEvent fieldsound; public CharacterStatModifiers stats; private bool canTrigger; private bool applyStats; private bool infBlockCD; public Player player; private Gun gun; private readonly float updateDelay = 0.2f; private float startTime; private float effectStartTime; private void Start() { player = ((Component)this).GetComponent(); stats = ((Component)this).GetComponent(); CharacterData componentInParent = ((Component)this).GetComponentInParent(); ResetTimer(); canTrigger = true; applyStats = false; infBlockCD = false; } private void Update() { //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) if (Time.time >= startTime + updateDelay) { if (stats.respawns > 0) { if (!canTrigger && stats.remainingRespawns > 0) { canTrigger = true; } if (stats.remainingRespawns == 0 && canTrigger) { NecronomiconBuffMono necronomiconBuffMono = ((Component)player).gameObject.AddComponent(); ((ReversibleEffect)necronomiconBuffMono).gunStatModifier.projectileSpeed_mult = 2f; ((ReversibleEffect)necronomiconBuffMono).gunStatModifier.damage_mult = 2f; ((ReversibleEffect)necronomiconBuffMono).gunStatModifier.attackSpeed_mult = 0.7f; infBlockCD = true; SoundContainer val = ScriptableObject.CreateInstance(); Random random = new Random(); int num = random.Next(1, 6); if (num == 1) { val.audioClip[0] = Assets.DemRes1; } if (num == 2) { val.audioClip[0] = Assets.DemRes2; } if (num == 3) { val.audioClip[0] = Assets.DemRes3; } if (num == 4) { val.audioClip[0] = Assets.DemRes4; } if (num == 5) { val.audioClip[0] = Assets.DemRes5; } val.setting.volumeIntensityEnable = true; fieldsound = ScriptableObject.CreateInstance(); fieldsound.soundContainerArray[0] = val; soundParameterIntensity.intensity = (float)((double)((Component)this).transform.localScale.x * (double)Optionshandler.vol_Master * (double)Optionshandler.vol_Sfx / 1.2000000476837158) * 1.15f; SoundManager.Instance.Play(fieldsound, ((Component)this).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity }); canTrigger = false; applyStats = true; ResetEffectTimer(); } } ResetTimer(); if (infBlockCD) { player.data.block.RPCA_DoBlock(false, true, (BlockTriggerType)0, default(Vector3), false); } } if (applyStats && Time.time >= effectStartTime + 5f) { Object.Destroy((Object)(object)((Component)((Component)this).GetComponent()).GetComponent()); Debug.Log((object)"buff mono destroyed"); applyStats = false; ResetEffectTimer(); infBlockCD = false; } } private void ResetTimer() { startTime = Time.time; } private void ResetEffectTimer() { effectStartTime = Time.time; } public void Destroy() { Object.Destroy((Object)(object)this); } } public static class AuraHelper { public static CardInfo FindCard(List cards, string cardName) { string cardName2 = cardName; if (cards == null || cards.Count == 0) { return null; } CardInfo val = cards.Find((CardInfo c) => c.cardName == cardName2); if ((Object)(object)val != (Object)null) { return val; } return cards.Find((CardInfo c) => c.cardName.EndsWith(cardName2)); } public static bool MatchesCardName(CardInfo card, string cardName) { if ((Object)(object)card == (Object)null || string.IsNullOrEmpty(cardName)) { return false; } return card.cardName == cardName || card.cardName.EndsWith(cardName); } public static void ApplyDebuffsToEnemies(Player player, string auraCardName, string debuffCardName) { int num = CountCards(player, auraCardName) + 1; bool flag = PhotonNetwork.OfflineMode; if (!flag && (Object)(object)player.data.view != (Object)null) { flag = player.data.view.IsMine; } if (flag) { if (PhotonNetwork.OfflineMode) { ApplyDebuffsToEnemiesInternal(player.playerID, num, debuffCardName); return; } NetworkingManager.RPC(typeof(AuraHelper), "RPCA_ApplyDebuffsToEnemies", new object[3] { player.playerID, num, debuffCardName }); } } [UnboundRPC] public static void RPCA_ApplyDebuffsToEnemies(int auraOwnerPlayerID, int auraCount, string debuffCardName) { ApplyDebuffsToEnemiesInternal(auraOwnerPlayerID, auraCount, debuffCardName); } private static void ApplyDebuffsToEnemiesInternal(int auraOwnerPlayerID, int auraCount, string debuffCardName) { if (MrFuntikMod.hiddenCards == null) { return; } CardInfo val = FindCard(MrFuntikMod.hiddenCards, debuffCardName); if ((Object)(object)val == (Object)null) { return; } Player val2 = PlayerManager.instance.players.Find((Player p) => p.playerID == auraOwnerPlayerID); if ((Object)(object)val2 == (Object)null) { return; } foreach (Player player in PlayerManager.instance.players) { if (player.playerID != val2.playerID && player.teamID != val2.teamID) { int num = CountCards(player, debuffCardName); int num2 = auraCount - num; for (int i = 0; i < num2; i++) { Cards.instance.AddCardToPlayer(player, val, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(player, val); } } } } public static int CountCards(Player player, string cardName) { string cardName2 = cardName; if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.currentCards == null) { return 0; } return player.data.currentCards.Count((CardInfo c) => MatchesCardName(c, cardName2)); } } public static class AuraMasterHelper { public static int CountAuraCards(Player player) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.currentCards == null) { return 0; } return player.data.currentCards.Count((CardInfo card) => (Object)(object)card != (Object)null && card.categories != null && card.categories.Contains(MrFuntikMod.AuraCards)); } public static void CheckUnlockAuraMaster(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; int num = CountAuraCards(player) + 1; if (num >= 2 && blacklistedCategories.Contains(MrFuntikMod.AuraMasterCategory)) { blacklistedCategories.Remove(MrFuntikMod.AuraMasterCategory); } } } public static void CheckLockAuraMaster(Player player) { if (!((Object)(object)player == (Object)null)) { List blacklistedCategories = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories; int num = CountAuraCards(player) - 1; if (num < 2 && !blacklistedCategories.Contains(MrFuntikMod.AuraMasterCategory)) { blacklistedCategories.Add(MrFuntikMod.AuraMasterCategory); } } } } public static class OneCutManager { public static bool IsActive = false; public static bool NeedsNextPage = false; public static int CurrentPage = 0; public static Player CurrentPlayer = null; public static List RemovableCards = null; private static int CardsShownBefore = 0; private static int SessionSlotCount = 0; private const int DefaultSlots = 5; private static readonly List _tempAllowMultiple = new List(); private static readonly List _tempCategoryCleared = new List(); private static readonly List _tempCategoryBackups = new List(); public static CardInfo NextPageCard = null; private static int GetTotalSlots() { if ((Object)(object)CardChoice.instance != (Object)null) { int childCount = ((Component)CardChoice.instance).transform.childCount; if (childCount > 0) { return childCount; } } return 5; } public static List GetRemovableCards(Player player) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.currentCards == null) { MrFuntikMod.Log("[OneCut] GetRemovableCards: player or data is null"); return new List(); } List list = new List(); HashSet hashSet = new HashSet(); MrFuntikMod.Log($"[OneCut] GetRemovableCards: checking {player.data.currentCards.Count} cards"); for (int i = 0; i < player.data.currentCards.Count; i++) { CardInfo val = player.data.currentCards[i]; if ((Object)(object)val == (Object)null) { MrFuntikMod.Log($"[OneCut] [{i}] NULL"); continue; } string text = val.cardName ?? ""; if (text == "One Cut" || text == "One Cut Next") { MrFuntikMod.Log($"[OneCut] [{i}] SKIP OneCut: {text}"); continue; } if (!hashSet.Add(text)) { MrFuntikMod.Log($"[OneCut] [{i}] DEDUP SKIP: {text}"); continue; } MrFuntikMod.Log($"[OneCut] [{i}] ADD: {text}"); list.Add(val); } MrFuntikMod.Log($"[OneCut] GetRemovableCards: found {list.Count} removable cards (deduplicated)"); return list; } public static bool IsNextPageCard(CardInfo card) { if ((Object)(object)card == (Object)null) { return false; } string text = card.cardName ?? ""; return text == "One Cut Next"; } public static void InitSession(Player player) { CurrentPlayer = player; CurrentPage = 0; CardsShownBefore = 0; NeedsNextPage = false; RemovableCards = GetRemovableCards(player); IsActive = true; SessionSlotCount = GetTotalSlots(); MrFuntikMod.Log($"[OneCut] InitSession. Total removable: {RemovableCards.Count}, slots: {SessionSlotCount}"); } public static void StartSelection(Player player) { InitSession(player); UpdateCardChoiceCards(); } public static void UpdateCardChoiceCards(int totalSlots = 0) { List list = new List(); if (totalSlots <= 0) { totalSlots = ((SessionSlotCount > 0) ? SessionSlotCount : GetTotalSlots()); } int num = RemovableCards?.Count ?? 0; int num2 = num - CardsShownBefore; bool flag = num2 > totalSlots; int num3 = (flag ? (totalSlots - 1) : num2); MrFuntikMod.Log($"[OneCut] Page {CurrentPage}: totalSlots={totalSlots}, cardsShownBefore={CardsShownBefore}, cardsLeft={num2}, needNextPage={flag}, cardsToShow={num3}"); for (int i = 0; i < num3; i++) { int num4 = CardsShownBefore + i; if (num4 < num) { CardInfo val = RemovableCards[num4]; CardInfo val2 = val.sourceCard ?? val; TempAllowCard(val2); list.Add(val2); MrFuntikMod.Log($"[OneCut] Slot {i}: [{num4}] {val2.cardName}"); } } if (flag && (Object)(object)NextPageCard != (Object)null) { TempAllowCard(NextPageCard); list.Add(NextPageCard); MrFuntikMod.Log("[OneCut] NextPage added to pool"); } CardChoice.instance.cards = list.ToArray(); MrFuntikMod.Log($"[OneCut] CardChoice.cards updated: {list.Count} cards (slots: {totalSlots})"); } private static void TempAllowCard(CardInfo card) { if (!((Object)(object)card == (Object)null)) { if (!card.allowMultiple && !_tempAllowMultiple.Contains(card)) { card.allowMultiple = true; _tempAllowMultiple.Add(card); } if (card.categories != null && card.categories.Length != 0 && !_tempCategoryCleared.Contains(card)) { _tempCategoryBackups.Add(card.categories); _tempCategoryCleared.Add(card); card.categories = (CardCategory[])(object)new CardCategory[0]; } } } public static void EndSelection() { RestoreTempAllowMultiple(); IsActive = false; NeedsNextPage = false; CurrentPage = 0; CardsShownBefore = 0; SessionSlotCount = 0; CurrentPlayer = null; RemovableCards = null; MrFuntikMod.Log("[OneCut] Selection ended"); } public static void ForceEndSelection() { RestoreTempAllowMultiple(); IsActive = false; NeedsNextPage = false; CurrentPage = 0; CardsShownBefore = 0; SessionSlotCount = 0; CurrentPlayer = null; RemovableCards = null; MrFuntikMod.Log("[OneCut] Selection force ended"); } private static void RestoreTempAllowMultiple() { foreach (CardInfo item in _tempAllowMultiple) { item.allowMultiple = false; } _tempAllowMultiple.Clear(); for (int i = 0; i < _tempCategoryCleared.Count; i++) { _tempCategoryCleared[i].categories = _tempCategoryBackups[i]; } _tempCategoryCleared.Clear(); _tempCategoryBackups.Clear(); } public static void GoToNextPage(Player player) { int num = GetTotalSlots() - 1; CardsShownBefore += num; CurrentPage++; NeedsNextPage = true; MrFuntikMod.Log($"[OneCut] GoToNextPage: now page {CurrentPage}, cardsShownBefore={CardsShownBefore}"); } public static void HandleCardSelection(CardInfo selectedCard, int playerID) { RestoreTempAllowMultiple(); if (RemovableCards == null || RemovableCards.Count == 0 || (Object)(object)selectedCard == (Object)null) { MrFuntikMod.LogWarning("[OneCut] HandleCardSelection: invalid state"); return; } string cardName = selectedCard.cardName; MrFuntikMod.Log("[OneCut] HandleCardSelection: selected '" + cardName + "'"); int totalSlots = GetTotalSlots(); int count = RemovableCards.Count; int num = count - CardsShownBefore; int num2 = ((num > totalSlots) ? (totalSlots - 1) : num); int cardsShownBefore = CardsShownBefore; int num3 = CardsShownBefore + num2; int num4 = -1; for (int i = cardsShownBefore; i < num3 && i < count; i++) { CardInfo val = RemovableCards[i]; CardInfo val2 = val.sourceCard ?? val; if (val.cardName == cardName || val2.cardName == cardName) { num4 = i; MrFuntikMod.Log($"[OneCut] Found card at removable index {i}: {val.cardName}"); break; } } if (num4 < 0) { MrFuntikMod.LogWarning($"[OneCut] Could not find '{cardName}' on current page (range {cardsShownBefore}-{num3})"); return; } Player val3 = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if ((Object)(object)val3 == (Object)null) { MrFuntikMod.LogWarning($"[OneCut] Player {playerID} not found"); return; } CardInfo val4 = RemovableCards[num4]; int num5 = -1; for (int j = 0; j < val3.data.currentCards.Count; j++) { if ((Object)(object)val3.data.currentCards[j] == (Object)(object)val4) { num5 = j; break; } } if (num5 < 0) { for (int k = 0; k < val3.data.currentCards.Count; k++) { if (val3.data.currentCards[k].cardName == val4.cardName) { num5 = k; break; } } } if (num5 >= 0) { MrFuntikMod.Log($"[OneCut] Removing card at index {num5}: {val4.cardName}"); if (PhotonNetwork.OfflineMode) { RPCA_RemoveCard(playerID, num5); return; } NetworkingManager.RPC(typeof(OneCutManager), "RPCA_RemoveCard", new object[2] { playerID, num5 }); } else { MrFuntikMod.LogWarning("[OneCut] Could not find '" + val4.cardName + "' in currentCards"); } } [UnboundRPC] public static void RPCA_RemoveCard(int playerID, int cardIndex) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == playerID); if ((Object)(object)val == (Object)null) { MrFuntikMod.LogWarning($"[OneCut] Player not found: {playerID}"); return; } if (cardIndex < 0 || cardIndex >= val.data.currentCards.Count) { MrFuntikMod.LogWarning($"[OneCut] Invalid card index: {cardIndex}"); return; } string cardName = val.data.currentCards[cardIndex].cardName; MrFuntikMod.Log($"[OneCut] RPCA: Removing '{cardName}' at index {cardIndex}"); Cards.instance.RemoveCardFromPlayer(val, cardIndex, true); } public static void Reset() { RestoreTempAllowMultiple(); IsActive = false; NeedsNextPage = false; CurrentPage = 0; CardsShownBefore = 0; SessionSlotCount = 0; CurrentPlayer = null; RemovableCards = null; } } }