Decompiled source of Flairs Cards v0.2.0
FlairsCards.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using ClassesManagerReborn; using ClassesManagerReborn.Util; using FC.Extensions; using FlairsCards.Cards; using FlairsCards.MonoBehaviours; using FlairsCards.Monobehaviours; using FlairsCards.Utilities; using HarmonyLib; using Jotunn.Utils; using Microsoft.CodeAnalysis; using ModdingUtils.Utils; using ModsPlus; using PSA.Extensions; using Photon.Pun; using RarityLib.Utils; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnityEngine; using WillsWackyManagers.Utils; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("FlairsCards")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+99da676f7ffa247b3aabc4cb3649ec1999a29e06")] [assembly: AssemblyProduct("FlairsCards")] [assembly: AssemblyTitle("FlairsCards")] [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; } } } public class SpeedOnBlockEffect : CardEffect { public override void OnBlockRecharge() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown StatManager.Apply(((CardEffect)this).player, new StatChanges { MovementSpeed = 1.075f }); } } namespace FC.Extensions { [Serializable] public class CharacterStatModifiersAdditionalData { public int curses; public int luck; public bool curseAverse = false; public bool overCharged = false; public CharacterStatModifiersAdditionalData() { curses = 0; luck = 0; curseAverse = false; overCharged = false; } } 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().curses = 0; __instance.GetAdditionalData().luck = 0; __instance.GetAdditionalData().curseAverse = false; __instance.GetAdditionalData().overCharged = false; } } } namespace FlairsCards { public static class Config { public const bool isDebugBuild = false; } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Flair.Mod.FlairsCards", "Flairs Cards", "0.2.0")] [BepInProcess("Rounds.exe")] public class FlairsCards : BaseUnityPlugin { private const string ModId = "com.Flair.Mod.FlairsCards"; private const string ModName = "Flairs Cards"; public const string Version = "0.2.0"; public const string ModInitials = "FC"; public const string CursedModInitials = "FC Curse"; private static readonly AssetBundle Bundle = AssetUtils.LoadAssetBundleFromResources("cardbundle", typeof(FlairsCards).Assembly); public static GameObject CardArtAccursed = Bundle.LoadAsset<GameObject>("C_ACCURSED"); public static GameObject CardArtCursedDraw = Bundle.LoadAsset<GameObject>("C_CURSEDDRAW"); public static GameObject CardArtFallenAngel = Bundle.LoadAsset<GameObject>("C_FALLENANGEL"); public static GameObject CardArtCondemnation = Bundle.LoadAsset<GameObject>("C_PLAGUEBEARER"); public static GameObject CardArtPrayer = Bundle.LoadAsset<GameObject>("C_PRAYER"); public static GameObject CardArtUnholyCurse = Bundle.LoadAsset<GameObject>("C_UNHOLYCURSE"); public static GameObject CardArtUnluckySouls = Bundle.LoadAsset<GameObject>("C_UNLUCKYSOULS"); public static GameObject CardArtBlocker = Bundle.LoadAsset<GameObject>("C_BLOCKER"); public static GameObject CardArtControlFreak = Bundle.LoadAsset<GameObject>("C_CONTROLFREAK"); public static GameObject CardArtOvercharged = Bundle.LoadAsset<GameObject>("C_OVERCHARGED"); public static GameObject CardArtOverloading = Bundle.LoadAsset<GameObject>("C_OVERLOADING"); public static GameObject CardArtRewind = Bundle.LoadAsset<GameObject>("C_REWIND"); public static GameObject CardArtSelfSacrifice = Bundle.LoadAsset<GameObject>("C_SELFSACRIFICE"); public static GameObject CardArtTerminalVelocity = Bundle.LoadAsset<GameObject>("C_TERMINALVELOCITY"); public static GameObject CardArtRoulette = Bundle.LoadAsset<GameObject>("C_BLACKJACK"); public static GameObject CardArtCoinflip = Bundle.LoadAsset<GameObject>("C_COINFLIP"); public static GameObject CardArtCurseAverse = Bundle.LoadAsset<GameObject>("C_CURSEAVERSE"); public static GameObject CardArtGambler = Bundle.LoadAsset<GameObject>("C_GAMBLER"); public static GameObject CardArtLuckyBuff = Bundle.LoadAsset<GameObject>("C_LUCKYBUFF"); public static GameObject CardArtNaturalLuck = Bundle.LoadAsset<GameObject>("C_NATURALLUCK"); public static GameObject CardArtNeutral = Bundle.LoadAsset<GameObject>("C_NEUTRAL"); public static GameObject CardArtWildcard = Bundle.LoadAsset<GameObject>("C_WILDCARD"); public static GameObject CardArtCannonball = Bundle.LoadAsset<GameObject>("C_CANNONBALL"); public static GameObject CardArtArrogance = Bundle.LoadAsset<GameObject>("C_ARROGANCE"); public static GameObject CardArtKinghood = Bundle.LoadAsset<GameObject>("C_KINGHOOD"); public static GameObject CardArtPersonalBodyguard = Bundle.LoadAsset<GameObject>("C_PERSONALBODYGUARD"); public static GameObject CardArtRoyalty = Bundle.LoadAsset<GameObject>("C_ROYALTY"); public static GameObject CardArtTaxCut = Bundle.LoadAsset<GameObject>("C_TAXCUT"); public static GameObject CardArtAdrenaline = Bundle.LoadAsset<GameObject>("C_ADRENALINE"); public static GameObject CardArtCantTouchThis = Bundle.LoadAsset<GameObject>("C_CANTTOUCHTHIS"); public static GameObject CardArtEnergyConverter = Bundle.LoadAsset<GameObject>("C_ENERGYCONVERTER"); public static GameObject CardArtEnergyDrink = Bundle.LoadAsset<GameObject>("C_ENERGYDRINK"); public static GameObject CardArtSpeedster = Bundle.LoadAsset<GameObject>("C_SPEEDSTER"); public static GameObject CardArtSupersonicCannon = Bundle.LoadAsset<GameObject>("C_SUPERSONICCANNON"); public static FlairsCards? Instance { get; private set; } private void Awake() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) RarityUtils.AddRarity("CommonClass", 1.5f, new Color(0.0978f, 0.1088f, 0.1321f), new Color(0.0978f, 0.1088f, 0.1321f)); RarityUtils.AddRarity("UncommonClass", 0.8f, new Color(0.1745f, 0.6782f, 1f), new Color(0.1934f, 0.3915f, 0.5189f)); RarityUtils.AddRarity("RareClass", 0.3f, new Color(1f, 0.1765f, 0.7567f), new Color(0.5283f, 0.1969f, 0.4321f)); new Harmony("com.Flair.Mod.FlairsCards").PatchAll(); } private void Start() { Instance = this; CustomCard.BuildCard<Cannonball>(); CustomCard.BuildCard<BattleScarred>((Action<CardInfo>)delegate(CardInfo cardInfo) { CurseManager.instance.RegisterCurse(cardInfo); }); CustomCard.BuildCard<BlindingSpeed>((Action<CardInfo>)delegate(CardInfo cardInfo) { CurseManager.instance.RegisterCurse(cardInfo); }); CustomCard.BuildCard<BucklingPressure>((Action<CardInfo>)delegate(CardInfo cardInfo) { CurseManager.instance.RegisterCurse(cardInfo); }); CustomCard.BuildCard<ClumsyFingers>((Action<CardInfo>)delegate(CardInfo cardInfo) { CurseManager.instance.RegisterCurse(cardInfo); }); CustomCard.BuildCard<Diseased>((Action<CardInfo>)delegate(CardInfo cardInfo) { CurseManager.instance.RegisterCurse(cardInfo); }); CustomCard.BuildCard<RandomDebuff>((Action<CardInfo>)delegate(CardInfo cardInfo) { CurseManager.instance.RegisterCurse(cardInfo); }); CustomCard.BuildCard<WeakenedWill>((Action<CardInfo>)delegate(CardInfo cardInfo) { CurseManager.instance.RegisterCurse(cardInfo); }); CustomCard.BuildCard<Accursed>((Action<CardInfo>)delegate(CardInfo card) { Accursed.Card = card; }); CustomCard.BuildCard<CursedDraw>((Action<CardInfo>)delegate(CardInfo card) { CursedDraw.Card = card; }); CustomCard.BuildCard<FallenAngel>((Action<CardInfo>)delegate(CardInfo card) { FallenAngel.Card = card; }); CustomCard.BuildCard<Condemnation>((Action<CardInfo>)delegate(CardInfo card) { Condemnation.Card = card; }); CustomCard.BuildCard<Prayer>((Action<CardInfo>)delegate(CardInfo card) { Prayer.Card = card; }); CustomCard.BuildCard<UnholyCurse>((Action<CardInfo>)delegate(CardInfo card) { UnholyCurse.Card = card; }); CustomCard.BuildCard<UnluckySouls>((Action<CardInfo>)delegate(CardInfo card) { UnluckySouls.Card = card; }); CustomCard.BuildCard<Blocker>((Action<CardInfo>)delegate(CardInfo card) { Blocker.Card = card; }); CustomCard.BuildCard<ControlFreak>((Action<CardInfo>)delegate(CardInfo card) { ControlFreak.Card = card; }); CustomCard.BuildCard<Overcharged>((Action<CardInfo>)delegate(CardInfo card) { Overcharged.Card = card; }); CustomCard.BuildCard<Overloading>((Action<CardInfo>)delegate(CardInfo card) { Overloading.Card = card; }); CustomCard.BuildCard<Rewind>((Action<CardInfo>)delegate(CardInfo card) { Rewind.Card = card; }); CustomCard.BuildCard<SelfSacrifice>((Action<CardInfo>)delegate(CardInfo card) { SelfSacrifice.Card = card; }); CustomCard.BuildCard<TerminalVelocity>((Action<CardInfo>)delegate(CardInfo card) { TerminalVelocity.Card = card; }); CustomCard.BuildCard<Coinflip>((Action<CardInfo>)delegate(CardInfo card) { Coinflip.Card = card; }); CustomCard.BuildCard<CurseAverse>((Action<CardInfo>)delegate(CardInfo card) { CurseAverse.Card = card; }); CustomCard.BuildCard<Gambler>((Action<CardInfo>)delegate(CardInfo card) { Gambler.Card = card; }); CustomCard.BuildCard<LuckyBuff>((Action<CardInfo>)delegate(CardInfo card) { LuckyBuff.Card = card; }); CustomCard.BuildCard<NaturalLuck>((Action<CardInfo>)delegate(CardInfo card) { NaturalLuck.Card = card; }); CustomCard.BuildCard<Neutral>((Action<CardInfo>)delegate(CardInfo card) { Neutral.Card = card; }); CustomCard.BuildCard<Wildcard>((Action<CardInfo>)delegate(CardInfo card) { Wildcard.Card = card; }); CustomCard.BuildCard<Arrogance>((Action<CardInfo>)delegate(CardInfo card) { Arrogance.Card = card; }); CustomCard.BuildCard<PersonalBodyguard>((Action<CardInfo>)delegate(CardInfo card) { PersonalBodyguard.Card = card; }); CustomCard.BuildCard<Revenge>((Action<CardInfo>)delegate(CardInfo card) { Revenge.Card = card; }); CustomCard.BuildCard<Royalty>((Action<CardInfo>)delegate(CardInfo card) { Royalty.Card = card; }); CustomCard.BuildCard<TaxCut>((Action<CardInfo>)delegate(CardInfo card) { TaxCut.Card = card; }); CustomCard.BuildCard<Adrenaline>((Action<CardInfo>)delegate(CardInfo card) { Adrenaline.Card = card; }); CustomCard.BuildCard<CantTouchThis>((Action<CardInfo>)delegate(CardInfo card) { CantTouchThis.Card = card; }); CustomCard.BuildCard<EnergyConverter>((Action<CardInfo>)delegate(CardInfo card) { EnergyConverter.Card = card; }); CustomCard.BuildCard<EnergyDrink>((Action<CardInfo>)delegate(CardInfo card) { EnergyDrink.Card = card; }); CustomCard.BuildCard<Speedster>((Action<CardInfo>)delegate(CardInfo card) { Speedster.Card = card; }); CustomCard.BuildCard<SupersonicCannon>((Action<CardInfo>)delegate(CardInfo card) { SupersonicCannon.Card = card; }); } } } namespace FlairsCards.Utilities { internal class FCDebug { public static void Log(object message) { bool flag = false; } } } namespace FlairsCards.MonoBehaviours { internal class ArroganceMono : MonoBehaviour { private Player player; private Gun gun; private int playerTeamID; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); playerTeamID = player.teamID; GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private void OnDestroy() { GameModeManager.RemoveHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private IEnumerator RoundEnd(IGameModeHandler gm) { int[] roundWinners = gm.GetRoundWinners(); if (roundWinners.Contains(playerTeamID)) { Gun obj = gun; obj.damage += 0.15f; CharacterStatModifiers stats = player.data.stats; stats.movementSpeed += 0.15f; } else { Gun obj2 = gun; obj2.damage -= 0.2f; CharacterStatModifiers stats2 = player.data.stats; stats2.movementSpeed -= 0.2f; } yield break; } } internal class CoinflipMono : MonoBehaviour { private Player player; private CharacterStatModifiers characterStats; private CharacterData data; private Gun gun; private GunAmmo gunAmmo; private int luck; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); characterStats = ((Component)player).GetComponent<CharacterStatModifiers>(); data = ((Component)player).GetComponent<CharacterData>(); GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private void OnDestroy() { GameModeManager.RemoveHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private IEnumerator RoundEnd(IGameModeHandler gm) { if (player.data.stats.GetAdditionalData().curseAverse) { luck = 0; } else { luck = Random.Range(0, 2); } if (luck == 0) { player.data.stats.GetAdditionalData().luck++; Gun obj = gun; obj.projectileSpeed += 0.25f; } else { player.data.stats.GetAdditionalData().luck--; Gun obj2 = gun; obj2.projectileSpeed -= 0.25f; } yield break; } } internal class CondemnationMono : MonoBehaviour { private Player player; private CustomHealthBar shieldBar; private HealthHandler healthHandler; private void Start() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent<Player>(); CharacterStatModifiers stats = player.data.stats; stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Combine(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnDamage)); healthHandler = ((Component)player).GetComponent<HealthHandler>(); GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart); Transform transform = ((Component)((Component)player).GetComponentInChildren<PlayerWobblePosition>()).transform; GameObject val = new GameObject("Shield Bar"); val.transform.SetParent(transform); shieldBar = val.AddComponent<CustomHealthBar>(); ((Component)shieldBar).transform.localPosition = Vector3.up * 0.25f; ((Component)shieldBar).transform.localScale = Vector3.one; shieldBar.SetColor(Color.cyan); shieldBar.CurrentHealth = 0f; shieldBar.MaxHealth = 300f; } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart); CharacterStatModifiers stats = player.data.stats; stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Remove(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnDamage)); Object.Destroy((Object)(object)((Component)shieldBar).gameObject); } private IEnumerator PointStart(IGameModeHandler gm) { shieldBar.CurrentHealth = 0f; for (int i = 0; i < player.data.stats.GetAdditionalData().curses; i++) { CustomHealthBar obj = shieldBar; obj.CurrentHealth += 20f; } yield break; } private void OnDamage(Vector2 damage, bool selfDamage) { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) if (!(shieldBar.CurrentHealth > 0f)) { return; } float magnitude = ((Vector2)(ref damage)).magnitude; if (shieldBar.CurrentHealth >= magnitude) { CustomHealthBar obj = shieldBar; obj.CurrentHealth -= magnitude; CharacterData data = player.data; data.health += ((Vector2)(ref damage)).magnitude; return; } magnitude -= shieldBar.CurrentHealth; if (magnitude < 0f) { magnitude = 0f; } shieldBar.CurrentHealth = 0f; Vector2 val = Vector2.up * magnitude; CharacterData data2 = player.data; data2.health += ((Vector2)(ref damage)).magnitude; ((Damagable)healthHandler).TakeDamage(val, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true, true); } } internal class ControlFreakMono : MonoBehaviour { private Player player; private Block block; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); block = ((Component)player).GetComponent<Block>(); GameModeManager.AddHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)RoundStart); } private void OnDestroy() { GameModeManager.RemoveHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)RoundStart); } private IEnumerator RoundStart(IGameModeHandler gm) { block.counter = 1000f; block.cdMultiplier = 1f; block.cdAdd = 0f; block.cooldown = 1f; if (block.cdAdd > 0f) { block.cdAdd = 0f; } yield break; } private void Update() { //IL_001f: 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) if (!block.IsOnCD()) { block.RPCA_DoBlock(true, false, (BlockTriggerType)0, default(Vector3), false); } } } internal class CursedDrawMono : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private CharacterData data; private HealthHandler health; private Gravity gravity; private Block block; private CharacterStatModifiers characterStats; private static bool isDrawn; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); data = ((Component)player).GetComponent<CharacterData>(); health = ((Component)player).GetComponent<HealthHandler>(); gravity = ((Component)player).GetComponent<Gravity>(); block = ((Component)player).GetComponent<Block>(); characterStats = ((Component)player).GetComponent<CharacterStatModifiers>(); GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private IEnumerator PickEnd(IGameModeHandler gm) { if (!isDrawn) { CardInfo common = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)CommonCondition, 1000); CardInfo common2 = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)CommonCondition, 1000); Cards.instance.AddCardToPlayer(player, common, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, common, (float?)3f); Cards.instance.AddCardToPlayer(player, common2, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, common2, (float?)3f); CurseManager.instance.CursePlayer(player, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(player, curse, (float?)3f); }); isDrawn = true; } yield break; } private bool CommonCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return (int)card.rarity == 0 && card.cardName != "Cursed Draw"; } } internal class FallenAngelMono : MonoBehaviour { private Player player; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); GameModeManager.AddHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)RoundStart); } private void OnDestroy() { GameModeManager.RemoveHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)RoundStart); } private IEnumerator RoundStart(IGameModeHandler gm) { player.data.stats.respawns = player.data.stats.GetAdditionalData().curses / 4; yield break; } } internal class LuckyBuffMono : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private CharacterData data; private HealthHandler health; private Gravity gravity; private Block block; private CharacterStatModifiers characterStats; private int playerTeamID; private int num; private int chance; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); data = ((Component)player).GetComponent<CharacterData>(); health = ((Component)player).GetComponent<HealthHandler>(); gravity = ((Component)player).GetComponent<Gravity>(); block = ((Component)player).GetComponent<Block>(); characterStats = ((Component)player).GetComponent<CharacterStatModifiers>(); playerTeamID = player.teamID; GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private IEnumerator PickEnd(IGameModeHandler gm) { if (player.data.stats.GetAdditionalData().curseAverse) { Random rndPos = new Random(); num = rndPos.Next(1, 5); chance = Random.Range(player.data.stats.GetAdditionalData().luck, player.data.stats.GetAdditionalData().luck); if (chance < 0) { chance = 0; } } else { Random rndNeu = new Random(); num = rndNeu.Next(1, 5); chance = Random.Range(-2 + player.data.stats.GetAdditionalData().luck, player.data.stats.GetAdditionalData().luck + 1); } if (num == 1) { GunAmmo obj = gunAmmo; obj.maxAmmo += chance; } else if (num == 2) { Gun obj2 = gun; obj2.damage += (float)(0.25 + (double)chance * 0.1); } else if (num == 3) { CharacterStatModifiers obj3 = characterStats; obj3.movementSpeed += (float)((double)chance * 0.1); } else { CharacterStatModifiers obj4 = characterStats; obj4.gravity += (float)((double)chance * 0.1); } yield break; } } internal class NaturalLuckMono : MonoBehaviour { private Player player; private int tempLuck = 0; private int luck; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private IEnumerator PickEnd(IGameModeHandler gm) { if (player.data.stats.GetAdditionalData().curseAverse) { player.data.stats.GetAdditionalData().luck -= tempLuck; luck = Random.Range(0, 2); player.data.stats.GetAdditionalData().luck += luck; } else { player.data.stats.GetAdditionalData().luck -= tempLuck; luck = Random.Range(-2, 3); player.data.stats.GetAdditionalData().luck += luck; } tempLuck = luck; yield break; } } internal class OverchargedMono : MonoBehaviour { private Player player; private Block block; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); block = ((Component)player).GetComponent<Block>(); } private void Update() { block.cdMultiplier = (float)(0.9375 * (double)player.data.HealthPercentage + 0.0625); player.data.stats.GetAdditionalData().overCharged = true; } } internal class OverloadingMono : MonoBehaviour { private Player player; private Block block; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); block = ((Component)player).GetComponent<Block>(); } private void Update() { if (player.data.stats.GetAdditionalData().overCharged) { block.cdMultiplier = 1f; } else { block.cdMultiplier = (float)(0.625 * (double)player.data.HealthPercentage + 0.375); } } } internal class RevengeMono : MonoBehaviour { private Player player; private Gun gun; private bool takenDamage = false; private float originalDamage; private void Start() { player = ((Component)this).GetComponent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); CharacterStatModifiers stats = player.data.stats; stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Combine(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnDamage)); Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); CharacterStatModifiers stats = player.data.stats; stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Remove(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnDamage)); Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); } public void OnShoot(GameObject projectile) { if (takenDamage) { gun.damage = originalDamage; takenDamage = false; } } public void OnDamage(Vector2 damage, bool selfDamage) { if (!takenDamage) { originalDamage = gun.damage; Gun obj = gun; obj.damage *= 2f; takenDamage = true; } } private IEnumerator PointEnd(IGameModeHandler gm) { gun.damage = originalDamage; takenDamage = false; yield break; } } internal class RouletteMono : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); } } internal class RoyaltyMono : MonoBehaviour { private Player player; private Gun gun; private int playerTeamID; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); playerTeamID = player.teamID; GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private void OnDestroy() { GameModeManager.RemoveHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private IEnumerator RoundEnd(IGameModeHandler gm) { int[] roundWinners = gm.GetRoundWinners(); if (roundWinners.Contains(playerTeamID)) { Gun obj = gun; obj.damage += 0.15f; } yield break; } } internal class SelfSacrificeMono : MonoBehaviour { private Player player; private Block block; private GeneralInput input; private HealthHandler healthHandler; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); block = ((Component)player).GetComponent<Block>(); input = ((Component)player).GetComponent<GeneralInput>(); healthHandler = ((Component)player).GetComponent<HealthHandler>(); } private void Update() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00af: 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: Unknown result type (might be due to invalid IL or missing references) if (!block.IsOnCD() && input.shieldWasPressed) { block.RPCA_DoBlock(true, false, (BlockTriggerType)0, default(Vector3), false); } else if (block.IsOnCD() && (double)player.data.HealthPercentage > 0.2 && input.shieldWasPressed) { Vector2 val = Vector2.up * (player.data.maxHealth / 5f); ((Damagable)healthHandler).TakeDamage(val, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, false, false); block.RPCA_DoBlock(true, false, (BlockTriggerType)0, default(Vector3), false); } } } internal class TaxCutMono : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private CharacterData data; private HealthHandler health; private Gravity gravity; private Block block; private CharacterStatModifiers characterStats; private int playerTeamID; private CardInfo previousCard; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); data = ((Component)player).GetComponent<CharacterData>(); health = ((Component)player).GetComponent<HealthHandler>(); gravity = ((Component)player).GetComponent<Gravity>(); block = ((Component)player).GetComponent<Block>(); characterStats = ((Component)player).GetComponent<CharacterStatModifiers>(); playerTeamID = player.teamID; GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private void OnDestroy() { GameModeManager.RemoveHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private IEnumerator RoundEnd(IGameModeHandler gm) { Cards.instance.RemoveCardFromPlayer(player, previousCard, (SelectionType)2); previousCard = null; yield break; } private IEnumerator PickEnd(IGameModeHandler gm) { int[] roundWinners = gm.GetPointWinners(); if (roundWinners.Contains(playerTeamID)) { CardInfo randomDraw = Cards.instance.NORARITY_GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Condition, 1000); Cards.instance.AddCardToPlayer(player, randomDraw, false, "", 0f, 0f, true); CardBarUtils.instance.ShowImmediate(player, randomDraw, (float?)0f); previousCard = randomDraw; } yield break; } private bool Condition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 return (int)card.rarity == 0 || (int)card.rarity == 1 || (int)card.rarity == 2; } } internal class UnholyCurseMono : MonoBehaviour { private Player player; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private IEnumerator PickEnd(IGameModeHandler gm) { CurseManager.instance.CursePlayer(player, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(player, curse); }); player.data.stats.GetAdditionalData().curses++; yield break; } } internal class WildcardMono : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private CharacterData data; private HealthHandler health; private Gravity gravity; private Block block; private CharacterStatModifiers characterStats; private CardInfo? previousCard = null; private int chance; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); data = ((Component)player).GetComponent<CharacterData>(); health = ((Component)player).GetComponent<HealthHandler>(); gravity = ((Component)player).GetComponent<Gravity>(); block = ((Component)player).GetComponent<Block>(); characterStats = ((Component)player).GetComponent<CharacterStatModifiers>(); GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); GameModeManager.AddHook("PickStart", (Func<IGameModeHandler, IEnumerator>)PickStart); } private void OnDestroy() { GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); GameModeManager.RemoveHook("PickStart", (Func<IGameModeHandler, IEnumerator>)PickStart); } private IEnumerator PickStart(IGameModeHandler gm) { if ((Object)(object)previousCard != (Object)null) { Cards.instance.RemoveCardFromPlayer(player, player.data.currentCards.Count - 1, true); } yield break; } private IEnumerator PickEnd(IGameModeHandler gm) { if (player.data.stats.GetAdditionalData().curseAverse) { chance = Random.Range(player.data.stats.GetAdditionalData().luck, player.data.stats.GetAdditionalData().luck + 2); } else { chance = Random.Range(-1 + player.data.stats.GetAdditionalData().luck, player.data.stats.GetAdditionalData().luck + 2); } CardInfo newCard = null; if (chance <= 0) { CardInfo[] cardsToDrawFrom = Cards.instance.HiddenCards.ToArray(); newCard = Cards.instance.DrawRandomCardWithCondition(cardsToDrawFrom, player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)NeutralNameCondition, 1000); Cards.instance.AddCardToPlayer(player, newCard, false, "", 0f, 0f, true); CardBarUtils.instance.ShowImmediate(player, newCard, (float?)0f); } else if (chance == 1) { newCard = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)CommonCondition, 1000); Cards.instance.AddCardToPlayer(player, newCard, false, "", 0f, 0f, true); CardBarUtils.instance.ShowImmediate(player, newCard, (float?)0f); } else if (chance >= 2 && chance <= 3) { newCard = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)UncommonCondition, 1000); Cards.instance.AddCardToPlayer(player, newCard, false, "", 0f, 0f, true); CardBarUtils.instance.ShowImmediate(player, newCard, (float?)0f); } else if (chance >= 4) { newCard = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)RareCondition, 1000); Cards.instance.AddCardToPlayer(player, newCard, false, "", 0f, 0f, true); CardBarUtils.instance.ShowImmediate(player, newCard, (float?)0f); } previousCard = newCard; yield break; } private bool NeutralNameCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { return true; } private bool CommonCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 return (int)card.rarity == 0; } private bool UncommonCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 return (int)card.rarity == 1; } private bool RareCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 return (int)card.rarity == 2; } } } namespace FlairsCards.Monobehaviours { internal class AdrenalineMono : MonoBehaviour { private Player player; private Coroutine effectCoroutine; private bool isActive = false; private float oldSpeed = 1.35f; private CustomHealthBar shieldBar; private HealthHandler healthHandler; private void Start() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00bd: 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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent<Player>(); CharacterStatModifiers stats = player.data.stats; stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Combine(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnDamage)); healthHandler = ((Component)player).GetComponent<HealthHandler>(); GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); Transform transform = ((Component)((Component)player).GetComponentInChildren<PlayerWobblePosition>()).transform; GameObject val = new GameObject("Shield Bar"); val.transform.SetParent(transform); shieldBar = val.AddComponent<CustomHealthBar>(); ((Component)shieldBar).transform.localPosition = Vector3.up * 0.25f; ((Component)shieldBar).transform.localScale = Vector3.one; shieldBar.SetColor(Color.cyan); shieldBar.CurrentHealth = 0f; } private void OnDestroy() { GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); CharacterStatModifiers stats = player.data.stats; stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Remove(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnDamage)); Object.Destroy((Object)(object)((Component)shieldBar).gameObject); } private IEnumerator PointEnd(IGameModeHandler gm) { if (isActive) { isActive = false; if (player.data.stats.movementSpeed - 0.4f >= oldSpeed - 0.1f) { CharacterStatModifiers stats = player.data.stats; stats.movementSpeed -= 0.4f; } } if (effectCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(effectCoroutine); effectCoroutine = null; } shieldBar.CurrentHealth = 0f; yield break; } private IEnumerator PickEnd(IGameModeHandler gm) { oldSpeed = player.data.stats.movementSpeed; yield break; } private void OnDamage(Vector2 damage, bool selfDamage) { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) if (shieldBar.CurrentHealth > 0f) { float magnitude = ((Vector2)(ref damage)).magnitude; if (shieldBar.CurrentHealth >= magnitude) { CustomHealthBar obj = shieldBar; obj.CurrentHealth -= magnitude; CharacterData data = player.data; data.health += ((Vector2)(ref damage)).magnitude; } else { magnitude -= shieldBar.CurrentHealth; if (magnitude < 0f) { magnitude = 0f; } shieldBar.CurrentHealth = 0f; Vector2 val = Vector2.up * magnitude; CharacterData data2 = player.data; data2.health += ((Vector2)(ref damage)).magnitude; ((Damagable)healthHandler).TakeDamage(val, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true, true); } } if (!isActive) { effectCoroutine = ((MonoBehaviour)this).StartCoroutine(RoundStartEffect()); } } private IEnumerator RoundStartEffect() { isActive = true; CharacterStatModifiers stats = player.data.stats; stats.movementSpeed += 0.4f; if (player.data.health > 0f) { CustomHealthBar obj = shieldBar; obj.CurrentHealth += Mathf.Round(player.data.maxHealth * 0.15f); } try { yield return (object)new WaitForSeconds(2f); } finally { CharacterStatModifiers stats2 = player.data.stats; stats2.movementSpeed -= 0.4f; CustomHealthBar obj2 = shieldBar; obj2.CurrentHealth -= Mathf.Round(player.data.maxHealth * 0.15f); if (shieldBar.CurrentHealth < 0f) { shieldBar.CurrentHealth = 0f; } isActive = false; effectCoroutine = null; } } } internal class CantTouchThisMono : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } private IEnumerator PickEnd(IGameModeHandler gm) { gunAmmo.maxAmmo = 1; gun.numberOfProjectiles = 1; yield break; } } internal class EnergyDrinkMono : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private float oldSpeed; private float oldDamage; private float oldReload; private Coroutine effectCoroutine; private void Start() { player = ((Component)this).GetComponent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>(); GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart); GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart); GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); } private IEnumerator PointStart(IGameModeHandler gm) { oldSpeed = player.data.stats.movementSpeed; oldDamage = gun.damage; oldReload = gunAmmo.reloadTimeAdd; effectCoroutine = ((MonoBehaviour)this).StartCoroutine(RoundStartEffect()); yield break; } private IEnumerator PointEnd(IGameModeHandler gm) { if (effectCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(effectCoroutine); effectCoroutine = null; } player.data.stats.movementSpeed = oldSpeed; gun.damage = oldDamage; gunAmmo.reloadTimeAdd = oldReload; yield break; } private IEnumerator RoundStartEffect() { CharacterStatModifiers stats = player.data.stats; stats.movementSpeed += 0.5f; Gun obj = gun; obj.damage += 0.5f; GunAmmo obj2 = gunAmmo; obj2.reloadTimeAdd -= 0.5f; yield return (object)new WaitForSeconds(12f); CharacterStatModifiers stats2 = player.data.stats; stats2.movementSpeed -= 1f; Gun obj3 = gun; obj3.damage -= 1f; GunAmmo obj4 = gunAmmo; obj4.reloadTimeAdd += 1f; } } internal class GamblerMono : MonoBehaviourPun { private Player player; private CustomHealthBar luckBar; private void Start() { player = ((Component)this).GetComponent<Player>(); GameModeManager.AddHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)RoundStart); GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); } private void OnDestroy() { GameModeManager.RemoveHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)RoundStart); GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); } private IEnumerator PointEnd(IGameModeHandler gm) { Object.Destroy((Object)(object)((Component)luckBar).gameObject); yield break; } private IEnumerator RoundStart(IGameModeHandler gm) { Transform parent = ((Component)((Component)player).GetComponentInChildren<PlayerWobblePosition>()).transform; GameObject obj = new GameObject("Shield Bar"); obj.transform.SetParent(parent); luckBar = obj.AddComponent<CustomHealthBar>(); ((Component)luckBar).transform.localPosition = Vector3.up * 0.25f; ((Component)luckBar).transform.localScale = Vector3.one; int luck = player.data.stats.GetAdditionalData().luck; float barHealth = GetBarHealth(luck); Color barColor = GetBarColor(luck); ((MonoBehaviourPun)this).photonView.RPC("RPCA_SyncLuckBar", (RpcTarget)3, new object[4] { barHealth, barColor.r, barColor.g, barColor.b }); yield break; } private float GetBarHealth(int luck) { if (luck <= -2) { return 0f; } if (luck <= -1) { return 15f; } if (luck == 0) { return 30f; } if (luck == 1) { return 45f; } if (luck == 2) { return 60f; } if (luck <= 4) { return 80f; } return 100f; } private Color GetBarColor(int luck) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_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_0054: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) if (luck <= -2) { return Color.black; } if (luck <= -1) { return Color.red; } if (luck == 0) { return Color.yellow; } if (luck == 1) { return Color.cyan; } if (luck == 2) { return Color.blue; } if (luck <= 4) { return Color.green; } return Color.white; } [PunRPC] private void RPCA_SyncLuckBar(float health, float r, float g, float b) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)luckBar == (Object)null)) { luckBar.CurrentHealth = health; luckBar.SetColor(new Color(r, g, b)); } } } internal class PersonalBodyguardMono : MonoBehaviour { private Player player; private bool firstTimeHit = false; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); CharacterStatModifiers stats = player.data.stats; stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Combine(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnDamage)); GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); } private void OnDestroy() { CharacterStatModifiers stats = player.data.stats; stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Remove(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnDamage)); GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); } private IEnumerator PointEnd(IGameModeHandler gm) { firstTimeHit = false; yield break; } private void OnDamage(Vector2 damage, bool selfDamage) { if (!firstTimeHit) { CharacterData data = player.data; data.health += ((Vector2)(ref damage)).magnitude; firstTimeHit = true; } } } } namespace FlairsCards.Cards { internal class Accursed : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.movementSpeed = 1.2f; gun.damage = 1.7f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Player player2 = player; CurseManager.instance.CursePlayer(player2, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(player2, curse); }); player2.data.stats.GetAdditionalData().curses++; FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player2.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Accursed"; } protected override string GetDescription() { return "Learn to grow stronger with the curses inflicted upon you"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtAccursed; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("CommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+70%", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Speed", amount = "+20%", simepleAmount = (SimpleAmount)2 }, new CardInfoStat { positive = false, stat = "Curse", amount = "+1", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "FC"; } } internal class AccursedClass : ClassHandler { internal static string name = "Accursed"; public override IEnumerator Init() { while (!Object.op_Implicit((Object)(object)Accursed.Card) || !Object.op_Implicit((Object)(object)UnluckySouls.Card) || !Object.op_Implicit((Object)(object)CursedDraw.Card) || !Object.op_Implicit((Object)(object)UnholyCurse.Card)) { yield return null; } ClassesRegistry.Register(Accursed.Card, (CardType)1, 0); ClassesRegistry.Register(UnluckySouls.Card, (CardType)16, Accursed.Card, 0); ClassesRegistry.Register(Prayer.Card, (CardType)16, Accursed.Card, 0); ClassesRegistry.Register(UnholyCurse.Card, (CardType)8, Accursed.Card, 0); ClassesRegistry.Register(CursedDraw.Card, (CardType)8, Accursed.Card, 0); ClassesRegistry.Register(Condemnation.Card, (CardType)2, (CardInfo[])(object)new CardInfo[1] { UnholyCurse.Card }, 0); ClassesRegistry.Register(FallenAngel.Card, (CardType)2, (CardInfo[])(object)new CardInfo[1] { UnholyCurse.Card }, 0); } public override IEnumerator PostInit() { yield break; } } internal class Condemnation : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AccursedClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.damage = 1.25f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<CondemnationMono>(((Component)player).gameObject, false); FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<CondemnationMono>(((Component)player).gameObject, false)); FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Condemnation"; } protected override string GetDescription() { return "Get a stacking +20 HP shield at the start of each point per curse"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtCondemnation; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("CommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Damage", amount = "+25%", simepleAmount = (SimpleAmount)2 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "FC"; } } internal class CursedDraw : CustomCard { private CardInfo chosenCard; internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AccursedClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; chosenCard = cardInfo; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<CursedDrawMono>(((Component)player).gameObject, false); player.data.stats.GetAdditionalData().curses++; FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<CursedDrawMono>(((Component)player).gameObject, false)); FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Cursed Draw"; } protected override string GetDescription() { return "Draw two common non-class cards, also draw a <color=#ff000fff>curse</color>"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtCursedDraw; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("UncommonClass"); } protected override CardInfoStat[] GetStats() { return null; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "FC"; } private bool CommonCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return (int)card.rarity == 0 && card.cardName != "Cursed Draw"; } } internal class FallenAngel : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AccursedClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 0.85f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<FallenAngelMono>(((Component)player).gameObject, false); FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<FallenAngelMono>(((Component)player).gameObject, false)); FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Fallen Angel"; } protected override string GetDescription() { return "Gain a revive for every 4 curses you have"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtFallenAngel; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("CommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Health", amount = "-15%", simepleAmount = (SimpleAmount)6 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "FC"; } } internal class Prayer : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AccursedClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { float num = (float)(1.0 + (double)characterStats.GetAdditionalData().curses * 0.1); base.statModifiers.movementSpeed = num; base.statModifiers.health = num; characterStats.GetAdditionalData().curses = 0; CurseManager.instance.RemoveAllCurses(player); FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Prayer"; } protected override string GetDescription() { return "Consume all curses you currently have, gain buffs depending on the amount consumed"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtPrayer; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("CommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Speed per curse", amount = "+10%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = true, stat = "Damage per curse", amount = "+15%", simepleAmount = (SimpleAmount)1 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "FC"; } } internal class UnholyCurse : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AccursedClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.damage = 1.15f; statModifiers.movementSpeed = 1.45f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<UnholyCurseMono>(((Component)player).gameObject, false); FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<UnholyCurseMono>(((Component)player).gameObject, false)); FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Unholy Curse"; } protected override string GetDescription() { return "Luck has never been on your side"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtUnholyCurse; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("CommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Damage", amount = "+15%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = true, stat = "Health", amount = "+45%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = false, stat = "Forced curses per draw", amount = "+1", simepleAmount = (SimpleAmount)1 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "FC"; } } internal class UnluckySouls : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = AccursedClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { for (int i = 0; i <= 1; i++) { int index = Random.Range(0, PlayerManager.instance.players.Count); Player chosenPlayer = PlayerManager.instance.players[index]; chosenPlayer.data.stats.GetAdditionalData().curses++; CurseManager.instance.CursePlayer(chosenPlayer, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(chosenPlayer, curse); }); } FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Unlucky Souls"; } protected override string GetDescription() { return "Two random players get a curse, including you"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtUnluckySouls; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("RareClass"); } protected override CardInfoStat[] GetStats() { return null; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "FC"; } } public class Blocker : SimpleCard { internal static CardInfo Card; 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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown CardDetails val = new CardDetails(); val.Title = "Blocker"; val.Description = "Enhance multiple different aspects of blocking"; val.ModName = "FC"; val.Rarity = RarityUtils.GetRarity("CommonClass"); val.Theme = (CardThemeColorType)7; val.Art = FlairsCards.CardArtBlocker; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+25%", simepleAmount = (SimpleAmount)2 }, new CardInfoStat { positive = true, stat = "Block cooldown", amount = "-0.25s", simepleAmount = (SimpleAmount)5 } }; return val; } } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.25f; block.cdAdd = -0.25f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } } internal class BlockerClass : ClassHandler { internal static string name = "Blocker"; public override IEnumerator Init() { while (!Object.op_Implicit((Object)(object)Gambler.Card)) { yield return null; } ClassesRegistry.Register(Blocker.Card, (CardType)1, 0); ClassesRegistry.Register(Rewind.Card, (CardType)16, Blocker.Card, 0); ClassesRegistry.Register(ControlFreak.Card, (CardType)16, Blocker.Card, 0); ClassesRegistry.Register(Overloading.Card, (CardType)8, Blocker.Card, 0); ClassesRegistry.Register(SelfSacrifice.Card, (CardType)8, Blocker.Card, 0); ClassesRegistry.Register(Overcharged.Card, (CardType)2, (CardInfo[])(object)new CardInfo[1] { Overloading.Card }, 0); ClassesRegistry.Register(TerminalVelocity.Card, (CardType)2, (CardInfo[])(object)new CardInfo[1] { SelfSacrifice.Card }, 0); } public override IEnumerator PostInit() { ClassesRegistry.Get(ControlFreak.Card).Blacklist(Overloading.Card); ClassesRegistry.Get(Overloading.Card).Blacklist(ControlFreak.Card); yield break; } } internal class ControlFreak : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = BlockerClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.counter = 1000f; block.cdAdd = -3f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<ControlFreakMono>(((Component)player).gameObject, false); FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ControlFreakMono>(((Component)player).gameObject, false)); FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Control Freak"; } protected override string GetDescription() { return "Block is set to a 1 second cooldown. Blocks occur automatically off cooldown."; } protected override GameObject GetCardArt() { return FlairsCards.CardArtControlFreak; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("UncommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Block cooldown", amount = "1s", simepleAmount = (SimpleAmount)7 }, new CardInfoStat { positive = false, stat = "Blocks", amount = "Uncontrollable", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "FC"; } } internal class Overcharged : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = BlockerClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.25f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<OverchargedMono>(((Component)player).gameObject, false); FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<OverchargedMono>(((Component)player).gameObject, false)); FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Overcharged"; } protected override string GetDescription() { return "Gain decreasing block cooldown as your health decreases. Max at 20% HP."; } protected override GameObject GetCardArt() { return FlairsCards.CardArtOvercharged; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("CommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+25%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = true, stat = "Block cooldown", amount = "Up to -75%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "FC"; } } internal class Overloading : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = BlockerClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.15f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<OverloadingMono>(((Component)player).gameObject, false); FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<OverloadingMono>(((Component)player).gameObject, false)); FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Overloading"; } protected override string GetDescription() { return "Gain decreasing block cooldown as your health decreases. Max at 20% HP."; } protected override GameObject GetCardArt() { return FlairsCards.CardArtOverloading; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("CommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+15%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = true, stat = "Block cooldown", amount = "Up to -50%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "FC"; } } internal class Rewind : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = BlockerClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.forceToAdd = -15f; statModifiers.health = 1.2f; block.cdAdd = 0.25f; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Rewind"; } protected override string GetDescription() { return "Leap backwards after a block"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtRewind; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("CommonClass"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = true, stat = "Block cooldown", amount = "+0.25s", simepleAmount = (SimpleAmount)5 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "FC"; } } internal class SelfSacrifice : CustomCard { internal static CardInfo Card; public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = BlockerClass.name; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; FCDebug.Log("[FC][Card] " + ((CustomCard)this).GetTitle() + " has been setup."); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.GetOrAddComponent<SelfSacrificeMono>(((Component)player).gameObject, false); FCDebug.Log(string.Format("[{0}][Card] {1} has been added to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<SelfSacrificeMono>(((Component)player).gameObject, false)); FCDebug.Log(string.Format("[{0}][Card] {1} has been removed to player {2}.", "FC", ((CustomCard)this).GetTitle(), player.playerID)); } protected override string GetTitle() { return "Self Sacrifice"; } protected override string GetDescription() { return "Use some of your health to block whenever you want"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtSelfSacrifice; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid