Decompiled source of ForseakynStudiosCards v1.0.1
FSCards.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using CardThemeLib; using FSCardsPlugin.Cards; using FSCardsPlugin.Extensions; using FSCardsPlugin.MonoBehaviours; using FSCardsPlugin.Utils; using HarmonyLib; using Microsoft.CodeAnalysis; using ModdingUtils.MonoBehaviours; using ModdingUtils.RoundsEffects; using ModsPlus; using Photon.Pun; using RarityLib.Utils; using Sonigon; using UnboundLib; using UnboundLib.Cards; using UnboundLib.Networking; using UnityEngine; using UnityEngine.UI; using WWMO.MonoBehaviours; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("FSCards")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+c62afcb943584d9da5502747ce56b7a36364efdd")] [assembly: AssemblyProduct("FSCards")] [assembly: AssemblyTitle("FSCards")] [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 FSCards.Patches { [HarmonyPatch(typeof(DeathEffect))] internal class DeathEffect_Patch { [HarmonyPostfix] [HarmonyPatch("PlayDeath")] private static void AdjustedRespawnTime(DeathEffect __instance, Color color, PlayerVelocity playerRig, Vector2 vel, int playerIDToRevive) { //IL_0013: 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) if (playerIDToRevive == -1) { return; } Player player = ((CharacterData)ExtensionMethods.GetFieldValue((object)playerRig, "data")).player; if (player.data.stats.GetAdditionalData().useNewRespawnTime) { float newRespawnTime = player.data.stats.GetAdditionalData().newRespawnTime; ExtensionMethods.SetFieldValue((object)__instance, "respawnTime", (object)newRespawnTime); ParticleSystem[] componentsInChildren = ((Component)__instance).GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem obj in componentsInChildren) { obj.playbackSpeed = 2.53f / newRespawnTime; MainModule main = obj.main; ((MainModule)(ref main)).simulationSpeed = 2.53f / newRespawnTime; } ((Component)__instance).gameObject.GetComponent<RemoveAfterSeconds>().seconds = 2f * newRespawnTime; } } } [Serializable] [HarmonyPatch(typeof(HealthHandler), "DoDamage")] internal class HealtHandlerPatchDoDamage { private static void Prefix(HealthHandler __instance, ref Vector2 damage, Vector2 position, Color blinkColor, GameObject damagingWeapon, Player damagingPlayer, bool healthRemoval, ref bool lethal, bool ignoreBlock) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0088: 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_00e1: 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) CharacterData val = (CharacterData)Traverse.Create((object)__instance).Field("data").GetValue(); Player player = val.player; if (!val.isPlaying || val.dead || __instance.isRespawning) { return; } if (player.data.stats.GetAdditionalData().firstHit) { player.data.stats.GetAdditionalData().firstHit = false; if (player.data.stats.GetAdditionalData().firstHitdmgReduction > 0f) { damage /= player.data.stats.GetAdditionalData().firstHitdmgReduction; } } if (player.data.stats.GetAdditionalData().useDmgReduction && player.data.stats.GetAdditionalData().dmgReduction > 0f) { damage /= player.data.stats.GetAdditionalData().dmgReduction; } if (lethal && val.health < ((Vector2)(ref damage)).magnitude) { _ = val.stats.GetAdditionalData().remainingMulligans; _ = 0; } } } } namespace FSCardsPlugin { internal class Assets { private static AssetBundle Bundle; public static GameObject AragornArt; public static GameObject BalrogArt; public static GameObject EarendilArt; public static GameObject FangornArt; public static GameObject FrodoArt; public static GameObject GandalfArt; public static GameObject GimliArt; public static GameObject HelmsDeepArt; public static GameObject LegolasArt; public static GameObject MithrilArt; public static GameObject MordorArt; public static GameObject NazgulArt; public static GameObject PalantirArt; public static GameObject RivendellArt; public static GameObject SauronArt; public static GameObject TheOneRingArt; public static GameObject BalrogEnergy; public static GameObject CurseOfMordor; public static GameObject MagicOrb; public static GameObject ScreenDarkness; public static GameObject WallsOfHelmsDeep; public static event Action OnFinishedLoadingAssets; public static IEnumerator LoadAssets() { string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "fscassets"); FSCards.LOGGER.LogInfo((object)("Started loading AssetsBundle from '" + text + "'")); Bundle = AssetBundle.LoadFromFile(text); if ((Object)(object)Bundle == (Object)null) { FSCards.LOGGER.LogError((object)("AssetBundle '" + text + "' not found in assembly manifest")); yield break; } AragornArt = Bundle.LoadAsset<GameObject>("C_Aragorn"); BalrogArt = Bundle.LoadAsset<GameObject>("C_Balrog"); EarendilArt = Bundle.LoadAsset<GameObject>("C_Earendil"); FangornArt = Bundle.LoadAsset<GameObject>("C_Fangorn"); FrodoArt = Bundle.LoadAsset<GameObject>("C_Frodo"); GandalfArt = Bundle.LoadAsset<GameObject>("C_Gandalf"); GimliArt = Bundle.LoadAsset<GameObject>("C_Gimli"); HelmsDeepArt = Bundle.LoadAsset<GameObject>("C_HelmsDeep"); LegolasArt = Bundle.LoadAsset<GameObject>("C_Legolas"); MithrilArt = Bundle.LoadAsset<GameObject>("C_Mithril"); MordorArt = Bundle.LoadAsset<GameObject>("C_Mordor"); NazgulArt = Bundle.LoadAsset<GameObject>("C_Nazgul"); PalantirArt = Bundle.LoadAsset<GameObject>("C_Palantir"); RivendellArt = Bundle.LoadAsset<GameObject>("C_Rivendell"); SauronArt = Bundle.LoadAsset<GameObject>("C_Sauron"); TheOneRingArt = Bundle.LoadAsset<GameObject>("C_TheOneRing"); BalrogEnergy = Bundle.LoadAsset<GameObject>("A_BalrogEnergy"); CurseOfMordor = Bundle.LoadAsset<GameObject>("A_CurseOfMordor"); MagicOrb = ((Component)Bundle.LoadAsset<GameObject>("A_MagicOrb").AddComponent<GuidedMagicOrb>()).gameObject; ScreenDarkness = ((Component)Bundle.LoadAsset<GameObject>("A_ScreenDarkness").AddComponent<ScreenDarknessEffect>()).gameObject; WallsOfHelmsDeep = Bundle.LoadAsset<GameObject>("A_WallsOfHelmsDeep"); FSCards.LOGGER.LogInfo((object)("Finished loading AssetsBundle from '" + text + "'")); Assets.OnFinishedLoadingAssets?.Invoke(); } } [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.forseakynstudios.rounds.cards", "ForseakynStudiosCards", "1.0.1")] [BepInProcess("Rounds.exe")] internal class FSCards : BaseUnityPlugin { private const string ModId = "com.forseakynstudios.rounds.cards"; private const string ModName = "ForseakynStudiosCards"; public const string Version = "1.0.1"; public const string ModInitials = "FSC"; internal static CardThemeColorType CardThemeColor; public static ManualLogSource LOGGER => ((BaseUnityPlugin)Instance).Logger; public static FSCards Instance { get; set; } private void Awake() { //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_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_0050: 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_006f: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) Instance = this; Assets.OnFinishedLoadingAssets += OnAssetsLoaded; ((MonoBehaviour)Unbound.Instance).StartCoroutine(Assets.LoadAssets()); CardThemeColor = CardThemeLib.instance.CreateOrGetType("EarthyBrown", new CardThemeColor { bgColor = new Color(0.36f, 0.25f, 0.2f), targetColor = new Color(0.58f, 0.44f, 0.3f) }); new Harmony("com.forseakynstudios.rounds.cards").PatchAll(); } private void Start() { } private void OnAssetsLoaded() { LOGGER.LogInfo((object)"Assets done loading, register cards"); RegisterPrefabs(); RegisterCards(); } private void RegisterPrefabs() { } private void RegisterCards() { CardsRegistry.RegisterCard<Aragorn>(); CardsRegistry.RegisterCard<Frodo>(); CardsRegistry.RegisterCard<Gandalf>(); CardsRegistry.RegisterCard<Legolas>(); CardsRegistry.RegisterCard<Gimli>(); CardsRegistry.RegisterCard<Sauron>(); CardsRegistry.RegisterCard<Rivendell>(); CardsRegistry.RegisterCard<Mordor>(); CardsRegistry.RegisterCard<HelmsDeep>(); CardsRegistry.RegisterCard<Fangorn>(); CardsRegistry.RegisterCard<TheOneRing>(); CardsRegistry.RegisterCard<Mithril>(); CardsRegistry.RegisterCard<Nazgul>(); CardsRegistry.RegisterCard<Palantir>(); CardsRegistry.RegisterCard<Balrog>(); CardsRegistry.RegisterCard<Earendil>(); } } } namespace FSCardsPlugin.Utils { public static class CardsRegistry { private static Dictionary<Type, CardInfo> storedCardInfo = new Dictionary<Type, CardInfo>(); public static void RegisterCard<T>() where T : CustomCard { CustomCard.BuildCard<T>((Action<CardInfo>)StoreCard<T>); } private static void StoreCard<T>(CardInfo card) where T : CustomCard { storedCardInfo.Add(typeof(T), card); } public static CardInfo GetCard<T>() where T : CustomCard { if (storedCardInfo.TryGetValue(typeof(T), out CardInfo value)) { return value; } return null; } } public static class Colors { public enum HueColorNames { Lime, Green, Aqua, Blue, Navy, Purple, Pink, Red, Orange, Yellow, White } private static Hashtable hueColourValues = new Hashtable { { HueColorNames.Lime, (object)new Color32((byte)166, (byte)254, (byte)0, byte.MaxValue) }, { HueColorNames.Green, (object)new Color32((byte)0, (byte)254, (byte)111, byte.MaxValue) }, { HueColorNames.Aqua, (object)new Color32((byte)0, (byte)201, (byte)254, byte.MaxValue) }, { HueColorNames.Blue, (object)new Color32((byte)0, (byte)122, (byte)254, byte.MaxValue) }, { HueColorNames.Navy, (object)new Color32((byte)60, (byte)0, (byte)254, byte.MaxValue) }, { HueColorNames.Purple, (object)new Color32((byte)143, (byte)0, (byte)254, byte.MaxValue) }, { HueColorNames.Pink, (object)new Color32((byte)232, (byte)0, (byte)254, byte.MaxValue) }, { HueColorNames.Red, (object)new Color32((byte)254, (byte)9, (byte)0, byte.MaxValue) }, { HueColorNames.Orange, (object)new Color32((byte)254, (byte)161, (byte)0, byte.MaxValue) }, { HueColorNames.Yellow, (object)new Color32((byte)254, (byte)224, (byte)0, byte.MaxValue) }, { HueColorNames.White, (object)new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue) } }; public static Color HueColourValue(HueColorNames color) { //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) return Color32.op_Implicit((Color32)hueColourValues[color]); } } } namespace FSCardsPlugin.MonoBehaviours { internal class BurnMono : HitSurfaceEffect { public Block block; public Player player; public CharacterData data; public Gun gun; public BoxTouchingLava_Mono hotbox; private void Awake() { player = ((Component)this).GetComponent<Player>(); block = ((Component)this).GetComponent<Block>(); data = ((Component)this).GetComponent<CharacterData>(); gun = ((Component)this).GetComponent<Gun>(); } public override void Hit(Vector2 position, Vector2 normal, Vector2 velocity) { //IL_000a: 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_007c: 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_00df: 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) //IL_0132: 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_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) GameObject val = Object.Instantiate<GameObject>(((GameObject)Resources.Load("0 cards/Demonic pact")).GetComponent<Gun>().objectsToSpawn[0].effect); val.transform.position = Vector2.op_Implicit(position); ((Object)val).hideFlags = (HideFlags)61; ((Object)val).name = "Explosion"; val.AddComponent<RemoveAfterSeconds>().seconds = 5f; ParticleSystem[] componentsInChildren = val.GetComponentsInChildren<ParticleSystem>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].startColor = new Color(1f, 0.8f, 0.1f, 1f); } ParticleSystemRenderer[] componentsInChildren2 = val.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer obj in componentsInChildren2) { ((Renderer)obj).material.color = new Color(1f, 0.8f, 0.1f, 1f); ((Renderer)obj).sharedMaterial.color = new Color(1f, 0.8f, 0.1f, 1f); } Material[] componentsInChildren3 = val.GetComponentsInChildren<Material>(); for (int k = 0; k < componentsInChildren3.Length; k++) { componentsInChildren3[k].color = new Color(1f, 0.8f, 0.1f, 1f); } foreach (Collider2D item in from uwu in Physics2D.OverlapCircleAll(position, 3f) where !Object.op_Implicit((Object)(object)((Component)uwu).gameObject.GetComponentInParent<ProjectileHit>()) && !Object.op_Implicit((Object)(object)((Component)uwu).gameObject.GetComponent<Player>()) && Object.op_Implicit((Object)(object)((Component)uwu).GetComponent<Rigidbody2D>()) select uwu) { if (item.attachedRigidbody.isKinematic || ((Component)item.attachedRigidbody).gameObject.layer == LayerMask.NameToLayer("BackgroundObject")) { continue; } if (Object.op_Implicit((Object)(object)((Component)item.attachedRigidbody).GetComponent<DamagableEvent>())) { ((Damagable)((Component)item.attachedRigidbody).GetComponent<DamagableEvent>()).CallTakeDamage(Vector2.up * 2f, Vector2.zero, (GameObject)null, (Player)null, true); continue; } if (!Object.op_Implicit((Object)(object)((Component)item.attachedRigidbody).gameObject.GetComponent<BoxTouchingLava_Mono>())) { hotbox = ((Component)item.attachedRigidbody).gameObject.AddComponent<BoxTouchingLava_Mono>(); } else { hotbox = ((Component)item.attachedRigidbody).gameObject.GetComponent<BoxTouchingLava_Mono>(); } BoxTouchingLava_Mono obj2 = hotbox; obj2.heatPercent += 0.5f; hotbox.heatPercent = Mathf.Min(hotbox.heatPercent, 3f); } } } internal class DwarvenStrength : CounterReversibleEffect { private float projectilesShot; public override CounterStatus UpdateCounter() { if (projectilesShot % 3f == 0f) { return (CounterStatus)0; } return (CounterStatus)2; } public override void UpdateEffects() { //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) ((ReversibleEffect)this).gunStatModifier.knockback_add = 10f; ((ReversibleEffect)this).gunStatModifier.damage_mult = 1.15f; ((ReversibleEffect)this).gunStatModifier.projectileColor = Colors.HueColourValue(Colors.HueColorNames.Purple); } public override void OnStart() { ((CounterReversibleEffect)this).OnStart(); projectilesShot = 0f; Gun gun = ((ReversibleEffect)this).gun; gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(OnShoot)); } public override void OnOnDestroy() { projectilesShot = 0f; Gun gun = ((ReversibleEffect)this).gun; gun.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(gun.ShootPojectileAction, new Action<GameObject>(OnShoot)); } private void OnShoot(GameObject projectile) { projectilesShot += 1f; } public override void OnApply() { } public override void Reset() { } } internal class FrodosFirstHitDmgReduction : ReversibleEffect { public override void OnStart() { Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnOnEnable() { base.stats.GetAdditionalData().firstHit = true; base.stats.GetAdditionalData().firstHitdmgReduction = 0.7f; } public override void OnOnDestroy() { Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); } public override void OnUpdate() { } public override void OnOnDisable() { base.stats.GetAdditionalData().firstHit = false; base.stats.GetAdditionalData().firstHitdmgReduction = 0f; Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); ((ReversibleEffect)this).ClearModifiers(true); } private void OnBlock(BlockTriggerType blockTriggerType) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) if ((int)blockTriggerType == 0 && base.stats.GetAdditionalData().firstHit) { base.stats.GetAdditionalData().firstHit = false; ((ReversibleEffect)this).ApplyModifiers(); } } } internal class GandalfsRebirth : CounterReversibleEffect { public override CounterStatus UpdateCounter() { if (((ReversibleEffect)this).player.data.stats.remainingRespawns == 0) { return (CounterStatus)0; } return (CounterStatus)2; } public override void UpdateEffects() { //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) ((ReversibleEffect)this).characterDataModifier.maxHealth_mult = 0.8f; ((ReversibleEffect)this).gunStatModifier.damage_mult = 3f; ((ReversibleEffect)this).gunStatModifier.numberOfProjectiles_add = 2; ((ReversibleEffect)this).gunStatModifier.spread_mult = 0.5f; ((ReversibleEffect)this).gunStatModifier.projectileColor = Colors.HueColourValue(Colors.HueColorNames.White); ((ColorEffect)ExtensionMethods.GetOrAddComponent<ReversibleColorEffect>(((Component)((ReversibleEffect)this).player).gameObject, false)).SetColor(Color.white); } public override void OnApply() { } public override void Reset() { } } internal class GuidedMagicOrb : MonoBehaviour { private MoveTransform move; private float updateDelay = 0.1f; private float startTime; private SyncProjectile sync; public int state; public bool detected; private FlickerEvent[] flicks; private PhotonView view; public RotSpring rot1; public RotSpring rot2; public float x; public float y; public float speedX; public float speedY; private void Start() { move = ((Component)this).GetComponentInParent<MoveTransform>(); flicks = ((Component)this).GetComponentsInChildren<FlickerEvent>(); view = ((Component)this).GetComponentInParent<PhotonView>(); sync = ((Component)this).GetComponentInParent<SyncProjectile>(); sync.active = true; state = 0; x = move.velocity.x; y = move.velocity.y; ResetTimer(); detected = false; } public void Destroy() { Object.Destroy((Object)(object)this); } private void ResetTimer() { startTime = Time.time; } private void Update() { //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_034b: 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_0119: 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_0165: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: 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_01aa: 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_01bc: 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_01dc: 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_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_01f8: 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_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: 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_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0232: 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_0241: Unknown result type (might be due to invalid IL or missing references) //IL_024b: 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_0265: 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) if (!(Time.time >= startTime + updateDelay) || !((Object)(object)((Component)this).gameObject.transform.parent != (Object)null)) { return; } ResetTimer(); if (state == 0) { state = 1; move.velocity.z = 0f; MoveTransform val = move; val.velocity.x = val.velocity.x * 1f; MoveTransform val2 = move; val2.velocity.y = val2.velocity.y * 1f; } else if (state == 1) { Player closestPlayer = PlayerManager.instance.GetClosestPlayer(Vector2.op_Implicit(((Component)this).transform.position), true); Player ownPlayer = ((Component)this).GetComponentInParent<ProjectileHit>().ownPlayer; if (Object.op_Implicit((Object)(object)closestPlayer) && (Object)(object)closestPlayer != (Object)(object)ownPlayer && !closestPlayer.data.dead && ((Component)closestPlayer.data).gameObject.activeInHierarchy) { detected = true; } bool flag = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)closestPlayer).transform.position)) <= 20f; if (detected && flag) { updateDelay = 0.2f; state = 2; Vector3 val3 = ((Component)closestPlayer).transform.position + ((Component)this).transform.right * move.selectedSpread * Vector3.Distance(((Component)this).transform.position, ((Component)closestPlayer).transform.position); float num = Vector3.Angle(((Component)this).transform.root.forward, val3 - ((Component)this).transform.position); MoveTransform obj = move; obj.velocity -= move.velocity * num; MoveTransform obj2 = move; obj2.velocity -= move.velocity; MoveTransform obj3 = move; obj3.velocity += Vector3.ClampMagnitude(val3 - ((Component)this).transform.position, 900f) * TimeHandler.deltaTime * ((Vector3)(ref move.localForce)).magnitude; move.velocity.z = 0f; speedX = move.velocity.x; speedY = move.velocity.y; MoveTransform obj4 = move; obj4.simulateGravity--; MoveTransform val4 = move; val4.velocity.x = val4.velocity.x * 0.01f; MoveTransform val5 = move; val5.velocity.y = val5.velocity.y * 0.01f; for (int i = 0; i < flicks.Length; i++) { flicks[i].isOn = true; } } } else if (state == 2) { new Vector3(speedX, speedY); move.velocity.x = speedX * 9f; move.velocity.y = speedY * 9f; move.velocity.z = 0f; state = 3; } else if (state == 3) { updateDelay = 0.3f; move.simulateGravity = 1; move.velocity.z = 0f; state = 1; detected = false; } } } internal class LegolasPowerShot : CounterReversibleEffect { public override void OnApply() { } public override void Reset() { } public override CounterStatus UpdateCounter() { if ((int)Traverse.Create((object)((ReversibleEffect)this).gunAmmo).Field("currentAmmo").GetValue() == 1) { return (CounterStatus)0; } return (CounterStatus)2; } public override void UpdateEffects() { //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) ((ReversibleEffect)this).gunStatModifier.gravity_mult = 0f; ((ReversibleEffect)this).gunStatModifier.projectileSpeed_add = 15f; ((ReversibleEffect)this).gunStatModifier.projectileColor = Colors.HueColourValue(Colors.HueColorNames.Lime); } } internal class MordorsPoison : RayHitEffect { public float time = 3f; public float interval = 0.3f; private void Start() { if ((Object)(object)((Component)this).GetComponentInParent<ProjectileHit>() != (Object)null) { ((Component)this).GetComponentInParent<ProjectileHit>().bulletCanDealDeamage = false; } } public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_0087: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hit.transform)) { ((Component)((Component)this).transform.root).GetComponentsInChildren<MordorsPoison>(); ProjectileHit componentInParent = ((Component)this).GetComponentInParent<ProjectileHit>(); DamageOverTime component = ((Component)hit.transform).GetComponent<DamageOverTime>(); if (Object.op_Implicit((Object)(object)component)) { component.TakeDamageOverTime(Vector2.op_Implicit(componentInParent.damage * ((Component)this).transform.forward), Vector2.op_Implicit(((Component)this).transform.position), time, interval, new Color(139f, 0.3f, 0f, 1f), (SoundEvent)null, ((Component)this).GetComponentInParent<ProjectileHit>().ownWeapon, ((Component)this).GetComponentInParent<ProjectileHit>().ownPlayer, true); } return (HasToReturn)1; } return (HasToReturn)1; } public void Destroy() { Object.Destroy((Object)(object)this); } } internal class RivendellsHealing : MonoBehaviour { private Player player; private float startTime = Time.time; private readonly float updateDelay = 10.5f; private void Start() { player = ((Component)this).GetComponent<Player>(); } public void Update() { if (Time.time >= startTime + updateDelay) { ResetTimer(); player.data.healthHandler.Heal(player.data.maxHealth * 0.25f); } } private void ResetTimer() { startTime = Time.time; } } internal class ScreenDarknessEffect : MonoBehaviour { public Image image; public Transform target; private const float DARKNESS_RADIUS_MAX = 2f; private const float DARKNESS_RADIUS = 0.2f; private const float DARKNESS_SOFTNESS = 0.2f; private const float DARKNESS_ASPECTRATIO = 1.77f; private float Radius { get { return ((Graphic)image).material.GetFloat("_Radius"); } set { ((Graphic)image).material.SetFloat("_Radius", value); } } private Vector4 PlayerPos { get { //IL_0010: Unknown result type (might be due to invalid IL or missing references) return ((Graphic)image).material.GetVector("_PlayerPos"); } set { //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((Graphic)image).material.SetVector("_PlayerPos", value); } } private void Start() { image = ((Component)this).GetComponentInChildren<Image>(); ((Graphic)image).material.SetFloat("_Radius", 0.2f); ((Graphic)image).material.SetFloat("_Softness", 0.2f); ((Graphic)image).material.SetFloat("_AspectRatio", 1.77f); ((Graphic)image).raycastTarget = false; } public ScreenDarknessEffect Initialize(float rampUpTime, Transform target) { ((MonoBehaviour)this).StopAllCoroutines(); ((MonoBehaviour)this).StartCoroutine(DoShow(rampUpTime)); this.target = target; return this; } private void Update() { //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_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_002b: 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) if (Object.op_Implicit((Object)(object)target)) { Vector3 val = Camera.main.WorldToViewportPoint(target.position); PlayerPos = new Vector4(val.x, val.y, 0f, 0f); } } public void Remove(float duration = 1f) { ((MonoBehaviour)this).StopAllCoroutines(); ((MonoBehaviour)this).StartCoroutine(DoRemove(duration)); } private IEnumerator DoShow(float duration) { Radius = 2f; float time = Time.time; while (Time.time - time <= duration) { float num = 1f - (Time.time - time) / duration; Radius = 0.2f * num; yield return null; } Radius = 0.2f; } private IEnumerator DoRemove(float duration) { Radius = 0.2f; float time = Time.time; while (Time.time - time <= duration) { float num = (Time.time - time) / duration; Radius = 2f * num; yield return null; } Radius = 2f; Object.Destroy((Object)(object)((Component)this).gameObject); } } internal class ShakeEffect : ReversibleEffect { private Player playerToModify; internal float xshakemag = 0.04f; internal float yshakemag = 0.02f; private readonly Random rng = new Random(); public override void OnAwake() { playerToModify = ((Component)this).gameObject.GetComponent<Player>(); } public override void OnStart() { } public override void OnUpdate() { //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_0048: Unknown result type (might be due to invalid IL or missing references) float num = (float)Extensions.NextGaussianDouble(rng); float num2 = (float)Extensions.NextGaussianDouble(rng); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(xshakemag * num, yshakemag * num2, 0f); Transform transform = ((Component)playerToModify).transform; transform.position += val; } public override void OnOnDestroy() { } public void SetXMag(float xmag) { xshakemag = xmag; } public void SetYMag(float ymag) { yshakemag = ymag; } } internal class TheOneRingsInvisibility : ReversibleEffect { private float duration; private bool ignoreWalls; private float regeneration; public override void OnStart() { ignoreWalls = base.gun.ignoreWalls; regeneration = base.health.regeneration; ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); } public override void OnOnDestroy() { base.gun.ignoreWalls = ignoreWalls; base.health.regeneration = regeneration; Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); } public override void OnUpdate() { if (!(duration <= 0f)) { duration -= TimeHandler.deltaTime; return; } duration = 0f; base.gun.ignoreWalls = ignoreWalls; base.health.regeneration = regeneration; ((ReversibleEffect)this).ClearModifiers(true); Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)base.player).gameObject, false)); ((Component)((Component)base.player).GetComponentInChildren<CharacterCreatorItemEquipper>()).gameObject.SetActive(true); } public override void OnOnDisable() { duration = 0f; base.gun.ignoreWalls = ignoreWalls; base.health.regeneration = regeneration; ((ReversibleEffect)this).ClearModifiers(true); Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)base.player).gameObject, false)); ((Component)((Component)base.player).GetComponentInChildren<CharacterCreatorItemEquipper>()).gameObject.SetActive(true); } private void OnBlock(BlockTriggerType blockTriggerType) { //IL_0000: 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 ((int)blockTriggerType == 0) { if (duration <= 0f) { base.gun.ignoreWalls = true; base.health.regeneration = -5f; ((ReversibleEffect)this).ApplyModifiers(); } duration = 5f; ((Component)base.player).gameObject.AddComponent<ColorEffect>().SetColor(Color.clear); ((Component)((Component)base.player).GetComponentInChildren<CharacterCreatorItemEquipper>()).gameObject.SetActive(false); } } } } namespace FSCardsPlugin.Extensions { [Serializable] public class CharacterStatModifiersAdditionalData { public bool useNewRespawnTime; public float newRespawnTime; public bool firstHit; public float firstHitdmgReduction; public int remainingMulligans; public bool useDmgReduction; public float dmgReduction; public CharacterStatModifiersAdditionalData() { useNewRespawnTime = false; newRespawnTime = 0f; firstHit = false; firstHitdmgReduction = 0f; remainingMulligans = 0; useDmgReduction = false; dmgReduction = 0f; } } public static class CharacterStatModifiersExtension { public static readonly ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData> data = new ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData>(); public static CharacterStatModifiersAdditionalData GetAdditionalData(this CharacterStatModifiers statModifiers) { return data.GetOrCreateValue(statModifiers); } public static void AddData(this CharacterStatModifiers statModifiers, CharacterStatModifiersAdditionalData value) { try { data.Add(statModifiers, value); } catch (Exception) { } } } [HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")] internal class CharacterStatModifiersPatchResetStats { private static void Prefix(CharacterStatModifiers __instance) { __instance.GetAdditionalData().useNewRespawnTime = false; __instance.GetAdditionalData().newRespawnTime = 0f; __instance.GetAdditionalData().firstHit = false; __instance.GetAdditionalData().firstHitdmgReduction = 0f; __instance.GetAdditionalData().remainingMulligans = 0; __instance.GetAdditionalData().useDmgReduction = false; __instance.GetAdditionalData().dmgReduction = 0f; } } [Serializable] public class GunAdditionalData { } public static class GunExtension { [HarmonyPatch(typeof(Gun), "ResetStats")] private class GunPatchResetStats { private static void Prefix(Gun __instance) { } } public static readonly ConditionalWeakTable<Gun, GunAdditionalData> data = new ConditionalWeakTable<Gun, GunAdditionalData>(); public static GunAdditionalData GetAdditionalData(this Gun gun) { return data.GetOrCreateValue(gun); } public static void AddData(this Gun gun, GunAdditionalData value) { try { data.Add(gun, value); } catch (Exception) { } } } internal static class PlayerManagerExtensions { public static Player GetPlayerWithID(this PlayerManager instance, int playerID) { return ((IEnumerable<Player>)instance.players).FirstOrDefault((Func<Player, bool>)((Player p) => p.playerID == playerID)); } public static void ForEachPlayer(this PlayerManager instance, Action<Player> action) { foreach (Player player in instance.players) { action(player); } } } } namespace FSCardsPlugin.Cards { internal class Aragorn : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //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_00b1: 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_00c7: 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_00cf: Expected O, but got Unknown //IL_00d1: 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_00dd: 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_00f3: 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_00fb: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Aragorn"; val.Description = "<b><color=#8b4513>[Accept no defeat]</color><b>\nAragorn's leadership and survivability"; val.ModName = "FSC"; val.Art = Assets.AragornArt; val.Rarity = (Rarity)1; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Health", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "DMG", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Lifesteal", amount = "+5%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Projectile speed", amount = "-5%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.1f; statModifiers.lifeSteal = 1.1f; gun.damage = 1.1f; gun.projectileSpeed = 0.95f; } protected override void Added(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) HealthBasedEffect obj = ((Component)player).gameObject.AddComponent<HealthBasedEffect>(); ((ReversibleEffect)obj).gunStatModifier.attackSpeed_mult = 1.5f; ((ReversibleEffect)obj).characterStatModifiersModifier.movementSpeed_mult = 1.25f; obj.SetPercThresholdMax(0.5f); obj.SetColor(Color.red); } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class Balrog : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Balrog"; val.Description = "<b><color=#8b4513>[Balrog Energy]</color><b>\nThe flame of Udûn"; val.ModName = "FSC"; val.Art = Assets.BalrogArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "DMG", amount = "200%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movement", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_0070: Expected O, but got Unknown //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_0087: 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_009e: Expected O, but got Unknown cardInfo.allowMultiple = false; gun.damage = 2f; gun.projectileColor = new Color(0.5f, 0f, 0f, 1f); statModifiers.movementSpeed = 0.85f; ObjectsToSpawn val = new ObjectsToSpawn { effect = Resources.Load<GameObject>("A_Explosion"), scaleStacks = true, scaleStackM = 0.7f, scaleFromDamage = 0.5f }; ObjectsToSpawn val2 = new ObjectsToSpawn { effect = Assets.BalrogEnergy, scaleStacks = true, scaleStackM = 0.7f, scaleFromDamage = 0.5f }; gun.objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[2] { val, val2 }; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class Earendil : CustomEffectCard<DarknessEffect> { public override CardDetails<DarknessEffect> Details { get { //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown CardDetails<DarknessEffect> val = new CardDetails<DarknessEffect>(); val.Title = "Light of Eärendil"; val.Description = "<b><color=#8b4513>[Eärendil's Light]</color><b>\nGaladriel's gift to Frodo"; val.ModName = "FSC"; val.Art = Assets.EarendilArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Projectile speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Projectile size", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; val.OwnerOnly = true; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.projectileSpeed = 1.5f; gun.projectileSize = 0.8f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class DarknessEffect : CardEffect { private readonly float duration = 5f; public override void OnBulletHit(GameObject projectile, HitInfo hit) { Player componentInChildren = ((Component)hit.collider).gameObject.GetComponentInChildren<Player>(); if ((Object)(object)componentInChildren != (Object)null && !componentInChildren.data.dead) { NetworkingManager.RPC(typeof(DarknessEffect), "RPC_ApplyDarkness", new object[2] { componentInChildren.playerID, 5f }); } } [UnboundRPC] private static void RPC_ApplyDarkness(int playerId, float duration) { Player playerWithID = PlayerManager.instance.GetPlayerWithID(playerId); if (playerWithID.data.view.IsMine) { ((MonoBehaviour)Unbound.Instance).StartCoroutine(DoDarknessOn(playerWithID, duration)); } } private static IEnumerator DoDarknessOn(Player target, float duration) { Player target2 = target; ScreenDarknessEffect screenDarkness = Object.Instantiate<GameObject>(Assets.ScreenDarkness, ((Component)Unbound.Instance.canvas).transform).GetComponent<ScreenDarknessEffect>().Initialize(1f, ((Component)target2).transform); float startTime = Time.time; yield return (object)new WaitUntil((Func<bool>)(() => Time.time - startTime >= duration || target2.data.dead)); ((Component)screenDarkness).GetComponent<ScreenDarknessEffect>().Remove(2f); } } internal class Fangorn : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //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_00b1: 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_00c7: 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_00cf: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Forest of Fangorn"; val.Description = "<b><color=#8b4513>[Density of the forest]</color><b>\nThe mysterious power of Fangorn"; val.ModName = "FSC"; val.Art = Assets.FangornArt; val.Rarity = (Rarity)1; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Movement", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "DMG", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_003a: 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) cardInfo.allowMultiple = false; statModifiers.health = 1.15f; statModifiers.movementSpeed = 1.15f; gun.slow = 0.75f; gun.projectileColor = new Color(0f, 255f, 255f); gun.damage = 0.9f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class Frodo : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //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_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) //IL_00bc: 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_00c4: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Frodo"; val.Description = "<b><color=#8b4513>[Frodo's willpower]</color><b>\nAquire Frodo's ability to continu,\neven under pressure"; val.ModName = "FSC"; val.Art = Assets.FrodoArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Block cooldown", amount = "-50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Hobbit", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.cdMultiplier = 0.8f; statModifiers.sizeMultiplier = 0.5f; statModifiers.health = 0.8f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<FrodosFirstHitDmgReduction>(((Component)player).gameObject, false); } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<FrodosFirstHitDmgReduction>(((Component)player).gameObject, false)); } } internal class Gandalf : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Gandalf"; val.Description = "<b><color=#8b4513>[Grey and white]</color><b>\nGandalf's wizardry"; val.ModName = "FSC"; val.Art = Assets.GandalfArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Projectiles", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.numberOfProjectiles = 1; statModifiers.respawns = 1; gun.reloadTime = 1.15f; gun.spread = 0.15f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<GandalfsRebirth>(((Component)player).gameObject, false); characterStats.GetAdditionalData().useNewRespawnTime = true; characterStats.GetAdditionalData().newRespawnTime = 0.5f; } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<GandalfsRebirth>(((Component)player).gameObject, false)); characterStats.GetAdditionalData().useNewRespawnTime = false; characterStats.GetAdditionalData().newRespawnTime = 0f; } } internal class Gimli : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //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_00b1: 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_00c7: 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_00cf: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Gimli"; val.Description = "<b><color=#8b4513>[Dwarven strength]</color><b>\nGimli's brute strength"; val.ModName = "FSC"; val.Art = Assets.GimliArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "DMG", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movement", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.damage = 1.25f; statModifiers.health = 1.15f; statModifiers.movementSpeed = 0.85f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<DwarvenStrength>(((Component)player).gameObject, false); } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<DwarvenStrength>(((Component)player).gameObject, false)); } } internal class HelmsDeep : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //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_00b1: 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_00c7: 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_00cf: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Helm's Deep"; val.Description = "<b><color=#8b4513>[Walls of Helm's Deep]</color></b>\nThe defence force of Helm's Deep"; val.ModName = "FSC"; val.Art = Assets.HelmsDeepArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Block cooldown", amount = "-20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block force", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Projectile speed", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.cdMultiplier = 0.8f; block.forceToAdd = 1.5f; gun.projectileSpeed = 0.9f; statModifiers.AddObjectToPlayer = Assets.WallsOfHelmsDeep; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class Legolas : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //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_00b1: 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_00c7: 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_00cf: Expected O, but got Unknown //IL_00d1: 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_00dd: 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_00f3: 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_00fb: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Legolas"; val.Description = "<b><color=#8b4513>[Elven Eyesight]</color></b>\nLegolas's movement speed and precision"; val.ModName = "FSC"; val.Art = Assets.LegolasArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Movement", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Jump", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-30%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.movementSpeed = 1.2f; statModifiers.numberOfJumps = 1; gun.attackSpeed = 0.8f; statModifiers.health = 0.7f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<LegolasPowerShot>(((Component)player).gameObject, false); } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<LegolasPowerShot>(((Component)player).gameObject, false)); } } internal class Mithril : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Mithril Armor"; val.Description = "<b><color=#8b4513>[Mithril]</color></b>\nFrodo's indestructible armor"; val.ModName = "FSC"; val.Art = Assets.MithrilArt; val.Rarity = (Rarity)1; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movement", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.5f; statModifiers.movementSpeed = 0.85f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.GetAdditionalData().useDmgReduction = true; characterStats.GetAdditionalData().dmgReduction = 0.9f; } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { characterStats.GetAdditionalData().useDmgReduction = false; characterStats.GetAdditionalData().dmgReduction = 0f; } } internal class Mordor : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Mordor's Shadow"; val.Description = "<b><color=#8b4513>[Curse of Mordor]</color></b>\nThe darkness of Mordor"; val.ModName = "FSC"; val.Art = Assets.MordorArt; val.Rarity = (Rarity)1; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "DMG", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Movement", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_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_0048: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown cardInfo.allowMultiple = false; gun.damage = 1.2f; gun.projectileColor = new Color(139f, 0f, 0f); statModifiers.movementSpeed = 0.85f; ObjectsToSpawn val = new ObjectsToSpawn { AddToProjectile = Assets.CurseOfMordor, scaleStacks = true, scaleStackM = 0.8f, scaleFromDamage = 1f }; gun.objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { val }; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class Nazgul : CustomEffectCard<NazgulsFear> { public override CardDetails<NazgulsFear> Details { get { //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown CardDetails<NazgulsFear> val = new CardDetails<NazgulsFear>(); val.Title = "Nazgûl's Fear"; val.Description = "<b><color=#8b4513>[The terror of Nazgûl]</color></b>\nThe terrifying presence of the Nazgûl"; val.ModName = "FSC"; val.Art = Assets.NazgulArt; val.Rarity = (Rarity)1; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Attack", amount = "-10%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.attackSpeed = 1.1f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class NazgulsFear : CardEffect { private float shakeDuration = 2f; public override void OnUpgradeCard() { shakeDuration += 1f; } public override IEnumerator OnBulletHitCoroutine(GameObject projectile, HitInfo hit) { Player componentInChildren = ((Component)hit.collider).gameObject.GetComponentInChildren<Player>(); if (!((Object)(object)componentInChildren == (Object)null)) { componentInChildren.data.stunHandler.AddStun(0.5f); ShakeEffect shakeeffect = ((Component)componentInChildren).gameObject.AddComponent<ShakeEffect>(); yield return (object)new WaitForSeconds(shakeDuration); Object.Destroy((Object)(object)shakeeffect); } } } internal class Palantir : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_0038: 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_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_0062: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_008e: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Palantír's Vision"; val.Description = "<b><color=#8b4513>[Power of the Palantír]</color></b>\nThe predictive power of the Palantír"; val.ModName = "FSC"; val.Art = Assets.PalantirArt; val.Rarity = RarityUtils.GetRarity("Legendary"); val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "DMG", amount = "-10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Projectile speed", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //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_0043: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown cardInfo.allowMultiple = false; gun.gravity = 0f; gun.destroyBulletAfter = 0f; gun.damage = 0.9f; gun.projectileSpeed = 0.7f; ObjectsToSpawn val = new ObjectsToSpawn { AddToProjectile = Assets.MagicOrb, scaleStacks = false, scaleStackM = 0.5f, scaleFromDamage = 0f }; gun.objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { val }; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class Rivendell : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Rivendell's Rest"; val.Description = "<b><color=#8b4513>[Rivendell's Blessing]</color></b>\nThe healing force of Rivendell"; val.ModName = "FSC"; val.Art = Assets.RivendellArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.2f; gun.reloadTime = 0.85f; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<RivendellsHealing>(((Component)player).gameObject, false); } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<RivendellsHealing>(((Component)player).gameObject, false)); } } internal class Sauron : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_0038: 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_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_0062: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_008e: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //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_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) //IL_00d0: 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_00d8: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Sauron"; val.Description = "<b><color=#8b4513>[Eye of Sauron]</color></b>\nPure destruction, but with a price"; val.ModName = "FSC"; val.Art = Assets.SauronArt; val.Rarity = RarityUtils.GetRarity("Legendary"); val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "DMG", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown cardInfo.allowMultiple = false; gun.damage = 2f; gun.projectileColor = new Color(0.5f, 0f, 0f, 1f); statModifiers.health = 0.8f; gun.reloadTime = 1.2f; ObjectsToSpawn val = new ObjectsToSpawn { effect = Resources.Load<GameObject>("A_Explosion"), scaleStacks = true, scaleStackM = 0.7f, scaleFromDamage = 0.5f }; gun.objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { val }; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0017: 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) InConeEffect orAddComponent = ExtensionMethods.GetOrAddComponent<InConeEffect>(((Component)player).gameObject, false); orAddComponent.SetCenterRay(new Vector2(1f, 0f)); orAddComponent.SetOtherColor(new Color(0.5f, 0.2f, 0f, 1f)); orAddComponent.SetNeedsLineOfSight(true); orAddComponent.SetApplyToSelf(false); orAddComponent.SetApplyToOthers(true); orAddComponent.SetCheckEnemiesOnly(true); orAddComponent.SetOtherEffectFunc((Func<Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, List<MonoBehaviour>>)EyeOfSauron); } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } private List<MonoBehaviour> EyeOfSauron(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { List<MonoBehaviour> list = new List<MonoBehaviour>(); ReversibleEffect val = ((Component)player).gameObject.AddComponent<ReversibleEffect>(); float num = 0.2f; float num2 = 0.3f; float regeneration = -5f; val.characterStatModifiersModifier.movementSpeed_mult = Mathf.Pow(1f - num, 1f); val.characterStatModifiersModifier.jump_mult = Mathf.Pow(1f - num2, 1f); val.health.regeneration = regeneration; list.Add((MonoBehaviour)(object)val); ShakeEffect item = ((Component)player).gameObject.AddComponent<ShakeEffect>(); list.Add((MonoBehaviour)(object)item); return list; } } internal class TemplateCard : SimpleCard { public override CardDetails Details { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_003a: 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_0052: 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_0064: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //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) //IL_0085: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Title"; val.Description = "<b><color=#8b4513>[Template]</color><b>\nMy template card"; val.ModName = "FSC"; val.Art = Assets.SauronArt; val.Rarity = (Rarity)2; val.Theme = FSCards.CardThemeColor; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Stat", amount = "Amount", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Stat", amount = "Amount", simepleAmount = (SimpleAmount)0 } }; return val; } } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; } protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } internal class TheOneRing : CustomEffectCard<InvisibilityEffect> { public override CardDetails<InvisibilityEffect> Details { get { //IL_0038: 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_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_0062: 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_007a: Unknown result type (might be due t