Decompiled source of ClassRoulette v1.0.0
ClassRoulette.dll
Decompiled 17 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.Versioning; using BepInEx; using BepInEx.Logging; using ClassRoulette.Framework; using ClassesManagerReborn; using HarmonyLib; using Microsoft.CodeAnalysis; using ModdingUtils.Utils; using ModsPlus; using Photon.Pun; using RarityLib.Utils; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnboundLib.Networking; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ClassRoulette { [BepInPlugin("com.jasonbellz.classroulette", "Class Roulette", "1.0.0")] [BepInProcess("Rounds.exe")] [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.*/)] public class ClassRoulettePlugin : BaseUnityPlugin { public const string ModId = "com.jasonbellz.classroulette"; public static ClassRoulettePlugin Instance { get; private set; } private void Awake() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) Instance = this; new Harmony("com.jasonbellz.classroulette").PatchAll(); } private void Start() { CardBuilder.BuildAll(((BaseUnityPlugin)this).Logger); ClassSecondDraw.Register(((BaseUnityPlugin)this).Logger); } } } namespace ClassRoulette.Framework { public static class CardBuilder { private static readonly Dictionary<Type, CardInfo> Built = new Dictionary<Type, CardInfo>(); private static readonly Dictionary<Type, ClassCardAttribute> Meta = new Dictionary<Type, ClassCardAttribute>(); private static int _expected; private static ManualLogSource _log; public static void BuildAll(ManualLogSource log) { _log = log; List<Type> list = (from t in Assembly.GetExecutingAssembly().GetTypes() where !t.IsAbstract && typeof(CustomCard).IsAssignableFrom(t) && t.GetCustomAttribute<ClassCardAttribute>() != null select t).OrderBy<Type, string>((Type t) => t.FullName, StringComparer.Ordinal).ToList(); _expected = list.Count; _log.LogInfo((object)$"[ClassRoulette] Building {_expected} class cards..."); MethodInfo methodInfo = typeof(CustomCard).GetMethods(BindingFlags.Static | BindingFlags.Public).First((MethodInfo m) => m.Name == "BuildCard" && m.IsGenericMethod && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType == typeof(Action<CardInfo>)); foreach (Type item in list) { Meta[item] = item.GetCustomAttribute<ClassCardAttribute>(); Type captured = item; Action<CardInfo> action = delegate(CardInfo ci) { OnCardBuilt(captured, ci); }; methodInfo.MakeGenericMethod(item).Invoke(null, new object[1] { action }); } } private static void OnCardBuilt(Type type, CardInfo info) { Built[type] = info; if (Built.Count >= _expected) { WireAll(); } } private static void WireAll() { foreach (KeyValuePair<Type, ClassCardAttribute> item in Meta.Where((KeyValuePair<Type, ClassCardAttribute> m) => m.Value.Role == CardRole.Entry)) { CardInfo val = Built[item.Key]; val.allowMultiple = false; ClassesRegistry.Register(val, (CardType)1, 0); ClassManager.Entries[item.Value.ClassName] = val; } foreach (KeyValuePair<Type, ClassCardAttribute> item2 in Meta.Where((KeyValuePair<Type, ClassCardAttribute> m) => m.Value.Role != CardRole.Entry)) { ClassCardAttribute value = item2.Value; CardInfo val2 = Built[item2.Key]; if (!ClassManager.Entries.TryGetValue(value.ClassName, out var value2)) { _log.LogError((object)("[ClassRoulette] No entry registered for class '" + value.ClassName + "' (card " + val2.cardName + ").")); } else if (value.Role == CardRole.Ultimate) { val2.allowMultiple = false; ClassesRegistry.Register(val2, (CardType)16, value2, 0); ClassManager.Ultimates[val2] = value.ClassName; } else { val2.allowMultiple = true; ClassesRegistry.Register(val2, (CardType)16, value2, 0); ClassManager.PoolCards[val2] = value.ClassName; } } _log.LogInfo((object)($"[ClassRoulette] Registered {ClassManager.Entries.Count} classes, " + $"{ClassManager.PoolCards.Count} pool cards, {ClassManager.Ultimates.Count} ultimates.")); } } public static class Cr { public const string ModName = "ClassRoulette"; public static Rarity Common => RarityUtils.GetRarity("Common"); public static Rarity Uncommon => RarityUtils.GetRarity("Uncommon"); public static Rarity Rare => RarityUtils.GetRarity("Rare"); public static CardInfoStat Stat(string name, string amount, bool positive = true) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown return new CardInfoStat { positive = positive, stat = name, amount = amount, simepleAmount = (SimpleAmount)0 }; } public static CardInfoStat[] Stats(params CardInfoStat[] stats) { return stats; } } public abstract class ClassStatCard : SimpleCard { protected abstract string Name { get; } protected abstract string Text { get; } protected abstract Rarity CardRarity { get; } protected abstract CardThemeColorType Color { get; } protected virtual CardInfoStat[] StatList => null; public override CardDetails Details => new CardDetails { Title = Name, Description = Text, ModName = "ClassRoulette", Rarity = CardRarity, Theme = Color, Stats = StatList, Art = null }; } public abstract class ClassEffectCard<T> : CustomEffectCard<T> where T : CardEffect { protected abstract string Name { get; } protected abstract string Text { get; } protected abstract Rarity CardRarity { get; } protected abstract CardThemeColorType Color { get; } protected virtual CardInfoStat[] StatList => null; public override CardDetails<T> Details => new CardDetails<T> { Title = Name, Description = Text, ModName = "ClassRoulette", Rarity = CardRarity, Theme = Color, Stats = StatList, Art = null }; } public enum CardRole { Entry, Pool, Ultimate } [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public class ClassCardAttribute : Attribute { public string ClassName { get; } public CardRole Role { get; } public ClassCardAttribute(string className, CardRole role) { ClassName = className; Role = role; } } [HarmonyPatch(typeof(Cards), "PlayerIsAllowedCard")] internal static class ClassCardGatePatch { private static void Postfix(ref bool __result, Player player, CardInfo card) { if (!__result || (Object)(object)player == (Object)null || (Object)(object)card == (Object)null) { return; } if (ClassPickState.Active && player.playerID == ClassPickState.PlayerID) { string value; if (!ClassManager.CardBelongsToClass(card, ClassPickState.ClassName)) { __result = false; } else if (ClassManager.Ultimates.TryGetValue(card, out value) && !ClassManager.IsUltimateUnlocked(player, value)) { __result = false; } } else if (ClassManager.IsClassPoolOrUltimate(card)) { __result = false; } } } public static class ClassManager { public const int UltimateThreshold = 8; public static readonly Dictionary<CardInfo, string> PoolCards = new Dictionary<CardInfo, string>(); public static readonly Dictionary<CardInfo, string> Ultimates = new Dictionary<CardInfo, string>(); public static readonly Dictionary<string, CardInfo> Entries = new Dictionary<string, CardInfo>(); public static int CountPoolCards(Player player, string className) { if (player?.data?.currentCards == null) { return 0; } int num = 0; foreach (CardInfo currentCard in player.data.currentCards) { if ((Object)(object)currentCard != (Object)null && PoolCards.TryGetValue(currentCard, out var value) && value == className) { num++; } } return num; } public static bool IsUltimateUnlocked(Player player, string className) { return CountPoolCards(player, className) >= 8; } public static bool CardBelongsToClass(CardInfo card, string className) { if ((Object)(object)card == (Object)null || className == null) { return false; } if (PoolCards.TryGetValue(card, out var value) && value == className) { return true; } if (Ultimates.TryGetValue(card, out var value2) && value2 == className) { return true; } return false; } public static bool IsClassPoolOrUltimate(CardInfo card) { if ((Object)(object)card != (Object)null) { if (!PoolCards.ContainsKey(card)) { return Ultimates.ContainsKey(card); } return true; } return false; } public static string GetOwnedClass(Player player) { if (player?.data?.currentCards == null) { return null; } foreach (KeyValuePair<string, CardInfo> entry in Entries) { if (player.data.currentCards.Contains(entry.Value)) { return entry.Key; } } return null; } } public static class ClassPickState { public static bool Active; public static int PlayerID = -1; public static string ClassName; public static void Begin(int playerID, string className) { Active = true; PlayerID = playerID; ClassName = className; } public static void End() { Active = false; PlayerID = -1; ClassName = null; } } public static class ClassSecondDraw { private static ManualLogSource _log; private static bool _hooked; public static void Register(ManualLogSource log) { _log = log; EnforceClassRules(); if (!_hooked) { _hooked = true; GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)ClassPicks, -1000); } } private static void EnforceClassRules() { try { if (ClassesManager.Class_War != null && !ClassesManager.Class_War.Value) { ClassesManager.Class_War.Value = true; } if (ClassesManager.Ignore_Blacklist != null && ClassesManager.Ignore_Blacklist.Value) { ClassesManager.Ignore_Blacklist.Value = false; } } catch { } } private static IEnumerator WaitForSyncUp() { if (!PhotonNetwork.OfflineMode && (Object)(object)ClassRoulettePlugin.Instance != (Object)null) { yield return MonoBehaviourExtensions.SyncMethod((MonoBehaviour)(object)ClassRoulettePlugin.Instance, "RPC_RequestSync", (int[])null, new object[1] { PhotonNetwork.LocalPlayer.ActorNumber }); } } [UnboundRPC] public static void RPC_RequestSync(int requestingPlayer) { NetworkingManager.RPC(typeof(ClassSecondDraw), "RPC_SyncResponse", new object[2] { requestingPlayer, PhotonNetwork.LocalPlayer.ActorNumber }); } [UnboundRPC] public static void RPC_SyncResponse(int requestingPlayer, int readyPlayer) { if (PhotonNetwork.LocalPlayer.ActorNumber == requestingPlayer && (Object)(object)ClassRoulettePlugin.Instance != (Object)null) { MonoBehaviourExtensions.RemovePendingRequest((MonoBehaviour)(object)ClassRoulettePlugin.Instance, readyPlayer, "RPC_RequestSync"); } } private static IEnumerator ClassPicks(IGameModeHandler gm) { EnforceClassRules(); if ((Object)(object)PlayerManager.instance == (Object)null) { yield break; } List<Player> players = (from val in PlayerManager.instance.players where (Object)(object)val != (Object)null && (Object)(object)val.data != (Object)null orderby val.playerID select val).ToList(); if (!players.Any((Player player) => ClassManager.GetOwnedClass(player) != null)) { yield break; } yield return WaitForSyncUp(); foreach (Player p in players) { string className = ClassManager.GetOwnedClass(p); if (className == null) { continue; } yield return WaitForSyncUp(); ClassPickState.Begin(p.playerID, className); try { try { CardChoiceVisuals instance = CardChoiceVisuals.instance; if (instance != null) { instance.Show(p.playerID, true); } } catch { } yield return GameModeManager.TriggerHook("PlayerPickStart"); yield return CardChoice.instance.DoPick(1, p.playerID, (PickerType)1); yield return (object)new WaitForSecondsRealtime(0.1f); } finally { ClassPickState.End(); } yield return GameModeManager.TriggerHook("PlayerPickEnd"); yield return (object)new WaitForSecondsRealtime(0.1f); } try { CardChoiceVisuals instance2 = CardChoiceVisuals.instance; if (instance2 != null) { instance2.Hide(); } } catch { } ClassPickState.End(); } } public static class EffectUtils { public static bool Mine(Player p) { if ((Object)(object)p?.data?.view != (Object)null) { return p.data.view.IsMine; } return false; } public static Player GetVictim(HitInfo hit, Player owner) { if (hit == null || (Object)(object)hit.transform == (Object)null) { return null; } Player componentInParent = ((Component)hit.transform).GetComponentInParent<Player>(); if ((Object)(object)componentInParent == (Object)null || (Object)(object)componentInParent == (Object)(object)owner) { return null; } if ((Object)(object)owner != (Object)null && componentInParent.teamID == owner.teamID) { return null; } return componentInParent; } public static ProjectileHit GetProjectileHit(GameObject projectile) { if ((Object)(object)projectile == (Object)null) { return null; } return projectile.GetComponentInChildren<ProjectileHit>(); } public static void BonusDamage(Player owner, Player victim, float amount, Color color) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if (Mine(owner) && !((Object)(object)victim?.data?.healthHandler == (Object)null) && !(amount <= 0f)) { Vector2 val = Vector2.op_Implicit(((Component)victim).transform.position); Vector2 val2 = Vector2.op_Implicit(((Component)victim).transform.position - ((Component)owner).transform.position); val2 = ((((Vector2)(ref val2)).sqrMagnitude < 0.0001f) ? Vector2.up : ((Vector2)(ref val2)).normalized); victim.data.healthHandler.DoDamage(val2 * amount, val, color, (GameObject)null, owner, false, true, false); } } public static void Poison(Player owner, Player victim, float totalDamage, float time, Color color) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) if (Mine(owner) && !((Object)(object)victim?.data?.healthHandler == (Object)null)) { victim.data.healthHandler.TakeDamageOverTime(Vector2.up * totalDamage, Vector2.op_Implicit(((Component)victim).transform.position), time, 0.5f, color, (GameObject)null, owner, true); } } public static void HealSelf(Player owner, HealthHandler health, float amount) { if (Mine(owner) && !((Object)(object)health == (Object)null)) { health.Heal(amount); } } public static void PushSelf(Player owner, HealthHandler health, Vector2 force) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (Mine(owner) && !((Object)(object)health == (Object)null)) { health.CallTakeForce(force, (ForceMode2D)1, false, true, 0.1f); } } public static void RadialBurst(Player owner, Vector2 center, float radius, float damage, float knockback, Color color, bool falloff = true) { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) if (!Mine(owner) || (Object)(object)PlayerManager.instance == (Object)null) { return; } foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player == (Object)null || (Object)(object)player == (Object)(object)owner || player.teamID == owner.teamID || (Object)(object)player.data == (Object)null || player.data.dead || !player.data.isPlaying) { continue; } Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); float num = Vector2.Distance(center, val); if (num > radius) { continue; } float num2 = (falloff ? Mathf.Clamp01(1f - num / radius) : 1f); Vector2 val2 = val - center; Vector2 val3; if (!(((Vector2)(ref val2)).sqrMagnitude < 0.0001f)) { val2 = val - center; val3 = ((Vector2)(ref val2)).normalized; } else { val3 = Vector2.up; } Vector2 val4 = val3; HealthHandler healthHandler = player.data.healthHandler; if (!((Object)(object)healthHandler == (Object)null)) { if (damage > 0f) { healthHandler.DoDamage(val4 * (damage * num2), val, color, (GameObject)null, owner, false, true, false); } if (knockback > 0f) { healthHandler.CallTakeForce(val4 * (knockback * num2), (ForceMode2D)1, false, false, 0.1f); } } } } } } namespace ClassRoulette.Classes.TricksterClass { [ClassCard("Trickster", CardRole.Entry)] public class Trickster : ClassStatCard { protected override string Name => "Trickster"; protected override string Text => "Class: TRICKSTER. Your bullets bounce off walls and hit harder each bounce. Bank shots around cover - but straight lines get weaker."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+2"), Cr.Stat("Damage per bounce", "+30%"), Cr.Stat("Damage", "-15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.reflects += 2; gun.dmgMOnBounce *= 1.3f; gun.damage = 0.85f; } } [ClassCard("Trickster", CardRole.Pool)] public class Ricochet : ClassStatCard { protected override string Name => "Ricochet"; protected override string Text => "More angles to work with."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+2")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.reflects += 2; } } [ClassCard("Trickster", CardRole.Pool)] public class Kinetic : ClassStatCard { protected override string Name => "Kinetic"; protected override string Text => "Bounces build power."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage per bounce", "+40%"), Cr.Stat("Speed per bounce", "+20%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.dmgMOnBounce *= 1.4f; gun.speedMOnBounce *= 1.2f; } } [ClassCard("Trickster", CardRole.Pool)] public class SmartBounce : ClassStatCard { protected override string Name => "Homing Bounce"; protected override string Text => "Bounces seek targets."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Smart bounces", "+2"), Cr.Stat("Damage", "-5%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.smartBounce += 2; gun.damage = 0.95f; } } [ClassCard("Trickster", CardRole.Pool)] public class LowGravity : ClassStatCard { protected override string Name => "Antigravity"; protected override string Text => "Bend the rules of physics."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet gravity", "-60%"), Cr.Stat("Bounces", "+1")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.gravity = 0.4f; gun.reflects++; } } [ClassCard("Trickster", CardRole.Pool)] public class Wobble : ClassStatCard { protected override string Name => "Wobble"; protected override string Text => "Wavy, unpredictable shots."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Wave motion", "ON"), Cr.Stat("Projectiles", "+1")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.waveMovement = true; gun.numberOfProjectiles++; } } [ClassCard("Trickster", CardRole.Pool)] public class Portal : ClassStatCard { protected override string Name => "Portal Rounds"; protected override string Text => "Now you see them..."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet portals", "+1"), Cr.Stat("Bounces", "+1")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.bulletPortal++; gun.reflects++; } } [ClassCard("Trickster", CardRole.Pool)] public class Drunk : ClassStatCard { protected override string Name => "Loose Cannon"; protected override string Text => "Spray and pray the angles."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Random bounces", "+3"), Cr.Stat("Damage per bounce", "+20%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.randomBounces += 3; gun.dmgMOnBounce *= 1.2f; } } [ClassCard("Trickster", CardRole.Pool)] public class Bouncy : ClassStatCard { protected override string Name => "Superball"; protected override string Text => "Keeps its speed on bounce."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+1"), Cr.Stat("Speed per bounce", "+30%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.reflects++; gun.speedMOnBounce *= 1.3f; } } [ClassCard("Trickster", CardRole.Pool)] public class CurveBall : ClassStatCard { protected override string Name => "Curve Ball"; protected override string Text => "Bend it around cover."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+1"), Cr.Stat("Damage per bounce", "+25%"), Cr.Stat("Bullet gravity", "-30%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.reflects++; gun.dmgMOnBounce *= 1.25f; gun.gravity = 0.7f; } } [ClassCard("Trickster", CardRole.Ultimate)] public class Pinball : ClassStatCard { protected override string Name => "Pinball"; protected override string Text => "ULTIMATE: +5 bounces and each bounce adds big damage and speed. Fill the room with lethal ricochets."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)8; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+5"), Cr.Stat("Damage per bounce", "+50%"), Cr.Stat("Speed per bounce", "+25%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.reflects += 5; gun.dmgMOnBounce *= 1.5f; gun.speedMOnBounce *= 1.25f; } } } namespace ClassRoulette.Classes.TankClass { public class RetaliateEffect : CardEffect { private float ragedUntil; public override void OnTakeDamage(Vector2 damage, bool selfDamage) { if (!selfDamage) { ragedUntil = Time.time + 3f; } } public override void OnShoot(GameObject projectile) { if (!(Time.time > ragedUntil)) { ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile); if ((Object)(object)projectileHit != (Object)null) { projectileHit.dealDamageMultiplierr *= 1.3f; } } } } public class LastStandEffect : CardEffect { private float last = -99f; public override void OnTakeDamage(Vector2 damage, bool selfDamage) { if (!selfDamage && !((Object)(object)((CardEffect)this).data == (Object)null) && ((CardEffect)this).data.health / Mathf.Max(1f, ((CardEffect)this).data.maxHealth) < 0.35f && Time.time - last > 8f) { last = Time.time; EffectUtils.HealSelf(((CardEffect)this).player, ((CardEffect)this).health, 25f); } } } [ClassCard("Tank", CardRole.Entry)] public class Tank : ClassEffectCard<RetaliateEffect> { protected override string Name => "Tank"; protected override string Text => "Class: TANK. When you take damage you enrage: +30% damage for 3 seconds."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+25%"), Cr.Stat("Movement speed", "-10%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.25f; m.movementSpeed = 0.9f; } } [ClassCard("Tank", CardRole.Pool)] public class Beefy : ClassStatCard { protected override string Name => "Beefy"; protected override string Text => "Just more of you."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+30%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.3f; } } [ClassCard("Tank", CardRole.Pool)] public class ThickSkin : ClassStatCard { protected override string Name => "Thick Skin"; protected override string Text => "Shrug it off."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+20%"), Cr.Stat("Regen", "+2/s")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.2f; m.regen += 2f; } } [ClassCard("Tank", CardRole.Pool)] public class Vampiric : ClassStatCard { protected override string Name => "Vampiric Plating"; protected override string Text => "Sustain through combat."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Lifesteal", "+20%"), Cr.Stat("Health", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.lifeSteal += 0.2f; m.health = 1.1f; } } [ClassCard("Tank", CardRole.Pool)] public class Heavyweight : ClassStatCard { protected override string Name => "Heavyweight"; protected override string Text => "Big and hard to move."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+20%"), Cr.Stat("Size", "+15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.2f; m.sizeMultiplier = 1.15f; } } [ClassCard("Tank", CardRole.Pool)] public class Bruiser : ClassStatCard { protected override string Name => "Bruiser"; protected override string Text => "Tough and mean."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+15%"), Cr.Stat("Damage", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.15f; gun.damage = 1.15f; } } [ClassCard("Tank", CardRole.Pool)] public class Sturdy : ClassStatCard { protected override string Name => "Sturdy"; protected override string Text => "Planted firmly."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+15%"), Cr.Stat("Block cooldown", "-15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.15f; b.cdMultiplier = 0.85f; } } [ClassCard("Tank", CardRole.Pool)] public class SecondWind : ClassStatCard { protected override string Name => "Second Wind"; protected override string Text => "Keep on ticking."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Regen", "+4/s"), Cr.Stat("Health", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.regen += 4f; m.health = 1.1f; } } [ClassCard("Tank", CardRole.Pool)] public class IronHide : ClassStatCard { protected override string Name => "Iron Hide"; protected override string Text => "Slow and unstoppable."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+40%"), Cr.Stat("Attack speed", "-10%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.4f; gun.attackSpeed = 1.1f; } } [ClassCard("Tank", CardRole.Pool)] public class Fortified : ClassStatCard { protected override string Name => "Fortified"; protected override string Text => "A wall that shoots back."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+25%"), Cr.Stat("Block cooldown", "-15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.25f; b.cdMultiplier = 0.85f; } } [ClassCard("Tank", CardRole.Ultimate)] public class LastStand : ClassEffectCard<LastStandEffect> { protected override string Name => "Last Stand"; protected override string Text => "ULTIMATE: When you drop below 35% HP you instantly heal 25 (once every 8s)."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)7; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+20%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.2f; } } } namespace ClassRoulette.Classes.SprayClass { public class RandomBulletEffect : CardEffect { private int shotCount; public override void OnShoot(GameObject projectile) { ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile); int num = new Random(((!((Object)(object)((CardEffect)this).player != (Object)null)) ? 1 : (((CardEffect)this).player.playerID + 1)) * 100000 + shotCount++).Next(0, 5); if (!((Object)(object)projectileHit == (Object)null)) { switch (num) { case 0: projectileHit.damage *= 1.3f; break; case 1: projectileHit.force *= 1.7f; break; case 2: projectileHit.stun += 0.2f; break; case 3: projectileHit.movementSlow += 0.35f; break; default: projectileHit.dealDamageMultiplierr *= 1.15f; break; } } } } public class OverdriveEffect : CardEffect { private float baseAttackSpeed = -1f; private float lastShot; private int heat; public override IEnumerator OnBattleStart(IGameModeHandler h) { baseAttackSpeed = ((CardEffect)this).gun.attackSpeed; heat = 0; yield break; } public override void OnShoot(GameObject projectile) { if (baseAttackSpeed < 0f) { baseAttackSpeed = ((CardEffect)this).gun.attackSpeed; } heat = ((Time.time - lastShot < 0.6f) ? Mathf.Min(heat + 1, 20) : 0); lastShot = Time.time; ((CardEffect)this).gun.attackSpeed = baseAttackSpeed * (1f - 0.02f * (float)heat); } private void Cool() { if (baseAttackSpeed > 0f) { ((CardEffect)this).gun.attackSpeed = baseAttackSpeed; } heat = 0; } public override IEnumerator OnPointEnd(IGameModeHandler h) { Cool(); yield break; } public override IEnumerator OnRoundEnd(IGameModeHandler h) { Cool(); yield break; } protected override void OnDestroy() { Cool(); ((CardEffect)this).OnDestroy(); } private void Update() { if (baseAttackSpeed > 0f && heat != 0 && Time.time - lastShot > 0.8f) { heat = 0; ((CardEffect)this).gun.attackSpeed = baseAttackSpeed; } } } [ClassCard("Spray", CardRole.Entry)] public class Sprayer : ClassEffectCard<RandomBulletEffect> { protected override string Name => "Spray"; protected override string Text => "Class: SPRAY. Every bullet rolls a random effect (bonus damage, knockback, stun, or slow)."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+15%"), Cr.Stat("Damage", "-10%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.85f; gun.damage = 0.9f; } } [ClassCard("Spray", CardRole.Pool)] public class Rapidfire : ClassStatCard { protected override string Name => "Rapidfire"; protected override string Text => "Hold the trigger."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+25%"), Cr.Stat("Damage", "-5%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.75f; gun.damage = 0.95f; } } [ClassCard("Spray", CardRole.Pool)] public class Scattershot : ClassStatCard { protected override string Name => "Scattershot"; protected override string Text => "More lead in the air."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+2"), Cr.Stat("Damage", "-25%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.numberOfProjectiles += 2; gun.damage = 0.75f; } } [ClassCard("Spray", CardRole.Pool)] public class DrumMag : ClassStatCard { protected override string Name => "Drum Mag"; protected override string Text => "Reload less, fire more."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Ammo", "+4"), Cr.Stat("Reload time", "-15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.ammo += 4; gun.reloadTime = 0.85f; } } [ClassCard("Spray", CardRole.Pool)] public class Bursty : ClassStatCard { protected override string Name => "Bursty"; protected override string Text => "Three-round bursts."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bursts", "+2"), Cr.Stat("Damage", "-10%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.bursts += 2; gun.timeBetweenBullets = 0.08f; gun.damage = 0.9f; } } [ClassCard("Spray", CardRole.Pool)] public class LightRounds : ClassStatCard { protected override string Name => "Light Rounds"; protected override string Text => "Speed over weight."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+15%"), Cr.Stat("Bullet speed", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.85f; gun.projectileSpeed = 1.15f; } } [ClassCard("Spray", CardRole.Pool)] public class Suppressive : ClassStatCard { protected override string Name => "Suppressive Fire"; protected override string Text => "Wall of bullets."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+1"), Cr.Stat("Attack speed", "+10%"), Cr.Stat("Spread", "+15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.numberOfProjectiles++; gun.attackSpeed = 0.9f; gun.spread += 0.08f; } } [ClassCard("Spray", CardRole.Pool)] public class Adrenaline : ClassStatCard { protected override string Name => "Adrenaline"; protected override string Text => "Faster on the draw."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+12%"), Cr.Stat("Movement speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.88f; m.movementSpeed = 1.1f; } } [ClassCard("Spray", CardRole.Pool)] public class HotBarrel : ClassStatCard { protected override string Name => "Hot Barrel"; protected override string Text => "It only gets hotter."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+20%"), Cr.Stat("Ammo", "+3")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.8f; gun.ammo += 3; } } [ClassCard("Spray", CardRole.Pool)] public class Sidearm : ClassStatCard { protected override string Name => "Sidearm"; protected override string Text => "Never let up."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+10%"), Cr.Stat("Projectiles", "+1"), Cr.Stat("Damage", "-12%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.9f; gun.numberOfProjectiles++; gun.damage = 0.88f; } } [ClassCard("Spray", CardRole.Ultimate)] public class Overdrive : ClassEffectCard<OverdriveEffect> { protected override string Name => "Overdrive"; protected override string Text => "ULTIMATE: Sustained fire heats your gun, ramping fire rate up to +40%. Stop firing and it cools down."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)1; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Ammo", "+3")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.ammo += 3; } } } namespace ClassRoulette.Classes.ShieldClass { public class ShieldbearerEffect : CardEffect { private bool empowered; public override void OnBlock(BlockTriggerType t) { empowered = true; } public override void OnShoot(GameObject projectile) { if (empowered) { empowered = false; ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile); if ((Object)(object)projectileHit != (Object)null) { projectileHit.dealDamageMultiplierr *= 1.6f; projectileHit.force *= 1.5f; } } } } public class PerfectGuardEffect : CardEffect { private float last = -99f; public override void OnBlock(BlockTriggerType t) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if (!(Time.time - last < 4f)) { last = Time.time; EffectUtils.RadialBurst(((CardEffect)this).player, Vector2.op_Implicit(((Component)((CardEffect)this).player).transform.position), 6f, 18f, 30f, Color.cyan); } } } public class GuardianPulseEffect : CardEffect { public override void OnBlock(BlockTriggerType t) { EffectUtils.HealSelf(((CardEffect)this).player, ((CardEffect)this).health, 8f); } } [ClassCard("Shield", CardRole.Entry)] public class Shieldbearer : ClassEffectCard<ShieldbearerEffect> { protected override string Name => "Shieldbearer"; protected override string Text => "Class: SHIELD. A successful block empowers your next shot (+damage & knockback)."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block cooldown", "-15%", positive: false)); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.cdMultiplier = 0.85f; } } [ClassCard("Shield", CardRole.Pool)] public class Bulwark : ClassStatCard { protected override string Name => "Bulwark"; protected override string Text => "Stand firm."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Blocks", "+1"), Cr.Stat("Block cooldown", "-15%", positive: false)); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.additionalBlocks++; block.cdMultiplier = 0.85f; } } [ClassCard("Shield", CardRole.Pool)] public class Aegis : ClassStatCard { protected override string Name => "Aegis"; protected override string Text => "A shield that mends."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+20%"), Cr.Stat("Block healing", "+10")); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.2f; block.healing += 10f; } } [ClassCard("Shield", CardRole.Pool)] public class QuickGuard : ClassStatCard { protected override string Name => "Quick Guard"; protected override string Text => "Blink and block."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block cooldown", "-30%", positive: false)); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.cdMultiplier = 0.7f; } } [ClassCard("Shield", CardRole.Pool)] public class ExtraPlating : ClassStatCard { protected override string Name => "Extra Plating"; protected override string Text => "More shields, more safety."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Blocks", "+2"), Cr.Stat("Movement speed", "-10%", positive: false)); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.additionalBlocks += 2; statModifiers.movementSpeed = 0.9f; } } [ClassCard("Shield", CardRole.Pool)] public class Fortress : ClassStatCard { protected override string Name => "Fortress"; protected override string Text => "Slow, but immovable."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+35%"), Cr.Stat("Movement speed", "-15%", positive: false)); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.35f; statModifiers.movementSpeed = 0.85f; } } [ClassCard("Shield", CardRole.Pool)] public class ReflectiveWard : ClassStatCard { protected override string Name => "Reflective Ward"; protected override string Text => "Empowered shots ricochet."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+2"), Cr.Stat("Damage", "+10%")); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.reflects += 2; gun.damage = 1.1f; } } [ClassCard("Shield", CardRole.Pool)] public class GuardianPulse : ClassEffectCard<GuardianPulseEffect> { protected override string Name => "Guardian Pulse"; protected override string Text => "Each block heals you for 8 HP."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block heal", "8 HP")); } [ClassCard("Shield", CardRole.Pool)] public class Counterweight : ClassStatCard { protected override string Name => "Counterweight"; protected override string Text => "Blocks shove attackers back."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Block knockback", "+high"), Cr.Stat("Blocks", "+1")); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.forceToAdd += 6000f; block.forceToAddUp += 2000f; block.additionalBlocks++; } } [ClassCard("Shield", CardRole.Pool)] public class Overcharged : ClassStatCard { protected override string Name => "Overcharged Shield"; protected override string Text => "A fortress that hits back."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Health", "+15%"), Cr.Stat("Damage", "+15%"), Cr.Stat("Block cooldown", "-10%", positive: false)); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.15f; gun.damage = 1.15f; block.cdMultiplier = 0.9f; } } [ClassCard("Shield", CardRole.Ultimate)] public class PerfectGuard : ClassEffectCard<PerfectGuardEffect> { protected override string Name => "Perfect Guard"; protected override string Text => "ULTIMATE: Blocking unleashes a shockwave that damages and knocks back nearby enemies (4s cooldown)."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)2; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Shockwave", "18 dmg"), Cr.Stat("Block cooldown", "-10%", positive: false)); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { block.cdMultiplier = 0.9f; } } } namespace ClassRoulette.Classes.PoisonClass { public class PoisonEffect : CardEffect { public override void OnBulletHit(GameObject projectile, HitInfo hit) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player); if (!((Object)(object)victim == (Object)null)) { EffectUtils.Poison(((CardEffect)this).player, victim, 4f, 3f, new Color(0.4f, 1f, 0f)); } } } public class VirulenceEffect : CardEffect { public override void OnBulletHit(GameObject projectile, HitInfo hit) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) Player victim = EffectUtils.GetVictim(hit, ((CardEffect)this).player); if (!((Object)(object)victim == (Object)null)) { EffectUtils.Poison(((CardEffect)this).player, victim, 9f, 4f, new Color(0.3f, 0.9f, 0f)); } } } [ClassCard("Poison", CardRole.Entry)] public class Poison : ClassEffectCard<PoisonEffect> { protected override string Name => "Poison"; protected override string Text => "Class: POISON. Your hits apply stacking poison (4 damage over 3s). Let it tick - but they can out-heal a single stack."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+10%"), Cr.Stat("Damage", "-15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.9f; gun.damage = 0.85f; } } [ClassCard("Poison", CardRole.Pool)] public class Venom : ClassStatCard { protected override string Name => "Venom"; protected override string Text => "More darts, more poison."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+15%"), Cr.Stat("Damage", "-5%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.85f; gun.damage = 0.95f; } } [ClassCard("Poison", CardRole.Pool)] public class Corrosion : ClassStatCard { protected override string Name => "Corrosion"; protected override string Text => "Weaken your foes."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Slow on hit", "+35%"), Cr.Stat("Attack speed", "+5%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.slow += 0.35f; gun.attackSpeed = 0.95f; } } [ClassCard("Poison", CardRole.Pool)] public class Plaguebearer : ClassStatCard { protected override string Name => "Plaguebearer"; protected override string Text => "Spread it wide."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+1"), Cr.Stat("Attack speed", "+8%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.numberOfProjectiles++; gun.attackSpeed = 0.92f; } } [ClassCard("Poison", CardRole.Pool)] public class Sickly : ClassStatCard { protected override string Name => "Sickly"; protected override string Text => "Death by a thousand ticks."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+12%"), Cr.Stat("Bullet speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.88f; gun.projectileSpeed = 1.1f; } } [ClassCard("Poison", CardRole.Pool)] public class Blight : ClassStatCard { protected override string Name => "Blight"; protected override string Text => "Lingering decay."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+15%"), Cr.Stat("Slow on hit", "+20%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.15f; gun.slow += 0.2f; } } [ClassCard("Poison", CardRole.Pool)] public class Festering : ClassStatCard { protected override string Name => "Festering"; protected override string Text => "It only gets worse."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Ammo", "+3"), Cr.Stat("Attack speed", "+8%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.ammo += 3; gun.attackSpeed = 0.92f; } } [ClassCard("Poison", CardRole.Pool)] public class Noxious : ClassStatCard { protected override string Name => "Noxious"; protected override string Text => "Choke them out."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Slow on hit", "+40%"), Cr.Stat("Damage", "+8%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.slow += 0.4f; gun.damage = 1.08f; } } [ClassCard("Poison", CardRole.Pool)] public class Antibody : ClassStatCard { protected override string Name => "Antibody"; protected override string Text => "Immune to your own toxins."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Regen", "+3/s"), Cr.Stat("Health", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.regen += 3f; m.health = 1.1f; } } [ClassCard("Poison", CardRole.Pool)] public class Miasma : ClassStatCard { protected override string Name => "Miasma"; protected override string Text => "Fill the air with rot."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+1"), Cr.Stat("Slow on hit", "+25%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.numberOfProjectiles++; gun.slow += 0.25f; } } [ClassCard("Poison", CardRole.Ultimate)] public class Virulence : ClassEffectCard<VirulenceEffect> { protected override string Name => "Virulence"; protected override string Text => "ULTIMATE: Your poison becomes deadly - 9 damage over 4s per hit, and it still stacks."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)5; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Attack speed", "+8%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.attackSpeed = 0.92f; } } } namespace ClassRoulette.Classes.PiercingClass { [ClassCard("Piercing", CardRole.Entry)] public class Piercing : ClassStatCard { protected override string Name => "Piercing"; protected override string Text => "Class: PIERCING. Your bullets punch through walls and keep going. Cover won't save them - but movement will."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Pierce walls", "YES"), Cr.Stat("Bullet speed", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.ignoreWalls = true; gun.projectileSpeed = 1.15f; } } [ClassCard("Piercing", CardRole.Pool)] public class ArmorPierce : ClassStatCard { protected override string Name => "Armor Pierce"; protected override string Text => "Cut straight through."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+20%"), Cr.Stat("Bullet speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.2f; gun.projectileSpeed = 1.1f; } } [ClassCard("Piercing", CardRole.Pool)] public class Railgun : ClassStatCard { protected override string Name => "Railgun"; protected override string Text => "Fast and flat."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet speed", "+40%"), Cr.Stat("Damage", "+10%"), Cr.Stat("Attack speed", "-10%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.projectileSpeed = 1.4f; gun.damage = 1.1f; gun.attackSpeed = 1.1f; } } [ClassCard("Piercing", CardRole.Pool)] public class Overpenetrate : ClassStatCard { protected override string Name => "Overpenetrate"; protected override string Text => "Keeps its punch downrange."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage over distance", "+25%"), Cr.Stat("Bullet speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damageAfterDistanceMultiplier = 1.25f; gun.projectileSpeed = 1.1f; } } [ClassCard("Piercing", CardRole.Pool)] public class Bypass : ClassStatCard { protected override string Name => "Bypass"; protected override string Text => "Shots that ignore blocks - but slow to fire."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Unblockable", "YES"), Cr.Stat("Attack speed", "-30%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.unblockable = true; gun.attackSpeed = 1.3f; } } [ClassCard("Piercing", CardRole.Pool)] public class Lance : ClassStatCard { protected override string Name => "Lance"; protected override string Text => "Long, sharp rounds."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+15%"), Cr.Stat("Bullet speed", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.15f; gun.projectileSpeed = 1.15f; } } [ClassCard("Piercing", CardRole.Pool)] public class Tungsten : ClassStatCard { protected override string Name => "Tungsten Core"; protected override string Text => "Dense and deadly."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+30%"), Cr.Stat("Attack speed", "-10%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.3f; gun.attackSpeed = 1.1f; } } [ClassCard("Piercing", CardRole.Pool)] public class Sabot : ClassStatCard { protected override string Name => "Sabot"; protected override string Text => "Flat trajectory, no drop."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet speed", "+25%"), Cr.Stat("Bullet gravity", "-50%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.projectileSpeed = 1.25f; gun.gravity = 0.5f; } } [ClassCard("Piercing", CardRole.Pool)] public class Puncture : ClassStatCard { protected override string Name => "Puncture"; protected override string Text => "More rounds through the gap."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+1"), Cr.Stat("Bullet speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.numberOfProjectiles++; gun.projectileSpeed = 1.1f; } } [ClassCard("Piercing", CardRole.Pool)] public class HollowPoint : ClassStatCard { protected override string Name => "Hollow Point"; protected override string Text => "Punch clean through."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+18%"), Cr.Stat("Bullet size", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.18f; gun.projectileSize += 0.15f; } } [ClassCard("Piercing", CardRole.Ultimate)] public class RailShot : ClassStatCard { protected override string Name => "Rail Shot"; protected override string Text => "ULTIMATE: Shots ignore walls AND blocks, and deal +12% of the target's current health. Land the shot - it can still be dodged."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Unblockable", "YES"), Cr.Stat("Target HP damage", "+12%"), Cr.Stat("Attack speed", "-15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.ignoreWalls = true; gun.unblockable = true; gun.percentageDamage += 0.12f; gun.attackSpeed = 1.15f; } } } namespace ClassRoulette.Classes.MovementClass { public class DashEffect : CardEffect { protected float cooldown = 1.2f; protected float dashForce = 15f; private float nextDash; public override void OnJump() { if (!(Time.time < nextDash)) { nextDash = Time.time + cooldown; Dash(); } } protected void Dash() { //IL_001b: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (((Object)(object)((CardEffect)this).data != (Object)null) ? ((CardEffect)this).data.aimDirection : Vector3.right); Vector2 right = default(Vector2); ((Vector2)(ref right))..ctor(val.x, val.y * 0.35f); if (((Vector2)(ref right)).sqrMagnitude < 0.0001f) { right = Vector2.right; } EffectUtils.PushSelf(((CardEffect)this).player, ((CardEffect)this).health, ((Vector2)(ref right)).normalized * dashForce); } } public class BlinkEffect : DashEffect { public BlinkEffect() { cooldown = 0.8f; dashForce = 26f; } } [ClassCard("Movement", CardRole.Entry)] public class Movement : ClassEffectCard<DashEffect> { protected override string Name => "Movement"; protected override string Text => "Class: MOVEMENT. Jump also dashes you in your aim direction (1.2s cooldown). Reposition, juke, and stay untouchable."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Movement speed", "+10%"), Cr.Stat("Jumps", "+1")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.movementSpeed = 1.1f; m.numberOfJumps++; } } [ClassCard("Movement", CardRole.Pool)] public class Sprint : ClassStatCard { protected override string Name => "Sprint"; protected override string Text => "Pure footspeed."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Movement speed", "+20%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.movementSpeed = 1.2f; } } [ClassCard("Movement", CardRole.Pool)] public class Leap : ClassStatCard { protected override string Name => "Leap"; protected override string Text => "Reach new heights."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Jump height", "+20%"), Cr.Stat("Jumps", "+1")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.jump = 1.2f; m.numberOfJumps++; } } [ClassCard("Movement", CardRole.Pool)] public class Featherfall : ClassStatCard { protected override string Name => "Featherfall"; protected override string Text => "Float like a leaf."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Gravity", "-30%"), Cr.Stat("Movement speed", "+8%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.gravity = 0.7f; m.movementSpeed = 1.08f; } } [ClassCard("Movement", CardRole.Pool)] public class Nimble : ClassStatCard { protected override string Name => "Nimble"; protected override string Text => "Small and slippery."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Size", "-15%"), Cr.Stat("Movement speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.sizeMultiplier = 0.85f; m.movementSpeed = 1.1f; } } [ClassCard("Movement", CardRole.Pool)] public class Acrobat : ClassStatCard { protected override string Name => "Acrobat"; protected override string Text => "Never stop moving."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Jumps", "+2"), Cr.Stat("Jump height", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.numberOfJumps += 2; m.jump = 1.1f; } } [ClassCard("Movement", CardRole.Pool)] public class Windrunner : ClassStatCard { protected override string Name => "Windrunner"; protected override string Text => "Speed feeds your aim."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Movement speed", "+15%"), Cr.Stat("Bullet speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.movementSpeed = 1.15f; gun.projectileSpeed = 1.1f; } } [ClassCard("Movement", CardRole.Pool)] public class Evasion : ClassStatCard { protected override string Name => "Evasion"; protected override string Text => "Hard to pin down."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Movement speed", "+12%"), Cr.Stat("Size", "-10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.movementSpeed = 1.12f; m.sizeMultiplier = 0.9f; } } [ClassCard("Movement", CardRole.Pool)] public class Momentum : ClassStatCard { protected override string Name => "Momentum"; protected override string Text => "Speed and a little punch."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Movement speed", "+10%"), Cr.Stat("Damage", "+8%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.movementSpeed = 1.1f; gun.damage = 1.08f; } } [ClassCard("Movement", CardRole.Pool)] public class Freerunner : ClassStatCard { protected override string Name => "Freerunner"; protected override string Text => "Always in motion."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Movement speed", "+15%"), Cr.Stat("Jump height", "+10%"), Cr.Stat("Jumps", "+1")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.movementSpeed = 1.15f; m.jump = 1.1f; m.numberOfJumps++; } } [ClassCard("Movement", CardRole.Ultimate)] public class Blink : ClassEffectCard<BlinkEffect> { protected override string Name => "Blink"; protected override string Text => "ULTIMATE: Your dash becomes a powerful blink - much longer range and a shorter cooldown. Cross the map in a blink."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)6; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Movement speed", "+10%"), Cr.Stat("Jumps", "+1")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.movementSpeed = 1.1f; m.numberOfJumps++; } } } namespace ClassRoulette.Classes.MarksmanClass { public class FocusEffect : CardEffect { private int stacks; public override void OnShoot(GameObject projectile) { if (stacks > 0) { ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile); if ((Object)(object)projectileHit != (Object)null) { projectileHit.dealDamageMultiplierr *= 1f + 0.12f * (float)stacks; } } } public override void OnBulletHit(GameObject projectile, HitInfo hit) { if ((Object)(object)EffectUtils.GetVictim(hit, ((CardEffect)this).player) != (Object)null) { stacks = Mathf.Min(stacks + 1, 5); } else if (hit != null && (Object)(object)hit.transform != (Object)null) { stacks = 0; } } } public class DeadeyeEffect : CardEffect { private int streak; public override void OnShoot(GameObject projectile) { if (streak >= 3) { ProjectileHit projectileHit = EffectUtils.GetProjectileHit(projectile); if ((Object)(object)projectileHit != (Object)null) { projectileHit.dealDamageMultiplierr *= 1.4f; projectileHit.unblockable = true; } } } public override void OnBulletHit(GameObject projectile, HitInfo hit) { if ((Object)(object)EffectUtils.GetVictim(hit, ((CardEffect)this).player) != (Object)null) { streak++; } else if (hit != null && (Object)(object)hit.transform != (Object)null) { streak = 0; } } } [ClassCard("Marksman", CardRole.Entry)] public class Marksman : ClassEffectCard<FocusEffect> { protected override string Name => "Marksman"; protected override string Text => "Class: MARKSMAN. Consecutive on-target hits ramp your damage (up to +60%); missing resets your Focus."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet speed", "+15%"), Cr.Stat("Spread", "-15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.projectileSpeed = 1.15f; gun.multiplySpread = 0.85f; } } [ClassCard("Marksman", CardRole.Pool)] public class SteadyAim : ClassStatCard { protected override string Name => "Steady Aim"; protected override string Text => "Tighten your spread."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Spread", "-40%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.multiplySpread = 0.6f; } } [ClassCard("Marksman", CardRole.Pool)] public class HighVelocity : ClassStatCard { protected override string Name => "High Velocity"; protected override string Text => "Faster bullets are harder to dodge."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet speed", "+35%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.projectileSpeed = 1.35f; } } [ClassCard("Marksman", CardRole.Pool)] public class Longshot : ClassStatCard { protected override string Name => "Longshot"; protected override string Text => "Bullets keep their bite over distance."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage over distance", "+25%"), Cr.Stat("Bullet speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damageAfterDistanceMultiplier = 1.25f; gun.projectileSpeed = 1.1f; } } [ClassCard("Marksman", CardRole.Pool)] public class MarksmansEye : ClassStatCard { protected override string Name => "Marksman's Eye"; protected override string Text => "Hit hard, fire slow."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+30%"), Cr.Stat("Attack speed", "-15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.3f; gun.attackSpeed = 1.15f; } } [ClassCard("Marksman", CardRole.Pool)] public class Scope : ClassStatCard { protected override string Name => "Scope"; protected override string Text => "Precision optics."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Spread", "-25%", positive: false), Cr.Stat("Bullet speed", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.multiplySpread = 0.75f; gun.projectileSpeed = 1.15f; } } [ClassCard("Marksman", CardRole.Pool)] public class PrecisionGrip : ClassStatCard { protected override string Name => "Precision Grip"; protected override string Text => "Steady hands."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+15%"), Cr.Stat("Recoil", "-30%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.15f; gun.recoilMuiltiplier = 0.7f; } } [ClassCard("Marksman", CardRole.Pool)] public class HollowPoint : ClassStatCard { protected override string Name => "Hollow Point"; protected override string Text => "Fewer, deadlier rounds."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+25%"), Cr.Stat("Ammo", "-2", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.25f; gun.ammo = -2; } } [ClassCard("Marksman", CardRole.Pool)] public class Marked : ClassStatCard { protected override string Name => "Marked"; protected override string Text => "Line up the shot."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+15%"), Cr.Stat("Bullet speed", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.15f; gun.projectileSpeed = 1.1f; } } [ClassCard("Marksman", CardRole.Pool)] public class Ranger : ClassStatCard { protected override string Name => "Ranger"; protected override string Text => "Reach out and touch them."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage over distance", "+20%"), Cr.Stat("Bullet speed", "+12%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damageAfterDistanceMultiplier = 1.2f; gun.projectileSpeed = 1.12f; } } [ClassCard("Marksman", CardRole.Ultimate)] public class Deadeye : ClassEffectCard<DeadeyeEffect> { protected override string Name => "Deadeye"; protected override string Text => "ULTIMATE: After 3 hits in a row, your next shot pierces blocks and deals +40% damage. Missing resets the chain."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)3; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+15%"), Cr.Stat("Bullet speed", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.15f; gun.projectileSpeed = 1.15f; } } } namespace ClassRoulette.Classes.ExplosiveClass { public class DetonationEffect : CardEffect { public override void OnBulletHit(GameObject projectile, HitInfo hit) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (EffectUtils.Mine(((CardEffect)this).player)) { Vector2 pos = hit?.point ?? Vector2.op_Implicit(projectile.transform.position); ((MonoBehaviour)this).StartCoroutine(Boom(pos)); } } private IEnumerator Boom(Vector2 pos) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSeconds(0.35f); EffectUtils.RadialBurst(((CardEffect)this).player, pos, 3f, 8f, 15f, new Color(1f, 0.5f, 0f)); } } public class ClusterEffect : CardEffect { public override void OnBulletHit(GameObject projectile, HitInfo hit) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (EffectUtils.Mine(((CardEffect)this).player)) { Vector2 pos = hit?.point ?? Vector2.op_Implicit(projectile.transform.position); ((MonoBehaviour)this).StartCoroutine(Cluster(pos)); } } private IEnumerator Cluster(Vector2 pos) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSeconds(0.4f); EffectUtils.RadialBurst(((CardEffect)this).player, pos, 5f, 14f, 25f, new Color(1f, 0.4f, 0f)); for (int i = 0; i < 3; i++) { yield return (object)new WaitForSeconds(0.15f); Vector2 center = pos + Random.insideUnitCircle * 3f; EffectUtils.RadialBurst(((CardEffect)this).player, center, 3f, 7f, 12f, new Color(1f, 0.6f, 0f)); } } } [ClassCard("Explosive", CardRole.Entry)] public class Explosive : ClassEffectCard<DetonationEffect> { protected override string Name => "Explosive"; protected override string Text => "Class: EXPLOSIVE. Bullets leave a delayed blast where they land (8 AoE damage). Move off the mark to dodge it."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet size", "+25%"), Cr.Stat("Attack speed", "-10%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.projectileSize += 0.25f; gun.attackSpeed = 1.1f; } } [ClassCard("Explosive", CardRole.Pool)] public class Ordnance : ClassStatCard { protected override string Name => "Ordnance"; protected override string Text => "Heavier payloads."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+20%"), Cr.Stat("Bullet size", "+20%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.2f; gun.projectileSize += 0.2f; } } [ClassCard("Explosive", CardRole.Pool)] public class Shrapnel : ClassStatCard { protected override string Name => "Shrapnel"; protected override string Text => "Spread the pain."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Projectiles", "+2"), Cr.Stat("Damage", "-15%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.numberOfProjectiles += 2; gun.damage = 0.85f; } } [ClassCard("Explosive", CardRole.Pool)] public class Demolition : ClassStatCard { protected override string Name => "Demolition"; protected override string Text => "Knock 'em flying."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Knockback", "+60%"), Cr.Stat("Damage", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.knockback = 1.6f; gun.damage = 1.1f; } } [ClassCard("Explosive", CardRole.Pool)] public class BigBore : ClassStatCard { protected override string Name => "Big Bore"; protected override string Text => "Massive rounds."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet size", "+50%"), Cr.Stat("Damage", "+15%"), Cr.Stat("Attack speed", "-10%", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.projectileSize += 0.5f; gun.damage = 1.15f; gun.attackSpeed = 1.1f; } } [ClassCard("Explosive", CardRole.Pool)] public class Grenadier : ClassStatCard { protected override string Name => "Grenadier"; protected override string Text => "Lob them in."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+15%"), Cr.Stat("Bullet gravity", "+high", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.15f; gun.gravity = 1.5f; } } [ClassCard("Explosive", CardRole.Pool)] public class ChainCharge : ClassStatCard { protected override string Name => "Chain Charge"; protected override string Text => "Bouncing booms."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bounces", "+2"), Cr.Stat("Damage", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.reflects += 2; gun.damage = 1.1f; } } [ClassCard("Explosive", CardRole.Pool)] public class BlastRadius : ClassStatCard { protected override string Name => "Blast Radius"; protected override string Text => "Everything hits harder."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+25%"), Cr.Stat("Bullet size", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.25f; gun.projectileSize += 0.15f; } } [ClassCard("Explosive", CardRole.Pool)] public class Volatile : ClassStatCard { protected override string Name => "Volatile"; protected override string Text => "High risk, high yield."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+35%"), Cr.Stat("Ammo", "-2", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.35f; gun.ammo = -2; } } [ClassCard("Explosive", CardRole.Pool)] public class Napalm : ClassStatCard { protected override string Name => "Napalm"; protected override string Text => "Leave them burning."; protected override Rarity CardRarity => Cr.Uncommon; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+18%"), Cr.Stat("Slow on hit", "+25%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.18f; gun.slow += 0.25f; } } [ClassCard("Explosive", CardRole.Ultimate)] public class ChainReaction : ClassEffectCard<ClusterEffect> { protected override string Name => "Chain Reaction"; protected override string Text => "ULTIMATE: Your detonations become clusters - a big blast plus three smaller secondary explosions."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)0; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Bullet size", "+15%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.projectileSize += 0.15f; } } } namespace ClassRoulette.Classes.ChaosClass { public class ChaosEffect : CardEffect { protected static readonly HashSet<int> PandemoniumOwners = new HashSet<int>(); protected bool doubleRoll; protected bool positiveOnly; private readonly List<Action> reverts = new List<Action>(); private int battleCount; private int RoundProxy() { int num = 0; if ((Object)(object)PlayerManager.instance != (Object)null) { foreach (Player player in PlayerManager.instance.players) { if (player?.data?.currentCards != null) { num += player.data.currentCards.Count; } } } return num; } public override IEnumerator OnBattleStart(IGameModeHandler gameModeHandler) { ApplyRoll(); yield break; } public override IEnumerator OnPointEnd(IGameModeHandler gameModeHandler) { RevertAll(); yield break; } public override IEnumerator OnRoundEnd(IGameModeHandler gameModeHandler) { RevertAll(); yield break; } protected override void OnDestroy() { RevertAll(); ((CardEffect)this).OnDestroy(); } private void ApplyRoll() { RevertAll(); battleCount++; if (positiveOnly || !((Object)(object)((CardEffect)this).player != (Object)null) || !PandemoniumOwners.Contains(((CardEffect)this).player.playerID)) { Random rng = new Random(((!((Object)(object)((CardEffect)this).player != (Object)null)) ? 1 : (((CardEffect)this).player.playerID + 1)) * 7919 + RoundProxy() * 31 + battleCount); int num = ((!doubleRoll) ? 1 : 2); for (int i = 0; i < num; i++) { RollOne(rng); } } } private void RollOne(Random rng) { switch (positiveOnly ? rng.Next(0, 6) : rng.Next(0, 9)) { case 0: Mul(delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.damage *= v; }, delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.damage /= v; }, 1.35f); break; case 1: Mul(delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.attackSpeed *= v; }, delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.attackSpeed /= v; }, 0.7f); break; case 2: Add(delegate { Gun gun = ((CardEffect)this).gun; gun.numberOfProjectiles += 2; }, delegate { Gun gun = ((CardEffect)this).gun; gun.numberOfProjectiles -= 2; }); break; case 3: Mul(delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.projectileSpeed *= v; }, delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.projectileSpeed /= v; }, 1.4f); break; case 4: Add(delegate { Gun gun = ((CardEffect)this).gun; gun.reflects += 3; }, delegate { Gun gun = ((CardEffect)this).gun; gun.reflects -= 3; }); break; case 5: Mul(delegate(float v) { CharacterStatModifiers characterStats = ((CardEffect)this).characterStats; characterStats.movementSpeed *= v; }, delegate(float v) { CharacterStatModifiers characterStats = ((CardEffect)this).characterStats; characterStats.movementSpeed /= v; }, 1.25f); break; case 6: Mul(delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.damage *= v; }, delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.damage /= v; }, 0.75f); break; case 7: Mul(delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.spread += v; }, delegate(float v) { Gun gun = ((CardEffect)this).gun; gun.spread -= v; }, 0.15f); break; default: Mul(delegate(float v) { CharacterStatModifiers characterStats = ((CardEffect)this).characterStats; characterStats.movementSpeed *= v; }, delegate(float v) { CharacterStatModifiers characterStats = ((CardEffect)this).characterStats; characterStats.movementSpeed /= v; }, 0.8f); break; } } private void Mul(Action<float> apply, Action<float> undo, float v) { apply(v); reverts.Add(delegate { undo(v); }); } private void Add(Action apply, Action undo) { apply(); reverts.Add(undo); } private void RevertAll() { for (int num = reverts.Count - 1; num >= 0; num--) { try { reverts[num](); } catch { } } reverts.Clear(); } } public class PandemoniumEffect : ChaosEffect { public PandemoniumEffect() { doubleRoll = true; positiveOnly = true; } protected override void Start() { ((CardEffect)this).Start(); if ((Object)(object)((CardEffect)this).player != (Object)null) { ChaosEffect.PandemoniumOwners.Add(((CardEffect)this).player.playerID); } } protected override void OnDestroy() { if ((Object)(object)((CardEffect)this).player != (Object)null) { ChaosEffect.PandemoniumOwners.Remove(((CardEffect)this).player.playerID); } base.OnDestroy(); } } [ClassCard("Chaos", CardRole.Entry)] public class Chaos : ClassEffectCard<ChaosEffect> { protected override string Name => "Chaos"; protected override string Text => "Class: CHAOS. Every round you roll a random modifier - it might be a huge buff or a nasty downside. Adapt to whatever you're dealt."; protected override Rarity CardRarity => Cr.Rare; protected override CardThemeColorType Color => (CardThemeColorType)4; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Random modifier", "each round"), Cr.Stat("Health", "+10%")); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { m.health = 1.1f; } } [ClassCard("Chaos", CardRole.Pool)] public class Gamble : ClassStatCard { protected override string Name => "Gamble"; protected override string Text => "High risk, high reward."; protected override Rarity CardRarity => Cr.Common; protected override CardThemeColorType Color => (CardThemeColorType)4; protected override CardInfoStat[] StatList => Cr.Stats(Cr.Stat("Damage", "+25%"), Cr.Stat("Ammo", "-1", positive: false)); public override void SetupCard(CardInfo c, Gun gun, ApplyCardStats s, CharacterStatModifiers m, Block b) { gun.damage = 1.25f; gun.ammo = -1; } } [ClassCard("Chaos", CardRole.Pool)] public class WildCard : ClassStatCard { protected override string Name => "Wild Card"; protected override string Text => "A bit of everything."; protected override