Decompiled source of Flairs Cards v0.1.1
FlairsCards.dll
Decompiled 4 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; 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 ModdingUtils.Utils; using ModsPlus; using PSA.Extensions; 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: AssemblyTitle("FlairsCards")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("FlairsCards")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("a74a6cc5-1bdc-493a-a170-3479c9a0569a")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.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.1f }); } } 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", "1.0.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 = "1.0.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 CardArtPlaguebearer = Bundle.LoadAsset<GameObject>("C_PLAGUEBEARER"); public static GameObject CardArtSadistic = Bundle.LoadAsset<GameObject>("C_SADISTIC"); 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 CardArtBlackjack = 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) RarityUtils.AddRarity("Unobtainable", 1E-09f, new Color(0.17f, 0.97f, 1f), new Color(0.11f, 0.71f, 0.73f)); 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() { 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<Plaguebearer>((Action<CardInfo>)delegate(CardInfo card) { Plaguebearer.Card = card; }); CustomCard.BuildCard<Sadistic>((Action<CardInfo>)delegate(CardInfo card) { Sadistic.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<Wildcard>((Action<CardInfo>)delegate(CardInfo card) { Wildcard.Card = card; }); CustomCard.BuildCard<Neutral>((Action<CardInfo>)delegate(CardInfo card) { Neutral.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<Kinghood>((Action<CardInfo>)delegate(CardInfo card) { Kinghood.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; }); instance = this; } } } 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("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private void OnDestroy() { GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); GameModeManager.RemoveHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private IEnumerator RoundEnd(IGameModeHandler gm) { yield break; } private IEnumerator PointEnd(IGameModeHandler gm) { int[] roundWinners = gm.GetPointWinners(); if (roundWinners.Contains(playerTeamID)) { Gun obj = gun; obj.damage += 0.05f; CharacterStatModifiers stats = player.data.stats; stats.movementSpeed += 0.05f; } else { Gun obj2 = gun; obj2.damage -= 0.075f; CharacterStatModifiers stats2 = player.data.stats; stats2.movementSpeed -= 0.075f; } yield break; } } internal class BlackjackMono : 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; public int dealerHand; public int playerHand; 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) { dealerHand = 0; playerHand = 15; int playerNumber = Random.Range(-2 + player.data.stats.GetAdditionalData().luck, player.data.stats.GetAdditionalData().luck + 1); playerHand += playerNumber; if (playerHand > 21 && player.data.stats.GetAdditionalData().curseAverse) { playerHand = 17; yield break; } if (playerHand > 21) { Gun obj = gun; obj.damage -= 0.1f; yield break; } while (dealerHand < 17) { int dealerNumber = Random.Range(1, 12); dealerHand += dealerNumber; } if (dealerHand > 21) { Gun obj2 = gun; obj2.damage += 0.2f; } else if (dealerHand > playerHand) { Gun obj3 = gun; obj3.damage -= 0.1f; } else { Gun obj4 = gun; obj4.damage += 0.2f; } } } 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 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 FallenAngelMono : MonoBehaviour { private Player player; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); GameModeManager.AddHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart); } private void OnDestroy() { GameModeManager.RemoveHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart); } private IEnumerator BattleStart(IGameModeHandler gm) { player.data.stats.respawns = player.data.stats.GetAdditionalData().curses / 4; yield break; } } internal class KinghoodMono : MonoBehaviour { private Player player; private Gun gun; private float totalRounds; private bool damageAdded = false; private List<TeamScore> currentScore = new List<TeamScore>(); private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private void OnDestroy() { GameModeManager.RemoveHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private IEnumerator RoundEnd(IGameModeHandler gm) { currentScore.Clear(); currentScore = (from ID in PlayerManager.instance.players.Select((Player player) => player.teamID).Distinct() select GameModeManager.CurrentHandler.GetTeamScore(ID)).ToList(); foreach (TeamScore item in currentScore) { totalRounds += item.rounds; } if (totalRounds >= 3f && !damageAdded) { Gun obj = gun; obj.damage += 1f; damageAdded = true; } totalRounds = 0f; 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, 3); player.data.stats.GetAdditionalData().luck += luck; } else { player.data.stats.GetAdditionalData().luck -= tempLuck; luck = Random.Range(-2, 4); 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 PlaguebearerMono : 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) { for (int i = 0; i < PlayerManager.instance.players.Count; i++) { Player chosenPlayer = PlayerManager.instance.players[i]; CurseManager.instance.CursePlayer(chosenPlayer, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(chosenPlayer, curse); }); } yield break; } } internal class RoyaltyMono : MonoBehaviour { private Player player; private Gun gun; private float totalRounds = 0f; private List<TeamScore> currentScore = new List<TeamScore>(); private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>(); GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private void OnDestroy() { GameModeManager.RemoveHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd); } private IEnumerator RoundEnd(IGameModeHandler gm) { currentScore.Clear(); currentScore = (from ID in PlayerManager.instance.players.Select((Player player) => player.teamID).Distinct() select GameModeManager.CurrentHandler.GetTeamScore(ID)).ToList(); foreach (TeamScore item in currentScore) { totalRounds += item.rounds; } Gun obj = gun; obj.damage += (float)((double)(totalRounds - 1f) * 0.02); totalRounds -= 1f; yield break; } } internal class SelfSacrificeMono : MonoBehaviour { private Player player; private Block block; private GeneralInput input; private void Start() { player = ((Component)this).gameObject.GetComponentInParent<Player>(); block = ((Component)player).GetComponent<Block>(); input = ((Component)player).GetComponent<GeneralInput>(); } 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) 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) { CharacterData data = player.data; data.health -= player.data.maxHealth / 5f; 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 + 1); } else { chance = Random.Range(-2 + player.data.stats.GetAdditionalData().luck, player.data.stats.GetAdditionalData().luck); } CardInfo newCard = null; if (chance <= 0) { newCard = Cards.instance.GetRandomCardWithCondition(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 card.cardName == "Neutral"; } 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 bool first = false; private void Start() { player = ((Component)this).GetComponent<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); GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); } 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)); } 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; } yield break; } private IEnumerator PickEnd(IGameModeHandler gm) { oldSpeed = player.data.stats.movementSpeed; yield break; } private void OnDamage(Vector2 damage, bool selfDamage) { 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) { player.data.health = Mathf.Min(player.data.health + Mathf.Round(player.data.maxHealth / 6f), player.data.maxHealth); } try { yield return (object)new WaitForSeconds(1f); } finally { CharacterStatModifiers stats2 = player.data.stats; stats2.movementSpeed -= 0.4f; player.data.health = Mathf.Max(player.data.health - Mathf.Round(player.data.maxHealth / 6f), 0f); if (player.data.health == 0f) { CharacterData data = player.data; data.health += 1f; } 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(10f); CharacterStatModifiers stats2 = player.data.stats; stats2.movementSpeed -= 1f; Gun obj3 = gun; obj3.damage -= 1f; GunAmmo obj4 = gunAmmo; obj4.reloadTimeAdd += 1f; } } 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) { CurseManager.instance.CursePlayer(player, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(player, curse); }); 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) { 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 = "Speed", amount = "+20%", simepleAmount = (SimpleAmount)2 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+70%", simepleAmount = (SimpleAmount)3 }, 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(Sadistic.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(Plaguebearer.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 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) { CardInfo randomCardWithCondition = 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 randomCardWithCondition2 = Cards.instance.GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)CommonCondition, 1000); Cards.instance.AddCardToPlayer(player, randomCardWithCondition, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition, (float?)3f); Cards.instance.AddCardToPlayer(player, randomCardWithCondition2, false, "", 2f, 2f, true); CardBarUtils.instance.ShowImmediate(player, randomCardWithCondition2, (float?)3f); CurseManager.instance.CursePlayer(player, (Action<CardInfo>)delegate(CardInfo curse) { CardBarUtils.instance.ShowImmediate(player, curse, (float?)3f); }); Cards.instance.RemoveCardFromPlayer(player, chosenCard, (SelectionType)2); 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) { 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; 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 at the time of drawing this card"; } 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() { 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"; } } internal class Plaguebearer : 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 = 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<PlaguebearerMono>(((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<PlaguebearerMono>(((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 "Plaguebearer"; } protected override string GetDescription() { return "Overwhelm with sickness, every player gets a curse each turn"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtPlaguebearer; } 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 = "Health", 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 Sadistic : 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.15); 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 "Sadistic"; } protected override string GetDescription() { return "Consume all curses you currently have, gain buffs depending on the amount destroyed"; } protected override GameObject GetCardArt() { return FlairsCards.CardArtSadistic; } 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 = "+15%", 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.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<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 = "+15%", 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 { 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) { 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) { 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); }); } Cards.instance.RemoveCardFromPlayer(player, chosenCard, (SelectionType)2); 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 "Choose two random players to 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 = "+30%", 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.3f; 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 increasing 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 increasing 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 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 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 return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Current HP", amount = "-20%", 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)7; } public override string GetModName() { return "FC"; } } public class TerminalVelocity : CustomEffectCard<SpeedOnBlockEffect> { internal static CardInfo Card; public override CardDetails<SpeedOnBlockEffect> Details { get { //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<SpeedOnBlockEffect> val = new CardDetails<SpeedOnBlockEffect>(); val.Title = "Terminal Velocity"; val.Description = "Gain movement speed on block"; val.ModName = "FC"; val.Rarity = RarityUtils.GetRarity("CommonClass"); val.Theme = (CardThemeColorType)7; val.Art = FlairsCards.CardArtTerminalVelocity; val.Stats = (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Movement speed per block", amount = "+10%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+0.25s", simepleAmount = (SimpleAmount)1 } }; return val; } } 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."); } } internal class BattleScarred : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 0.7f; gun.projectileSpeed = 0.7f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CurseManager.instance.curseCategory }; 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 "Battle Scarred"; } protected override string GetDescription() { return null; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Bullet Speed", amount = "-30%", simepleAmount = (SimpleAmount)6 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-30%", 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)4; } public override string GetModName() { return "FC Curse"; } } internal class BlindingSpeed : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 3f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CurseManager.instance.curseCategory }; 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 "Blinding Speed"; } protected override string GetDescription() { return "A little speed never hurt anyone"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Speed", amount = "+300%", simepleAmount = (SimpleAmount)4 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)4; } public override string GetModName() { return "FC Curse"; } } internal class BucklingPressure : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 0.6f; statModifiers.gravity = 1.4f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CurseManager.instance.curseCategory }; 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 "Buckling Pressure"; } protected override string GetDescription() { return null; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = false, stat = "Speed", amount = "-40%", simepleAmount = (SimpleAmount)6 }, new CardInfoStat { positive = false, stat = "Gravity", amount = "+40%", simepleAmount = (SimpleAmount)3 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)4; } public override string GetModName() { return "FC Curse"; } } internal class ClumsyFingers : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.reloadTimeAdd = 1.5f; cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CurseManager.instance.curseCategory }; 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 "Clumsy Fingers"; } protected override string GetDescription() { return "Increased reload time"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might b