using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Microsoft.CodeAnalysis; using ModdingUtils.Utils; using RarityLib.Utils; using ReksikCards.Cards; using ReksikCards.Culture; using ReksikCards.Monos; using ReksikCards.Vfx; using TMPro; using UnboundLib; using UnboundLib.Cards; using UnboundLib.Networking; using UnboundLib.Utils.UI; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ReksikCards")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+0fbecc4f03dc29fe44c83f8b0218e1023db9b306")] [assembly: AssemblyProduct("ReksikCards")] [assembly: AssemblyTitle("ReksikCards")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace ReksikCards { public enum ReksikBondId { Workshop, IronPact, Harmony, RedDetonation, LongGame, BossProtocol } public sealed class ReksikBondDefinition { public ReksikBondId Id { get; } public string Key { get; } public string DisplayName { get; } public string CompactName { get; } public string FirstCardName { get; } public string SecondCardName { get; } internal ReksikBondDefinition(ReksikBondId id, string key, string displayName, string compactName, string firstCardName, string secondCardName) { Id = id; Key = key; DisplayName = displayName; CompactName = compactName; FirstCardName = firstCardName; SecondCardName = secondCardName; } } public sealed class ReksikActiveBond { public ReksikBondDefinition Definition { get; } public int FirstCount { get; } public int SecondCount { get; } public int CombinedLevel { get; } public float BondPower { get; } internal ReksikActiveBond(ReksikBondDefinition definition, int firstCount, int secondCount, int combinedLevel, float bondPower) { Definition = definition; FirstCount = firstCount; SecondCount = secondCount; CombinedLevel = combinedLevel; BondPower = bondPower; } } public static class ReksikBonds { private static readonly ReksikBondDefinition[] DefinitionsInternal = new ReksikBondDefinition[6] { new ReksikBondDefinition(ReksikBondId.Workshop, "workshop", "Workshop", "WS", "Artem", "Sosnovka"), new ReksikBondDefinition(ReksikBondId.IronPact, "iron-pact", "Iron Pact", "IP", "Daniil", "Dmitriy"), new ReksikBondDefinition(ReksikBondId.Harmony, "harmony", "Harmony", "HY", "Tukson", "Nesen"), new ReksikBondDefinition(ReksikBondId.RedDetonation, "red-detonation", "Red Detonation", "RD", "Fedr", "Viktor"), new ReksikBondDefinition(ReksikBondId.LongGame, "long-game", "Long Game", "LG", "Egor", "Matvey"), new ReksikBondDefinition(ReksikBondId.BossProtocol, "boss-protocol", "Boss Protocol", "BP", "Rex", "Agent") }; public static IReadOnlyList Definitions => DefinitionsInternal; public static int Count(Player player, string cardName) { if ((Object)(object)player == (Object)null || string.IsNullOrEmpty(cardName)) { return 0; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component != (Object)null)) { return 0; } return component.Get(cardName); } public static bool Has(Player player, string cardName) { return Count(player, cardName) > 0; } public static bool Has(Player player, ReksikBondId bondId) { ReksikBondDefinition reksikBondDefinition = Find(bondId); if (reksikBondDefinition != null && Has(player, reksikBondDefinition.FirstCardName)) { return Has(player, reksikBondDefinition.SecondCardName); } return false; } public static bool Has(Player player, string firstCardName, string secondCardName) { if (Has(player, firstCardName)) { return Has(player, secondCardName); } return false; } public static int CombinedLevel(Player player, ReksikBondId bondId) { ReksikBondDefinition reksikBondDefinition = Find(bondId); if (reksikBondDefinition != null) { return CombinedLevel(player, reksikBondDefinition); } return 0; } public static int CombinedLevel(Player player, string bondKey) { ReksikBondDefinition reksikBondDefinition = Find(bondKey); if (reksikBondDefinition != null) { return CombinedLevel(player, reksikBondDefinition); } return 0; } public static int CombinedLevel(Player player, string firstCardName, string secondCardName) { int num = Count(player, firstCardName); int num2 = Count(player, secondCardName); if (num <= 0 || num2 <= 0) { return 0; } return num + num2 - 1; } public static int CombinedLevel(Player player, ReksikBondDefinition definition) { if (definition == null) { return 0; } return CombinedLevel(player, definition.FirstCardName, definition.SecondCardName); } public static float BondPower(Player player, ReksikBondId bondId) { return BondPower(CombinedLevel(player, bondId)); } public static float BondPower(Player player, string bondKey) { return BondPower(CombinedLevel(player, bondKey)); } public static float BondPower(Player player, ReksikBondDefinition definition) { return BondPower(CombinedLevel(player, definition)); } public static float BondPower(int combinedLevel) { if (!ReksikHostSettings.BondsEnabled || combinedLevel <= 0) { return 0f; } return (float)combinedLevel * ReksikHostSettings.MechanicPower; } public static IEnumerable ActiveBonds(Player player) { for (int i = 0; i < DefinitionsInternal.Length; i++) { ReksikBondDefinition reksikBondDefinition = DefinitionsInternal[i]; int num = Count(player, reksikBondDefinition.FirstCardName); int num2 = Count(player, reksikBondDefinition.SecondCardName); if (num > 0 && num2 > 0) { int combinedLevel = num + num2 - 1; yield return new ReksikActiveBond(reksikBondDefinition, num, num2, combinedLevel, BondPower(combinedLevel)); } } } public static IEnumerable GetActiveBonds(Player player) { return ActiveBonds(player); } public static ReksikBondDefinition? Find(ReksikBondId bondId) { for (int i = 0; i < DefinitionsInternal.Length; i++) { if (DefinitionsInternal[i].Id == bondId) { return DefinitionsInternal[i]; } } return null; } public static ReksikBondDefinition? Find(string bondKey) { if (string.IsNullOrEmpty(bondKey)) { return null; } for (int i = 0; i < DefinitionsInternal.Length; i++) { ReksikBondDefinition reksikBondDefinition = DefinitionsInternal[i]; if (string.Equals(reksikBondDefinition.Key, bondKey, StringComparison.OrdinalIgnoreCase) || string.Equals(reksikBondDefinition.DisplayName, bondKey, StringComparison.OrdinalIgnoreCase)) { return reksikBondDefinition; } } return null; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency("root.rarity.lib", "1.3.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.reksikcards.rounds", "ReksikCards", "5.0.0")] [BepInProcess("Rounds.exe")] public class ReksikCardsPlugin : BaseUnityPlugin { public const string ModId = "com.reksikcards.rounds"; public const string ModName = "ReksikCards"; public const string Version = "5.0.0"; public const string ModInitials = "Reksik"; private float nextBondScanAt; public static ReksikCardsPlugin Instance { get; private set; } internal static void LogCultureRuntime(string message) { if ((Object)(object)Instance != (Object)null) { ((BaseUnityPlugin)Instance).Logger.LogInfo((object)message); } } private void Awake() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) new Harmony("com.reksikcards.rounds").PatchAll(); } private void Start() { Instance = this; ReksikHostSettings.Initialize(((BaseUnityPlugin)this).Config); ReksikSettingsMenu.Register(); ReksikHostSettings.StartNetworking(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CulturalCardRegistry.RegisterAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)("ReksikCards 5.0.0 loaded: 22 manual + " + 198 + " Culture cards registered.")); } private void Update() { ReksikHostSettings.UpdateHostSync(); ReksikRarityWeights.Update(); if (Time.unscaledTime < nextBondScanAt) { return; } nextBondScanAt = Time.unscaledTime + 0.75f; if ((Object)(object)PlayerManager.instance == (Object)null || PlayerManager.instance.players == null) { return; } foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null) { ReksikBondSystemMono.GetOrAdd(player); } } } } internal static class ReksikRuntimeStatMath { private const float MultiplierEpsilon = 0.0001f; public static float ApplyMultiplier(float currentValue, ref float appliedMultiplier, float newMultiplier, float minValue = float.NegativeInfinity, float maxValue = float.PositiveInfinity) { float num = RemoveMultiplierCore(currentValue, appliedMultiplier); float num2 = Mathf.Max(0.0001f, newMultiplier); float num3 = ClampFloat(num * num2, minValue, maxValue); appliedMultiplier = ((Mathf.Abs(num) < 0.0001f) ? 1f : (num3 / num)); return num3; } public static float RemoveMultiplier(float currentValue, ref float appliedMultiplier, float minValue = float.NegativeInfinity, float maxValue = float.PositiveInfinity) { float value = RemoveMultiplierCore(currentValue, appliedMultiplier); appliedMultiplier = 1f; return ClampFloat(value, minValue, maxValue); } public static float ApplyAdditive(float currentValue, ref float appliedAmount, float newAmount, float minValue = float.NegativeInfinity, float maxValue = float.PositiveInfinity) { float num = currentValue - appliedAmount; float num2 = ClampFloat(num + newAmount, minValue, maxValue); appliedAmount = num2 - num; return num2; } public static float RemoveAdditive(float currentValue, ref float appliedAmount, float minValue = float.NegativeInfinity, float maxValue = float.PositiveInfinity) { float value = currentValue - appliedAmount; appliedAmount = 0f; return ClampFloat(value, minValue, maxValue); } public static float ApplyMinimumBoost(float currentValue, ref float appliedAmount, float minimumValue) { float num = currentValue - appliedAmount; appliedAmount = Mathf.Max(0f, minimumValue - num); return num + appliedAmount; } public static float RemoveMinimumBoost(float currentValue, ref float appliedAmount) { return RemoveAdditive(currentValue, ref appliedAmount); } public static int ApplyAdditive(int currentValue, ref int appliedAmount, int newAmount, int minValue = int.MinValue, int maxValue = int.MaxValue) { int num = currentValue - appliedAmount; int num2 = Mathf.Clamp(num + newAmount, minValue, maxValue); appliedAmount = num2 - num; return num2; } public static int RemoveAdditive(int currentValue, ref int appliedAmount, int minValue = int.MinValue, int maxValue = int.MaxValue) { int num = currentValue - appliedAmount; appliedAmount = 0; return Mathf.Clamp(num, minValue, maxValue); } private static float RemoveMultiplierCore(float currentValue, float appliedMultiplier) { float num = ((Mathf.Abs(appliedMultiplier) < 0.0001f) ? 1f : appliedMultiplier); return currentValue / num; } private static float ClampFloat(float value, float minValue, float maxValue) { if (!float.IsNegativeInfinity(minValue)) { value = Mathf.Max(minValue, value); } if (!float.IsPositiveInfinity(maxValue)) { value = Mathf.Min(maxValue, value); } return value; } } internal static class ReksikUtils { private static readonly FieldInfo PlayerVelocityField = typeof(PlayerVelocity).GetField("velocity", BindingFlags.Instance | BindingFlags.NonPublic); public static IEnumerable EnemyPlayers(Player self) { if ((Object)(object)PlayerManager.instance == (Object)null || PlayerManager.instance.players == null || (Object)(object)self == (Object)null) { yield break; } foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)null) && player.teamID != self.teamID) { yield return player; } } } public static Player? GetClosestEnemy(Player self) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)self == (Object)null) { return null; } Vector2 val = Vector2.op_Implicit(((Component)self).transform.position); Player result = null; float num = float.MaxValue; foreach (Player item in EnemyPlayers(self)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead) { Vector2 val2 = Vector2.op_Implicit(((Component)item).transform.position) - val; float sqrMagnitude = ((Vector2)(ref val2)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; result = item; } } } return result; } public static Player? GetClosestEnemy(Player self, float maxRange) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)self == (Object)null) { return null; } if (maxRange <= 0f) { return null; } Vector2 val = Vector2.op_Implicit(((Component)self).transform.position); float num = maxRange * maxRange; Player result = null; float num2 = num; foreach (Player item in EnemyPlayers(self)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead) { Vector2 val2 = Vector2.op_Implicit(((Component)item).transform.position) - val; float sqrMagnitude = ((Vector2)(ref val2)).sqrMagnitude; if (sqrMagnitude <= num2) { num2 = sqrMagnitude; result = item; } } } return result; } public static float GetDamageFactor(Player p) { try { if ((Object)(object)p == (Object)null || (Object)(object)p.data == (Object)null || (Object)(object)p.data.weaponHandler == (Object)null || (Object)(object)p.data.weaponHandler.gun == (Object)null) { return 1f; } float damage = p.data.weaponHandler.gun.damage; if (float.IsNaN(damage) || float.IsInfinity(damage)) { return 1f; } return Mathf.Clamp(damage, 0.05f, 50f); } catch { return 1f; } } public static float HealthFraction(Player p) { if ((Object)(object)p == (Object)null || (Object)(object)p.data == (Object)null) { return 1f; } if (p.data.maxHealth <= 0f) { return 1f; } return Mathf.Clamp01(p.data.health / p.data.maxHealth); } public static void Heal(Player p, float amount) { if (!((Object)(object)p == (Object)null) && !((Object)(object)p.data == (Object)null)) { p.data.health = Mathf.Min(p.data.maxHealth, p.data.health + amount); } } public static void AddVelocity(Player p, Vector2 add) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)p == (Object)null || (Object)(object)p.data == (Object)null) { return; } if (PlayerVelocityField != null && (Object)(object)p.data.playerVel != (Object)null) { try { Vector2 val = (Vector2)PlayerVelocityField.GetValue(p.data.playerVel); PlayerVelocityField.SetValue(p.data.playerVel, val + add); return; } catch (Exception) { } } MoveTransform componentInChildren = ((Component)p).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.velocity += new Vector3(add.x, add.y, 0f); } } public static void AddHorizontalVelocityTowards(Player p, Vector2 target, float force) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)p == (Object)null || (Object)(object)p.data == (Object)null || Mathf.Approximately(force, 0f)) { return; } float num = target.x - ((Component)p).transform.position.x; if (Mathf.Abs(num) < 0.05f) { try { num = ((Component)p.data.weaponHandler.gun).transform.right.x; } catch { num = 1f; } } AddVelocity(p, new Vector2(Mathf.Sign(num) * force, 0f)); } public static bool IsLocallyOwned(Player player) { try { object obj = (((Object)(object)player == (Object)null) ? null : player.data); if (obj == null) { return false; } Type type = obj.GetType(); object obj2 = type.GetField("view", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(obj); if (obj2 == null) { obj2 = type.GetProperty("view", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(obj, null); } if (obj2 == null) { return false; } PropertyInfo property = obj2.GetType().GetProperty("IsMine", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); bool flag = default(bool); int num; if (property != null) { object value = property.GetValue(obj2, null); if (value is bool) { flag = (bool)value; num = 1; } else { num = 0; } } else { num = 0; } return (byte)((uint)num & (flag ? 1u : 0u)) != 0; } catch { return false; } } public static string GetNickname(Player p) { try { object obj = (((Object)(object)p == (Object)null) ? null : p.data); if (obj == null) { return string.Empty; } Type type = obj.GetType(); object obj2 = null; FieldInfo field = type.GetField("view", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); obj2 = ((!(field != null)) ? type.GetProperty("view", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(obj, null) : field.GetValue(obj)); if (obj2 == null) { return string.Empty; } object obj3 = obj2.GetType().GetProperty("Owner", BindingFlags.Instance | BindingFlags.Public)?.GetValue(obj2, null); if (obj3 == null) { return string.Empty; } return (obj3.GetType().GetProperty("NickName", BindingFlags.Instance | BindingFlags.Public)?.GetValue(obj3, null) as string) ?? string.Empty; } catch { return string.Empty; } } } } namespace ReksikCards.Culture { public static class CulturalCardCatalog { public const int ExpectedCount = 198; private const string TypePrefix = "CulturalCard"; private const string ClassroomSource = "Classroom of the Elite"; private static readonly string[] AllowedSources; private static readonly IReadOnlyList AllInternal; private static readonly Dictionary ByStableId; public static IReadOnlyList All => AllInternal; static CulturalCardCatalog() { AllowedSources = new string[8] { "Foundation", "Lord of War", "Kaguya-sama", "Code Geass", "Zirkonavty", "Classroom of the Elite", "Project Hail Mary", "Amazing Digital Circus" }; AllInternal = Array.AsReadOnly(BuildSeed()); ByStableId = BuildStableIdIndex(AllInternal); Validate(AllInternal); } public static CulturalCardDefinition GetByIndex(int index) { if (index < 0 || index >= AllInternal.Count) { throw new ArgumentOutOfRangeException("index"); } return AllInternal[index]; } public static CulturalCardDefinition GetByCardType(Type cardType) { if (cardType == null) { throw new ArgumentNullException("cardType"); } string name = cardType.Name; if (name.StartsWith("CulturalCard", StringComparison.Ordinal) && name.Length == "CulturalCard".Length + 3 && int.TryParse(name.Substring("CulturalCard".Length), NumberStyles.None, CultureInfo.InvariantCulture, out var result) && result >= 0 && result < AllInternal.Count) { return GetByIndex(result); } throw new KeyNotFoundException("Type '" + cardType.FullName + "' is not a CulturalCard000..CulturalCard197 type."); } public static CulturalCardDefinition GetByStableId(string stableId) { if (stableId == null) { throw new ArgumentNullException("stableId"); } if (ByStableId.TryGetValue(stableId, out CulturalCardDefinition value)) { return value; } throw new KeyNotFoundException("Unknown cultural stable id '" + stableId + "'."); } private static CulturalCardDefinition[] BuildSeed() { List list = new List(198); Add(list, 0, "Hari Seldon", "Foundation", "foundation-psychohistory", legendary: true); Add(list, 1, "Gaal Dornick", "Foundation", "foundation-psychohistory"); Add(list, 2, "Salvor Hardin", "Foundation", "foundation-psychohistory"); Add(list, 3, "Hober Mallow", "Foundation", "foundation-psychohistory"); Add(list, 4, "Bayta Darell", "Foundation", "foundation-psychohistory"); Add(list, 5, "The Mule", "Foundation", "foundation-psychohistory", legendary: true); Add(list, 6, "Arkady Darell", "Foundation", "foundation-psychohistory"); Add(list, 7, "Eto Demerzel", "Foundation", "foundation-plan"); Add(list, 8, "Psychohistory", "Foundation", "foundation-plan"); Add(list, 9, "Seldon Plan", "Foundation", "foundation-plan"); Add(list, 10, "Terminus Vault", "Foundation", "foundation-plan"); Add(list, 11, "Prime Radiant", "Foundation", "foundation-plan"); Add(list, 12, "Second Foundation", "Foundation", "foundation-plan"); Add(list, 13, "First Foundation", "Foundation", "foundation-crisis"); Add(list, 14, "Encyclopedia Galactica", "Foundation", "foundation-crisis"); Add(list, 15, "Imperial Trantor", "Foundation", "foundation-crisis"); Add(list, 16, "Anacreon Crisis", "Foundation", "foundation-crisis"); Add(list, 17, "Four Kingdoms", "Foundation", "foundation-crisis"); Add(list, 18, "Trader Prince", "Foundation", "foundation-crisis"); Add(list, 19, "Mentalic Shield", "Foundation", "foundation-mentalic"); Add(list, 20, "Time Vault", "Foundation", "foundation-mentalic"); Add(list, 21, "Galactic Empire", "Foundation", "foundation-mentalic"); Add(list, 22, "Foundation's Edge", "Foundation", "foundation-mentalic"); Add(list, 23, "Gaia Consensus", "Foundation", "foundation-mentalic"); Add(list, 24, "Star's End", "Foundation", "foundation-mentalic"); Add(list, 25, "Yuri Orlov", "Lord of War", "lord-of-war-trade", legendary: true); Add(list, 26, "Vitaly Orlov", "Lord of War", "lord-of-war-trade"); Add(list, 27, "Ava Fontaine", "Lord of War", "lord-of-war-trade"); Add(list, 28, "Jack Valentine", "Lord of War", "lord-of-war-trade"); Add(list, 29, "Simeon Weisz", "Lord of War", "lord-of-war-trade"); Add(list, 30, "Andre Baptiste Sr.", "Lord of War", "lord-of-war-trade"); Add(list, 31, "Andre Baptiste Jr.", "Lord of War", "lord-of-war-logistics"); Add(list, 32, "Anatoly Orlov", "Lord of War", "lord-of-war-logistics"); Add(list, 33, "Irina Orlov", "Lord of War", "lord-of-war-logistics"); Add(list, 34, "The Bullet's Journey", "Lord of War", "lord-of-war-logistics"); Add(list, 35, "Odessa Arsenal", "Lord of War", "lord-of-war-logistics"); Add(list, 36, "Liberia Contract", "Lord of War", "lord-of-war-logistics"); Add(list, 37, "Container Manifest", "Lord of War", "lord-of-war-pressure"); Add(list, 38, "Interpol Tail", "Lord of War", "lord-of-war-pressure"); Add(list, 39, "Arms Bazaar", "Lord of War", "lord-of-war-pressure"); Add(list, 40, "False End-User Certificate", "Lord of War", "lord-of-war-pressure"); Add(list, 41, "Embargo Runner", "Lord of War", "lord-of-war-pressure"); Add(list, 42, "Cargo of Kalashnikovs", "Lord of War", "lord-of-war-pressure"); Add(list, 43, "Gunrunner's Ledger", "Lord of War", "lord-of-war-legacy"); Add(list, 44, "Dictator's Favor", "Lord of War", "lord-of-war-legacy"); Add(list, 45, "Border Inspection", "Lord of War", "lord-of-war-legacy"); Add(list, 46, "Merchant of Death", "Lord of War", "lord-of-war-legacy"); Add(list, 47, "Family Business", "Lord of War", "lord-of-war-legacy"); Add(list, 48, "Last Shipment", "Lord of War", "lord-of-war-legacy"); Add(list, 49, "Supply and Demand", "Lord of War", "lord-of-war-legacy", legendary: true); Add(list, 50, "Kaguya Shinomiya", "Kaguya-sama", "kaguya-mind-games", legendary: true); Add(list, 51, "Miyuki Shirogane", "Kaguya-sama", "kaguya-mind-games", legendary: true); Add(list, 52, "Chika Fujiwara", "Kaguya-sama", "kaguya-mind-games"); Add(list, 53, "Yu Ishigami", "Kaguya-sama", "kaguya-mind-games"); Add(list, 54, "Miko Iino", "Kaguya-sama", "kaguya-mind-games"); Add(list, 55, "Ai Hayasaka", "Kaguya-sama", "kaguya-mind-games"); Add(list, 56, "Kei Shirogane", "Kaguya-sama", "kaguya-student-council"); Add(list, 57, "Maki Shijo", "Kaguya-sama", "kaguya-student-council"); Add(list, 58, "Nagisa Kashiwagi", "Kaguya-sama", "kaguya-student-council"); Add(list, 59, "Tsubasa Tanuma", "Kaguya-sama", "kaguya-student-council"); Add(list, 60, "Papa Shirogane", "Kaguya-sama", "kaguya-student-council"); Add(list, 61, "Kobachi Osaragi", "Kaguya-sama", "kaguya-student-council"); Add(list, 62, "Mikado Shijo", "Kaguya-sama", "kaguya-festival"); Add(list, 63, "Student Council Room", "Kaguya-sama", "kaguya-festival"); Add(list, 64, "Love Is War", "Kaguya-sama", "kaguya-festival"); Add(list, 65, "Psychological Feint", "Kaguya-sama", "kaguya-festival"); Add(list, 66, "French Exchange Party", "Kaguya-sama", "kaguya-festival"); Add(list, 67, "Fireworks Promise", "Kaguya-sama", "kaguya-festival"); Add(list, 68, "Moon Viewing", "Kaguya-sama", "kaguya-confession"); Add(list, 69, "Election Campaign", "Kaguya-sama", "kaguya-confession"); Add(list, 70, "Culture Festival Heart", "Kaguya-sama", "kaguya-confession"); Add(list, 71, "Dual Confession", "Kaguya-sama", "kaguya-confession"); Add(list, 72, "Impossible Challenge", "Kaguya-sama", "kaguya-confession"); Add(list, 73, "Secret Cosplay", "Kaguya-sama", "kaguya-confession"); Add(list, 74, "Ramen Emperor", "Kaguya-sama", "kaguya-confession"); Add(list, 75, "Lelouch vi Britannia", "Code Geass", "code-geass-geass", legendary: true); Add(list, 76, "C.C.", "Code Geass", "code-geass-geass", legendary: true); Add(list, 77, "Suzaku Kururugi", "Code Geass", "code-geass-knightmare"); Add(list, 78, "Kallen Kozuki", "Code Geass", "code-geass-knightmare"); Add(list, 79, "Nunnally vi Britannia", "Code Geass", "code-geass-requiem"); Add(list, 80, "Schneizel el Britannia", "Code Geass", "code-geass-requiem"); Add(list, 81, "Euphemia li Britannia", "Code Geass", "code-geass-requiem"); Add(list, 82, "Jeremiah Gottwald", "Code Geass", "code-geass-factions"); Add(list, 83, "Cornelia li Britannia", "Code Geass", "code-geass-factions"); Add(list, 84, "Rolo Lamperouge", "Code Geass", "code-geass-geass"); Add(list, 85, "Shirley Fenette", "Code Geass", "code-geass-requiem"); Add(list, 86, "Charles zi Britannia", "Code Geass", "code-geass-geass"); Add(list, 87, "V.V.", "Code Geass", "code-geass-geass"); Add(list, 88, "Lloyd Asplund", "Code Geass", "code-geass-knightmare"); Add(list, 89, "Rakshata Chawla", "Code Geass", "code-geass-knightmare"); Add(list, 90, "Zero Requiem", "Code Geass", "code-geass-requiem", legendary: true); Add(list, 91, "Geass Command", "Code Geass", "code-geass-geass"); Add(list, 92, "Black Knights", "Code Geass", "code-geass-factions"); Add(list, 93, "Knightmare Gawain", "Code Geass", "code-geass-knightmare"); Add(list, 94, "Lancelot Albion", "Code Geass", "code-geass-knightmare"); Add(list, 95, "Guren Mk-II", "Code Geass", "code-geass-knightmare"); Add(list, 96, "Damocles", "Code Geass", "code-geass-requiem"); Add(list, 97, "F.L.E.I.J.A.", "Code Geass", "code-geass-requiem"); Add(list, 98, "Sword of Akasha", "Code Geass", "code-geass-geass"); Add(list, 99, "Rebellion Broadcast", "Code Geass", "code-geass-factions"); Add(list, 100, "Star Captain", "Zirkonavty", "zirkonavty-navigation", legendary: true); Add(list, 101, "Orbital Navigator", "Zirkonavty", "zirkonavty-navigation"); Add(list, 102, "Void Cartographer", "Zirkonavty", "zirkonavty-navigation"); Add(list, 103, "Comet Signal", "Zirkonavty", "zirkonavty-navigation"); Add(list, 104, "Solar Sail", "Zirkonavty", "zirkonavty-navigation"); Add(list, 105, "Nebula Passage", "Zirkonavty", "zirkonavty-navigation"); Add(list, 106, "Gravity Well", "Zirkonavty", "zirkonavty-engineering"); Add(list, 107, "Cryogenic Watch", "Zirkonavty", "zirkonavty-engineering"); Add(list, 108, "Lunar Relay", "Zirkonavty", "zirkonavty-engineering"); Add(list, 109, "Red Dwarf Route", "Zirkonavty", "zirkonavty-engineering"); Add(list, 110, "Deep-Space Beacon", "Zirkonavty", "zirkonavty-engineering"); Add(list, 111, "Meteor Shield", "Zirkonavty", "zirkonavty-engineering"); Add(list, 112, "Stellar Map", "Zirkonavty", "zirkonavty-expedition"); Add(list, 113, "Silent Orbit", "Zirkonavty", "zirkonavty-expedition"); Add(list, 114, "Cosmic EVA", "Zirkonavty", "zirkonavty-expedition"); Add(list, 115, "Ion Wake", "Zirkonavty", "zirkonavty-expedition"); Add(list, 116, "Photon Reserve", "Zirkonavty", "zirkonavty-expedition"); Add(list, 117, "Black-Sky Protocol", "Zirkonavty", "zirkonavty-expedition"); Add(list, 118, "Asteroid Harbor", "Zirkonavty", "zirkonavty-signals"); Add(list, 119, "Wormhole Estimate", "Zirkonavty", "zirkonavty-signals"); Add(list, 120, "Exoplanet Dawn", "Zirkonavty", "zirkonavty-signals"); Add(list, 121, "Radio Horizon", "Zirkonavty", "zirkonavty-signals"); Add(list, 122, "Return Burn", "Zirkonavty", "zirkonavty-signals"); Add(list, 123, "Constellation Pact", "Zirkonavty", "zirkonavty-signals"); Add(list, 124, "Homeworld Signal", "Zirkonavty", "zirkonavty-signals", legendary: true); Add(list, 125, "Kiyotaka Ayanokoji", "Classroom of the Elite", "classroom-hidden-genius", legendary: true); Add(list, 126, "Suzune Horikita", "Classroom of the Elite", "classroom-class-leaders", legendary: true); Add(list, 127, "Kikyo Kushida", "Classroom of the Elite", "classroom-social-web"); Add(list, 128, "Class D Survival Test", "Classroom of the Elite", "classroom-special-exams"); Add(list, 129, "Island Special Exam", "Classroom of the Elite", "classroom-special-exams"); Add(list, 130, "Kei Karuizawa", "Classroom of the Elite", "classroom-social-web"); Add(list, 131, "Kakeru Ryuen", "Classroom of the Elite", "classroom-class-leaders", legendary: true); Add(list, 132, "Yosuke Hirata", "Classroom of the Elite", "classroom-social-web"); Add(list, 133, "Sports Festival", "Classroom of the Elite", "classroom-special-exams"); Add(list, 134, "Paper Shuffle", "Classroom of the Elite", "classroom-special-exams"); Add(list, 135, "Rooftop Confrontation", "Classroom of the Elite", "classroom-hidden-genius"); Add(list, 136, "Arisu Sakayanagi", "Classroom of the Elite", "classroom-class-leaders"); Add(list, 137, "Honami Ichinose", "Classroom of the Elite", "classroom-class-leaders"); Add(list, 138, "Hiyori Shiina", "Classroom of the Elite", "classroom-social-web"); Add(list, 139, "Mixed Training Camp", "Classroom of the Elite", "classroom-special-exams"); Add(list, 140, "Event Selection Exam", "Classroom of the Elite", "classroom-special-exams"); Add(list, 141, "Class Poll", "Classroom of the Elite", "classroom-special-exams"); Add(list, 142, "Ichika Amasawa", "Classroom of the Elite", "classroom-white-room"); Add(list, 143, "Takuya Yagami", "Classroom of the Elite", "classroom-white-room"); Add(list, 144, "Tsubasa Nanase", "Classroom of the Elite", "classroom-first-years"); Add(list, 145, "Kazuomi Hosen", "Classroom of the Elite", "classroom-first-years"); Add(list, 146, "First-Year Special Exam", "Classroom of the Elite", "classroom-first-years"); Add(list, 147, "Year Two Strategy", "Classroom of the Elite", "classroom-hidden-genius"); Add(list, 148, "Ryland Grace", "Project Hail Mary", "hail-mary-science", legendary: true); Add(list, 149, "Rocky the Eridian", "Project Hail Mary", "hail-mary-science", legendary: true); Add(list, 150, "Eva Stratt", "Project Hail Mary", "hail-mary-science"); Add(list, 151, "Yao Li-Jie", "Project Hail Mary", "hail-mary-science"); Add(list, 152, "Olesya Ilyukhina", "Project Hail Mary", "hail-mary-science"); Add(list, 153, "Martin DuBois", "Project Hail Mary", "hail-mary-science"); Add(list, 154, "Annie Shapiro", "Project Hail Mary", "hail-mary-mission"); Add(list, 155, "Dimitri Komorov", "Project Hail Mary", "hail-mary-mission"); Add(list, 156, "Astrophage", "Project Hail Mary", "hail-mary-mission", legendary: true); Add(list, 157, "Petrova Line", "Project Hail Mary", "hail-mary-mission"); Add(list, 158, "Hail Mary Vessel", "Project Hail Mary", "hail-mary-mission"); Add(list, 159, "Blip-A", "Project Hail Mary", "hail-mary-mission"); Add(list, 160, "Eridian Tunnel", "Project Hail Mary", "hail-mary-engineering"); Add(list, 161, "Tau Ceti Mission", "Project Hail Mary", "hail-mary-engineering"); Add(list, 162, "Ammonia Atmosphere", "Project Hail Mary", "hail-mary-engineering"); Add(list, 163, "Xenonite", "Project Hail Mary", "hail-mary-engineering"); Add(list, 164, "Spin Drive", "Project Hail Mary", "hail-mary-engineering"); Add(list, 165, "Chain Model", "Project Hail Mary", "hail-mary-engineering"); Add(list, 166, "Taumoeba", "Project Hail Mary", "hail-mary-survival"); Add(list, 167, "Nitrogen Resistance", "Project Hail Mary", "hail-mary-survival"); Add(list, 168, "Centrifuge Lab", "Project Hail Mary", "hail-mary-survival"); Add(list, 169, "Beatles Databank", "Project Hail Mary", "hail-mary-survival"); Add(list, 170, "Three-Body Orbit", "Project Hail Mary", "hail-mary-survival"); Add(list, 171, "Save Erid", "Project Hail Mary", "hail-mary-survival"); Add(list, 172, "Save Earth", "Project Hail Mary", "hail-mary-survival"); Add(list, 173, "Pomni", "Amazing Digital Circus", "digital-circus-cast", legendary: true); Add(list, 174, "Caine", "Amazing Digital Circus", "digital-circus-cast", legendary: true); Add(list, 175, "Jax", "Amazing Digital Circus", "digital-circus-cast"); Add(list, 176, "Ragatha", "Amazing Digital Circus", "digital-circus-cast"); Add(list, 177, "Gangle", "Amazing Digital Circus", "digital-circus-cast"); Add(list, 178, "Zooble", "Amazing Digital Circus", "digital-circus-cast"); Add(list, 179, "Kinger", "Amazing Digital Circus", "digital-circus-adventure"); Add(list, 180, "Bubble", "Amazing Digital Circus", "digital-circus-adventure"); Add(list, 181, "Kaufmo", "Amazing Digital Circus", "digital-circus-adventure"); Add(list, 182, "Gummigoo", "Amazing Digital Circus", "digital-circus-adventure"); Add(list, 183, "Princess Loolilalu", "Amazing Digital Circus", "digital-circus-adventure"); Add(list, 184, "The Fudge", "Amazing Digital Circus", "digital-circus-adventure"); Add(list, 185, "The Moon", "Amazing Digital Circus", "digital-circus-abstraction"); Add(list, 186, "The Sun", "Amazing Digital Circus", "digital-circus-abstraction"); Add(list, 187, "Digital Circus Tent", "Amazing Digital Circus", "digital-circus-abstraction"); Add(list, 188, "Exit Door", "Amazing Digital Circus", "digital-circus-abstraction"); Add(list, 189, "Abstracted Cellar", "Amazing Digital Circus", "digital-circus-abstraction"); Add(list, 190, "Candy Canyon Kingdom", "Amazing Digital Circus", "digital-circus-abstraction"); Add(list, 191, "In-House Adventure", "Amazing Digital Circus", "digital-circus-chaos"); Add(list, 192, "NPC Paradox", "Amazing Digital Circus", "digital-circus-chaos"); Add(list, 193, "Comedy Mask", "Amazing Digital Circus", "digital-circus-chaos"); Add(list, 194, "Tragedy Mask", "Amazing Digital Circus", "digital-circus-chaos"); Add(list, 195, "Glitching Hallway", "Amazing Digital Circus", "digital-circus-chaos"); Add(list, 196, "Caine's Roulette", "Amazing Digital Circus", "digital-circus-chaos"); Add(list, 197, "The Void Beyond", "Amazing Digital Circus", "digital-circus-chaos"); return list.ToArray(); } private static void Add(List cards, int index, string title, string sourceKey, string familyId, bool legendary = false) { string stableId = "CulturalCard" + index.ToString("D3", CultureInfo.InvariantCulture); CulturalRarityTier rarity = ResolveRarity(stableId, title, familyId, legendary); CulturalAuthoredCardProfile culturalAuthoredCardProfile = CulturalAuthoredProfileCatalog.Resolve(stableId, sourceKey); CulturalMechanicSpec[] mechanics = culturalAuthoredCardProfile.Mechanics; CulturalBaseStats baseStats = culturalAuthoredCardProfile.BaseStats; IReadOnlyList stats = CulturalCardPresentation.BuildBaseStats(baseStats); cards.Add(new CulturalCardDefinition(index, stableId, title, BuildDescription(stableId, culturalAuthoredCardProfile.ShowMechanic, mechanics), sourceKey, familyId, rarity, allowMultiple: true, baseStats, stats, Array.AsReadOnly(mechanics))); } private static CulturalRarityTier ResolveRarity(string stableId, string title, string familyId, bool legendary) { bool flag = IsLegendaryOverride(stableId); if (legendary != flag) { throw new InvalidOperationException("Legendary seed flag for '" + stableId + "' does not match its explicit profile."); } if (flag) { return CulturalRarityTier.Legendary; } if (stableId == "CulturalCard106" || stableId == "CulturalCard188" || IsRareTitle(title)) { return CulturalRarityTier.Rare; } if (!IsUncommonFamily(familyId)) { return CulturalRarityTier.Common; } return CulturalRarityTier.Uncommon; } private static bool IsRareTitle(string title) { switch (title) { case "Geass Command": case "Prime Radiant": case "Merchant of Death": case "Year Two Strategy": case "Abstracted Cellar": case "Knightmare Gawain": case "Terminus Vault": case "Culture Festival Heart": case "F.L.E.I.J.A.": case "Black-Sky Protocol": case "Rooftop Confrontation": case "Xenonite": case "Save Earth": case "The Void Beyond": return true; default: return false; } } private static bool IsUncommonFamily(string familyId) { switch (familyId) { case "foundation-crisis": case "hail-mary-mission": case "digital-circus-chaos": case "lord-of-war-pressure": case "classroom-first-years": case "hail-mary-engineering": case "zirkonavty-expedition": case "kaguya-festival": case "code-geass-factions": case "classroom-special-exams": case "digital-circus-adventure": return true; default: return false; } } private static bool IsLegendaryOverride(string stableId) { switch (stableId) { case "CulturalCard000": case "CulturalCard005": case "CulturalCard100": case "CulturalCard025": case "CulturalCard124": case "CulturalCard125": case "CulturalCard126": case "CulturalCard049": case "CulturalCard148": case "CulturalCard149": case "CulturalCard050": case "CulturalCard051": case "CulturalCard156": case "CulturalCard075": case "CulturalCard076": case "CulturalCard173": case "CulturalCard174": case "CulturalCard090": case "CulturalCard131": return true; default: return false; } } private static string BuildDescription(string stableId, bool showPrimaryMechanic, IReadOnlyList mechanics) { if (CulturalSignatureState.HasSignature(stableId)) { return string.Empty; } return CulturalCardPresentation.BuildDescription(showPrimaryMechanic, mechanics); } private static Dictionary BuildStableIdIndex(IReadOnlyList cards) { Dictionary dictionary = new Dictionary(StringComparer.Ordinal); for (int i = 0; i < cards.Count; i++) { dictionary.Add(cards[i].StableId, cards[i]); } return dictionary; } private static void Validate(IReadOnlyList cards) { if (cards.Count != 198) { throw new InvalidOperationException($"Cultural seed must contain exactly {198} cards, found {cards.Count}."); } HashSet hashSet = new HashSet(StringComparer.Ordinal); HashSet hashSet2 = new HashSet(StringComparer.Ordinal); Dictionary dictionary = new Dictionary(StringComparer.Ordinal); HashSet hashSet3 = new HashSet(StringComparer.Ordinal); int num = 0; int num2 = 0; float num3 = 0f; float num4 = 0f; CulturalCardDefinition culturalCardDefinition = null; for (int i = 0; i < AllowedSources.Length; i++) { dictionary.Add(AllowedSources[i], 0); } for (int j = 0; j < cards.Count; j++) { CulturalCardDefinition culturalCardDefinition2 = cards[j]; string text = "CulturalCard" + j.ToString("D3", CultureInfo.InvariantCulture); if (culturalCardDefinition2.Index != j || !string.Equals(culturalCardDefinition2.StableId, text, StringComparison.Ordinal)) { throw new InvalidOperationException($"Cultural seed index {j} must be '{text}', found index={culturalCardDefinition2.Index}, id='{culturalCardDefinition2.StableId}'."); } if (!hashSet.Add(culturalCardDefinition2.StableId)) { throw new InvalidOperationException("Duplicate cultural stable id '" + culturalCardDefinition2.StableId + "'."); } if (!hashSet2.Add(culturalCardDefinition2.Title)) { throw new InvalidOperationException("Duplicate cultural title '" + culturalCardDefinition2.Title + "'."); } if (!dictionary.ContainsKey(culturalCardDefinition2.SourceKey)) { throw new InvalidOperationException("Cultural card '" + culturalCardDefinition2.StableId + "' uses non-whitelisted source '" + culturalCardDefinition2.SourceKey + "'."); } if (string.IsNullOrWhiteSpace(culturalCardDefinition2.FamilyId) || culturalCardDefinition2.Description.Length > 140 || culturalCardDefinition2.Stats.Count < 3 || culturalCardDefinition2.Stats.Count > 4 || culturalCardDefinition2.Mechanics.Count < 1 || culturalCardDefinition2.Mechanics.Count > 2) { throw new InvalidOperationException("Cultural card '" + culturalCardDefinition2.StableId + "' has incomplete or malformed data."); } bool flag = false; bool flag2 = false; for (int k = 0; k < culturalCardDefinition2.Stats.Count; k++) { flag |= culturalCardDefinition2.Stats[k].IsPositive; flag2 |= !culturalCardDefinition2.Stats[k].IsPositive; } if (!flag || (culturalCardDefinition2.Rarity != CulturalRarityTier.Legendary && !flag2)) { throw new InvalidOperationException("Cultural card '" + culturalCardDefinition2.StableId + "' must expose a strong boon" + ((culturalCardDefinition2.Rarity == CulturalRarityTier.Legendary) ? "." : " and a visible tradeoff.")); } if (!culturalCardDefinition2.AllowMultiple) { throw new InvalidOperationException("Cultural card '" + culturalCardDefinition2.StableId + "' must allow duplicate stacks."); } dictionary[culturalCardDefinition2.SourceKey]++; if (culturalCardDefinition2.Rarity == CulturalRarityTier.Legendary) { num++; if (!IsLegendaryOverride(culturalCardDefinition2.StableId) || culturalCardDefinition2.Mechanics.Count != 1) { throw new InvalidOperationException("Legendary card '" + culturalCardDefinition2.StableId + "' must have one explicit signature mechanic."); } float num5 = Math.Abs(culturalCardDefinition2.Mechanics[0].Magnitude * (float)culturalCardDefinition2.Mechanics[0].BurstCount); if (culturalCardDefinition2.StableId == "CulturalCard125") { num3 = num5; } else { num4 = Math.Max(num4, num5); } } if (string.Equals(culturalCardDefinition2.Title, "Kiyotaka Ayanokoji", StringComparison.Ordinal)) { culturalCardDefinition = culturalCardDefinition2; } if (IsLegendaryOverride(culturalCardDefinition2.StableId)) { num2++; } if (string.Equals(culturalCardDefinition2.SourceKey, "Classroom of the Elite", StringComparison.Ordinal)) { if (culturalCardDefinition2.FamilyId.IndexOf("-season-", StringComparison.Ordinal) >= 0) { throw new InvalidOperationException("Classroom card '" + culturalCardDefinition2.StableId + "' still uses a season as its mechanic family."); } if (!culturalCardDefinition2.FamilyId.StartsWith("classroom-", StringComparison.Ordinal)) { throw new InvalidOperationException("Classroom card '" + culturalCardDefinition2.StableId + "' uses an unrelated family '" + culturalCardDefinition2.FamilyId + "'."); } hashSet3.Add(culturalCardDefinition2.FamilyId); } } if (num != 19) { throw new InvalidOperationException($"Cultural seed must contain exactly 19 Legendary cards, found {num}."); } if (culturalCardDefinition == null || culturalCardDefinition.Rarity != CulturalRarityTier.Legendary) { throw new InvalidOperationException("Kiyotaka Ayanokoji must exist and be Legendary."); } if (culturalCardDefinition.BaseStats.Health < 2f || culturalCardDefinition.BaseStats.Damage < 2f || culturalCardDefinition.BaseStats.AttackSpeed > 0.5f || culturalCardDefinition.BaseStats.BlockCooldown > 0.5f) { throw new InvalidOperationException("Kiyotaka Ayanokoji must keep the strongest four-axis base profile."); } if (num2 != 19) { throw new InvalidOperationException($"Legendary profiles are incomplete: {num2}/19."); } if (num3 <= num4) { throw new InvalidOperationException("Ayanokoji must keep the strongest legendary signature coefficient."); } for (int l = 0; l < AllowedSources.Length; l++) { if (dictionary[AllowedSources[l]] <= 0) { throw new InvalidOperationException("Whitelisted source '" + AllowedSources[l] + "' has no cards."); } } string[] array = new string[6] { "classroom-hidden-genius", "classroom-class-leaders", "classroom-social-web", "classroom-special-exams", "classroom-white-room", "classroom-first-years" }; for (int m = 0; m < array.Length; m++) { if (!hashSet3.Contains(array[m])) { throw new InvalidOperationException("Classroom of the Elite requires semantic family '" + array[m] + "'."); } } } } public enum CulturalRarityTier { Common, Uncommon, Rare, Legendary } public sealed class CulturalCardStat { public string Label { get; } public string Amount { get; } public bool IsPositive { get; } public CulturalCardStat(string label, string amount, bool isPositive) { Label = label ?? throw new ArgumentNullException("label"); Amount = amount ?? throw new ArgumentNullException("amount"); IsPositive = isPositive; } } public sealed class CulturalBaseStats { public float Health { get; set; } = 1f; public float MovementSpeed { get; set; } = 1f; public float Jump { get; set; } = 1f; public float PlayerGravity { get; set; } = 1f; public float SizeMultiplier { get; set; } = 1f; public int ExtraJumps { get; set; } public int Respawns { get; set; } public float LifeSteal { get; set; } public float Regeneration { get; set; } public float DamageOverTime { get; set; } public float Damage { get; set; } = 1f; public float AttackSpeed { get; set; } = 1f; public float Knockback { get; set; } = 1f; public float ProjectileSpeed { get; set; } = 1f; public float ProjectileSimulationSpeed { get; set; } = 1f; public float ProjectileGravity { get; set; } = 1f; public float SpreadMultiplier { get; set; } = 1f; public float ProjectileSizeAdd { get; set; } public float ReloadTime { get; set; } = 1f; public float ReloadTimeAdd { get; set; } public int Ammo { get; set; } public float AmmoRegeneration { get; set; } public int Projectiles { get; set; } public int Bursts { get; set; } public int Reflects { get; set; } public int Bounces { get; set; } public float BounceSpeed { get; set; } = 1f; public float BounceDamage { get; set; } = 1f; public float Slow { get; set; } public float DamageAfterDistance { get; set; } = 1f; public float BulletLifetime { get; set; } public float BlockCooldown { get; set; } = 1f; public float BlockCooldownAdd { get; set; } public float BlockHealing { get; set; } public int AdditionalBlocks { get; set; } } public sealed class CulturalCardDefinition { public int Index { get; } public string StableId { get; } public string Title { get; } public string Description { get; } public string SourceKey { get; } public string FamilyId { get; } public CulturalRarityTier Rarity { get; } public bool AllowMultiple { get; } public CulturalBaseStats BaseStats { get; } public IReadOnlyList Stats { get; } public IReadOnlyList Mechanics { get; } public CulturalCardDefinition(int index, string stableId, string title, string description, string sourceKey, string familyId, CulturalRarityTier rarity, bool allowMultiple, CulturalBaseStats baseStats, IReadOnlyList stats, IReadOnlyList mechanics) { Index = index; StableId = stableId ?? throw new ArgumentNullException("stableId"); Title = title ?? throw new ArgumentNullException("title"); Description = description ?? throw new ArgumentNullException("description"); SourceKey = sourceKey ?? throw new ArgumentNullException("sourceKey"); FamilyId = familyId ?? throw new ArgumentNullException("familyId"); Rarity = rarity; AllowMultiple = allowMultiple; BaseStats = baseStats ?? throw new ArgumentNullException("baseStats"); Stats = stats ?? throw new ArgumentNullException("stats"); Mechanics = mechanics ?? throw new ArgumentNullException("mechanics"); } } public sealed class CulturalCard000 : CulturalDefinitionCard { } public sealed class CulturalCard001 : CulturalDefinitionCard { } public sealed class CulturalCard002 : CulturalDefinitionCard { } public sealed class CulturalCard003 : CulturalDefinitionCard { } public sealed class CulturalCard004 : CulturalDefinitionCard { } public sealed class CulturalCard005 : CulturalDefinitionCard { } public sealed class CulturalCard006 : CulturalDefinitionCard { } public sealed class CulturalCard007 : CulturalDefinitionCard { } public sealed class CulturalCard008 : CulturalDefinitionCard { } public sealed class CulturalCard009 : CulturalDefinitionCard { } public sealed class CulturalCard010 : CulturalDefinitionCard { } public sealed class CulturalCard011 : CulturalDefinitionCard { } public sealed class CulturalCard012 : CulturalDefinitionCard { } public sealed class CulturalCard013 : CulturalDefinitionCard { } public sealed class CulturalCard014 : CulturalDefinitionCard { } public sealed class CulturalCard015 : CulturalDefinitionCard { } public sealed class CulturalCard016 : CulturalDefinitionCard { } public sealed class CulturalCard017 : CulturalDefinitionCard { } public sealed class CulturalCard018 : CulturalDefinitionCard { } public sealed class CulturalCard019 : CulturalDefinitionCard { } public sealed class CulturalCard020 : CulturalDefinitionCard { } public sealed class CulturalCard021 : CulturalDefinitionCard { } public sealed class CulturalCard022 : CulturalDefinitionCard { } public sealed class CulturalCard023 : CulturalDefinitionCard { } public sealed class CulturalCard024 : CulturalDefinitionCard { } public sealed class CulturalCard025 : CulturalDefinitionCard { } public sealed class CulturalCard026 : CulturalDefinitionCard { } public sealed class CulturalCard027 : CulturalDefinitionCard { } public sealed class CulturalCard028 : CulturalDefinitionCard { } public sealed class CulturalCard029 : CulturalDefinitionCard { } public sealed class CulturalCard030 : CulturalDefinitionCard { } public sealed class CulturalCard031 : CulturalDefinitionCard { } public sealed class CulturalCard032 : CulturalDefinitionCard { } public sealed class CulturalCard033 : CulturalDefinitionCard { } public sealed class CulturalCard034 : CulturalDefinitionCard { } public sealed class CulturalCard035 : CulturalDefinitionCard { } public sealed class CulturalCard036 : CulturalDefinitionCard { } public sealed class CulturalCard037 : CulturalDefinitionCard { } public sealed class CulturalCard038 : CulturalDefinitionCard { } public sealed class CulturalCard039 : CulturalDefinitionCard { } public sealed class CulturalCard040 : CulturalDefinitionCard { } public sealed class CulturalCard041 : CulturalDefinitionCard { } public sealed class CulturalCard042 : CulturalDefinitionCard { } public sealed class CulturalCard043 : CulturalDefinitionCard { } public sealed class CulturalCard044 : CulturalDefinitionCard { } public sealed class CulturalCard045 : CulturalDefinitionCard { } public sealed class CulturalCard046 : CulturalDefinitionCard { } public sealed class CulturalCard047 : CulturalDefinitionCard { } public sealed class CulturalCard048 : CulturalDefinitionCard { } public sealed class CulturalCard049 : CulturalDefinitionCard { } public sealed class CulturalCard050 : CulturalDefinitionCard { } public sealed class CulturalCard051 : CulturalDefinitionCard { } public sealed class CulturalCard052 : CulturalDefinitionCard { } public sealed class CulturalCard053 : CulturalDefinitionCard { } public sealed class CulturalCard054 : CulturalDefinitionCard { } public sealed class CulturalCard055 : CulturalDefinitionCard { } public sealed class CulturalCard056 : CulturalDefinitionCard { } public sealed class CulturalCard057 : CulturalDefinitionCard { } public sealed class CulturalCard058 : CulturalDefinitionCard { } public sealed class CulturalCard059 : CulturalDefinitionCard { } public sealed class CulturalCard060 : CulturalDefinitionCard { } public sealed class CulturalCard061 : CulturalDefinitionCard { } public sealed class CulturalCard062 : CulturalDefinitionCard { } public sealed class CulturalCard063 : CulturalDefinitionCard { } public sealed class CulturalCard064 : CulturalDefinitionCard { } public sealed class CulturalCard065 : CulturalDefinitionCard { } public sealed class CulturalCard066 : CulturalDefinitionCard { } public sealed class CulturalCard067 : CulturalDefinitionCard { } public sealed class CulturalCard068 : CulturalDefinitionCard { } public sealed class CulturalCard069 : CulturalDefinitionCard { } public sealed class CulturalCard070 : CulturalDefinitionCard { } public sealed class CulturalCard071 : CulturalDefinitionCard { } public sealed class CulturalCard072 : CulturalDefinitionCard { } public sealed class CulturalCard073 : CulturalDefinitionCard { } public sealed class CulturalCard074 : CulturalDefinitionCard { } public sealed class CulturalCard075 : CulturalDefinitionCard { } public sealed class CulturalCard076 : CulturalDefinitionCard { } public sealed class CulturalCard077 : CulturalDefinitionCard { } public sealed class CulturalCard078 : CulturalDefinitionCard { } public sealed class CulturalCard079 : CulturalDefinitionCard { } public sealed class CulturalCard080 : CulturalDefinitionCard { } public sealed class CulturalCard081 : CulturalDefinitionCard { } public sealed class CulturalCard082 : CulturalDefinitionCard { } public sealed class CulturalCard083 : CulturalDefinitionCard { } public sealed class CulturalCard084 : CulturalDefinitionCard { } public sealed class CulturalCard085 : CulturalDefinitionCard { } public sealed class CulturalCard086 : CulturalDefinitionCard { } public sealed class CulturalCard087 : CulturalDefinitionCard { } public sealed class CulturalCard088 : CulturalDefinitionCard { } public sealed class CulturalCard089 : CulturalDefinitionCard { } public sealed class CulturalCard090 : CulturalDefinitionCard { } public sealed class CulturalCard091 : CulturalDefinitionCard { } public sealed class CulturalCard092 : CulturalDefinitionCard { } public sealed class CulturalCard093 : CulturalDefinitionCard { } public sealed class CulturalCard094 : CulturalDefinitionCard { } public sealed class CulturalCard095 : CulturalDefinitionCard { } public sealed class CulturalCard096 : CulturalDefinitionCard { } public sealed class CulturalCard097 : CulturalDefinitionCard { } public sealed class CulturalCard098 : CulturalDefinitionCard { } public sealed class CulturalCard099 : CulturalDefinitionCard { } public sealed class CulturalCard100 : CulturalDefinitionCard { } public sealed class CulturalCard101 : CulturalDefinitionCard { } public sealed class CulturalCard102 : CulturalDefinitionCard { } public sealed class CulturalCard103 : CulturalDefinitionCard { } public sealed class CulturalCard104 : CulturalDefinitionCard { } public sealed class CulturalCard105 : CulturalDefinitionCard { } public sealed class CulturalCard106 : CulturalDefinitionCard { } public sealed class CulturalCard107 : CulturalDefinitionCard { } public sealed class CulturalCard108 : CulturalDefinitionCard { } public sealed class CulturalCard109 : CulturalDefinitionCard { } public sealed class CulturalCard110 : CulturalDefinitionCard { } public sealed class CulturalCard111 : CulturalDefinitionCard { } public sealed class CulturalCard112 : CulturalDefinitionCard { } public sealed class CulturalCard113 : CulturalDefinitionCard { } public sealed class CulturalCard114 : CulturalDefinitionCard { } public sealed class CulturalCard115 : CulturalDefinitionCard { } public sealed class CulturalCard116 : CulturalDefinitionCard { } public sealed class CulturalCard117 : CulturalDefinitionCard { } public sealed class CulturalCard118 : CulturalDefinitionCard { } public sealed class CulturalCard119 : CulturalDefinitionCard { } public sealed class CulturalCard120 : CulturalDefinitionCard { } public sealed class CulturalCard121 : CulturalDefinitionCard { } public sealed class CulturalCard122 : CulturalDefinitionCard { } public sealed class CulturalCard123 : CulturalDefinitionCard { } public sealed class CulturalCard124 : CulturalDefinitionCard { } public sealed class CulturalCard125 : CulturalDefinitionCard { } public sealed class CulturalCard126 : CulturalDefinitionCard { } public sealed class CulturalCard127 : CulturalDefinitionCard { } public sealed class CulturalCard128 : CulturalDefinitionCard { } public sealed class CulturalCard129 : CulturalDefinitionCard { } public sealed class CulturalCard130 : CulturalDefinitionCard { } public sealed class CulturalCard131 : CulturalDefinitionCard { } public sealed class CulturalCard132 : CulturalDefinitionCard { } public sealed class CulturalCard133 : CulturalDefinitionCard { } public sealed class CulturalCard134 : CulturalDefinitionCard { } public sealed class CulturalCard135 : CulturalDefinitionCard { } public sealed class CulturalCard136 : CulturalDefinitionCard { } public sealed class CulturalCard137 : CulturalDefinitionCard { } public sealed class CulturalCard138 : CulturalDefinitionCard { } public sealed class CulturalCard139 : CulturalDefinitionCard { } public sealed class CulturalCard140 : CulturalDefinitionCard { } public sealed class CulturalCard141 : CulturalDefinitionCard { } public sealed class CulturalCard142 : CulturalDefinitionCard { } public sealed class CulturalCard143 : CulturalDefinitionCard { } public sealed class CulturalCard144 : CulturalDefinitionCard { } public sealed class CulturalCard145 : CulturalDefinitionCard { } public sealed class CulturalCard146 : CulturalDefinitionCard { } public sealed class CulturalCard147 : CulturalDefinitionCard { } public sealed class CulturalCard148 : CulturalDefinitionCard { } public sealed class CulturalCard149 : CulturalDefinitionCard { } public sealed class CulturalCard150 : CulturalDefinitionCard { } public sealed class CulturalCard151 : CulturalDefinitionCard { } public sealed class CulturalCard152 : CulturalDefinitionCard { } public sealed class CulturalCard153 : CulturalDefinitionCard { } public sealed class CulturalCard154 : CulturalDefinitionCard { } public sealed class CulturalCard155 : CulturalDefinitionCard { } public sealed class CulturalCard156 : CulturalDefinitionCard { } public sealed class CulturalCard157 : CulturalDefinitionCard { } public sealed class CulturalCard158 : CulturalDefinitionCard { } public sealed class CulturalCard159 : CulturalDefinitionCard { } public sealed class CulturalCard160 : CulturalDefinitionCard { } public sealed class CulturalCard161 : CulturalDefinitionCard { } public sealed class CulturalCard162 : CulturalDefinitionCard { } public sealed class CulturalCard163 : CulturalDefinitionCard { } public sealed class CulturalCard164 : CulturalDefinitionCard { } public sealed class CulturalCard165 : CulturalDefinitionCard { } public sealed class CulturalCard166 : CulturalDefinitionCard { } public sealed class CulturalCard167 : CulturalDefinitionCard { } public sealed class CulturalCard168 : CulturalDefinitionCard { } public sealed class CulturalCard169 : CulturalDefinitionCard { } public sealed class CulturalCard170 : CulturalDefinitionCard { } public sealed class CulturalCard171 : CulturalDefinitionCard { } public sealed class CulturalCard172 : CulturalDefinitionCard { } public sealed class CulturalCard173 : CulturalDefinitionCard { } public sealed class CulturalCard174 : CulturalDefinitionCard { } public sealed class CulturalCard175 : CulturalDefinitionCard { } public sealed class CulturalCard176 : CulturalDefinitionCard { } public sealed class CulturalCard177 : CulturalDefinitionCard { } public sealed class CulturalCard178 : CulturalDefinitionCard { } public sealed class CulturalCard179 : CulturalDefinitionCard { } public sealed class CulturalCard180 : CulturalDefinitionCard { } public sealed class CulturalCard181 : CulturalDefinitionCard { } public sealed class CulturalCard182 : CulturalDefinitionCard { } public sealed class CulturalCard183 : CulturalDefinitionCard { } public sealed class CulturalCard184 : CulturalDefinitionCard { } public sealed class CulturalCard185 : CulturalDefinitionCard { } public sealed class CulturalCard186 : CulturalDefinitionCard { } public sealed class CulturalCard187 : CulturalDefinitionCard { } public sealed class CulturalCard188 : CulturalDefinitionCard { } public sealed class CulturalCard189 : CulturalDefinitionCard { } public sealed class CulturalCard190 : CulturalDefinitionCard { } public sealed class CulturalCard191 : CulturalDefinitionCard { } public sealed class CulturalCard192 : CulturalDefinitionCard { } public sealed class CulturalCard193 : CulturalDefinitionCard { } public sealed class CulturalCard194 : CulturalDefinitionCard { } public sealed class CulturalCard195 : CulturalDefinitionCard { } public sealed class CulturalCard196 : CulturalDefinitionCard { } public sealed class CulturalCard197 : CulturalDefinitionCard { } internal static class CulturalCardPresentation { public static IReadOnlyList BuildBaseStats(CulturalBaseStats stats) { List list = new List(4); AddMultiplier(list, "Health", stats.Health, lowerIsBeneficial: false); AddMultiplier(list, "Damage", stats.Damage, lowerIsBeneficial: false); AddInverseRate(list, "Attack speed", stats.AttackSpeed); AddMultiplier(list, "Move speed", stats.MovementSpeed, lowerIsBeneficial: false); AddPlayerSize(list, stats.SizeMultiplier); AddMultiplier(list, "Jump", stats.Jump, lowerIsBeneficial: false); AddMultiplier(list, "Player gravity", stats.PlayerGravity, lowerIsBeneficial: true); AddPercentAdditive(list, "Lifesteal", stats.LifeSteal, positiveWhenAboveZero: true); AddFloat(list, "Regeneration", stats.Regeneration, positiveWhenAboveZero: true, " HP/s"); AddSeconds(list, "Damage delay", stats.DamageOverTime); AddMultiplier(list, "Knockback", stats.Knockback, lowerIsBeneficial: false); AddMultiplier(list, "Bullet speed", stats.ProjectileSpeed, lowerIsBeneficial: false); AddMultiplier(list, "Simulation speed", stats.ProjectileSimulationSpeed, lowerIsBeneficial: false); AddMultiplier(list, "Bullet gravity", stats.ProjectileGravity, lowerIsBeneficial: true); AddMultiplier(list, "Spread", stats.SpreadMultiplier, lowerIsBeneficial: true); AddFloat(list, "Bullet size", stats.ProjectileSizeAdd, positiveWhenAboveZero: true); AddMultiplier(list, "Reload time", stats.ReloadTime, lowerIsBeneficial: true); AddSignedSeconds(list, "Reload time", stats.ReloadTimeAdd, lowerIsBeneficial: true); AddInt(list, "Ammo", stats.Ammo, positiveWhenAboveZero: true); AddFloat(list, "Ammo regen", stats.AmmoRegeneration, positiveWhenAboveZero: true, "/s"); AddInt(list, "Projectiles", stats.Projectiles, positiveWhenAboveZero: true); AddInt(list, "Bursts", stats.Bursts, positiveWhenAboveZero: true); AddInt(list, "Reflects", stats.Reflects, positiveWhenAboveZero: true); AddInt(list, "Bounces", stats.Bounces, positiveWhenAboveZero: true); AddMultiplier(list, "Bounce speed", stats.BounceSpeed, lowerIsBeneficial: false); AddMultiplier(list, "Bounce damage", stats.BounceDamage, lowerIsBeneficial: false); AddPercentAdditive(list, "Slow", stats.Slow, positiveWhenAboveZero: true); AddMultiplier(list, "Distance damage", stats.DamageAfterDistance, lowerIsBeneficial: false); AddFloat(list, "Bullet lifetime", stats.BulletLifetime, positiveWhenAboveZero: false, " sec"); AddMultiplier(list, "Block cooldown", stats.BlockCooldown, lowerIsBeneficial: true); AddSignedSeconds(list, "Block cooldown", stats.BlockCooldownAdd, lowerIsBeneficial: true); AddFloat(list, "Block healing", stats.BlockHealing, positiveWhenAboveZero: true); AddInt(list, "Block charges", stats.AdditionalBlocks, positiveWhenAboveZero: true); AddInt(list, "Extra jumps", stats.ExtraJumps, positiveWhenAboveZero: true); AddInt(list, "Revives", stats.Respawns, positiveWhenAboveZero: true); return list.AsReadOnly(); } public static string BuildDescription(bool showPrimaryMechanic, IReadOnlyList mechanics) { if (!showPrimaryMechanic || mechanics.Count == 0) { return string.Empty; } string text = EffectSentence(mechanics[0].EffectId); if (mechanics.Count != 1) { return text + " " + EffectSentence(mechanics[1].EffectId); } return text; } private static void AddPlayerSize(ICollection result, float value) { if (!(Math.Abs(value - 1f) <= 0.0001f)) { float num = (value - 1f) * 100f; result.Add(new CulturalCardStat("Player size", Percent(num), num < 0f)); } } private static void AddInverseRate(ICollection result, string label, float intervalMultiplier) { if (!(Math.Abs(intervalMultiplier - 1f) <= 0.0001f)) { float num = (0f - (intervalMultiplier - 1f)) * 100f; result.Add(new CulturalCardStat(label, Percent(num), num > 0f)); } } private static void AddMultiplier(ICollection result, string label, float value, bool lowerIsBeneficial) { if (!(Math.Abs(value - 1f) <= 0.0001f)) { float num = (value - 1f) * 100f; bool isPositive = (lowerIsBeneficial ? (num < 0f) : (num > 0f)); result.Add(new CulturalCardStat(label, Percent(num), isPositive)); } } private static void AddPercentAdditive(ICollection result, string label, float value, bool positiveWhenAboveZero) { if (!(Math.Abs(value) <= 0.0001f)) { bool isPositive = (positiveWhenAboveZero ? (value > 0f) : (value < 0f)); result.Add(new CulturalCardStat(label, Percent(value * 100f), isPositive)); } } private static void AddSeconds(ICollection result, string label, float value) { if (!(Math.Abs(value) <= 0.0001f)) { result.Add(new CulturalCardStat(label, SignedNumber(value) + " sec", value > 0f)); } } private static void AddSignedSeconds(ICollection result, string label, float value, bool lowerIsBeneficial) { if (!(Math.Abs(value) <= 0.0001f)) { bool isPositive = (lowerIsBeneficial ? (value < 0f) : (value > 0f)); result.Add(new CulturalCardStat(label, SignedNumber(value) + " sec", isPositive)); } } private static void AddFloat(ICollection result, string label, float value, bool positiveWhenAboveZero, string suffix = "") { if (!(Math.Abs(value) <= 0.0001f)) { bool isPositive = (positiveWhenAboveZero ? (value > 0f) : (value < 0f)); result.Add(new CulturalCardStat(label, SignedNumber(value) + suffix, isPositive)); } } private static void AddInt(ICollection result, string label, int value, bool positiveWhenAboveZero) { if (value != 0) { bool isPositive = (positiveWhenAboveZero ? (value > 0) : (value < 0)); result.Add(new CulturalCardStat(label, Signed(value), isPositive)); } } private static string EffectSentence(CulturalEffectId effectId) { return effectId switch { CulturalEffectId.ProjectileDamage => "Shots gain extra damage.", CulturalEffectId.ProjectileSpeed => "Shots gain extra speed.", CulturalEffectId.ProjectileSize => "Shots grow in flight.", CulturalEffectId.ShootHeal => "The first shot heals you.", CulturalEffectId.ShootLunge => "The first shot lunges forward.", CulturalEffectId.ShootShockwave => "The first shot releases a shockwave.", CulturalEffectId.BlockHeal => "Blocking restores health.", CulturalEffectId.BlockRepel => "Blocking repels nearby enemies.", CulturalEffectId.BlockDamage => "Blocking damages nearby enemies.", CulturalEffectId.BlockAmmo => "Blocking reloads and empowers the next volley.", CulturalEffectId.DamageRecovery => "Taking damage restores part of your health.", CulturalEffectId.DamageRetaliation => "Taking damage retaliates against the attacker.", CulturalEffectId.DamageCharge => "Taking damage empowers the next volley.", CulturalEffectId.Regeneration => "Regenerates health over time.", CulturalEffectId.ProximityDamage => "The nearest enemy takes periodic damage.", CulturalEffectId.LowHealthPulse => "Low health triggers periodic recovery.", _ => string.Empty, }; } private static string Percent(float value) { return ((value > 0f) ? "+" : string.Empty) + value.ToString("0.#", CultureInfo.InvariantCulture) + "%"; } private static string SignedNumber(float value) { return ((value > 0f) ? "+" : string.Empty) + value.ToString("0.##", CultureInfo.InvariantCulture); } private static string Signed(int value) { if (value <= 0) { return value.ToString(CultureInfo.InvariantCulture); } return "+" + value.ToString(CultureInfo.InvariantCulture); } } public static class CulturalCardRegistry { public const int CardCount = 198; private static readonly Dictionary IndexByType = new Dictionary(198); private static bool registered; public static void RegisterAll() { if (!registered) { registered = true; Register(0); Register(1); Register(2); Register(3); Register(4); Register(5); Register(6); Register(7); Register(8); Register(9); Register(10); Register(11); Register(12); Register(13); Register(14); Register(15); Register(16); Register(17); Register(18); Register(19); Register(20); Register(21); Register(22); Register(23); Register(24); Register(25); Register(26); Register(27); Register(28); Register(29); Register(30); Register(31); Register(32); Register(33); Register(34); Register(35); Register(36); Register(37); Register(38); Register(39); Register(40); Register(41); Register(42); Register(43); Register(44); Register(45); Register(46); Register(47); Register(48); Register(49); Register(50); Register(51); Register(52); Register(53); Register(54); Register(55); Register(56); Register(57); Register(58); Register(59); Register(60); Register(61); Register(62); Register(63); Register(64); Register(65); Register(66); Register(67); Register(68); Register(69); Register(70); Register(71); Register(72); Register(73); Register(74); Register(75); Register(76); Register(77); Register(78); Register(79); Register(80); Register(81); Register(82); Register(83); Register(84); Register(85); Register(86); Register(87); Register(88); Register(89); Register(90); Register(91); Register(92); Register(93); Register(94); Register(95); Register(96); Register(97); Register(98); Register(99); Register(100); Register(101); Register(102); Register(103); Register(104); Register(105); Register(106); Register(107); Register(108); Register(109); Register(110); Register(111); Register(112); Register(113); Register(114); Register(115); Register(116); Register(117); Register(118); Register(119); Register(120); Register(121); Register(122); Register(123); Register(124); Register(125); Register(126); Register(127); Register(128); Register(129); Register(130); Register(131); Register(132); Register(133); Register(134); Register(135); Register(136); Register(137); Register(138); Register(139); Register(140); Register(141); Register(142); Register(143); Register(144); Register(145); Register(146); Register(147); Register(148); Register(149); Register(150); Register(151); Register(152); Register(153); Register(154); Register(155); Register(156); Register(157); Register(158); Register(159); Register(160); Register(161); Register(162); Register(163); Register(164); Register(165); Register(166); Register(167); Register(168); Register(169); Register(170); Register(171); Register(172); Register(173); Register(174); Register(175); Register(176); Register(177); Register(178); Register(179); Register(180); Register(181); Register(182); Register(183); Register(184); Register(185); Register(186); Register(187); Register(188); Register(189); Register(190); Register(191); Register(192); Register(193); Register(194); Register(195); Register(196); Register(197); } } internal static CulturalCardDefinition DefinitionFor(Type cardType) { if (!IndexByType.TryGetValue(cardType, out var value)) { throw new InvalidOperationException("Unregistered cultural marker type: " + cardType.FullName); } return CulturalCardCatalog.GetByIndex(value); } private static void Register(int index) where T : CulturalDefinitionCard { IndexByType.Add(typeof(T), index); CustomCard.BuildCard((Action)delegate(CardInfo card) { CulturalCardDefinition byIndex = CulturalCardCatalog.GetByIndex(index); card.cardName = byIndex.Title; card.cardDestription = CulturalSignaturePresentation.Append(byIndex.StableId, byIndex.Description); }); } } public abstract class CulturalDefinitionCard : ReksikCardsBase { private CulturalCardDefinition? definition; internal CulturalCardDefinition Definition => definition ?? (definition = CulturalCardCatalog.GetByCardType(((object)this).GetType())); public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CulturalCardDefinition culturalCardDefinition = Definition; cardInfo.allowMultiple = culturalCardDefinition.AllowMultiple; ApplyBaseStats(culturalCardDefinition.BaseStats, gun, statModifiers, block); cardInfo.categories = Array.Empty(); cardInfo.blacklistedCategories = Array.Empty(); } private static void ApplyBaseStats(CulturalBaseStats baseStats, Gun gun, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = baseStats.Health; statModifiers.movementSpeed = baseStats.MovementSpeed; statModifiers.jump = baseStats.Jump; statModifiers.gravity = baseStats.PlayerGravity; statModifiers.sizeMultiplier = baseStats.SizeMultiplier; statModifiers.numberOfJumps = baseStats.ExtraJumps; statModifiers.respawns = baseStats.Respawns; statModifiers.lifeSteal = baseStats.LifeSteal; statModifiers.regen = baseStats.Regeneration; statModifiers.secondsToTakeDamageOver = baseStats.DamageOverTime; gun.damage = baseStats.Damage; gun.attackSpeed = baseStats.AttackSpeed; gun.knockback = baseStats.Knockback; gun.projectileSpeed = baseStats.ProjectileSpeed; gun.projectielSimulatonSpeed = baseStats.ProjectileSimulationSpeed; gun.gravity = baseStats.ProjectileGravity; gun.multiplySpread = baseStats.SpreadMultiplier; gun.size = baseStats.ProjectileSizeAdd; gun.reloadTime = baseStats.ReloadTime; gun.reloadTimeAdd = baseStats.ReloadTimeAdd; gun.ammo = baseStats.Ammo; gun.ammoReg = baseStats.AmmoRegeneration; gun.numberOfProjectiles = baseStats.Projectiles; gun.bursts = baseStats.Bursts; gun.reflects = baseStats.Reflects + baseStats.Bounces; gun.speedMOnBounce = baseStats.BounceSpeed; gun.dmgMOnBounce = baseStats.BounceDamage; gun.slow = baseStats.Slow; gun.damageAfterDistanceMultiplier = baseStats.DamageAfterDistance; gun.destroyBulletAfter = baseStats.BulletLifetime; block.cdMultiplier = baseStats.BlockCooldown; block.cdAdd = baseStats.BlockCooldownAdd; block.healing = baseStats.BlockHealing; block.additionalBlocks = baseStats.AdditionalBlocks; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { CulturalCardDefinition culturalCardDefinition = Definition; CulturalRuntimeMono.GetOrAdd(player).AddCard(culturalCardDefinition.StableId, culturalCardDefinition.FamilyId, culturalCardDefinition.SourceKey, culturalCardDefinition.Rarity, culturalCardDefinition.Mechanics); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { CulturalRuntimeMono component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.RemoveCard(Definition.StableId); } } } public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null || (Object)(object)data == (Object)null || data.currentCards == null) { return; } CulturalCardDefinition culturalCardDefinition = Definition; int num = 0; for (int i = 0; i < data.currentCards.Count; i++) { CardInfo val = data.currentCards[i]; CulturalDefinitionCard culturalDefinitionCard = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent() : null); if ((Object)(object)culturalDefinitionCard != (Object)null && string.Equals(culturalDefinitionCard.Definition.StableId, culturalCardDefinition.StableId, StringComparison.Ordinal)) { num++; } } CulturalRuntimeMono.GetOrAdd(player).SetCard(culturalCardDefinition.StableId, culturalCardDefinition.FamilyId, culturalCardDefinition.SourceKey, culturalCardDefinition.Rarity, num, culturalCardDefinition.Mechanics); } protected override string GetTitle() { return Definition.StableId; } protected override string GetDescription() { CulturalCardDefinition culturalCardDefinition = Definition; return CulturalSignaturePresentation.Append(culturalCardDefinition.StableId, culturalCardDefinition.Description); } protected override CardInfoStat[] GetStats() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown CulturalCardDefinition culturalCardDefinition = Definition; CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[culturalCardDefinition.Stats.Count]; for (int i = 0; i < array.Length; i++) { CulturalCardStat culturalCardStat = culturalCardDefinition.Stats[i]; array[i] = new CardInfoStat { positive = culturalCardStat.IsPositive, stat = culturalCardStat.Label, amount = culturalCardStat.Amount, simepleAmount = (SimpleAmount)0 }; } return array; } protected override Rarity GetRarity() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) return (Rarity)(Definition.Rarity switch { CulturalRarityTier.Common => 0, CulturalRarityTier.Uncommon => 1, CulturalRarityTier.Rare => 2, CulturalRarityTier.Legendary => ReksikRarities.Legendary, _ => throw new ArgumentOutOfRangeException(), }); } protected override GameObject GetCardArt() { return CulturalSharedArtCache.GetOrCreate(Definition); } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)(Definition.SourceKey switch { "Foundation" => 7, "Lord of War" => 1, "Kaguya-sama" => 4, "Code Geass" => 0, "Zirkonavty" => 3, "Classroom of the Elite" => 2, "Project Hail Mary" => 6, "Amazing Digital Circus" => 4, _ => 3, }); } } internal static class CulturalSharedArtCache { private static readonly Dictionary BySource = new Dictionary(); private static readonly Dictionary ByStableId = new Dictionary(); private static Font? font; public static GameObject GetOrCreate(CulturalCardDefinition definition) { if (definition == null) { throw new ArgumentNullException("definition"); } if (definition.Rarity == CulturalRarityTier.Legendary) { if (ByStableId.TryGetValue(definition.StableId, out GameObject value) && (Object)(object)value != (Object)null) { return value; } if (TryLoadPortrait(definition, out value)) { DisableRenderers(value); ((Object)value).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)value); ByStableId[definition.StableId] = value; return value; } } return GetOrCreate(definition.SourceKey); } public static GameObject GetOrCreate(string sourceKey) { string text = (string.IsNullOrWhiteSpace(sourceKey) ? "culture" : sourceKey.Trim()); if (BySource.TryGetValue(text, out GameObject value) && (Object)(object)value != (Object)null) { return value; } value = BuildFallback(text); DisableRenderers(value); ((Object)value).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)value); BySource[text] = value; return value; } private static bool TryLoadPortrait(CulturalCardDefinition definition, out GameObject portrait) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) portrait = null; string name = "ReksikCards.Assets.CulturePortraits." + definition.StableId + ".png"; using Stream stream = typeof(CulturalSharedArtCache).Assembly.GetManifestResourceStream(name); if (stream == null || stream.Length <= 0 || stream.Length > int.MaxValue) { return false; } byte[] array = new byte[(int)stream.Length]; int num; for (int i = 0; i < array.Length; i += num) { num = stream.Read(array, i, array.Length - i); if (num <= 0) { return false; } } Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false); if (!ImageConversion.LoadImage(val, array, true)) { Object.Destroy((Object)(object)val); return false; } ((Object)val).name = definition.StableId + "_PortraitTexture"; ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; ((Object)val).hideFlags = (HideFlags)61; Sprite val2 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), (float)((Texture)val).width); ((Object)val2).name = definition.StableId + "_PortraitSprite"; ((Object)val2).hideFlags = (HideFlags)61; Color val3 = SourceColor(definition.SourceKey); portrait = new GameObject("CulturePortrait_" + definition.StableId); portrait.AddComponent(); GameObject val4 = new GameObject("Background"); val4.transform.SetParent(portrait.transform, false); SpriteRenderer obj = val4.AddComponent(); obj.sprite = ReksikSpriteCache.Square; obj.color = new Color(val3.r * 0.2f, val3.g * 0.2f, val3.b * 0.2f, 0.98f); ((Renderer)obj).sortingOrder = 0; val4.transform.localScale = new Vector3(1.14f, 1.14f, 1f); GameObject val5 = new GameObject("Portrait"); val5.transform.SetParent(portrait.transform, false); SpriteRenderer obj2 = val5.AddComponent(); obj2.sprite = val2; obj2.color = Color.white; ((Renderer)obj2).sortingOrder = 1; val5.transform.localScale = new Vector3(1.08f, 1.08f, 1f); GameObject val6 = new GameObject("LegendaryHalo"); val6.transform.SetParent(portrait.transform, false); SpriteRenderer obj3 = val6.AddComponent(); obj3.sprite = ReksikSpriteCache.Ring; obj3.color = new Color(1f, 0.76f, 0.18f, 0.72f); ((Renderer)obj3).sortingOrder = 2; val6.transform.localScale = new Vector3(1.12f, 1.12f, 1f); AddText(portrait, "Source", SourceLabel(definition.SourceKey), new Vector3(0f, -0.43f, 0f), 0.048f, 42, new Color(1f, 0.88f, 0.48f, 0.82f), 3); portrait.transform.localScale = Vector3.one * 0.78f; return true; } private static GameObject BuildFallback(string sourceKey) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) Color val = SourceColor(sourceKey); GameObject val2 = new GameObject("CultureArt_" + SafeObjectName(sourceKey)); val2.AddComponent(); GameObject val3 = new GameObject("Background"); val3.transform.SetParent(val2.transform, false); SpriteRenderer obj = val3.AddComponent(); obj.sprite = ReksikSpriteCache.Square; obj.color = new Color(val.r * 0.34f, val.g * 0.34f, val.b * 0.34f, 0.96f); ((Renderer)obj).sortingOrder = 0; val3.transform.localScale = new Vector3(1.16f, 1.16f, 1f); GameObject val4 = new GameObject("Halo"); val4.transform.SetParent(val2.transform, false); SpriteRenderer obj2 = val4.AddComponent(); obj2.sprite = ReksikSpriteCache.Ring; obj2.color = new Color(val.r, val.g, val.b, 0.78f); ((Renderer)obj2).sortingOrder = 1; val4.transform.localScale = new Vector3(0.88f, 0.88f, 1f); AddText(val2, "Source", SourceLabel(sourceKey), new Vector3(0f, 0.31f, 0f), 0.075f, 58, new Color(1f, 1f, 1f, 0.72f), 2); val2.transform.localScale = Vector3.one * 0.78f; return val2; } private static void AddText(GameObject root, string objectName, string value, Vector3 position, float characterSize, int fontSize, Color color, int sortingOrder) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(objectName); val.transform.SetParent(root.transform, false); val.transform.localPosition = position; TextMesh val2 = val.AddComponent(); val2.text = value; val2.color = color; val2.characterSize = characterSize; val2.fontSize = fontSize; val2.anchor = (TextAnchor)4; val2.alignment = (TextAlignment)1; val2.lineSpacing = 0.82f; if ((Object)(object)font == (Object)null) { font = Resources.GetBuiltinResource("Arial.ttf"); } if ((Object)(object)font != (Object)null) { val2.font = font; } MeshRenderer component = ((Component)val2).GetComponent(); if ((Object)(object)component != (Object)null) { ((Renderer)component).sortingOrder = sortingOrder; } } private static void DisableRenderers(GameObject root) { Renderer[] componentsInChildren = root.GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)componentsInChildren[i] != (Object)null) { componentsInChildren[i].enabled = false; } } } private static Color SourceColor(string sourceKey) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) uint num = 2166136261u; for (int i = 0; i < sourceKey.Length; i++) { num ^= sourceKey[i]; num *= 16777619; } return Color.HSVToRGB((float)(num % 360) / 360f, 0.67f, 0.96f); } private static string SourceLabel(string sourceKey) { return sourceKey switch { "Classroom of the Elite" => "COTE", "Foundation" => "FND", "Lord of War" => "LOW", "Kaguya-sama" => "KS", "Code Geass" => "CG", "Zirkonavty" => "ZRK", "Amazing Digital Circus" => "ADC", "Project Hail Mary" => "PHM", _ => "CULT", }; } private static string SafeObjectName(string sourceKey) { return sourceKey.Replace(" ", "_").Replace(";", string.Empty).Replace(":", string.Empty); } } internal sealed class CulturalArtSpawnFixMono : MonoBehaviour { private bool applied; private void Awake() { TryApply(); } private void Start() { TryApply(); } private void OnTransformParentChanged() { TryApply(); } private void TryApply() { if (applied || (Object)(object)((Component)this).transform.parent == (Object)null) { return; } Renderer[] componentsInChildren = ((Component)this).GetComponentsInChildren(true); Renderer componentInChildren = ((Component)((Component)this).transform.parent).GetComponentInChildren(); int layer = ((Component)((Component)this).transform.parent).gameObject.layer; ReksikVfx.SetLayerRecursive(((Component)this).gameObject, layer); foreach (Renderer val in componentsInChildren) { if (!((Object)(object)val == (Object)null)) { val.enabled = true; if ((Object)(object)componentInChildren != (Object)null) { val.sortingLayerID = componentInChildren.sortingLayerID; } } } applied = true; Object.Destroy((Object)(object)this); } } internal static class CulturalSignaturePresentation { private static readonly IReadOnlyDictionary ByStableId = new Dictionary(StringComparer.Ordinal) { ["CulturalCard000"] = "Damage taken charges your next volley; block cashes it in.", ["CulturalCard005"] = "The nearest enemy takes periodic damage.", ["CulturalCard025"] = "Shots build Cargo; block converts it into ammo and damage.", ["CulturalCard049"] = "Consecutive volleys alternate between damage and speed.", ["CulturalCard050"] = "Shoot, block, then shoot again to empower the final move.", ["CulturalCard051"] = "Clean volleys build Excellence; taking damage resets it.", ["CulturalCard075"] = "Damage marks the attacker; block returns it and arms a shot.", ["CulturalCard076"] = "Once per life, critical health triggers emergency recovery.", ["CulturalCard090"] = "Critical health releases stored recovery and retaliation.", ["CulturalCard100"] = "Unbroken volleys build momentum; taking damage resets it.", ["CulturalCard124"] = "Blocking broadcasts recovery and stored power.", ["CulturalCard125"] = "Observed shots and damage convert into power on block.", ["CulturalCard126"] = "Blocking stores discipline for the next volley.", ["CulturalCard131"] = "Damage builds pressure; block releases retaliation and pursuit.", ["CulturalCard148"] = "Damage becomes evidence that empowers the next volley.", ["CulturalCard149"] = "Alternating block and shoot grants recovery and payoff.", ["CulturalCard156"] = "Incoming pressure becomes energy released on block.", ["CulturalCard173"] = "Once per life, critical health launches an escape and recovery.", ["CulturalCard174"] = "Each block rotates the next volley through three modes." }; public static string Append(string stableId, string description) { if (!ByStableId.TryGetValue(stableId, out string value)) { return description; } if (!string.IsNullOrWhiteSpace(description)) { return description + "\n" + value; } return value; } } internal enum CulturalVfxShape { Circle, Ring, Diamond, Burst, Square } internal sealed class CulturalVfxStyle { public Color Primary { get; } public Color Secondary { get; } public CulturalVfxShape PrimaryShape { get; } public CulturalVfxShape AccentShape { get; } public float RadiusScale { get; } public float DurationScale { get; } public float TrailWidthScale { get; } public float Rotation { get; } public int Key { get; } public CulturalVfxStyle(Color primary, Color secondary, CulturalVfxShape primaryShape, CulturalVfxShape accentShape, float radiusScale, float durationScale, float trailWidthScale, float rotation, int key) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) Primary = primary; Secondary = secondary; PrimaryShape = primaryShape; AccentShape = accentShape; RadiusScale = radiusScale; DurationScale = durationScale; TrailWidthScale = trailWidthScale; Rotation = rotation; Key = key; } public static CulturalVfxStyle Create(string sourceKey, CulturalRarityTier rarity, CulturalEffectId effectId, string stableId) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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) SourcePalette(sourceKey, out var primary, out var secondary); int num = StableHash(stableId + ":" + effectId); float num2 = (float)(num & 0xFF) / 255f - 0.5f; Color primary2 = Color.Lerp(SemanticColor(effectId), primary, 0.52f + num2 * 0.18f); Color secondary2 = Color.Lerp(secondary, Color.white, (rarity == CulturalRarityTier.Legendary) ? 0.42f : 0.12f); primary2.a = ((rarity == CulturalRarityTier.Legendary) ? 0.82f : 0.66f); secondary2.a = ((rarity == CulturalRarityTier.Legendary) ? 0.78f : 0.58f); CulturalVfxShape primaryShape = ChoosePrimaryShape(effectId, num); CulturalVfxShape accentShape = ChooseAccentShape(effectId, num); return new CulturalVfxStyle(primary2, secondary2, primaryShape, accentShape, rarity switch { CulturalRarityTier.Uncommon => 1.05f, CulturalRarityTier.Rare => 1.1f, CulturalRarityTier.Legendary => 1.18f, _ => 1f, } * (1f + num2 * 0.1f), ((rarity == CulturalRarityTier.Legendary) ? 1.14f : 1f) * (1f - num2 * 0.08f), ((rarity == CulturalRarityTier.Legendary) ? 1.22f : 1f) * (1f + num2 * 0.18f), (float)(num & 0x3FF) * (45f / 128f), num); } public static CulturalVfxStyle Default(CulturalEffectId effectId) { return Create("Culture", CulturalRarityTier.Common, effectId, effectId.ToString()); } private static CulturalVfxShape ChoosePrimaryShape(CulturalEffectId effectId, int hash) { switch (effectId) { case CulturalEffectId.ProjectileDamage: return CulturalVfxShape.Burst; case CulturalEffectId.ProjectileSpeed: return CulturalVfxShape.Diamond; case CulturalEffectId.ProjectileSize: return CulturalVfxShape.Circle; case CulturalEffectId.ShootHeal: case CulturalEffectId.BlockHeal: case CulturalEffectId.DamageRecovery: case CulturalEffectId.Regeneration: return CulturalVfxShape.Circle; case CulturalEffectId.BlockRepel: case CulturalEffectId.LowHealthPulse: return CulturalVfxShape.Ring; case CulturalEffectId.ShootLunge: case CulturalEffectId.BlockAmmo: case CulturalEffectId.DamageCharge: return CulturalVfxShape.Diamond; case CulturalEffectId.ShootShockwave: case CulturalEffectId.BlockDamage: case CulturalEffectId.DamageRetaliation: case CulturalEffectId.ProximityDamage: return CulturalVfxShape.Burst; default: if ((hash & 1) != 0) { return CulturalVfxShape.Diamond; } return CulturalVfxShape.Square; } } private static CulturalVfxShape ChooseAccentShape(CulturalEffectId effectId, int hash) { switch (effectId) { case CulturalEffectId.ProjectileSpeed: case CulturalEffectId.ShootLunge: if ((hash & 1) != 0) { return CulturalVfxShape.Square; } return CulturalVfxShape.Diamond; case CulturalEffectId.ProjectileDamage: case CulturalEffectId.BlockDamage: if ((hash & 1) != 0) { return CulturalVfxShape.Diamond; } return CulturalVfxShape.Burst; default: if ((hash & 1) != 0) { return CulturalVfxShape.Square; } return CulturalVfxShape.Ring; } } private static Color SemanticColor(CulturalEffectId effectId) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) switch (effectId) { case CulturalEffectId.ShootHeal: case CulturalEffectId.BlockHeal: case CulturalEffectId.DamageRecovery: case CulturalEffectId.Regeneration: return new Color(0.28f, 1f, 0.52f, 1f); case CulturalEffectId.BlockDamage: case CulturalEffectId.DamageRetaliation: case CulturalEffectId.LowHealthPulse: return new Color(1f, 0.18f, 0.26f, 1f); case CulturalEffectId.ProjectileSpeed: case CulturalEffectId.ShootLunge: return new Color(0.18f, 0.86f, 1f, 1f); case CulturalEffectId.BlockAmmo: case CulturalEffectId.DamageCharge: return new Color(1f, 0.74f, 0.18f, 1f); default: return new Color(0.7f, 0.38f, 1f, 1f); } } private static void SourcePalette(string sourceKey, out Color primary, out Color secondary) { //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) switch (sourceKey) { case "Foundation": primary = new Color(0.24f, 0.88f, 1f); secondary = new Color(0.92f, 0.98f, 1f); break; case "Lord of War": primary = new Color(1f, 0.42f, 0.12f); secondary = new Color(0.28f, 0.31f, 0.34f); break; case "Kaguya-sama": primary = new Color(1f, 0.24f, 0.58f); secondary = new Color(1f, 0.91f, 0.96f); break; case "Code Geass": primary = new Color(0.9f, 0.08f, 0.2f); secondary = new Color(0.48f, 0.16f, 0.78f); break; case "Zirkonavty": primary = new Color(0.16f, 0.84f, 1f); secondary = new Color(0.06f, 0.16f, 0.42f); break; case "Classroom of the Elite": primary = new Color(0.3f, 0.66f, 1f); secondary = new Color(0.94f, 0.98f, 1f); break; case "Project Hail Mary": primary = new Color(0.45f, 1f, 0.34f); secondary = new Color(1f, 0.78f, 0.16f); break; case "Amazing Digital Circus": primary = new Color(1f, 0.12f, 0.82f); secondary = new Color(0.12f, 0.92f, 1f); break; default: primary = new Color(0.64f, 0.42f, 1f); secondary = Color.white; break; } } private static int StableHash(string value) { uint num = 2166136261u; for (int i = 0; i < value.Length; i++) { num ^= value[i]; num *= 16777619; } return (int)(num & 0x7FFFFFFF); } } public enum CulturalEffectId { ProjectileDamage, ProjectileSpeed, ProjectileSize, ShootHeal, ShootLunge, ShootShockwave, BlockHeal, BlockRepel, BlockDamage, BlockAmmo, DamageRecovery, DamageRetaliation, DamageCharge, Regeneration, ProximityDamage, LowHealthPulse } internal static class CulturalMechanicExecutor { private const float MinimumMultiplier = 0.01f; private const string LowHealthAuraKey = "CultureLowHealthAura"; private static readonly Color ProjectileColor = new Color(0.22f, 0.92f, 1f, 0.68f); private static readonly Color BlockColor = new Color(0.68f, 0.42f, 1f, 0.58f); private static readonly Color HealColor = new Color(0.3f, 1f, 0.55f, 0.58f); private static readonly Color DangerColor = new Color(1f, 0.22f, 0.3f, 0.62f); private static bool VisualsEnabled => ReksikHostSettings.CultureVfxEnabled; public static void ApplyProjectileDamage(GameObject projectile, float power) { if (!((Object)(object)projectile == (Object)null) && !Mathf.Approximately(power, 0f)) { ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage *= Mathf.Max(0.01f, 1f + power); } } } public static void ApplyProjectileSpeed(GameObject projectile, float power) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)projectile == (Object)null) && !Mathf.Approximately(power, 0f)) { MoveTransform component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.velocity *= Mathf.Max(0.01f, 1f + power); } } } public static void ApplyProjectileSize(GameObject projectile, float power) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)projectile == (Object)null) && !Mathf.Approximately(power, 0f)) { Transform transform = projectile.transform; transform.localScale *= Mathf.Max(0.01f, 1f + power); } } public static void HealMaxHealthFraction(Player player, float fraction) { if (IsAlive(player) && !(fraction <= 0f)) { ReksikUtils.Heal(player, player.data.maxHealth * fraction); } } public static void HealRaw(Player player, float amount) { if (IsAlive(player) && !(amount <= 0f)) { ReksikUtils.Heal(player, amount); } } public static void LungeTowardsClosestEnemy(Player player, float force) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (IsAlive(player) && !Mathf.Approximately(force, 0f)) { Player closestEnemy = ReksikUtils.GetClosestEnemy(player); if (!((Object)(object)closestEnemy == (Object)null)) { ReksikUtils.AddHorizontalVelocityTowards(player, Vector2.op_Implicit(((Component)closestEnemy).transform.position), force); } } } public static void RepelEnemies(Player player, float force, float radius) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) if (!IsAlive(player) || Mathf.Approximately(force, 0f) || radius <= 0f) { return; } Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); float num = radius * radius; foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if (!IsAlive(item)) { continue; } Vector2 val2 = Vector2.op_Implicit(((Component)item).transform.position) - val; if (!(((Vector2)(ref val2)).sqrMagnitude > num)) { Vector2 val3 = ((((Vector2)(ref val2)).sqrMagnitude > 0.001f) ? ((Vector2)(ref val2)).normalized : Vector2.up); HealthHandler healthHandler = item.data.healthHandler; if ((Object)(object)healthHandler != (Object)null) { healthHandler.CallTakeForce(val3 * force, (ForceMode2D)1, false, true, 0f); } } } } public static void DamageEnemiesInRadius(Player player, float damage, float radius) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (!IsAlive(player) || damage <= 0f || radius <= 0f) { return; } Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); float num = radius * radius; foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if (IsAlive(item)) { Vector2 delta = Vector2.op_Implicit(((Component)item).transform.position) - val; if (!(((Vector2)(ref delta)).sqrMagnitude > num)) { DealDamage(player, item, damage, delta); } } } } public static void DamageClosestEnemy(Player player, float damage, float maximumRange) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (IsAlive(player) && !(damage <= 0f) && !(maximumRange <= 0f)) { Player closestEnemy = ReksikUtils.GetClosestEnemy(player, maximumRange); if (!((Object)(object)closestEnemy == (Object)null)) { Vector2 delta = Vector2.op_Implicit(((Component)closestEnemy).transform.position) - Vector2.op_Implicit(((Component)player).transform.position); DealDamage(player, closestEnemy, damage, delta); } } } public static void RetaliateAgainstLastAttacker(Player player, float damage) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (IsAlive(player) && !(damage <= 0f)) { Player lastSourceOfDamage = player.data.lastSourceOfDamage; if (IsAlive(lastSourceOfDamage) && lastSourceOfDamage.teamID != player.teamID) { Vector2 delta = Vector2.op_Implicit(((Component)lastSourceOfDamage).transform.position) - Vector2.op_Implicit(((Component)player).transform.position); DealDamage(player, lastSourceOfDamage, damage, delta); } } } public static void Reload(Player player) { if (IsAlive(player) && !((Object)(object)player.data.weaponHandler == (Object)null) && !((Object)(object)player.data.weaponHandler.gun == (Object)null)) { GunAmmo componentInChildren = ((Component)player.data.weaponHandler.gun).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.ReloadAmmo(false); } } } public static void AddDamageCharge(GameObject projectile, float totalCharge, int projectileBudget) { if (!((Object)(object)projectile == (Object)null) && !(totalCharge <= 0f) && projectileBudget > 0) { ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage += totalCharge / (float)projectileBudget; } } } public static void PlayProjectileTrail(GameObject projectile, int structuralStacks, CulturalVfxStyle style) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (VisualsEnabled && !((Object)(object)projectile == (Object)null)) { int num = Mathf.Clamp(structuralStacks, 1, 12); ReksikVfx.AttachSimpleTrail(projectile, style.Primary, (0.22f + 0.012f * (float)num) * style.DurationScale, (0.075f + 0.012f * (float)num) * style.TrailWidthScale, 0.008f * style.TrailWidthScale); } } public static void PlayProjectileTrail(GameObject projectile, int structuralStacks) { PlayProjectileTrail(projectile, structuralStacks, CulturalVfxStyle.Default(CulturalEffectId.ProjectileDamage)); } public static void PlayHealPulse(Player player, int structuralStacks, CulturalVfxStyle style) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (VisualsEnabled && IsAlive(player)) { int num = Mathf.Clamp(structuralStacks, 1, 12); ReksikVfx.PlayStyledPulse(Vector2.op_Implicit(((Component)player).transform.position), 0.85f + 0.07f * (float)num, 0.14f + 0.004f * (float)num, style, ((Component)player).transform); } } public static void PlayHealPulse(Player player, int structuralStacks) { PlayHealPulse(player, structuralStacks, CulturalVfxStyle.Default(CulturalEffectId.BlockHeal)); } public static void PlayShockwave(Player player, float mechanicalRadius, int structuralStacks, CulturalVfxStyle style) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (VisualsEnabled && IsAlive(player)) { int num = Mathf.Clamp(structuralStacks, 1, 12); ReksikVfx.PlayStyledShockwave(Vector2.op_Implicit(((Component)player).transform.position), Mathf.Min(mechanicalRadius, 8f), 0.16f + 0.005f * (float)num, style, ((Component)player).transform); } } public static void PlayShockwave(Player player, float mechanicalRadius, int structuralStacks) { PlayShockwave(player, mechanicalRadius, structuralStacks, CulturalVfxStyle.Default(CulturalEffectId.ShootShockwave)); } public static void PlayBlockPulse(Player player, float mechanicalRadius, int structuralStacks, CulturalVfxStyle style) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (VisualsEnabled && IsAlive(player)) { int num = Mathf.Clamp(structuralStacks, 1, 12); float radius = Mathf.Min(mechanicalRadius, 8.5f); ReksikVfx.PlayStyledShockwave(Vector2.op_Implicit(((Component)player).transform.position), radius, 0.18f + 0.004f * (float)num, style, ((Component)player).transform); ReksikVfx.PlayStyledPulse(Vector2.op_Implicit(((Component)player).transform.position), 0.95f + 0.06f * (float)num, 0.13f, style, ((Component)player).transform); } } public static void PlayBlockPulse(Player player, float mechanicalRadius, int structuralStacks) { PlayBlockPulse(player, mechanicalRadius, structuralStacks, CulturalVfxStyle.Default(CulturalEffectId.BlockRepel)); } public static void PlayRetaliationRing(Player player, int structuralStacks, CulturalVfxStyle style) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (VisualsEnabled && IsAlive(player)) { int num = Mathf.Clamp(structuralStacks, 1, 12); ReksikVfx.PlayStyledShockwave(Vector2.op_Implicit(((Component)player).transform.position), 2.8f + 0.18f * (float)num, 0.15f + 0.004f * (float)num, style, ((Component)player).transform); } } public static void PlayRetaliationRing(Player player, int structuralStacks) { PlayRetaliationRing(player, structuralStacks, CulturalVfxStyle.Default(CulturalEffectId.DamageRetaliation)); } public static void PlayLowHealthPulse(Player player, int structuralStacks, CulturalVfxStyle style) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (VisualsEnabled && IsAlive(player)) { int num = Mathf.Clamp(structuralStacks, 1, 12); ReksikVfx.PlayStyledPulse(Vector2.op_Implicit(((Component)player).transform.position), 1f + 0.08f * (float)num, 0.2f, style, ((Component)player).transform); } } public static void SetLowHealthAura(Player player, bool enabled, int structuralStacks, CulturalVfxStyle style) { //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_0057: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { if (!enabled || !VisualsEnabled) { ReksikVfx.RemoveStatus(((Component)player).transform, "CultureLowHealthAura"); return; } int num = Mathf.Clamp(structuralStacks, 1, 12); Color primary = style.Primary; ReksikVfx.SetAura(((Component)player).transform, "CultureLowHealthAura", enabled: true, (1.12f + 0.035f * (float)num) * style.RadiusScale, new Color(primary.r, primary.g, primary.b, 0.18f)); } } public static float DamageFactor(Player player) { if (!IsAlive(player)) { return 1f; } return ReksikUtils.GetDamageFactor(player); } private static bool IsAlive(Player player) { if ((Object)(object)player != (Object)null && (Object)(object)player.data != (Object)null) { return !player.data.dead; } return false; } private static void DealDamage(Player owner, Player target, float damage, Vector2 delta) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) if (damage <= 0f || !IsAlive(owner) || !IsAlive(target)) { return; } Vector2 val = ((((Vector2)(ref delta)).sqrMagnitude > 0.001f) ? ((Vector2)(ref delta)).normalized : Vector2.up); try { ((Damagable)target.data.healthHandler).CallTakeDamage(val * damage, Vector2.op_Implicit(((Component)target).transform.position), (GameObject)null, owner, false); } catch { } } } public sealed class CulturalMechanicSpec { public CulturalEffectId EffectId { get; } public float Magnitude { get; } public float Secondary { get; } public float Interval { get; } public int BurstCount { get; } public CulturalMechanicSpec(CulturalEffectId effectId, float magnitude, float secondary = 0f, float interval = 0f, int burstCount = 1) { EffectId = effectId; Magnitude = RequireFinite(magnitude, "magnitude"); Secondary = RequireFinite(secondary, "secondary"); Interval = RequireFinite(interval, "interval"); BurstCount = Math.Min(8, Math.Max(1, burstCount)); } private static float RequireFinite(float value, string parameterName) { if (float.IsNaN(value) || float.IsInfinity(value)) { throw new ArgumentOutOfRangeException(parameterName, "Mechanic values must be finite."); } return value; } } internal static class ClassroomProfiles { public static CulturalAuthoredCardProfile Resolve(string stableId) { return stableId switch { "CulturalCard125" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(2f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 2f, 0.5f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.5f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.3f, 0.024f)), "CulturalCard126" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.7f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.45f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.48f, 0f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.21f, 0.018f)), "CulturalCard127" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.78f, 1.25f, 1f, 1f, 1f, 0, 0, 0.08f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.72f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.064f, 0.008f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.022f, 0.003f)), "CulturalCard128" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.45f, 1f, 1f, 1f, 1f, 0, 0, 0f, 4.5f, 0f, 0.7f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 1.8f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.076f, 0.009f, 4.4f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.034f, 0.004f, 1.2f)), "CulturalCard129" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.55f, 1.55f, 1.45f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.041f, 0.005f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.014f, 0.002f)), "CulturalCard130" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.76f, 1.3f, 1f, 1f, 1f, 0, 0, 0f, 3.2f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.036f, 0.004f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.024f, 0.003f)), "CulturalCard131" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.55f, 0.7f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.9f, 1f, 2f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.23f, 0.018f)), "CulturalCard132" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.38f, 1.2f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.72f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 1f, 0f, 14f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.032f, 0.004f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.026f, 0.003f)), "CulturalCard133" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1.5f, 1.45f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 0.78f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.089f, 0.011f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.057f, 0.007f)), "CulturalCard134" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.82f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.4f, 1f, 1f, 1f, 1f, 1f, 0.45f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.07f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.13f, 0.018f)), "CulturalCard135" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.5f, 1f, 1f, 1f, 1f, 0, 0, 0.1f, 0f, 0f, 1.85f, 1.35f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.1f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.09f, 0.011f)), "CulturalCard136" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.62f, 0.68f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.75f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.52f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.085f, 0.011f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.072f, 0.009f)), "CulturalCard137" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.5f, 1.18f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.72f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 1f, 0f, 18f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.04f, 0.005f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.013f, 0.002f)), "CulturalCard138" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.75f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.4f, 1f, 1f, 1.35f, 1f, 1f, 0.38f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.029f, 0.004f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.058f, 0.007f)), "CulturalCard139" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.35f, 1.28f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.72f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.75f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.034f, 0.004f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.068f, 0.008f)), "CulturalCard140" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.5f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1.25f, 0f, 2, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.76f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.17f, 0.021f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.064f, 0.008f)), "CulturalCard141" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.82f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.78f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.58f, 0f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.085f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.032f, 0.004f)), "CulturalCard142" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.58f, 1.35f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.9f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.1f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.085f, 0.01f)), "CulturalCard143" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.64f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.78f, 0.62f, 1f, 1f, 1f, 1f, 0.48f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.092f, 0.011f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.08f, 0.01f)), "CulturalCard144" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.78f, 1.42f, 1.3f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.74f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.08f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.027f, 0.003f)), "CulturalCard145" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.45f, 0.72f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.8f, 1f, 1.9f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.095f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.085f, 0.01f)), "CulturalCard146" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.75f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.4f, 1f, 1f, 1.5f, 1f, 1f, 1f, 0f, 1.18f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.068f, 0.008f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.078f, 0.009f)), "CulturalCard147" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.75f, 0.7f, 1f, 1f, 1f, 1f, 0.35f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.115f, 0.014f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.19f, 0.023f)), _ => throw new InvalidOperationException("No hand-authored Classroom of the Elite profile for '" + stableId + "'."), }; } } internal static class CodeGeassProfiles { public static CulturalAuthoredCardProfile Resolve(string stableId) { return stableId switch { "CulturalCard075" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.78f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.65f, 1f, 1f, 1f, 1f, 1f, 0.48f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.24f, 0.019f)), "CulturalCard076" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.7f, 1f, 1f, 1f, 1f, 0, 1, 0f, 5f, 0f, 0.82f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.04f, 0.004f)), "CulturalCard077" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.74f, 1.42f, 1.35f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1.35f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.095f, 0.011f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.045f, 0.006f)), "CulturalCard078" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.62f, 0.74f, 1.65f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.105f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.08f, 0.009f)), "CulturalCard079" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.42f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.6f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.76f, 0f, 14f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.03f, 0.005f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.055f, 0.007f)), "CulturalCard080" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.76f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.5f, 1f, 1f, 1f, 1.4f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1.65f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.1f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.075f, 0.009f)), "CulturalCard081" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.38f, 1f, 1f, 1f, 1f, 0, 0, 0f, 4f, 0f, 0.58f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.72f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.018f, 0.003f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.05f, 0.006f)), "CulturalCard082" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.65f, 1f, 1f, 1f, 1.15f, 0, 0, 0f, 3f, 0f, 1f, 1f, 1.5f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.11f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.095f, 0.011f)), "CulturalCard083" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.2f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.55f, 1.28f, 1.7f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.105f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.085f, 0.01f)), "CulturalCard084" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.58f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.32f, 0.7f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.28f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.045f, 0.006f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.075f, 0.009f)), "CulturalCard085" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.28f, 1.18f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.7f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 1f, 0f, 9f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.055f, 0.007f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.014f, 0.0025f)), "CulturalCard086" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.75f, 1f, 1f, 1f, 1.18f, 0, 0, 0f, 0f, 0f, 1.42f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.22f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.105f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.04f, 0.005f)), "CulturalCard087" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.55f, 0.72f, 1f, 1f, 1f, 0, 0, 0.12f, 4.5f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.014f, 0.002f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.08f, 0.01f)), "CulturalCard088" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.64f, 1f, 1f, 1f, 1.5f, 1f, 1f, 0f, 1f, 0f, 0, 0.72f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.1f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.14f, 0.02f)), "CulturalCard089" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.45f, 1.35f, 1f, 1f, 1f, 1f, 1f, 0.5f, 1f, 0f, 2), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.085f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.07f, 0.009f)), "CulturalCard090" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.58f, 1f, 1f, 1f, 1f, 0, 1, 0.15f, 0f, 0f, 1.6f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.22f, 0.018f)), "CulturalCard091" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.62f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.4f, 1f, 1f, 1f, 1f, 1f, 0.4f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.35f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.12f, 0.014f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.115f, 0.013f)), "CulturalCard092" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.3f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.76f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 2, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.17f, 0.024f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.085f, 0.01f)), "CulturalCard093" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.65f, 0.62f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.6f, 1f, 0f, 0, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.13f, 0.015f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.12f, 0.014f)), "CulturalCard094" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.7f, 1.45f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 0.74f, 1f, 1f, 1.75f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.12f, 0.014f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.095f, 0.011f)), "CulturalCard095" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.58f, 1f, 1.85f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 1.5f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.115f, 0.013f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.085f, 0.01f)), "CulturalCard096" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.9f, 0.55f, 1f, 1f, 1.22f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.58f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.11f, 0.013f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.07f, 0.009f)), "CulturalCard097" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.5f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 2.1f, 1.75f, 1f, 1f, 1f, 1f, 1f, 0.85f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.15f, 0.017f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.14f, 0.016f)), "CulturalCard098" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.58f, 1f, 1f, 0.72f, 1f, 0, 0, 0.13f, 0f, 0f, 1.68f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.055f, 0.007f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.12f, 0.014f)), "CulturalCard099" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.72f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 0.74f, 0f, 3, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.76f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.1f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.085f, 0.01f)), _ => throw new InvalidOperationException("No hand-authored Code Geass profile for '" + stableId + "'."), }; } } internal sealed class CulturalAuthoredCardProfile { public CulturalBaseStats BaseStats { get; } public bool ShowMechanic { get; } public CulturalMechanicSpec[] Mechanics { get; } public CulturalAuthoredCardProfile(CulturalBaseStats baseStats, bool showMechanic, CulturalMechanicSpec[] mechanics) { BaseStats = baseStats ?? throw new ArgumentNullException("baseStats"); ShowMechanic = showMechanic; Mechanics = mechanics ?? throw new ArgumentNullException("mechanics"); } } internal static class CulturalAuthoredProfileCatalog { public static CulturalAuthoredCardProfile Resolve(string stableId, string sourceKey) { return sourceKey switch { "Foundation" => FoundationProfiles.Resolve(stableId), "Lord of War" => LordOfWarProfiles.Resolve(stableId), "Kaguya-sama" => KaguyaProfiles.Resolve(stableId), "Code Geass" => CodeGeassProfiles.Resolve(stableId), "Zirkonavty" => ZirkonavtyProfiles.Resolve(stableId), "Classroom of the Elite" => ClassroomProfiles.Resolve(stableId), "Project Hail Mary" => HailMaryProfiles.Resolve(stableId), "Amazing Digital Circus" => DigitalCircusProfiles.Resolve(stableId), _ => throw new InvalidOperationException("No authored profile catalog for source '" + sourceKey + "'."), }; } } internal static class CulturalProfileFactory { public static CulturalAuthoredCardProfile Card(CulturalBaseStats stats, params CulturalMechanicSpec[] mechanics) { return new CulturalAuthoredCardProfile(stats, showMechanic: false, mechanics); } public static CulturalAuthoredCardProfile Headline(CulturalBaseStats stats, params CulturalMechanicSpec[] mechanics) { return new CulturalAuthoredCardProfile(stats, showMechanic: true, mechanics); } public static CulturalBaseStats Stats(float health = 1f, float movementSpeed = 1f, float jump = 1f, float playerGravity = 1f, float sizeMultiplier = 1f, int extraJumps = 0, int respawns = 0, float lifeSteal = 0f, float regeneration = 0f, float damageOverTime = 0f, float damage = 1f, float attackSpeed = 1f, float knockback = 1f, float projectileSpeed = 1f, float projectileSimulationSpeed = 1f, float projectileGravity = 1f, float spreadMultiplier = 1f, float projectileSizeAdd = 0f, float reloadTime = 1f, float reloadTimeAdd = 0f, int ammo = 0, float ammoRegeneration = 0f, int projectiles = 0, int bursts = 0, int reflects = 0, int bounces = 0, float bounceSpeed = 1f, float bounceDamage = 1f, float slow = 0f, float damageAfterDistance = 1f, float bulletLifetime = 0f, float blockCooldown = 1f, float blockCooldownAdd = 0f, float blockHealing = 0f, int additionalBlocks = 0) { return new CulturalBaseStats { Health = health, MovementSpeed = movementSpeed, Jump = jump, PlayerGravity = playerGravity, SizeMultiplier = sizeMultiplier, ExtraJumps = extraJumps, Respawns = respawns, LifeSteal = lifeSteal, Regeneration = regeneration, DamageOverTime = damageOverTime, Damage = damage, AttackSpeed = attackSpeed, Knockback = knockback, ProjectileSpeed = projectileSpeed, ProjectileSimulationSpeed = projectileSimulationSpeed, ProjectileGravity = projectileGravity, SpreadMultiplier = spreadMultiplier, ProjectileSizeAdd = projectileSizeAdd, ReloadTime = reloadTime, ReloadTimeAdd = reloadTimeAdd, Ammo = ammo, AmmoRegeneration = ammoRegeneration, Projectiles = projectiles, Bursts = bursts, Reflects = reflects, Bounces = bounces, BounceSpeed = bounceSpeed, BounceDamage = bounceDamage, Slow = slow, DamageAfterDistance = damageAfterDistance, BulletLifetime = bulletLifetime, BlockCooldown = blockCooldown, BlockCooldownAdd = blockCooldownAdd, BlockHealing = blockHealing, AdditionalBlocks = additionalBlocks }; } public static CulturalMechanicSpec Effect(CulturalEffectId effectId, float magnitude, float familyMagnitude, float interval = 0f, int burstCount = 1) { return new CulturalMechanicSpec(effectId, magnitude, familyMagnitude, interval, burstCount); } } internal static class DigitalCircusProfiles { public static CulturalAuthoredCardProfile Resolve(string stableId) { return stableId switch { "CulturalCard173" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1.55f, 1f, 0.68f, 1f, 1, 1), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.21f, 0.017f, 3.1f)), "CulturalCard174" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.68f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 2, 1.5f, 1f, 0f, 1f, 0f, 0.66f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.24f, 0.019f, 0.72f)), "CulturalCard175" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1.34f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.22f, 0.78f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.115f, 0.013f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.07f, 0.008f, 1.6f)), "CulturalCard176" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.38f, 1f, 1f, 1f, 1f, 0, 0, 0f, 4f, 0f, 0.76f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.82f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.05f, 0.006f, 1.1f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.04f, 0.005f, 1.35f)), "CulturalCard177" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.62f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.38f, 0.82f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.78f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.1f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.07f, 0.009f, 4.2f)), "CulturalCard178" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.24f, 0.8f, 1f, 1f, 0.78f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.42f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.095f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.115f, 0.014f, 0.55f)), "CulturalCard179" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.5f, 0.7f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.62f, 0f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.125f, 0.015f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.075f, 0.0095f, 3.8f)), "CulturalCard180" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.55f, 1.48f, 1f, 1f, 0.72f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1.52f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.105f, 0.013f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.075f, 0.009f, 0.85f)), "CulturalCard181" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.66f, 1f, 1f, 1f, 1.16f, 0, 0, 0f, 0f, 0f, 1.48f, 1.2f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.055f, 0.007f, 1.05f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.1f, 0.012f, 1.4f)), "CulturalCard182" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.34f, 1.2f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.28f, 1.22f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.045f, 0.006f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.085f, 0.01f)), "CulturalCard183" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.22f, 1f, 1f, 1f, 1f, 0, 0, 0f, 3.5f, 0f, 0.72f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 1f, 0f, 10f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.04f, 0.005f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.016f, 0.0025f, 1.2f)), "CulturalCard184" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.68f, 0.58f, 1f, 1f, 1.24f, 0, 0, 0.14f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.065f, 0.0085f, 0.95f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.055f, 0.007f, 1.15f)), "CulturalCard185" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 0.58f, 1f, 1, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 0.68f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.088f, 0.011f, 0.75f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.06f, 0.0075f, 4.2f)), "CulturalCard186" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.78f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.48f, 1f, 1f, 1.38f, 1f, 1f, 1.28f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.092f, 0.0115f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.07f, 0.0085f, 1.15f)), "CulturalCard187" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.5f, 0.66f, 1f, 1f, 1.18f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.6f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.11f, 0.0135f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.105f, 0.013f, 0.65f)), "CulturalCard188" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.58f, 1.55f, 1.42f, 1f, 1f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.13f, 0.016f, 0.45f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.055f, 0.007f, 0.9f)), "CulturalCard189" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.7f, 0.56f, 1f, 1f, 1.2f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.068f, 0.0085f, 0.9f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.09f, 0.0115f, 3.4f)), "CulturalCard190" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.68f, 1f, 1f, 1f, 1f, 1f, 1f, 0.38f, 0.72f, 0f, 3), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.155f, 0.022f, 1.25f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.014f, 0.002f, 1.4f)), "CulturalCard191" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1.26f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.74f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 0.74f, 0f, 0, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.078f, 0.0095f, 0.95f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.082f, 0.01f, 0.85f)), "CulturalCard192" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.68f, 1f, 1f, 1f, 1f, 0, 1, 0f, 0f, 0f, 1.32f, 1f, 1f, 1f, 1f, 1f, 1.38f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.095f, 0.0115f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.078f, 0.0095f, 3.7f)), "CulturalCard193" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.66f, 1.28f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 0.72f, 1f, 1f, 1f, 1f, 0.74f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.018f, 0.0025f, 1.1f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.09f, 0.011f)), "CulturalCard194" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.26f, 0.66f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.56f, 1.3f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.115f, 0.0135f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.048f, 0.006f, 1.5f)), "CulturalCard195" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.7f, 1.42f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1.55f, 1f, 1.46f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.12f, 0.0145f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.1f, 0.0125f, 0.55f)), "CulturalCard196" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.54f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1.28f, 0f, 0, 0f, 2, 0, 0, 1), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.11f, 0.013f, 1f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.1f, 0.012f)), "CulturalCard197" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.45f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 2f, 0.65f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 3), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.06f, 0.008f, 0.85f, 2), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.105f, 0.013f, 3.2f, 2)), _ => throw new InvalidOperationException("No hand-authored Amazing Digital Circus profile for '" + stableId + "'."), }; } } internal static class FoundationProfiles { public static CulturalAuthoredCardProfile Resolve(string stableId) { return stableId switch { "CulturalCard000" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.85f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.65f, 1f, 1f, 1.4f, 1f, 1f, 0.6f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.22f, 0.018f)), "CulturalCard001" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.35f, 1.2f, 1f, 1f, 1.45f, 1f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.11f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.028f, 0.004f, 0.45f)), "CulturalCard002" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.75f, 1.4f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1.45f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.085f, 0.01f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.105f, 0.012f, 0.4f)), "CulturalCard003" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.75f, 1f, 1f, 1.25f, 1f, 1f, 1f, 0f, 0.75f, 0f, 3), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.145f, 0.022f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.065f, 0.009f)), "CulturalCard004" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.35f, 1f, 1f, 1f, 1f, 0, 0, 0.08f, 0f, 0f, 0.75f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.85f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.045f, 0.006f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.028f, 0.004f, 0.7f)), "CulturalCard005" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.3f, 1.35f, 1f, 1f, 1f, 0, 0, 0.1f, 0f, 0f, 1.55f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.18f, 0.015f, 0.85f)), "CulturalCard006" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.55f, 1f, 1f, 1.2f, 1f, 1f, 1f, 0f, 1f, 0f, 2, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.068f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.055f, 0.007f, 0.8f)), "CulturalCard007" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.4f, 1f, 1f, 1f, 1f, 0, 0, 0f, 4f, 0f, 0.7f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.85f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.014f, 0.0025f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.06f, 0.008f, 0.55f)), "CulturalCard008" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.55f, 1.25f, 1f, 1.55f, 1f, 1f, 0.45f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.085f, 0.011f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.075f, 0.01f, 3.8f)), "CulturalCard009" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.65f, 1f, 1f, 1f, 1f, 0, 0, 0.18f, 0f, 0f, 0.65f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.58f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.18f, 0.025f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.012f, 0.002f)), "CulturalCard010" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.7f, 0.75f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.65f, 0f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.115f, 0.014f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.095f, 0.012f, 0.65f)), "CulturalCard011" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.75f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.4f, 1f, 1f, 1f, 1.5f, 1f, 0.35f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.125f, 0.015f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.095f, 0.012f)), "CulturalCard012" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.65f, 1.25f, 1f, 1f, 0.82f, 0, 0, 0f, 0f, 0f, 1.25f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.052f, 0.0065f, 1.05f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.032f, 0.0045f, 0.6f)), "CulturalCard013" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.55f, 0.8f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.35f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.75f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.09f, 0.012f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.135f, 0.02f, 0.7f)), "CulturalCard014" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.75f, 1f, 1f, 1.25f, 1f, 1f, 1f, 0f, 0.8f, 0f, 4), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.155f, 0.023f, 0.6f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.062f, 0.0085f)), "CulturalCard015" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.8f, 0.75f, 1f, 1f, 1.2f, 0, 0, 0f, 0f, 0f, 1.55f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.095f, 0.0125f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.045f, 0.006f, 1.1f)), "CulturalCard016" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.65f, 1f, 1.5f, 1f, 1f, 1f, 1f, 0.35f, 1f, 0f, 0, 0f, 2), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.036f, 0.00475f, 0.85f, 2), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.082f, 0.011f, 0.75f)), "CulturalCard017" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1.3f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 1, 1.45f, 1.3f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.105f, 0.0135f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.085f, 0.0105f, 0.55f)), "CulturalCard018" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.8f, 1.25f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, -0.25f, 3), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.078f, 0.0105f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.165f, 0.024f, 0.5f)), "CulturalCard019" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.4f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.7f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.65f, 0f, 18f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.12f, 0.0145f, 0.75f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.038f, 0.005f, 0.65f)), "CulturalCard020" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.25f, 0.75f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.55f, 0f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.175f, 0.0245f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.08f, 0.0105f, 3.6f)), "CulturalCard021" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.65f, 1f, 1f, 1f, 1.15f, 0, 0, 0f, 0f, 0f, 1.45f, 1.25f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.105f, 0.0135f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.05f, 0.0065f, 1.2f)), "CulturalCard022" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.7f, 1.35f, 1.3f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.095f, 0.012f, 0.5f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.072f, 0.0095f)), "CulturalCard023" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.3f, 1f, 1f, 1f, 1f, 0, 0, 0.08f, 7f, 0f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.016f, 0.0028f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.024f, 0.0035f, 1f)), "CulturalCard024" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.7f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.45f, 1f, 1f, 1.6f, 1f, 1f, 0.5f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.09f, 0.0115f, 3.4f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.065f, 0.0085f, 0.9f)), _ => throw new InvalidOperationException("No hand-authored Foundation profile for '" + stableId + "'."), }; } } internal static class HailMaryProfiles { public static CulturalAuthoredCardProfile Resolve(string stableId) { return stableId switch { "CulturalCard148" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.6f, 0.55f, 1f, 1f, 1f, 1f, 0.45f, 0f, 1f, 0f, 3), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.07f, 0.006f)), "CulturalCard149" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.9f, 1f, 1f, 1f, 1.18f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.45f, 1f, 0f, 0, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.17f, 0.014f)), "CulturalCard150" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.55f, 1f, 1f, 1f, 1f, 1f, 0.4f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.62f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.088f, 0.011f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.16f, 0.021f, 0.7f)), "CulturalCard151" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.62f, 0.72f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.6f, 0f, 18f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.036f, 0.0045f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.072f, 0.009f, 0.6f)), "CulturalCard152" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.7f, 1.5f, 1.42f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.098f, 0.012f, 0.48f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.034f, 0.0045f, 0.65f)), "CulturalCard153" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.68f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.48f, 1f, 1f, 1f, 1.75f, 1f, 0.34f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.086f, 0.0105f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.108f, 0.013f)), "CulturalCard154" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.4f, 1f, 1f, 1.62f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1.82f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.118f, 0.014f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.066f, 0.008f, 0.85f)), "CulturalCard155" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.68f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.62f, 1f, 1.8f, 1f, 1f, 1f, 1f, 0.42f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.08f, 0.01f, 0.58f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.095f, 0.012f, 0.68f)), "CulturalCard156" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.7f, 0.6f, 1f, 2f, 1f, 0f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.24f, 0.019f)), "CulturalCard157" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.66f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1.88f, 1f, 0.28f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1.95f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.082f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.074f, 0.009f)), "CulturalCard158" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.68f, 0.68f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 4, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.64f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.19f, 0.026f, 0.6f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.036f, 0.0048f, 0.68f)), "CulturalCard159" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.45f, 1f, 1f, 1f, 1.22f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1.72f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.092f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.105f, 0.013f, 0.7f)), "CulturalCard160" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.66f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 0.22f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 2, 1.62f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.124f, 0.015f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.072f, 0.009f, 0.78f)), "CulturalCard161" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.7f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1.82f, 1f, 0.3f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 2f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.084f, 0.0105f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.078f, 0.0095f)), "CulturalCard162" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.58f, 0.62f, 1f, 1f, 1f, 0, 0, 0f, 6.5f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.28f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.048f, 0.0062f, 1.05f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.032f, 0.0042f, 0.72f)), "CulturalCard163" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.55f, 0.66f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.52f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.66f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.112f, 0.014f, 0.68f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.086f, 0.011f)), "CulturalCard164" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.64f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 0.62f, 1f, 1.92f, 1f, 0.3f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.134f, 0.016f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.088f, 0.011f, 0.5f)), "CulturalCard165" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.7f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.46f, 1f, 1f, 1f, 1f, 1f, 1f, 0.34f, 1f, 0f, 0, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.078f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.08f, 0.0102f)), "CulturalCard166" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.62f, 1f, 1f, 1f, 1f, 0, 0, 0f, 8.5f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.3f, 1f, 0f, 0, 0.78f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.052f, 0.0068f, 0.92f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.016f, 0.0026f)), "CulturalCard167" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.72f, 0.64f, 1f, 1f, 1f, 0, 0, 0f, 10f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.04f, 0.0052f, 0.62f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.018f, 0.003f)), "CulturalCard168" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.72f, 1f, 0.58f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1.72f, 1f, 0.38f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.072f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.102f, 0.0125f)), "CulturalCard169" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 0.44f, 0f, 0.68f, 0f, 3), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.172f, 0.023f, 0.58f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.02f, 0.0032f, 0.9f)), "CulturalCard170" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.64f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 2, 1.68f, 1.48f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.116f, 0.0145f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.076f, 0.0094f)), "CulturalCard171" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.65f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.62f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.58f, 0f, 24f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.044f, 0.0058f, 0.62f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.088f, 0.011f, 3.6f)), "CulturalCard172" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.82f, 1f, 1f, 1f, 1f, 0, 1, 0f, 8f, 0f, 0.58f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.1f, 0.012f, 3.4f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.015f, 0.002f)), _ => throw new InvalidOperationException("No hand-authored Project Hail Mary profile for '" + stableId + "'."), }; } } internal static class KaguyaProfiles { public static CulturalAuthoredCardProfile Resolve(string stableId) { return stableId switch { "CulturalCard050" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.3f, 1.3f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 1f, -0.35f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.19f, 0.016f)), "CulturalCard051" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.25f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.55f, 0.65f, 1f, 1.35f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.1f, 0.008f)), "CulturalCard052" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1.28f, 1.35f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.62f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.062f, 0.008f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.075f, 0.01f)), "CulturalCard053" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.38f, 1f, 1f, 1f, 1f, 1f, 0.48f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1.65f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.065f, 0.008f, 4f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.072f, 0.009f)), "CulturalCard054" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.3f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.72f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.25f, 1f, 0f, 0.62f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.068f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.082f, 0.011f)), "CulturalCard055" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.7f, 1.42f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 0.68f, 1f, 1.55f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.105f, 0.013f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.08f, 0.01f)), "CulturalCard056" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1.25f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.7f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 0.66f, 0f, 0, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.17f, 0.024f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.026f, 0.004f)), "CulturalCard057" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.74f, 1f, 1f, 1f, 1f, 0, 0, 0.12f, 3f, 0f, 1.48f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.082f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.072f, 0.009f, 3.8f)), "CulturalCard058" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.38f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1.28f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.72f, 0f, 16f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.03f, 0.004f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.011f, 0.0018f)), "CulturalCard059" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.3f, 1.18f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.72f, 1f, 1.65f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.075f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.02f, 0.003f)), "CulturalCard060" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.65f, 0.72f, 1f, 1f, 1.16f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1.7f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.046f, 0.006f, 0.9f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.095f, 0.012f)), "CulturalCard061" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1.6f, 1f, 0.38f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1.55f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.095f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.068f, 0.009f)), "CulturalCard062" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.78f, 1.36f, 1.32f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.42f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.078f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.072f, 0.009f)), "CulturalCard063" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.55f, 0.72f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.64f, 0f, 14f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.028f, 0.004f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.16f, 0.023f)), "CulturalCard064" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.78f, 1.35f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.55f, 1f, 1.45f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.08f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.075f, 0.01f)), "CulturalCard065" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.76f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.38f, 1f, 1f, 1.45f, 1f, 1f, 0.42f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.07f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.076f, 0.01f)), "CulturalCard066" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1.3f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.68f, 0.68f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 1), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.082f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.032f, 0.004f)), "CulturalCard067" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.68f, 1.48f, 1.4f, 1f, 1f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.095f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.08f, 0.01f, 3.5f)), "CulturalCard068" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.76f, 1f, 1f, 0.55f, 1f, 1, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 0.45f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.07f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.062f, 0.008f)), "CulturalCard069" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.35f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.7f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.28f, 1f, 0f, 0.6f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.09f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.15f, 0.022f)), "CulturalCard070" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.55f, 1f, 1f, 1f, 1f, 1f, 1f, 0.35f, 1f, 0f, 2, 0f, 2), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.095f, 0.012f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.03f, 0.004f)), "CulturalCard071" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.82f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.5f, 1.3f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.085f, 0.011f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.18f, 0.025f)), "CulturalCard072" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.58f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.75f, 1f, 1f, 1.35f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1.8f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.1f, 0.013f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.032f, 0.004f)), "CulturalCard073" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.65f, 1.35f, 1f, 1f, 0.82f, 0, 0, 0f, 0f, 0f, 1f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.08f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.073f, 0.009f)), "CulturalCard074" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.55f, 0.7f, 1f, 1f, 1f, 0, 0, 0f, 5f, 0f, 1f, 1f, 1.55f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.014f, 0.002f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.085f, 0.011f)), _ => throw new InvalidOperationException("No hand-authored Kaguya-sama profile for '" + stableId + "'."), }; } } internal static class LordOfWarProfiles { public static CulturalAuthoredCardProfile Resolve(string stableId) { return stableId switch { "CulturalCard025" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.55f, 1.15f, 1f, 1f, 1f, 1f, 1f, 0f, 0.72f, 0f, 3), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.18f, 0.016f)), "CulturalCard026" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.35f, 0.78f, 1f, 1f, 1f, 1f, 1.35f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.075f, 0.009f, 0.75f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.04f, 0.005f, 1.4f)), "CulturalCard027" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.28f, 0.86f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.78f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.78f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.03f, 0.004f, 1.1f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.008f, 0.0015f)), "CulturalCard028" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.82f, 1f, 1f, 1f, 1.5f, 1f, 0.5f, 0f, 1.28f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.075f, 0.009f, 1.2f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.032f, 0.004f, 1.4f)), "CulturalCard029" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.7f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.45f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 2, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 1.22f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.14f, 0.022f, 1.6f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.07f, 0.009f)), "CulturalCard030" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.55f, 0.7f, 1f, 1f, 1.16f, 0, 0, 0f, 0f, 0f, 1.3f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.05f, 0.006f, 1.2f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.1f, 0.012f, 1.4f)), "CulturalCard031" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.66f, 1.32f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 0.78f, 1f, 1f, 1f, 1f, 1.4f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.1f, 0.012f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.075f, 0.009f, 1.5f)), "CulturalCard032" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.35f, 0.82f, 1f, 1f, 1f, 0, 0, 0f, 4f, 0f, 0.72f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.04f, 0.005f, 1.3f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.065f, 0.008f, 4.5f)), "CulturalCard033" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.22f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.7f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.74f, 0f, 15f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.028f, 0.0045f, 1f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.0085f, 0.0015f)), "CulturalCard034" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.75f, 1.5f, 1f, 1f, 1.8f, 1f, 0.25f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.11f, 0.014f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.085f, 0.011f)), "CulturalCard035" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.64f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1.3f, 0f, 3, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.16f, 0.024f, 1.6f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.045f, 0.006f)), "CulturalCard036" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.28f, 0.76f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.32f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1.2f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.08f, 0.01f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.032f, 0.004f, 1.8f)), "CulturalCard037" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.62f, 1f, 1f, 1f, 1f, 1f, 0.72f, 0f, 1f, 0f, 1, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.05f, 0.007f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.13f, 0.021f, 1.75f)), "CulturalCard038" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.68f, 1.38f, 1.25f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.75f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.035f, 0.005f, 1.1f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.08f, 0.01f, 1f)), "CulturalCard039" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.58f, 1f, 1f, 1f, 1f, 1f, 1f, 0.3f, 0.7f, 0f, 4), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.065f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.15f, 0.023f, 1.4f)), "CulturalCard040" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.82f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.72f, 1f, 1f, 1.3f, 1f, 1f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.03f, 0.004f, 2f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.065f, 0.008f)), "CulturalCard041" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.62f, 1.42f, 1f, 1.2f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1.4f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.095f, 0.011f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.075f, 0.01f)), "CulturalCard042" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 0.75f, 1f, 1f, 1f, 1f, 1.65f, 0f, 1.35f, 0f, 5), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.075f, 0.01f, 0f, 2), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.12f, 0.019f, 1.8f)), "CulturalCard043" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.85f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.72f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 0.78f, 0f, 0, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.07f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.125f, 0.02f, 1.7f)), "CulturalCard044" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.45f, 0.68f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.38f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 1.25f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.1f, 0.012f, 1.3f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.11f, 0.014f, 1.5f)), "CulturalCard045" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.78f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.68f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.62f, 0f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.12f, 0.015f, 1f), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.075f, 0.01f, 1.2f)), "CulturalCard046" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.65f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.6f, 0.72f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 3), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.19f, 0.016f)), "CulturalCard047" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.3f, 0.82f, 1f, 1f, 1f, 0, 0, 0.08f, 0f, 0f, 0.78f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.045f, 0.006f, 1.3f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.009f, 0.0015f)), "CulturalCard048" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.6f, 1.45f, 1f, 1f, 1f, 1f, 1f, 0f, 1.35f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.11f, 0.013f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.075f, 0.01f, 4f)), "CulturalCard049" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(0.6f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.32f, 0.74f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 2), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.18f, 0.015f)), _ => throw new InvalidOperationException("No hand-authored Lord of War profile for '" + stableId + "'."), }; } } internal static class ZirkonavtyProfiles { public static CulturalAuthoredCardProfile Resolve(string stableId) { return stableId switch { "CulturalCard100" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1f, 1.45f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1.8f, 1f, 0.4f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 1), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.21f, 0.017f)), "CulturalCard101" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.78f, 1.32f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1.6f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.105f, 0.013f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.06f, 0.0075f, 0.55f)), "CulturalCard102" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.38f, 1.22f, 1f, 1f, 1.72f, 1f, 0.42f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.118f, 0.014f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.072f, 0.009f)), "CulturalCard103" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.68f, 1f, 1f, 1.92f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 1, 1.48f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.132f, 0.0155f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.062f, 0.008f, 0.85f)), "CulturalCard104" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.72f, 1.42f, 1.38f, 0.62f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.09f, 0.011f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.0095f, 0.0018f)), "CulturalCard105" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.76f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 0.3f, 1f, 0.38f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.22f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.07f, 0.009f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.034f, 0.0045f, 0.65f)), "CulturalCard106" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(2f, 0.55f, 1f, 1.5f, 1.4f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.11f, 0.014f, 0.7f, 2), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.055f, 0.007f, 0.85f, 2)), "CulturalCard107" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.58f, 1f, 1f, 1f, 1f, 0, 0, 0f, 8f, 0f, 0.68f, 1.28f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.016f, 0.0026f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.074f, 0.0095f, 3.6f)), "CulturalCard108" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.74f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1.48f, 1f, 1f, 1f, 0f, 1f, 0f, 3, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.175f, 0.025f, 0.6f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.082f, 0.0105f)), "CulturalCard109" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.68f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.62f, 1f, 1.7f, 1f, 1f, 1f, 1f, 0.42f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSize, 0.088f, 0.0115f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.049f, 0.0062f, 1.05f)), "CulturalCard110" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.38f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.66f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.28f, 1f, 0f, 0.62f), CulturalProfileFactory.Effect(CulturalEffectId.BlockRepel, 0.098f, 0.0125f, 0.75f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.068f, 0.0088f, 3.9f)), "CulturalCard111" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 0.72f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.58f, 0f, 22f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockDamage, 0.108f, 0.0135f, 0.65f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.07f, 0.009f, 0.55f)), "CulturalCard112" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.42f, 1.24f, 1f, 1.58f, 1f, 1f, 0.38f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.082f, 0.0105f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileSpeed, 0.112f, 0.0138f)), "CulturalCard113" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.76f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.5f, 1f, 1f, 1f, 1f, 0.48f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 1), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.09f, 0.0118f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.008f, 0.0016f)), "CulturalCard114" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.62f, 1.5f, 1.48f, 1f, 1f, 1), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.105f, 0.013f, 0.48f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.02f, 0.0032f, 0.95f)), "CulturalCard115" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1.34f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.7f, 1f, 1f, 1.76f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0.24f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.082f, 0.0105f, 0.8f), CulturalProfileFactory.Effect(CulturalEffectId.ProximityDamage, 0.043f, 0.0056f, 0.95f)), "CulturalCard116" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.62f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 0.68f, 0f, 5, 0.82f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.22f, 0.03f, 0.55f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.016f, 0.0027f, 0.85f)), "CulturalCard117" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.45f, 1f, 1f, 1f, 1f, 0, 1, 0f, 0f, 0f, 0.55f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.6f), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.105f, 0.0135f, 3.2f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.086f, 0.0112f)), "CulturalCard118" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.68f, 0.64f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 1f, 0f, 24f, 1), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.036f, 0.005f, 0.7f), CulturalProfileFactory.Effect(CulturalEffectId.BlockAmmo, 0.165f, 0.023f, 0.75f)), "CulturalCard119" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.58f, 1.58f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 2, 1.6f), CulturalProfileFactory.Effect(CulturalEffectId.ShootLunge, 0.112f, 0.014f, 0.52f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.038f, 0.005f, 0.6f)), "CulturalCard120" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.42f, 1f, 1f, 1f, 1f, 0, 0, 0f, 9f, 0f, 1.3f, 1f, 1f, 0.68f), CulturalProfileFactory.Effect(CulturalEffectId.Regeneration, 0.018f, 0.003f), CulturalProfileFactory.Effect(CulturalEffectId.ShootHeal, 0.022f, 0.0035f, 0.9f)), "CulturalCard121" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 0.64f, 1f, 1f, 1f, 1.78f, 1f, 0.32f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1.82f), CulturalProfileFactory.Effect(CulturalEffectId.ProjectileDamage, 0.076f, 0.0095f), CulturalProfileFactory.Effect(CulturalEffectId.DamageCharge, 0.064f, 0.0083f)), "CulturalCard122" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(0.68f, 1f, 1f, 1f, 1f, 0, 0, 0f, 0f, 0f, 1.58f, 1f, 1.65f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.62f), CulturalProfileFactory.Effect(CulturalEffectId.ShootShockwave, 0.092f, 0.0118f, 0.78f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRetaliation, 0.075f, 0.0095f, 0.58f)), "CulturalCard123" => CulturalProfileFactory.Card(CulturalProfileFactory.Stats(1.34f, 0.74f, 1f, 1f, 1f, 0, 0, 0.12f, 0f, 0f, 1.36f), CulturalProfileFactory.Effect(CulturalEffectId.BlockHeal, 0.03f, 0.0042f, 0.72f), CulturalProfileFactory.Effect(CulturalEffectId.DamageRecovery, 0.032f, 0.0044f, 0.62f)), "CulturalCard124" => CulturalProfileFactory.Headline(CulturalProfileFactory.Stats(1.75f, 1f, 1f, 1f, 1f, 0, 1, 0f, 0f, 0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0f, 1f, 0f, 0, 0f, 0, 0, 0, 0, 1f, 1f, 0f, 1f, 0f, 0.5f, 0f, 0f, 1), CulturalProfileFactory.Effect(CulturalEffectId.LowHealthPulse, 0.2f, 0.016f)), _ => throw new InvalidOperationException("No hand-authored Zirkonavty profile for '" + stableId + "'."), }; } } public sealed class CulturalRuntimeMono : MonoBehaviour { private const float BurstWindowSeconds = 0.035f; private const float HookRefreshInterval = 0.5f; private const int MaxTrailProjectilesPerBurst = 6; private const float ShootShockwaveRadius = 4.5f; private const float BlockEffectRadius = 5.5f; private const float ProximityRange = 6f; private const float LowHealthThreshold = 0.35f; private readonly Dictionary cards = new Dictionary(StringComparer.Ordinal); private readonly Dictionary familyStacks = new Dictionary(StringComparer.Ordinal); private readonly Dictionary resolvedById = new Dictionary(); private readonly List resolved = new List(); private readonly Dictionary nextTriggerAt = new Dictionary(); private readonly CulturalSignatureState signatures = new CulturalSignatureState(); private Player player; private Gun gun; private Block block; private CharacterStatModifiers stats; private float nextHookRefreshAt; private float nextMechanicTickAt; private float resolvedMechanicPower = float.NaN; private bool wasDead; private bool retaliationInProgress; private bool lowHealthAuraVisible; private int lowHealthAuraStructuralStacks; private int lowHealthAuraStyleKey; private float lastProjectileAt = -999f; private int burstSerial; private int projectileIndexInBurst; private float storedDamageCharge; private float activeBurstDamageCharge; private int activeBurstProjectileBudget; private int activeBurstChargeApplications; public static CulturalRuntimeMono GetOrAdd(Player player) { if ((Object)(object)player == (Object)null) { return null; } CulturalRuntimeMono culturalRuntimeMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)culturalRuntimeMono == (Object)null) { culturalRuntimeMono = ((Component)player).gameObject.AddComponent(); } return culturalRuntimeMono; } public void AddCard(string stableId, string familyId, string sourceKey, CulturalRarityTier rarity, IReadOnlyList effects) { string text = RequireStableId(stableId); if (!cards.TryGetValue(text, out CulturalCardRuntimeState value)) { value = new CulturalCardRuntimeState { StableId = text, FamilyId = NormalizeFamily(familyId, text), SourceKey = (sourceKey ?? string.Empty), Rarity = rarity, SelfStacks = 0, Effects = CopyEffects(effects) }; cards.Add(text, value); } else { value.FamilyId = NormalizeFamily(familyId, text); value.SourceKey = sourceKey ?? string.Empty; value.Rarity = rarity; value.Effects = CopyEffects(effects); } value.SelfStacks++; RebuildResolvedMechanics(); LogRuntimeState("armed", value); } public void RemoveCard(string stableId) { if (!string.IsNullOrWhiteSpace(stableId) && cards.TryGetValue(stableId, out CulturalCardRuntimeState value)) { value.SelfStacks--; if (value.SelfStacks <= 0) { cards.Remove(stableId); } RebuildResolvedMechanics(); } } public void SetCard(string stableId, string familyId, string sourceKey, CulturalRarityTier rarity, int selfStacks, IReadOnlyList effects) { string text = RequireStableId(stableId); if (selfStacks <= 0) { RemoveAll(text); return; } if (!cards.TryGetValue(text, out CulturalCardRuntimeState value)) { value = new CulturalCardRuntimeState(); cards.Add(text, value); } value.StableId = text; value.FamilyId = NormalizeFamily(familyId, text); value.SourceKey = sourceKey ?? string.Empty; value.Rarity = rarity; value.SelfStacks = selfStacks; value.Effects = CopyEffects(effects); RebuildResolvedMechanics(); LogRuntimeState("reconciled", value); } private void LogRuntimeState(string action, CulturalCardRuntimeState state) { Player val = (Player)(((Object)(object)player != (Object)null) ? ((object)player) : ((object)((Component)this).GetComponentInParent())); int num = (((Object)(object)val == (Object)null) ? (-1) : val.playerID); ReksikCardsPlugin.LogCultureRuntime("Culture card " + action + ": player=" + num + ", id=" + state.StableId + ", copies=" + state.SelfStacks + ", mechanics=" + state.Effects.Length + ", resolved=" + resolved.Count + "."); } public void RemoveAll(string stableId) { if (!string.IsNullOrWhiteSpace(stableId) && cards.Remove(stableId)) { RebuildResolvedMechanics(); } } public void ClearCards() { cards.Clear(); familyStacks.Clear(); resolvedById.Clear(); resolved.Clear(); ResetTransientState(); } public int GetCardStacks(string stableId) { if (string.IsNullOrWhiteSpace(stableId)) { return 0; } if (!cards.TryGetValue(stableId, out CulturalCardRuntimeState value)) { return 0; } return value.SelfStacks; } public int GetFamilyStacks(string familyId) { if (string.IsNullOrWhiteSpace(familyId)) { return 0; } if (!familyStacks.TryGetValue(familyId, out var value)) { return 0; } return value; } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } wasDead = player.data.dead; RefreshBindings(force: true); } private void OnDestroy() { UnbindGun(); UnbindBlock(); UnbindStats(); ResetTransientState(); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (!ReksikUtils.IsLocallyOwned(player)) { SetLowHealthAura(enabled: false, 0); return; } if (Time.time >= nextHookRefreshAt) { RefreshBindings(force: false); } if (player.data.dead) { if (!wasDead) { wasDead = true; ResetTransientState(); } return; } if (wasDead) { wasDead = false; ResetTransientState(); } float mechanicPower = ReksikHostSettings.MechanicPower; if (!Mathf.Approximately(resolvedMechanicPower, mechanicPower)) { RebuildResolvedMechanics(); } if (!ReksikHostSettings.CultureVfxEnabled) { SetLowHealthAura(enabled: false, 0); } if (!ReksikHostSettings.CultureMechanicsEnabled || cards.Count == 0) { SetLowHealthAura(enabled: false, 0); return; } float num = 1f / Mathf.Clamp(ReksikHostSettings.CultureEffectRateHz, 1f, 30f); if (!(Time.time < nextMechanicTickAt)) { nextMechanicTickAt = Time.time + num; ExecuteUpdateMechanics(num); } } private void RefreshBindings(bool force) { nextHookRefreshAt = Time.time + 0.5f; Gun val = (((Object)(object)player.data.weaponHandler == (Object)null) ? null : player.data.weaponHandler.gun); Block val2 = player.data.block; CharacterStatModifiers val3 = player.data.stats; if (force || (Object)(object)gun != (Object)(object)val) { UnbindGun(); gun = val; if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } } if (force || (Object)(object)block != (Object)(object)val2) { UnbindBlock(); block = val2; if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); } } if (force || (Object)(object)stats != (Object)(object)val3) { UnbindStats(); stats = val3; if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj3 = stats; obj3.WasDealtDamageAction = (Action)Delegate.Combine(obj3.WasDealtDamageAction, new Action(OnDamaged)); } } } private void UnbindGun() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); gun = null; } } private void UnbindBlock() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); block = null; } } private void UnbindStats() { if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj = stats; obj.WasDealtDamageAction = (Action)Delegate.Remove(obj.WasDealtDamageAction, new Action(OnDamaged)); stats = null; } } private void OnShootProjectile(GameObject projectile) { if (!ReksikHostSettings.CultureMechanicsEnabled || !IsOwnerAlive() || (Object)(object)projectile == (Object)null || cards.Count == 0) { return; } float time = Time.time; bool num = time - lastProjectileAt > 0.035f; lastProjectileAt = time; if (num) { burstSerial++; projectileIndexInBurst = 0; activeBurstDamageCharge = storedDamageCharge; storedDamageCharge = 0f; activeBurstProjectileBudget = (((Object)(object)gun == (Object)null) ? 1 : Math.Max(1, gun.numberOfProjectiles)); activeBurstChargeApplications = 0; signatures.OnBurstStart(player, projectile, GetCardStacks, ref storedDamageCharge); } else { projectileIndexInBurst++; } CulturalResolvedMechanic culturalResolvedMechanic = null; if (TryGet(CulturalEffectId.ProjectileDamage, out CulturalResolvedMechanic mechanic)) { CulturalMechanicExecutor.ApplyProjectileDamage(projectile, mechanic.Power); culturalResolvedMechanic = mechanic; } if (TryGet(CulturalEffectId.ProjectileSpeed, out CulturalResolvedMechanic mechanic2)) { CulturalMechanicExecutor.ApplyProjectileSpeed(projectile, mechanic2.Power); if (culturalResolvedMechanic == null || mechanic2.StructuralStacks > culturalResolvedMechanic.StructuralStacks) { culturalResolvedMechanic = mechanic2; } } if (TryGet(CulturalEffectId.ProjectileSize, out CulturalResolvedMechanic mechanic3)) { CulturalMechanicExecutor.ApplyProjectileSize(projectile, mechanic3.Power); if (culturalResolvedMechanic == null || mechanic3.StructuralStacks > culturalResolvedMechanic.StructuralStacks) { culturalResolvedMechanic = mechanic3; } } if (culturalResolvedMechanic != null && projectileIndexInBurst < 6) { CulturalMechanicExecutor.PlayProjectileTrail(projectile, culturalResolvedMechanic.StructuralStacks, culturalResolvedMechanic.VfxStyle); } if (activeBurstDamageCharge > 0f && activeBurstChargeApplications < activeBurstProjectileBudget) { CulturalMechanicExecutor.AddDamageCharge(projectile, activeBurstDamageCharge, activeBurstProjectileBudget); activeBurstChargeApplications++; } if (num) { if (TryTrigger(CulturalEffectId.ShootHeal, 0f, out CulturalResolvedMechanic mechanic4)) { CulturalMechanicExecutor.HealMaxHealthFraction(player, mechanic4.Power); CulturalMechanicExecutor.PlayHealPulse(player, mechanic4.StructuralStacks, mechanic4.VfxStyle); } if (TryTrigger(CulturalEffectId.ShootLunge, 0f, out CulturalResolvedMechanic mechanic5)) { CulturalMechanicExecutor.LungeTowardsClosestEnemy(player, mechanic5.Power); } if (TryTrigger(CulturalEffectId.ShootShockwave, 0f, out CulturalResolvedMechanic mechanic6)) { float damage = mechanic6.Power * CulturalMechanicExecutor.DamageFactor(player); float num2 = 4.5f + 0.15f * (float)mechanic6.StructuralStacks; CulturalMechanicExecutor.DamageEnemiesInRadius(player, damage, num2); CulturalMechanicExecutor.PlayShockwave(player, num2, mechanic6.StructuralStacks, mechanic6.VfxStyle); } } } private void OnBlock(BlockTriggerType triggerType) { if (!ReksikHostSettings.CultureMechanicsEnabled || !IsOwnerAlive() || cards.Count == 0) { return; } float num = 0f; int num2 = 0; CulturalResolvedMechanic culturalResolvedMechanic = null; signatures.OnBlock(player, GetCardStacks, ref storedDamageCharge); if (TryTrigger(CulturalEffectId.BlockHeal, 0f, out CulturalResolvedMechanic mechanic)) { CulturalMechanicExecutor.HealMaxHealthFraction(player, mechanic.Power); CulturalMechanicExecutor.PlayHealPulse(player, mechanic.StructuralStacks, mechanic.VfxStyle); num = Math.Max(num, 2.2f); num2 = Math.Max(num2, mechanic.StructuralStacks); if (culturalResolvedMechanic == null || mechanic.StructuralStacks > culturalResolvedMechanic.StructuralStacks) { culturalResolvedMechanic = mechanic; } } if (TryTrigger(CulturalEffectId.BlockRepel, 0f, out CulturalResolvedMechanic mechanic2)) { float num3 = 5.5f + 0.15f * (float)mechanic2.StructuralStacks; CulturalMechanicExecutor.RepelEnemies(player, mechanic2.Power, num3); num = Math.Max(num, num3); num2 = Math.Max(num2, mechanic2.StructuralStacks); if (culturalResolvedMechanic == null || mechanic2.StructuralStacks > culturalResolvedMechanic.StructuralStacks) { culturalResolvedMechanic = mechanic2; } } if (TryTrigger(CulturalEffectId.BlockDamage, 0f, out CulturalResolvedMechanic mechanic3)) { float damage = mechanic3.Power * CulturalMechanicExecutor.DamageFactor(player); float num4 = 5.5f + 0.15f * (float)mechanic3.StructuralStacks; CulturalMechanicExecutor.DamageEnemiesInRadius(player, damage, num4); num = Math.Max(num, num4); num2 = Math.Max(num2, mechanic3.StructuralStacks); if (culturalResolvedMechanic == null || mechanic3.StructuralStacks > culturalResolvedMechanic.StructuralStacks) { culturalResolvedMechanic = mechanic3; } } if (TryTrigger(CulturalEffectId.BlockAmmo, 0f, out CulturalResolvedMechanic mechanic4) && mechanic4.Power > 0f) { CulturalMechanicExecutor.Reload(player); storedDamageCharge += mechanic4.Power * CulturalMechanicExecutor.DamageFactor(player); num = Math.Max(num, 2.2f); num2 = Math.Max(num2, mechanic4.StructuralStacks); if (culturalResolvedMechanic == null || mechanic4.StructuralStacks > culturalResolvedMechanic.StructuralStacks) { culturalResolvedMechanic = mechanic4; } } if (num > 0f) { CulturalMechanicExecutor.PlayBlockPulse(player, num, num2, (culturalResolvedMechanic == null) ? CulturalVfxStyle.Default(CulturalEffectId.BlockRepel) : culturalResolvedMechanic.VfxStyle); } } private void OnDamaged(Vector2 damage, bool selfDamage) { if (!ReksikHostSettings.CultureMechanicsEnabled || !IsOwnerAlive() || cards.Count == 0 || selfDamage || retaliationInProgress) { return; } float magnitude = ((Vector2)(ref damage)).magnitude; if (magnitude <= 0f) { return; } signatures.OnDamaged(magnitude, GetCardStacks); if (TryTrigger(CulturalEffectId.DamageRecovery, 0f, out CulturalResolvedMechanic mechanic)) { CulturalMechanicExecutor.HealRaw(player, magnitude * mechanic.Power); CulturalMechanicExecutor.PlayHealPulse(player, mechanic.StructuralStacks, mechanic.VfxStyle); } if (TryTrigger(CulturalEffectId.DamageRetaliation, 0f, out CulturalResolvedMechanic mechanic2)) { retaliationInProgress = true; try { CulturalMechanicExecutor.RetaliateAgainstLastAttacker(player, magnitude * mechanic2.Power); CulturalMechanicExecutor.PlayRetaliationRing(player, mechanic2.StructuralStacks, mechanic2.VfxStyle); } finally { retaliationInProgress = false; } } if (TryGet(CulturalEffectId.DamageCharge, out CulturalResolvedMechanic mechanic3)) { storedDamageCharge += magnitude * mechanic3.Power; } } private void ExecuteUpdateMechanics(float tickDelta) { if (cards.Count != 0) { signatures.Tick(player, tickDelta, GetCardStacks); if (TryGet(CulturalEffectId.Regeneration, out CulturalResolvedMechanic mechanic) && mechanic.Power > 0f) { CulturalMechanicExecutor.HealMaxHealthFraction(player, mechanic.Power * tickDelta); } if (TryTrigger(CulturalEffectId.ProximityDamage, 1f, out CulturalResolvedMechanic mechanic2)) { float damage = mechanic2.Power * CulturalMechanicExecutor.DamageFactor(player); float maximumRange = 6f + 0.12f * (float)mechanic2.StructuralStacks; CulturalMechanicExecutor.DamageClosestEnemy(player, damage, maximumRange); } CulturalResolvedMechanic mechanic3 = null; bool flag = ReksikUtils.HealthFraction(player) <= 0.35f && TryGet(CulturalEffectId.LowHealthPulse, out mechanic3); SetLowHealthAura(flag, flag ? mechanic3.StructuralStacks : 0, flag ? mechanic3.VfxStyle : CulturalVfxStyle.Default(CulturalEffectId.LowHealthPulse)); if (flag && TryTrigger(CulturalEffectId.LowHealthPulse, 4f, out mechanic3)) { CulturalMechanicExecutor.HealMaxHealthFraction(player, mechanic3.Power); CulturalMechanicExecutor.PlayLowHealthPulse(player, mechanic3.StructuralStacks, mechanic3.VfxStyle); } } } private void SetLowHealthAura(bool enabled, int structuralStacks) { SetLowHealthAura(enabled, structuralStacks, CulturalVfxStyle.Default(CulturalEffectId.LowHealthPulse)); } private void SetLowHealthAura(bool enabled, int structuralStacks, CulturalVfxStyle style) { enabled = enabled && ReksikHostSettings.CultureVfxEnabled && IsOwnerAlive(); int num = Mathf.Clamp(structuralStacks, 1, 12); if (lowHealthAuraVisible != enabled || (enabled && (lowHealthAuraStructuralStacks != num || lowHealthAuraStyleKey != style.Key))) { lowHealthAuraVisible = enabled; lowHealthAuraStructuralStacks = (enabled ? num : 0); lowHealthAuraStyleKey = (enabled ? style.Key : 0); CulturalMechanicExecutor.SetLowHealthAura(player, enabled, lowHealthAuraStructuralStacks, style); } } private bool TryGet(CulturalEffectId effectId, out CulturalResolvedMechanic mechanic) { if (resolvedById.TryGetValue(effectId, out mechanic)) { return !Mathf.Approximately(mechanic.Power, 0f); } return false; } private bool TryTrigger(CulturalEffectId effectId, float defaultInterval, out CulturalResolvedMechanic mechanic) { if (!TryGet(effectId, out mechanic)) { return false; } float num = ((mechanic.Interval > 0f) ? mechanic.Interval : defaultInterval); if (num <= 0f) { return true; } float time = Time.time; if (nextTriggerAt.TryGetValue(effectId, out var value) && time < value) { return false; } nextTriggerAt[effectId] = time + num; return true; } private void RebuildResolvedMechanics() { CulturalRuntimeResolverV2.Rebuild(cards, familyStacks, resolvedById, resolved); resolvedMechanicPower = Mathf.Max(0f, ReksikHostSettings.MechanicPower); for (int i = 0; i < resolved.Count; i++) { resolved[i].Power *= resolvedMechanicPower; } if (!resolvedById.ContainsKey(CulturalEffectId.DamageCharge)) { storedDamageCharge = 0f; activeBurstDamageCharge = 0f; activeBurstProjectileBudget = 0; activeBurstChargeApplications = 0; } } private void ResetTransientState() { SetLowHealthAura(enabled: false, 0); nextTriggerAt.Clear(); nextMechanicTickAt = 0f; retaliationInProgress = false; lastProjectileAt = -999f; projectileIndexInBurst = 0; storedDamageCharge = 0f; activeBurstDamageCharge = 0f; activeBurstProjectileBudget = 0; activeBurstChargeApplications = 0; signatures.ResetForLife(); } private bool IsOwnerAlive() { if ((Object)(object)player != (Object)null && (Object)(object)player.data != (Object)null && !player.data.dead) { return ReksikUtils.IsLocallyOwned(player); } return false; } private static string RequireStableId(string stableId) { if (string.IsNullOrWhiteSpace(stableId)) { throw new ArgumentException("A cultural card must have a stable ID.", "stableId"); } return stableId.Trim(); } private static string NormalizeFamily(string familyId, string stableId) { if (!string.IsNullOrWhiteSpace(familyId)) { return familyId.Trim(); } return stableId; } private static CulturalMechanicSpec[] CopyEffects(IReadOnlyList effects) { if (effects == null || effects.Count == 0) { return Array.Empty(); } CulturalMechanicSpec[] array = new CulturalMechanicSpec[effects.Count]; for (int i = 0; i < effects.Count; i++) { array[i] = effects[i]; } return array; } } internal static class CulturalRuntimeResolverV2 { public static void Rebuild(Dictionary cards, Dictionary familyStacks, Dictionary resolvedById, List resolved) { familyStacks.Clear(); resolvedById.Clear(); resolved.Clear(); foreach (CulturalCardRuntimeState value5 in cards.Values) { if (value5.SelfStacks > 0) { string key = NormalizeFamily(value5.FamilyId, value5.StableId); familyStacks.TryGetValue(key, out var value); familyStacks[key] = value + value5.SelfStacks; } } Dictionary> dictionary = new Dictionary>(StringComparer.Ordinal); foreach (CulturalCardRuntimeState value6 in cards.Values) { if (value6.SelfStacks <= 0 || CulturalSignatureState.HasSignature(value6.StableId)) { continue; } string key2 = NormalizeFamily(value6.FamilyId, value6.StableId); CulturalMechanicSpec[] effects = value6.Effects; foreach (CulturalMechanicSpec culturalMechanicSpec in effects) { if (culturalMechanicSpec == null) { continue; } CulturalResolvedMechanic culturalResolvedMechanic = Ensure(culturalMechanicSpec.EffectId, resolvedById, resolved); int num = value6.SelfStacks * value6.SelfStacks; float num2 = culturalMechanicSpec.Magnitude * (float)num * (float)culturalMechanicSpec.BurstCount; culturalResolvedMechanic.Power += num2; culturalResolvedMechanic.StructuralStacks += num * culturalMechanicSpec.BurstCount; float num3 = (float)value6.Rarity * 100000f + Math.Abs(num2); if (num3 > culturalResolvedMechanic.VfxPriority || (Math.Abs(num3 - culturalResolvedMechanic.VfxPriority) <= 0.0001f && string.CompareOrdinal(value6.StableId, culturalResolvedMechanic.VfxStableId) < 0)) { culturalResolvedMechanic.VfxPriority = num3; culturalResolvedMechanic.VfxStableId = value6.StableId; culturalResolvedMechanic.VfxStyle = CulturalVfxStyle.Create(value6.SourceKey, value6.Rarity, culturalMechanicSpec.EffectId, value6.StableId); } if (culturalMechanicSpec.Interval > 0f && (culturalResolvedMechanic.Interval <= 0f || culturalMechanicSpec.Interval < culturalResolvedMechanic.Interval)) { culturalResolvedMechanic.Interval = culturalMechanicSpec.Interval; } float value2 = culturalMechanicSpec.Secondary * (float)culturalMechanicSpec.BurstCount; if (!(Math.Abs(value2) <= 0.0001f)) { if (!dictionary.TryGetValue(key2, out var value3)) { value3 = new Dictionary(); dictionary.Add(key2, value3); } if (!value3.TryGetValue(culturalMechanicSpec.EffectId, out var value4) || Math.Abs(value2) > Math.Abs(value4)) { value3[culturalMechanicSpec.EffectId] = value2; } } } } foreach (KeyValuePair> item in dictionary) { int num4 = familyStacks[item.Key]; foreach (KeyValuePair item2 in item.Value) { Ensure(item2.Key, resolvedById, resolved).Power += item2.Value * (float)num4; } } } private static CulturalResolvedMechanic Ensure(CulturalEffectId effectId, Dictionary resolvedById, List resolved) { if (resolvedById.TryGetValue(effectId, out CulturalResolvedMechanic value)) { return value; } value = new CulturalResolvedMechanic { EffectId = effectId, Power = 0f, StructuralStacks = 0, Interval = 0f, VfxStyle = CulturalVfxStyle.Default(effectId), VfxPriority = float.MinValue, VfxStableId = string.Empty }; resolvedById.Add(effectId, value); resolved.Add(value); return value; } private static string NormalizeFamily(string familyId, string stableId) { if (!string.IsNullOrWhiteSpace(familyId)) { return familyId; } return stableId; } } internal sealed class CulturalCardRuntimeState { public string StableId = string.Empty; public string FamilyId = string.Empty; public string SourceKey = string.Empty; public CulturalRarityTier Rarity; public int SelfStacks; public CulturalMechanicSpec[] Effects = Array.Empty(); } internal sealed class CulturalResolvedMechanic { public CulturalEffectId EffectId; public float Power; public int StructuralStacks; public float Interval; public CulturalVfxStyle VfxStyle = CulturalVfxStyle.Default(CulturalEffectId.ProjectileDamage); public float VfxPriority; public string VfxStableId = string.Empty; } internal static class CulturalSignatureGrowth { public static float Resolve(Func stacks, string stableId) { int num = Math.Max(0, stacks(stableId)); if (num == 0) { return 0f; } CulturalCardDefinition byStableId = CulturalCardCatalog.GetByStableId(stableId); float num2 = 0f; if (byStableId.Mechanics.Count == 1) { CulturalMechanicSpec culturalMechanicSpec = byStableId.Mechanics[0]; if (Math.Abs(culturalMechanicSpec.Magnitude) > 0.0001f) { num2 = culturalMechanicSpec.Secondary / culturalMechanicSpec.Magnitude; } } int num3 = 0; for (int i = 0; i < CulturalCardCatalog.All.Count; i++) { CulturalCardDefinition culturalCardDefinition = CulturalCardCatalog.All[i]; if (string.Equals(culturalCardDefinition.FamilyId, byStableId.FamilyId, StringComparison.Ordinal)) { num3 += Math.Max(0, stacks(culturalCardDefinition.StableId)); } } return (float)(num * num) + num2 * (float)num3; } } internal sealed class CulturalSignatureState { private const string Hari = "CulturalCard000"; private const string Mule = "CulturalCard005"; private const string Yuri = "CulturalCard025"; private const string SupplyDemand = "CulturalCard049"; private const string Kaguya = "CulturalCard050"; private const string Miyuki = "CulturalCard051"; private const string Lelouch = "CulturalCard075"; private const string Cc = "CulturalCard076"; private const string ZeroRequiem = "CulturalCard090"; private const string StarCaptain = "CulturalCard100"; private const string HomeworldSignal = "CulturalCard124"; private const string Ayanokoji = "CulturalCard125"; private const string Horikita = "CulturalCard126"; private const string Ryuen = "CulturalCard131"; private const string Grace = "CulturalCard148"; private const string Rocky = "CulturalCard149"; private const string Astrophage = "CulturalCard156"; private const string Pomni = "CulturalCard173"; private const string Caine = "CulturalCard174"; private float forecast; private float commandDebt; private float zeroBurden; private float calculation; private float ryuenPressure; private float science; private float astrophageEnergy; private float cargo; private int marketPhase; private int schemePhase; private int excellence; private int captainMomentum; private int discipline; private int caineMode; private bool rockyBlockPrimed; private bool contractUsed; private bool zeroReleaseUsed; private bool panicExitUsed; private static float Power => Mathf.Max(0f, ReksikHostSettings.MechanicPower); public void OnBurstStart(Player player, GameObject projectile, Func stacks, ref float storedDamageCharge) { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectile == (Object)null) { return; } float num = G(stacks, "CulturalCard025"); if (num > 0f) { cargo = Math.Min(cargo + num, 6f * num); } num = G(stacks, "CulturalCard049"); if (num > 0f) { marketPhase = 1 - marketPhase; if (marketPhase == 0) { CulturalMechanicExecutor.ApplyProjectileDamage(projectile, 0.18f * num * Power); } else { CulturalMechanicExecutor.ApplyProjectileSpeed(projectile, 0.22f * num * Power); } } num = G(stacks, "CulturalCard050"); if (num > 0f) { if (schemePhase == 2) { CulturalMechanicExecutor.ApplyProjectileDamage(projectile, 0.28f * num * Power); CulturalMechanicExecutor.ApplyProjectileSize(projectile, 0.06f * num * Power); schemePhase = 0; Pulse(player, num, new Color(0.95f, 0.3f, 0.62f, 0.58f)); } else { schemePhase = 1; } } num = G(stacks, "CulturalCard051"); if (num > 0f) { excellence = Math.Min(excellence + 1, 5); CulturalMechanicExecutor.ApplyProjectileDamage(projectile, 0.035f * (float)excellence * num * Power); CulturalMechanicExecutor.ApplyProjectileSpeed(projectile, 0.025f * (float)excellence * num * Power); } num = G(stacks, "CulturalCard100"); if (num > 0f) { captainMomentum = Math.Min(captainMomentum + 1, 5); CulturalMechanicExecutor.ApplyProjectileSpeed(projectile, 0.055f * (float)captainMomentum * num * Power); } num = G(stacks, "CulturalCard125"); if (num > 0f) { calculation += 1.25f; } num = G(stacks, "CulturalCard126"); if (num > 0f && discipline > 0) { CulturalMechanicExecutor.ApplyProjectileDamage(projectile, 0.09f * (float)discipline * num * Power); discipline = 0; } num = G(stacks, "CulturalCard149"); if (num > 0f && rockyBlockPrimed) { rockyBlockPrimed = false; CulturalMechanicExecutor.HealMaxHealthFraction(player, 0.018f * num * Power); storedDamageCharge += CulturalMechanicExecutor.DamageFactor(player) * 0.45f * num * Power; CulturalMechanicExecutor.PlayHealPulse(player, VisualStacks(num)); } num = G(stacks, "CulturalCard148"); if (num > 0f && science > 0f) { storedDamageCharge += science * 0.16f * num * Power; science = 0f; } num = G(stacks, "CulturalCard174"); if (num > 0f) { if (caineMode == 0) { CulturalMechanicExecutor.ApplyProjectileDamage(projectile, 0.12f * num * Power); } else if (caineMode == 1) { CulturalMechanicExecutor.ApplyProjectileSpeed(projectile, 0.16f * num * Power); } else { CulturalMechanicExecutor.ApplyProjectileSize(projectile, 0.1f * num * Power); } } } public void OnBlock(Player player, Func stacks, ref float storedDamageCharge) { float num = G(stacks, "CulturalCard000"); if (num > 0f && forecast > 0f) { storedDamageCharge += forecast * 0.22f * num * Power; forecast = 0f; } num = G(stacks, "CulturalCard025"); if (num > 0f && cargo > 0f) { CulturalMechanicExecutor.Reload(player); storedDamageCharge += cargo * 0.32f * CulturalMechanicExecutor.DamageFactor(player) * Power; cargo = 0f; } num = G(stacks, "CulturalCard050"); if (num > 0f && schemePhase == 1) { schemePhase = 2; } num = G(stacks, "CulturalCard075"); if (num > 0f && commandDebt > 0f) { CulturalMechanicExecutor.RetaliateAgainstLastAttacker(player, commandDebt * 0.24f * num * Power); storedDamageCharge += commandDebt * 0.1f * num * Power; CulturalMechanicExecutor.PlayRetaliationRing(player, VisualStacks(num)); commandDebt = 0f; } num = G(stacks, "CulturalCard124"); if (num > 0f) { CulturalMechanicExecutor.HealMaxHealthFraction(player, 0.035f * num * Power); storedDamageCharge += 0.5f * num * Power; CulturalMechanicExecutor.PlayHealPulse(player, VisualStacks(num)); } num = G(stacks, "CulturalCard125"); if (num > 0f && calculation > 0f) { storedDamageCharge += calculation * 0.42f * num * Power; calculation = 0f; CulturalMechanicExecutor.PlayBlockPulse(player, 2.5f + 0.22f * num, VisualStacks(num)); } num = G(stacks, "CulturalCard126"); if (num > 0f) { discipline = Math.Min(discipline + 1, 4); } num = G(stacks, "CulturalCard131"); if (num > 0f && ryuenPressure > 0f) { CulturalMechanicExecutor.RetaliateAgainstLastAttacker(player, ryuenPressure * 0.2f * num * Power); CulturalMechanicExecutor.LungeTowardsClosestEnemy(player, 0.45f * num * Power); ryuenPressure = 0f; } num = G(stacks, "CulturalCard156"); if (num > 0f && astrophageEnergy > 0f) { storedDamageCharge += astrophageEnergy * 0.2f * num * Power; astrophageEnergy = 0f; } if (G(stacks, "CulturalCard149") > 0f) { rockyBlockPrimed = true; } num = G(stacks, "CulturalCard174"); if (num > 0f) { caineMode = (caineMode + 1) % 3; CulturalMechanicExecutor.PlayBlockPulse(player, 2.2f + 0.18f * num, VisualStacks(num)); } } public void OnDamaged(float incomingDamage, Func stacks) { if (G(stacks, "CulturalCard000") > 0f) { forecast += incomingDamage; } if (G(stacks, "CulturalCard075") > 0f) { commandDebt += incomingDamage; } if (G(stacks, "CulturalCard090") > 0f) { zeroBurden += incomingDamage; } if (G(stacks, "CulturalCard125") > 0f) { calculation += incomingDamage; } if (G(stacks, "CulturalCard131") > 0f) { ryuenPressure += incomingDamage; } if (G(stacks, "CulturalCard148") > 0f) { science += incomingDamage; } if (G(stacks, "CulturalCard156") > 0f) { astrophageEnergy += incomingDamage; } if (stacks("CulturalCard051") > 0) { excellence = 0; } if (stacks("CulturalCard100") > 0) { captainMomentum = 0; } } public void Tick(Player player, float tickDelta, Func stacks) { //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { return; } float num = G(stacks, "CulturalCard005"); if (num > 0f) { CulturalMechanicExecutor.DamageClosestEnemy(player, 0.025f * num * Power * CulturalMechanicExecutor.DamageFactor(player) * tickDelta, 4.5f + 0.25f * num); } num = G(stacks, "CulturalCard076"); if (num > 0f && !contractUsed && ReksikUtils.HealthFraction(player) <= 0.08f) { contractUsed = true; CulturalMechanicExecutor.HealMaxHealthFraction(player, 0.12f * num * Power); CulturalMechanicExecutor.PlayHealPulse(player, VisualStacks(num)); } num = G(stacks, "CulturalCard090"); if (num > 0f && !zeroReleaseUsed && zeroBurden > 0f && ReksikUtils.HealthFraction(player) <= 0.18f) { zeroReleaseUsed = true; CulturalMechanicExecutor.DamageEnemiesInRadius(player, zeroBurden * 0.15f * num * Power, 4.5f + 0.2f * num); CulturalMechanicExecutor.HealMaxHealthFraction(player, 0.035f * num * Power); CulturalMechanicExecutor.PlayRetaliationRing(player, VisualStacks(num)); zeroBurden = 0f; } num = G(stacks, "CulturalCard173"); if (num > 0f && !panicExitUsed && ReksikUtils.HealthFraction(player) <= 0.25f) { panicExitUsed = true; Player closestEnemy = ReksikUtils.GetClosestEnemy(player); if ((Object)(object)closestEnemy != (Object)null) { ReksikUtils.AddHorizontalVelocityTowards(player, Vector2.op_Implicit(((Component)closestEnemy).transform.position), -1.8f * num * Power); } CulturalMechanicExecutor.HealMaxHealthFraction(player, 0.045f * num * Power); Pulse(player, num, new Color(0.95f, 0.35f, 0.82f, 0.62f)); } } public void ResetForLife() { forecast = (commandDebt = (zeroBurden = (calculation = (ryuenPressure = (science = (astrophageEnergy = 0f)))))); cargo = 0f; marketPhase = (schemePhase = (excellence = (captainMomentum = (discipline = (caineMode = 0))))); rockyBlockPrimed = (contractUsed = (zeroReleaseUsed = (panicExitUsed = false))); } public static bool HasSignature(string stableId) { switch (stableId) { case "CulturalCard000": case "CulturalCard005": case "CulturalCard100": case "CulturalCard025": case "CulturalCard124": case "CulturalCard125": case "CulturalCard126": case "CulturalCard049": case "CulturalCard148": case "CulturalCard149": case "CulturalCard050": case "CulturalCard051": case "CulturalCard156": case "CulturalCard075": case "CulturalCard076": case "CulturalCard173": case "CulturalCard174": case "CulturalCard090": case "CulturalCard131": return true; default: return false; } } private static float G(Func stacks, string stableId) { return CulturalSignatureGrowth.Resolve(stacks, stableId); } private static int VisualStacks(float growth) { return Mathf.Max(1, Mathf.CeilToInt(growth)); } private static void Pulse(Player player, float growth, Color color) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (ReksikHostSettings.CultureVfxEnabled) { ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.2f + 0.12f * growth, 0.14f, color, ((Component)player).transform); } } } } namespace ReksikCards.Vfx { public class CardArtSpawnFixMono : MonoBehaviour { private bool applied; private void Awake() { TryApply(); } private void OnEnable() { TryApply(); } private void Start() { TryApply(); } private void OnTransformParentChanged() { TryApply(); } private void TryApply() { if (applied) { return; } Transform parent = ((Component)this).transform.parent; if ((Object)(object)parent == (Object)null) { return; } try { Renderer[] componentsInChildren = ((Component)this).GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)componentsInChildren[i] != (Object)null) { componentsInChildren[i].enabled = true; } } int layer = ((Component)parent).gameObject.layer; ReksikVfx.SetLayerRecursive(((Component)this).gameObject, layer); Renderer componentInChildren = ((Component)parent).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { for (int j = 0; j < componentsInChildren.Length; j++) { if (!((Object)(object)componentsInChildren[j] == (Object)null)) { componentsInChildren[j].sortingLayerID = componentInChildren.sortingLayerID; } } } applied = true; ((Behaviour)this).enabled = false; Object.Destroy((Object)(object)this); } catch { } } } internal static class ReksikCardArtCache { private static readonly Dictionary Prefabs = new Dictionary(); private static Font? cardArtFont; public static GameObject GetOrCreate(string title) { title = (title ?? string.Empty).Trim(); if (title.Length == 0) { title = "Card"; } if (Prefabs.TryGetValue(title, out GameObject value) && (Object)(object)value != (Object)null) { return value; } GameObject val = CreateArtPrefab(title); DisableAllRenderers(val); ((Object)val).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)val); Prefabs[title] = val; return val; } private static void DisableAllRenderers(GameObject root) { if ((Object)(object)root == (Object)null) { return; } try { Renderer[] componentsInChildren = root.GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)componentsInChildren[i] != (Object)null) { componentsInChildren[i].enabled = false; } } } catch { } } private static GameObject CreateArtPrefab(string title) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(title + "_Art"); Color color = PickColor(title); Color color2 = Tint(color, 0.7f, 0.85f); Color color3 = Tint(color, 1.18f, 0.28f); val.AddComponent(); GameObject val2 = new GameObject("BG"); val2.transform.SetParent(val.transform, false); SpriteRenderer obj = val2.AddComponent(); obj.sprite = ReksikSpriteCache.Square; obj.color = color2; ((Renderer)obj).sortingOrder = 0; val2.transform.localScale = new Vector3(1.18f, 1.18f, 1f); GameObject val3 = new GameObject("Glow"); val3.transform.SetParent(val.transform, false); SpriteRenderer obj2 = val3.AddComponent(); obj2.sprite = ReksikSpriteCache.Circle; obj2.color = color3; ((Renderer)obj2).sortingOrder = 1; val3.transform.localScale = new Vector3(0.92f, 0.92f, 1f); GameObject val4 = new GameObject("Burst"); val4.transform.SetParent(val.transform, false); SpriteRenderer obj3 = val4.AddComponent(); obj3.sprite = ReksikSpriteCache.Burst; obj3.color = Tint(color, 1.1f, 0.24f); ((Renderer)obj3).sortingOrder = 2; val4.transform.localScale = new Vector3(0.82f, 0.82f, 1f); val4.transform.localRotation = Quaternion.Euler(0f, 0f, 18f); GameObject val5 = new GameObject("Diamond"); val5.transform.SetParent(val.transform, false); SpriteRenderer obj4 = val5.AddComponent(); obj4.sprite = ReksikSpriteCache.Diamond; obj4.color = new Color(1f, 1f, 1f, 0.16f); ((Renderer)obj4).sortingOrder = 3; val5.transform.localScale = new Vector3(0.88f, 0.88f, 1f); GameObject val6 = new GameObject("Ring"); val6.transform.SetParent(val.transform, false); SpriteRenderer obj5 = val6.AddComponent(); obj5.sprite = ReksikSpriteCache.Ring; obj5.color = new Color(1f, 1f, 1f, 0.88f); ((Renderer)obj5).sortingOrder = 4; val6.transform.localScale = Vector3.one * 0.94f; GameObject val7 = new GameObject("Marker"); val7.transform.SetParent(val.transform, false); SpriteRenderer obj6 = val7.AddComponent(); obj6.sprite = ReksikSpriteCache.Circle; obj6.color = Tint(color, 1.2f, 0.92f); ((Renderer)obj6).sortingOrder = 5; val7.transform.localPosition = new Vector3(0f, 0.34f, 0f); val7.transform.localScale = new Vector3(0.16f, 0.16f, 1f); GameObject val8 = new GameObject("Label"); val8.transform.SetParent(val.transform, false); TextMesh val9 = val8.AddComponent(); ConfigureTextMesh(val9, MakeLabel(title), Color.white, 0.18f, 120); GameObject val10 = new GameObject("Shadow"); val10.transform.SetParent(val8.transform, false); val10.transform.localPosition = new Vector3(0.02f, -0.02f, 0.01f); TextMesh obj7 = val10.AddComponent(); ConfigureTextMesh(obj7, val9.text, new Color(0f, 0f, 0f, 0.6f), 0.12f, 80); Renderer component = ((Component)val9).GetComponent(); if ((Object)(object)component != (Object)null) { component.sortingOrder = 2000; } Renderer component2 = ((Component)obj7).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.sortingOrder = 1999; } val.transform.localScale = Vector3.one * 0.75f; return val; } private static void ConfigureTextMesh(TextMesh textMesh, string text, Color color, float characterSize, int fontSize) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) textMesh.text = text; textMesh.color = color; textMesh.characterSize = characterSize; textMesh.fontSize = fontSize; textMesh.anchor = (TextAnchor)4; textMesh.alignment = (TextAlignment)1; if ((Object)(object)cardArtFont == (Object)null) { cardArtFont = Resources.GetBuiltinResource("Arial.ttf"); } if ((Object)(object)cardArtFont != (Object)null) { textMesh.font = cardArtFont; } } private static string MakeLabel(string title) { string text = (title ?? string.Empty).Trim(); if (text.Length == 0) { return "?"; } string[] array = text.Split(new char[1] { ' ' }, StringSplitOptions.RemoveEmptyEntries); if (array.Length >= 2) { string obj = ((array[0].Length > 0) ? array[0].Substring(0, 1) : ""); string text2 = ((array[1].Length > 0) ? array[1].Substring(0, 1) : ""); string text3 = (obj + text2).ToUpperInvariant(); if (text3.Length <= 0) { return text.Substring(0, Mathf.Min(2, text.Length)).ToUpperInvariant(); } return text3; } return text.Substring(0, Mathf.Min(2, text.Length)).ToUpperInvariant(); } private static Color PickColor(string title) { //IL_0022: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) string text = (title ?? string.Empty).Trim().ToLowerInvariant(); if (text.Contains("rex")) { return ReksikVfx.BossColor; } if (text.Contains("viktor")) { return ReksikVfx.ExplosionColor; } if (text.Contains("daniil")) { return new Color(0.2f, 0.8f, 0.35f, 0.85f); } if (text.Contains("dmitriy")) { return new Color(0.25f, 0.6f, 0.95f, 0.85f); } if (text.Contains("egor")) { return new Color(0.35f, 0.7f, 1f, 0.85f); } if (text.Contains("nazar")) { return new Color(0.9f, 0.85f, 0.25f, 0.85f); } if (text.Contains("matvey")) { return ReksikVfx.ChillColor; } if (text.Contains("matousovsky") || text.Contains("matus")) { return ReksikVfx.CurseColor; } if (text.Contains("roman")) { return new Color(0.75f, 0.75f, 0.75f, 0.85f); } if (text.Contains("tukson")) { return ReksikVfx.YangColor; } if (text.Contains("nesen")) { return ReksikVfx.YinColor; } if (text.Contains("rostislav")) { return ReksikVfx.RockColor; } if (text.Contains("fedr")) { return ReksikVfx.TechColor; } if (text.Contains("maksim") || text.Contains("maxim")) { return new Color(0.75f, 1f, 0.25f, 0.85f); } if (text.Contains("sosnovka") || text.Contains("artem")) { return ReksikVfx.WoodColor; } if (text.Contains("tanker")) { return new Color(0.65f, 0.65f, 0.7f, 0.85f); } if (text.Contains("agent")) { return new Color(0.95f, 0.25f, 0.25f, 0.85f); } if (text.Contains("subject")) { return ReksikVfx.MindColor; } return new Color(0.55f, 0.55f, 0.55f, 0.85f); } private static Color Tint(Color color, float brightness, float alpha) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) return new Color(Mathf.Clamp01(color.r * brightness), Mathf.Clamp01(color.g * brightness), Mathf.Clamp01(color.b * brightness), Mathf.Clamp01(alpha)); } } internal static class ReksikSpriteCache { private static Sprite circleSprite; private static Sprite ringSprite; private static Sprite squareSprite; private static Sprite diamondSprite; private static Sprite burstSprite; private static bool built; public static Sprite Circle { get { EnsureBuilt(); return circleSprite; } } public static Sprite Ring { get { EnsureBuilt(); return ringSprite; } } public static Sprite Square { get { EnsureBuilt(); return squareSprite; } } public static Sprite Diamond { get { EnsureBuilt(); return diamondSprite; } } public static Sprite Burst { get { EnsureBuilt(); return burstSprite; } } private static void EnsureBuilt() { if (!built) { built = true; circleSprite = CreateCircleSprite(96, 0f); ringSprite = CreateCircleSprite(96, 0.78f); squareSprite = CreateSquareSprite(96); diamondSprite = CreateDiamondSprite(96); burstSprite = CreateBurstSprite(96); } } private static Sprite CreateSquareSprite(int size) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(size, size, (TextureFormat)4, false); ((Texture)val).filterMode = (FilterMode)1; Color32[] array = (Color32[])(object)new Color32[size * size]; for (int i = 0; i < array.Length; i++) { array[i] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); } val.SetPixels32(array); val.Apply(false, false); return Sprite.Create(val, new Rect(0f, 0f, (float)size, (float)size), new Vector2(0.5f, 0.5f), 96f); } private static Sprite CreateCircleSprite(int size, float ringCutoff) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(size, size, (TextureFormat)4, false); ((Texture)val).filterMode = (FilterMode)1; int num = size / 2; int num2 = size / 2; float num3 = (float)size * 0.48f; float num4 = num3 * num3; float num5 = Mathf.Clamp01(ringCutoff) * num3; float num6 = num5 * num5; Color32[] array = (Color32[])(object)new Color32[size * size]; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num7 = (float)(j - num) + 0.5f; float num8 = (float)(i - num2) + 0.5f; float num9 = num7 * num7 + num8 * num8; bool flag = num9 <= num4; bool flag2 = num9 <= num6; byte b = 0; if (flag && (!flag2 || ringCutoff <= 0f)) { float num10 = Mathf.Sqrt(num9); float num11 = Mathf.Clamp01((num3 - num10) / 2f); b = (byte)Mathf.Clamp(num11 * 255f, 0f, 255f); b = ((!(ringCutoff <= 0f)) ? ((byte)Mathf.Clamp(120f + num11 * 90f, 0f, 255f)) : ((byte)Mathf.Clamp(180f + num11 * 75f, 0f, 255f))); } array[i * size + j] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, b); } } val.SetPixels32(array); val.Apply(false, false); return Sprite.Create(val, new Rect(0f, 0f, (float)size, (float)size), new Vector2(0.5f, 0.5f), 96f); } private static Sprite CreateDiamondSprite(int size) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(size, size, (TextureFormat)4, false); ((Texture)val).filterMode = (FilterMode)1; int num = size / 2; int num2 = size / 2; float num3 = (float)size * 0.46f; Color32[] array = (Color32[])(object)new Color32[size * size]; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num4 = Mathf.Abs((float)(j - num) + 0.5f); float num5 = Mathf.Abs((float)(i - num2) + 0.5f); float num6 = num4 + num5; byte b = 0; if (num6 <= num3) { float num7 = Mathf.Clamp01((num3 - num6) / 3f); b = (byte)Mathf.Clamp(160f + num7 * 95f, 0f, 255f); } array[i * size + j] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, b); } } val.SetPixels32(array); val.Apply(false, false); return Sprite.Create(val, new Rect(0f, 0f, (float)size, (float)size), new Vector2(0.5f, 0.5f), 96f); } private static Sprite CreateBurstSprite(int size) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(size, size, (TextureFormat)4, false); ((Texture)val).filterMode = (FilterMode)1; int num = size / 2; int num2 = size / 2; float num3 = (float)size * 0.48f; float num4 = (float)size * 0.18f; Color32[] array = (Color32[])(object)new Color32[size * size]; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num5 = (float)(j - num) + 0.5f; float num6 = (float)(i - num2) + 0.5f; float num7 = Mathf.Sqrt(num5 * num5 + num6 * num6); float num8 = Mathf.Atan2(num6, num5); float num9 = 0.65f + 0.35f * Mathf.Abs(Mathf.Cos(num8 * 6f)); float num10 = Mathf.Lerp(num4, num3, num9); byte b = 0; if (num7 <= num10) { float num11 = Mathf.Clamp01((num10 - num7) / 3.5f); b = (byte)Mathf.Clamp(120f + num11 * 135f, 0f, 255f); } array[i * size + j] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, b); } } val.SetPixels32(array); val.Apply(false, false); return Sprite.Create(val, new Rect(0f, 0f, (float)size, (float)size), new Vector2(0.5f, 0.5f), 96f); } } internal static class ReksikVfx { public static readonly Color BossColor = new Color(0.7f, 0.15f, 1f, 0.65f); public static readonly Color ExplosionColor = new Color(1f, 0.55f, 0.15f, 0.7f); public static readonly Color TechColor = new Color(0.2f, 0.95f, 1f, 0.7f); public static readonly Color ChillColor = new Color(0.55f, 0.85f, 1f, 0.65f); public static readonly Color CurseColor = new Color(0.55f, 0.1f, 0.1f, 0.7f); public static readonly Color WoodColor = new Color(0.75f, 0.55f, 0.25f, 0.7f); public static readonly Color YinColor = new Color(0.15f, 0.15f, 0.2f, 0.8f); public static readonly Color YangColor = new Color(0.95f, 0.95f, 0.95f, 0.8f); public static readonly Color MindColor = new Color(0.95f, 0.2f, 0.95f, 0.7f); public static readonly Color RockColor = new Color(0.95f, 0.2f, 0.25f, 0.75f); public static readonly Color GrowthColor = new Color(0.35f, 0.95f, 0.55f, 0.7f); private const string RootName = "ReksikVfxRoot"; private static bool contextValid; private static int contextLayer; private static int contextSortingLayerID; private static Material? sharedTrailMaterial; public static void SetContextFrom(Transform? reference) { if ((Object)(object)reference == (Object)null) { return; } try { contextLayer = ((Component)reference).gameObject.layer; contextSortingLayerID = TryGetSortingLayerID(reference); contextValid = true; } catch { } } private static int TryGetSortingLayerID(Transform reference) { try { Renderer componentInChildren = ((Component)reference).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { return componentInChildren.sortingLayerID; } } catch { } return 0; } internal static void SetLayerRecursive(GameObject go, int layer) { if ((Object)(object)go == (Object)null) { return; } go.layer = layer; Transform transform = go.transform; for (int i = 0; i < transform.childCount; i++) { Transform child = transform.GetChild(i); if ((Object)(object)child != (Object)null) { SetLayerRecursive(((Component)child).gameObject, layer); } } } private static void ApplyContext(GameObject go, Transform? reference = null) { if ((Object)(object)go == (Object)null) { return; } if ((Object)(object)reference != (Object)null) { SetContextFrom(reference); } if (!contextValid) { return; } try { SetLayerRecursive(go, contextLayer); Renderer[] componentsInChildren = go.GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { if (!((Object)(object)componentsInChildren[i] == (Object)null)) { componentsInChildren[i].sortingLayerID = contextSortingLayerID; } } } catch { } } private static void SpawnTimedSprite(string name, Vector2 worldPos, Sprite sprite, int sortingOrder, Color startColor, Color endColor, float duration, float startScale, float endScale, Transform? context = null, float zRotation = 0f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.position = new Vector3(worldPos.x, worldPos.y, 0f); val.transform.localRotation = Quaternion.Euler(0f, 0f, zRotation); ApplyContext(val, context); SpriteRenderer val2 = val.AddComponent(); val2.sprite = sprite; val2.color = startColor; ((Renderer)val2).sortingOrder = sortingOrder; if (contextValid) { ((Renderer)val2).sortingLayerID = contextSortingLayerID; } val.AddComponent().Init(val2, duration, startScale, endScale, startColor, endColor); } public static Transform GetOrCreateRoot(Transform parent) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown SetContextFrom(parent); Transform val = parent.Find("ReksikVfxRoot"); if ((Object)(object)val != (Object)null) { if (contextValid) { try { SetLayerRecursive(((Component)val).gameObject, contextLayer); } catch { } } return val; } GameObject val2 = new GameObject("ReksikVfxRoot"); val2.transform.SetParent(parent, false); val2.transform.localPosition = Vector3.zero; ApplyContext(val2, parent); return val2.transform; } public static void PlayStyledShockwave(Vector2 worldPos, float radius, float duration, CulturalVfxStyle style, Transform? context = null) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(0f, ReksikHostSettings.VfxScale); if (num <= 0f) { return; } radius *= num * style.RadiusScale; duration *= style.DurationScale; try { float num2 = Mathf.Max(0.1f, radius * 0.22f); float num3 = Mathf.Max(0.2f, radius * 2f); Color primary = style.Primary; Color endColor = default(Color); ((Color)(ref endColor))..ctor(primary.r, primary.g, primary.b, 0f); Color secondary = style.Secondary; Color endColor2 = default(Color); ((Color)(ref endColor2))..ctor(secondary.r, secondary.g, secondary.b, 0f); SpawnTimedSprite("CultureWavePrimary", worldPos, SpriteFor(style.PrimaryShape), 1002, primary, endColor, duration, num2, num3, context, style.Rotation); SpawnTimedSprite("CultureWaveRing", worldPos, ReksikSpriteCache.Ring, 1000, new Color(secondary.r, secondary.g, secondary.b, secondary.a * 0.78f), endColor2, duration * 0.88f, num2 * 0.75f, num3 * 0.9f, context, (0f - style.Rotation) * 0.5f); SpawnTimedSprite("CultureWaveAccent", worldPos, SpriteFor(style.AccentShape), 998, new Color(primary.r, primary.g, primary.b, primary.a * 0.24f), endColor, duration * 0.68f, num2 * 0.45f, num3 * 0.58f, context, style.Rotation + 45f); } catch { } } public static void PlayStyledPulse(Vector2 worldPos, float radius, float duration, CulturalVfxStyle style, Transform? context = null) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(0f, ReksikHostSettings.VfxScale); if (num <= 0f) { return; } radius *= num * style.RadiusScale; duration *= style.DurationScale; try { float num2 = Mathf.Max(0.08f, radius * 0.18f); float num3 = Mathf.Max(0.2f, radius * 1.25f); Color primary = style.Primary; Color endColor = default(Color); ((Color)(ref endColor))..ctor(primary.r, primary.g, primary.b, 0f); Color secondary = style.Secondary; Color endColor2 = default(Color); ((Color)(ref endColor2))..ctor(secondary.r, secondary.g, secondary.b, 0f); SpawnTimedSprite("CulturePulsePrimary", worldPos, SpriteFor(style.PrimaryShape), 1001, new Color(primary.r, primary.g, primary.b, primary.a * 0.62f), endColor, duration, num2, num3, context, style.Rotation); SpawnTimedSprite("CulturePulseAccent", worldPos, SpriteFor(style.AccentShape), 1002, new Color(secondary.r, secondary.g, secondary.b, secondary.a * 0.72f), endColor2, duration * 0.76f, num2 * 0.58f, num3 * 0.78f, context, 0f - style.Rotation); SpawnTimedSprite("CulturePulseRing", worldPos, ReksikSpriteCache.Ring, 1000, new Color(primary.r, primary.g, primary.b, primary.a * 0.55f), endColor, duration * 0.92f, num2 * 0.82f, num3 * 1.1f, context); } catch { } } private static Sprite SpriteFor(CulturalVfxShape shape) { return (Sprite)(shape switch { CulturalVfxShape.Circle => ReksikSpriteCache.Circle, CulturalVfxShape.Ring => ReksikSpriteCache.Ring, CulturalVfxShape.Diamond => ReksikSpriteCache.Diamond, CulturalVfxShape.Burst => ReksikSpriteCache.Burst, CulturalVfxShape.Square => ReksikSpriteCache.Square, _ => ReksikSpriteCache.Circle, }); } public static void PlayShockwave(Vector2 worldPos, float radius, float duration, Color color, Transform? context = null) { //IL_0044: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(0f, ReksikHostSettings.VfxScale); if (num <= 0f) { return; } radius *= num; try { float num2 = Mathf.Max(0.1f, radius * 0.25f); float num3 = Mathf.Max(0.2f, radius * 2f); Color startColor = default(Color); ((Color)(ref startColor))..ctor(color.r, color.g, color.b, color.a); Color endColor = default(Color); ((Color)(ref endColor))..ctor(color.r, color.g, color.b, 0f); Color startColor2 = default(Color); ((Color)(ref startColor2))..ctor(color.r, color.g, color.b, color.a * 0.18f); Color endColor2 = default(Color); ((Color)(ref endColor2))..ctor(color.r, color.g, color.b, 0f); SpawnTimedSprite("ShockwaveRing", worldPos, ReksikSpriteCache.Ring, 1000, startColor, endColor, duration, num2, num3, context); SpawnTimedSprite("ShockwaveFill", worldPos, ReksikSpriteCache.Circle, 998, startColor2, endColor2, duration * 0.85f, num2 * 0.65f, num3 * 0.6f, context, Random.Range(0f, 360f)); SpawnTimedSprite("ShockwaveBurst", worldPos, ReksikSpriteCache.Burst, 1002, new Color(color.r, color.g, color.b, color.a * 0.55f), endColor, duration * 0.7f, num2 * 0.35f, num3 * 0.4f, context, Random.Range(0f, 360f)); } catch { } } public static void PlayPulse(Vector2 worldPos, float radius, float duration, Color color, Transform? context = null) { //IL_0044: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(0f, ReksikHostSettings.VfxScale); if (num <= 0f) { return; } radius *= num; try { float num2 = Mathf.Max(0.08f, radius * 0.2f); float num3 = Mathf.Max(0.2f, radius * 1.2f); Color startColor = default(Color); ((Color)(ref startColor))..ctor(color.r, color.g, color.b, color.a * 0.55f); Color endColor = default(Color); ((Color)(ref endColor))..ctor(color.r, color.g, color.b, 0f); Color startColor2 = default(Color); ((Color)(ref startColor2))..ctor(color.r, color.g, color.b, color.a * 0.75f); Color startColor3 = default(Color); ((Color)(ref startColor3))..ctor(1f, 1f, 1f, Mathf.Clamp01(color.a * 0.45f)); SpawnTimedSprite("PulseFill", worldPos, ReksikSpriteCache.Circle, 999, startColor, endColor, duration, num2, num3, context, Random.Range(0f, 360f)); SpawnTimedSprite("PulseRing", worldPos, ReksikSpriteCache.Ring, 1001, startColor2, endColor, duration * 0.9f, num2 * 0.85f, num3 * 1.1f, context); SpawnTimedSprite("PulseDiamond", worldPos, ReksikSpriteCache.Diamond, 1000, startColor3, endColor, duration * 0.75f, num2 * 0.55f, num3 * 0.75f, context, 45f + Random.Range(-15f, 15f)); } catch { } } public static void PlayMuzzleFlash(Transform? origin, float size, Color color) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)origin == (Object)null) { return; } float num = Mathf.Max(0f, ReksikHostSettings.VfxScale); if (num <= 0f) { return; } size *= num; try { Vector3 val = origin.position + origin.right * 0.35f; Color startColor = default(Color); ((Color)(ref startColor))..ctor(color.r, color.g, color.b, color.a); Color endColor = default(Color); ((Color)(ref endColor))..ctor(color.r, color.g, color.b, 0f); SpawnTimedSprite("MuzzleBurst", Vector2.op_Implicit(val), ReksikSpriteCache.Burst, 1102, startColor, endColor, 0.1f, size * 0.3f, size * 1.05f, origin, origin.eulerAngles.z); SpawnTimedSprite("MuzzleRing", Vector2.op_Implicit(val), ReksikSpriteCache.Ring, 1101, new Color(color.r, color.g, color.b, color.a * 0.7f), endColor, 0.12f, size * 0.22f, size * 1.25f, origin); SpawnTimedSprite("MuzzleCore", Vector2.op_Implicit(val), ReksikSpriteCache.Circle, 1100, new Color(1f, 1f, 1f, Mathf.Clamp01(color.a * 0.85f)), new Color(1f, 1f, 1f, 0f), 0.09f, size * 0.18f, size * 0.7f, origin); } catch { } } public static void AttachSimpleTrail(GameObject projectile, Color color, float time = 0.25f, float startWidth = 0.2f, float endWidth = 0.02f) { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectile == (Object)null) { return; } float num = Mathf.Max(0f, ReksikHostSettings.VfxScale); if (num <= 0f) { return; } startWidth *= num; endWidth *= num; try { ApplyContext(projectile, projectile.transform); TrailRenderer val = projectile.GetComponent(); if ((Object)(object)val == (Object)null) { val = projectile.AddComponent(); } val.time = Mathf.Max(0.05f, time); val.startWidth = startWidth; val.endWidth = endWidth; val.minVertexDistance = 0.05f; val.widthCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 1f), new Keyframe(0.35f, 0.85f), new Keyframe(1f, 0f) }); ((Renderer)val).sortingOrder = 1500; if (contextValid) { ((Renderer)val).sortingLayerID = contextSortingLayerID; } Material orCreateTrailMaterial = GetOrCreateTrailMaterial(); if ((Object)(object)orCreateTrailMaterial != (Object)null) { ((Renderer)val).sharedMaterial = orCreateTrailMaterial; } Color val2 = default(Color); ((Color)(ref val2))..ctor(color.r, color.g, color.b, Mathf.Clamp01(color.a)); Color val3 = Color.Lerp(val2, Color.white, 0.18f); new Color(color.r, color.g, color.b, 0f); Gradient val4 = new Gradient(); val4.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(val3, 0f), new GradientColorKey(val2, 0.45f), new GradientColorKey(val2, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(val2.a, 0f), new GradientAlphaKey(val2.a * 0.55f, 0.35f), new GradientAlphaKey(0f, 1f) }); val.colorGradient = val4; } catch { } } public static StatusTextVfxMono GetOrCreateStatusText(Transform parent, string key, Vector3 offset, string initialText, Color color) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) bool playerStatusTextEnabled = ReksikHostSettings.PlayerStatusTextEnabled; if (!playerStatusTextEnabled) { key = "__ReksikSuppressedPlayerText"; } Transform orCreateRoot = GetOrCreateRoot(parent); Transform val = orCreateRoot.Find(key); if ((Object)(object)val != (Object)null) { StatusTextVfxMono component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { if (playerStatusTextEnabled) { ((Component)component).gameObject.SetActive(true); ((Behaviour)component).enabled = true; component.Init(parent, initialText, color, offset); } return component; } } GameObject val2 = new GameObject(key); val2.transform.SetParent(orCreateRoot, false); ApplyContext(val2, parent); StatusTextVfxMono statusTextVfxMono = val2.AddComponent(); if (playerStatusTextEnabled) { statusTextVfxMono.Init(parent, initialText, color, offset); } else { ((Behaviour)statusTextVfxMono).enabled = false; val2.SetActive(false); } return statusTextVfxMono; } public static void RemoveStatus(Transform parent, string key) { Transform val = GetOrCreateRoot(parent).Find(key); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); } } public static SpriteRenderer GetOrCreateAura(Transform parent, string key, float radius, Color color, int sortingOrder = 10) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_004a: Unknown result type (might be due to invalid IL or missing references) radius *= Mathf.Max(0f, ReksikHostSettings.VfxScale); Transform orCreateRoot = GetOrCreateRoot(parent); Transform val = orCreateRoot.Find(key); if ((Object)(object)val != (Object)null) { SpriteRenderer component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.color = color; val.localScale = new Vector3(radius, radius, 1f); return component; } } GameObject val2 = new GameObject(key); val2.transform.SetParent(orCreateRoot, false); val2.transform.localPosition = Vector3.zero; ApplyContext(val2, parent); SpriteRenderer val3 = val2.AddComponent(); val3.sprite = ReksikSpriteCache.Circle; val3.color = color; ((Renderer)val3).sortingOrder = sortingOrder; if (contextValid) { ((Renderer)val3).sortingLayerID = contextSortingLayerID; } val2.transform.localScale = new Vector3(radius, radius, 1f); return val3; } public static void SetAura(Transform parent, string key, bool enabled, float radius, Color color) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) if (!enabled || ReksikHostSettings.VfxScale <= 0f) { RemoveStatus(parent, key); } else { GetOrCreateAura(parent, key, radius, color); } } private static Material? GetOrCreateTrailMaterial() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown if ((Object)(object)sharedTrailMaterial != (Object)null) { return sharedTrailMaterial; } Shader val = Shader.Find("Sprites/Default"); if ((Object)(object)val == (Object)null) { val = Shader.Find("Unlit/Color"); } if ((Object)(object)val == (Object)null) { return null; } sharedTrailMaterial = new Material(val); ((Object)sharedTrailMaterial).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)sharedTrailMaterial); return sharedTrailMaterial; } public static void SafeLog(string msg) { try { Debug.Log((object)("[SD][VFX] " + msg)); } catch { } } } public class StatusTextVfxMono : MonoBehaviour { private Transform target; private TextMesh textMesh; private TextMesh shadowMesh; private Vector3 offset; private float endTime; private bool timed; public void Init(Transform target, string text, Color color, Vector3 offset) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) this.target = target; this.offset = offset; textMesh = ((Component)this).gameObject.GetComponent(); if ((Object)(object)textMesh == (Object)null) { textMesh = ((Component)this).gameObject.AddComponent(); } shadowMesh = EnsureShadow(textMesh); textMesh.text = text; textMesh.color = color; textMesh.characterSize = 0.12f; textMesh.fontSize = 80; textMesh.anchor = (TextAnchor)4; textMesh.alignment = (TextAlignment)1; Font builtinResource = Resources.GetBuiltinResource("Arial.ttf"); if ((Object)(object)builtinResource != (Object)null) { textMesh.font = builtinResource; if ((Object)(object)shadowMesh != (Object)null) { shadowMesh.font = builtinResource; } } SyncShadow(textMesh.text, color); try { ((Component)this).gameObject.layer = ((Component)target).gameObject.layer; Renderer componentInChildren = ((Component)target).GetComponentInChildren(); MeshRenderer component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { if ((Object)(object)componentInChildren != (Object)null) { ((Renderer)component).sortingLayerID = componentInChildren.sortingLayerID; } ((Renderer)component).sortingOrder = 2000; } if ((Object)(object)shadowMesh != (Object)null) { MeshRenderer component2 = ((Component)shadowMesh).GetComponent(); if ((Object)(object)component2 != (Object)null) { if ((Object)(object)componentInChildren != (Object)null) { ((Renderer)component2).sortingLayerID = componentInChildren.sortingLayerID; } ((Renderer)component2).sortingOrder = 1999; } } } catch { } timed = false; } public void SetText(string text) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)textMesh != (Object)null) { textMesh.text = text; SyncShadow(text, textMesh.color); } } public void SetColor(Color color) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)textMesh != (Object)null) { textMesh.color = color; SyncShadow(textMesh.text, color); } } public void SetTimed(float seconds) { timed = true; endTime = Time.time + Mathf.Max(0.05f, seconds); } private void LateUpdate() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if (!ReksikHostSettings.PlayerStatusTextEnabled) { ((Component)this).gameObject.SetActive(false); return; } if ((Object)(object)target == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = 0.03f * Mathf.Sin(Time.time * 3f); ((Component)this).transform.position = target.position + offset + Vector3.up * num; if ((Object)(object)Camera.main != (Object)null) { ((Component)this).transform.forward = ((Component)Camera.main).transform.forward; } try { ((Component)this).gameObject.layer = ((Component)target).gameObject.layer; } catch { } if (timed && Time.time >= endTime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private static TextMesh EnsureShadow(TextMesh mainText) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) Transform val = ((Component)mainText).transform.Find("Shadow"); GameObject val2 = (GameObject)(((Object)(object)val != (Object)null) ? ((object)((Component)val).gameObject) : ((object)new GameObject("Shadow"))); val2.transform.SetParent(((Component)mainText).transform, false); val2.transform.localPosition = new Vector3(0.02f, -0.02f, 0.01f); TextMesh val3 = val2.GetComponent(); if ((Object)(object)val3 == (Object)null) { val3 = val2.AddComponent(); } val3.anchor = (TextAnchor)4; val3.alignment = (TextAlignment)1; val3.characterSize = 0.12f; val3.fontSize = 80; return val3; } private void SyncShadow(string text, Color mainColor) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)shadowMesh == (Object)null)) { shadowMesh.text = text; shadowMesh.characterSize = textMesh.characterSize; shadowMesh.fontSize = textMesh.fontSize; shadowMesh.color = new Color(0f, 0f, 0f, Mathf.Clamp01(mainColor.a * 0.6f)); } } } public class TimedSpriteVfxMono : MonoBehaviour { private SpriteRenderer sr; private float startTime; private float duration; private float startScale; private float endScale; private Color startColor; private Color endColor; private float baseRotation; private float spinDegreesPerSecond; private float stretchAmount; public void Init(SpriteRenderer renderer, float duration, float startScale, float endScale, Color startColor, Color endColor) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) sr = renderer; this.duration = Mathf.Max(0.02f, duration); this.startScale = startScale; this.endScale = endScale; this.startColor = startColor; this.endColor = endColor; startTime = Time.time; baseRotation = ((Component)this).transform.localEulerAngles.z; spinDegreesPerSecond = Random.Range(-55f, 55f); stretchAmount = Random.Range(0.02f, 0.08f); } private void Update() { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_00f0: Unknown result type (might be due to invalid IL or missing references) float num = (Time.time - startTime) / duration; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num2 = 1f - Mathf.Pow(1f - Mathf.Clamp01(num), 3f); float num3 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01(num)); float num4 = Mathf.Lerp(startScale, endScale, num2); float num5 = 1f + Mathf.Sin(num * MathF.PI) * stretchAmount; ((Component)this).transform.localScale = new Vector3(num4 * num5, num4 / num5, 1f); ((Component)this).transform.localRotation = Quaternion.Euler(0f, 0f, baseRotation + spinDegreesPerSecond * num); if ((Object)(object)sr != (Object)null) { sr.color = Color.Lerp(startColor, endColor, num3); } } } } namespace ReksikCards.Monos { public class AgentMarkedMono : MonoBehaviour { private Player target; private Block block; private HealthHandler healthHandler; private float endTime; private bool active; private float appliedBlockCdMultiplier = 1f; private float appliedRegenPenalty; private const string AuraKey = "AgentMarkedAura"; public static void ApplyOrRefresh(Player p, float duration, float blockCdMultiplier, float regenPenalty) { if (!((Object)(object)p == (Object)null) && !((Object)(object)p.data == (Object)null)) { AgentMarkedMono agentMarkedMono = ((Component)p).gameObject.GetComponent(); if ((Object)(object)agentMarkedMono == (Object)null) { agentMarkedMono = ((Component)p).gameObject.AddComponent(); } agentMarkedMono.Apply(duration, blockCdMultiplier, regenPenalty); } } private void Start() { target = ((Component)this).GetComponentInParent(); if ((Object)(object)target == (Object)null || (Object)(object)target.data == (Object)null) { Object.Destroy((Object)(object)this); return; } block = target.data.block; healthHandler = target.data.healthHandler; } private void Apply(float duration, float blockCdMultiplier, float regenPenalty) { endTime = Mathf.Max(endTime, Time.time + Mathf.Max(0.05f, duration)); if ((Object)(object)target == (Object)null || (Object)(object)target.data == (Object)null || (Object)(object)block == (Object)null || (Object)(object)healthHandler == (Object)null) { appliedBlockCdMultiplier = Mathf.Max(1f, blockCdMultiplier); appliedRegenPenalty = Mathf.Max(0f, regenPenalty); return; } if (!active) { active = true; appliedBlockCdMultiplier = 1f; appliedRegenPenalty = 0f; } RemoveApplied(); appliedBlockCdMultiplier = Mathf.Max(1f, blockCdMultiplier); appliedRegenPenalty = Mathf.Max(0f, regenPenalty); ApplyNow(); } private void Update() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)target == (Object)null) && !((Object)(object)target.data == (Object)null)) { if (!active && (appliedBlockCdMultiplier > 1f || appliedRegenPenalty > 0f) && (Object)(object)block != (Object)null && (Object)(object)healthHandler != (Object)null) { active = true; ApplyNow(); } if (active) { ReksikVfx.SetAura(((Component)target).transform, "AgentMarkedAura", enabled: true, 1.35f, new Color(0.9f, 0.2f, 0.85f, 0.16f)); } if (active && Time.time >= endTime) { End(); Object.Destroy((Object)(object)this); } } } private void OnDestroy() { End(); } private void ApplyNow() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.cdMultiplier *= appliedBlockCdMultiplier; } if ((Object)(object)healthHandler != (Object)null) { HealthHandler obj2 = healthHandler; obj2.regeneration -= appliedRegenPenalty; } } private void RemoveApplied() { if (active) { if ((Object)(object)block != (Object)null && appliedBlockCdMultiplier != 0f) { Block obj = block; obj.cdMultiplier /= appliedBlockCdMultiplier; } if ((Object)(object)healthHandler != (Object)null) { HealthHandler obj2 = healthHandler; obj2.regeneration += appliedRegenPenalty; } } } private void End() { if (active) { RemoveApplied(); active = false; appliedBlockCdMultiplier = 1f; appliedRegenPenalty = 0f; if ((Object)(object)target != (Object)null) { ReksikVfx.RemoveStatus(((Component)target).transform, "AgentMarkedAura"); } } } } public class AgentOperativeMono : MonoBehaviour { private Player player; private Block block; private int level = 1; private float lastExtractTime; private float Cooldown => Mathf.Max(0.4f, 1.1f * Mathf.Pow(0.9f, (float)(level - 1))); private float Range => 10f + 1.2f * (float)(level - 1); private float BaseExtractDamage => 35f + 12f * (float)(level - 1); private float HealMultiplier => 1f + 0.15f * (float)(level - 1); private float DebuffDuration => 2.8f + 0.35f * (float)(level - 1); private float FearDuration => 2f + 0.25f * (float)(level - 1); private float MarkBlockCdMultiplier => 1.25f + 0.08f * (float)(level - 1); private float RegenPenalty => 20f + 10f * (float)(level - 1); private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } block = player.data.block; if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } } public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); } private void OnDestroy() { try { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } } catch { } } private void OnBlock(BlockTriggerType triggerType) { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || Time.time - lastExtractTime < Cooldown) { return; } lastExtractTime = Time.time; Player closestEnemy = ReksikUtils.GetClosestEnemy(player, Range); if (!((Object)(object)closestEnemy == (Object)null) && !((Object)(object)closestEnemy.data == (Object)null) && !closestEnemy.data.dead) { bool flag = (Object)(object)((Component)closestEnemy).gameObject.GetComponent() != (Object)null; float num = BaseExtractDamage * (flag ? 1.45f : 1f); float amount = num * HealMultiplier * (flag ? 1.1f : 1f); Damagable component = ((Component)closestEnemy).GetComponent(); if ((Object)(object)component != (Object)null) { Vector3 val = ((Component)closestEnemy).transform.position - ((Component)player).transform.position; Vector2 val2 = Vector2.op_Implicit(((Vector3)(ref val)).normalized); component.TakeDamage(new Vector2(num, num), val2, (GameObject)null, player, true, false); } ReksikUtils.Heal(player, amount); float duration = DebuffDuration + (flag ? 0.75f : 0f); AgentMarkedMono.ApplyOrRefresh(closestEnemy, duration, MarkBlockCdMultiplier + (flag ? 0.15f : 0f), RegenPenalty + (flag ? 15f : 0f)); float moveMul = (flag ? 0.55f : 0.65f); FearDebuffMono.ApplyOrRefresh(closestEnemy, FearDuration + (flag ? 0.5f : 0f), moveMul, 0.9f, 1.15f); Color color = (flag ? new Color(0.95f, 0.25f, 0.25f, 0.55f) : new Color(0.8f, 0.25f, 0.95f, 0.55f)); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.05f, 0.12f, color); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)closestEnemy).transform.position), 1.1f, 0.14f, color); ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)closestEnemy).transform.position), 6f, 0.16f, color); ApplyBossProtocolMarks(closestEnemy); } } private void ApplyBossProtocolMarks(Player primaryTarget) { //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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) int num = ReksikBonds.CombinedLevel(player, ReksikBondId.BossProtocol); float num2 = ReksikBonds.BondPower(player, ReksikBondId.BossProtocol); if (num <= 0 || num2 <= 0f) { return; } float num3 = Range + 1.25f * num2; float num4 = num3 * num3; List list = new List(); foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item == (Object)(object)primaryTarget) && !((Object)(object)item.data == (Object)null) && !item.data.dead) { Vector2 val = Vector2.op_Implicit(((Component)item).transform.position) - Vector2.op_Implicit(((Component)player).transform.position); if (((Vector2)(ref val)).sqrMagnitude <= num4) { list.Add(item); } } } list.Sort(delegate(Player left, Player right) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_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) Vector2 val3 = Vector2.op_Implicit(((Component)left).transform.position) - Vector2.op_Implicit(((Component)player).transform.position); float sqrMagnitude = ((Vector2)(ref val3)).sqrMagnitude; val3 = Vector2.op_Implicit(((Component)right).transform.position) - Vector2.op_Implicit(((Component)player).transform.position); float sqrMagnitude2 = ((Vector2)(ref val3)).sqrMagnitude; int num7 = sqrMagnitude.CompareTo(sqrMagnitude2); return (num7 == 0) ? left.playerID.CompareTo(right.playerID) : num7; }); int num5 = num; float duration = 1.2f + 0.4f * num2; float blockCdMultiplier = 1.05f + 0.04f * num2; float regenPenalty = 4f + 3f * num2; float duration2 = 0.65f + 0.15f * num2; for (int num6 = 0; num6 < list.Count && num6 < num5; num6++) { Player val2 = list[num6]; AgentMarkedMono.ApplyOrRefresh(val2, duration, blockCdMultiplier, regenPenalty); FearDebuffMono.ApplyOrRefresh(val2, duration2, 0.82f, 0.96f, 1.04f); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)val2).transform.position), 0.82f + 0.12f * num2, 0.12f + 0.006f * num2, new Color(0.82f, 0.3f, 1f, 0.52f), ((Component)val2).transform); } } } public class ArinaPolarityMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private int level = 1; private bool pullMode = true; private float lastBurstImpulseTime = -999f; private const float BurstWindow = 0.035f; private float PullLungeForce => 9f * (float)level; private float PullProjectileSpeedMultiplier => 1f + 0.22f * (float)level; private float PushRadius => 3.5f + 1.5f * (float)level; private float PushForce => 9f + 6f * (float)level; private float PushProjectileScale => 1f + 0.22f * (float)level; private float ModeVfxRadius => 2.7f + 0.8f * (float)level; public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); UpdateStatus(); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); } UpdateStatus(); } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "ArinaPolarity"); ReksikVfx.RemoveStatus(((Component)player).transform, "ArinaPolarityAura"); } } private void Update() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { if (player.data.dead) { ReksikVfx.RemoveStatus(((Component)player).transform, "ArinaPolarityAura"); return; } Color color = (pullMode ? new Color(0.3f, 0.82f, 1f, 0.12f) : new Color(1f, 0.3f, 0.72f, 0.12f)); ReksikVfx.SetAura(((Component)player).transform, "ArinaPolarityAura", enabled: true, 0.78f + 0.1f * (float)level, color); } } private void OnBlock(BlockTriggerType triggerType) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { pullMode = !pullMode; Color color = (pullMode ? new Color(0.25f, 0.85f, 1f, 0.72f) : new Color(1f, 0.25f, 0.72f, 0.72f)); ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)player).transform.position), ModeVfxRadius, 0.2f, color, ((Component)player).transform); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), ModeVfxRadius * 0.45f, 0.16f, new Color(1f, 1f, 1f, 0.52f), ((Component)player).transform); UpdateStatus(); } } private void OnShootProjectile(GameObject projectile) { if (!((Object)(object)projectile == (Object)null) && !((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { bool flag = Time.time - lastBurstImpulseTime > 0.035f; if (flag) { lastBurstImpulseTime = Time.time; } if (pullMode) { ApplyPull(projectile, flag); } else { ApplyPush(projectile, flag); } } } private void ApplyPull(GameObject projectile, bool applyBurstImpulse) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) MoveTransform component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.velocity *= PullProjectileSpeedMultiplier; } ReksikVfx.AttachSimpleTrail(projectile, new Color(0.25f, 0.85f, 1f, 0.78f), 0.22f + 0.025f * (float)level, 0.11f + 0.025f * (float)level, 0.01f); if (!applyBurstImpulse) { return; } Player closestEnemy = ReksikUtils.GetClosestEnemy(player); if (!((Object)(object)closestEnemy == (Object)null)) { ReksikUtils.AddHorizontalVelocityTowards(player, Vector2.op_Implicit(((Component)closestEnemy).transform.position), PullLungeForce); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), ModeVfxRadius * 0.55f, 0.14f, new Color(0.25f, 0.85f, 1f, 0.55f), ((Component)player).transform); if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.42f + 0.1f * (float)level, new Color(0.25f, 0.85f, 1f, 0.78f)); } } } private void ApplyPush(GameObject projectile, bool applyBurstImpulse) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) Transform transform = projectile.transform; transform.localScale *= PushProjectileScale; ReksikVfx.AttachSimpleTrail(projectile, new Color(1f, 0.25f, 0.72f, 0.78f), 0.2f + 0.025f * (float)level, 0.13f + 0.03f * (float)level); if (!applyBurstImpulse) { return; } Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead) { Vector2 val2 = Vector2.op_Implicit(((Component)item).transform.position) - val; if (!(((Vector2)(ref val2)).sqrMagnitude > PushRadius * PushRadius)) { Vector2 val3 = ((((Vector2)(ref val2)).sqrMagnitude > 0.001f) ? ((Vector2)(ref val2)).normalized : Vector2.up); ReksikUtils.AddVelocity(item, val3 * PushForce); } } } ReksikVfx.PlayShockwave(val, PushRadius, 0.18f, new Color(1f, 0.25f, 0.72f, 0.62f), ((Component)player).transform); if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.46f + 0.11f * (float)level, new Color(1f, 0.25f, 0.72f, 0.78f)); } } private void UpdateStatus() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { Color color = (pullMode ? new Color(0.42f, 0.9f, 1f, 0.95f) : new Color(1f, 0.42f, 0.78f, 0.95f)); StatusTextVfxMono orCreateStatusText = ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "ArinaPolarity", new Vector3(0f, 2.3f, 0f), string.Empty, color); orCreateStatusText.SetColor(color); orCreateStatusText.SetText(pullMode ? "PULL" : "PUSH"); } } } public class CarpenterPlankMono : MonoBehaviour { private const int HeavyBeamCadence = 4; private const float BlockEventGuardSeconds = 0.2f; private const string ArmorAuraKey = "WoodArmorAura"; private const string ChargeTextKey = "CarpenterCharges"; private const string WorkshopAuraKey = "WorkshopAura"; private const string WorkshopLabelKey = "WorkshopLabel"; private Player player; private Gun gun; private Block block; private CharacterStatModifiers stats; private int artemLevel; private int sosnovkaLevel; private int plankCharges; private int heavyBeamCharges; private int nailCadence; private bool armorActive; private bool workshopReactionReady; private float armorEndTime; private float lastBlockTime = -999f; public bool HasAnyCarpenter { get { if (artemLevel <= 0) { return sosnovkaLevel > 0; } return true; } } private bool WorkshopActive { get { if (ReksikHostSettings.BondsEnabled && artemLevel > 0) { return sosnovkaLevel > 0; } return false; } } private float CrossCardPower { get { if (!WorkshopActive) { return 0f; } float mechanicPower = ReksikHostSettings.MechanicPower; if (!(mechanicPower >= 0f) || float.IsNaN(mechanicPower) || float.IsInfinity(mechanicPower)) { return 0f; } return mechanicPower; } } private int PlankChargesPerBlock => sosnovkaLevel + ScaleCrossCardCharges(artemLevel); private float ArmorDuration => 2.75f + 0.85f * (float)sosnovkaLevel + 0.3f * (float)artemLevel * CrossCardPower; private float ArmorRepairFraction => 0.18f + 0.08f * (float)sosnovkaLevel + 0.025f * (float)artemLevel * CrossCardPower; private float PlankDamageMultiplier => 1f + 0.22f * (float)sosnovkaLevel + 0.08f * (float)artemLevel * CrossCardPower; private float PlankSizeMultiplier => 1f + 0.12f * (float)sosnovkaLevel + 0.04f * (float)artemLevel * CrossCardPower; private float PlankSpeedMultiplier => 1f + 0.04f * (float)sosnovkaLevel + 0.02f * (float)artemLevel * CrossCardPower; private int HeavyBeamChargesPerBlock => artemLevel + ScaleCrossCardCharges(sosnovkaLevel); private float NailDamageMultiplier => 1f + 0.18f * (float)artemLevel + 0.05f * (float)sosnovkaLevel * CrossCardPower; private float NailSizeMultiplier => 1f + 0.045f * (float)artemLevel + 0.015f * (float)sosnovkaLevel * CrossCardPower; private float HeavyBeamDamageMultiplier => 1.2f + 0.35f * (float)artemLevel + 0.12f * (float)sosnovkaLevel * CrossCardPower; private float HeavyBeamSizeMultiplier => 1.1f + 0.12f * (float)artemLevel + 0.05f * (float)sosnovkaLevel * CrossCardPower; private float HeavyBeamSpeedMultiplier => 1.05f + 0.08f * (float)artemLevel + 0.03f * (float)sosnovkaLevel * CrossCardPower; private int ScaleCrossCardCharges(int otherCardLevel) { if (otherCardLevel <= 0) { return 0; } return Mathf.FloorToInt((float)otherCardLevel * CrossCardPower + 0.5f); } public void SetArtemLevel(int newLevel) { artemLevel = Mathf.Max(0, newLevel); if (artemLevel == 0) { heavyBeamCharges = 0; nailCadence = 0; } RefreshPersistentVfx(); } public void SetSosnovkaLevel(int newLevel) { sosnovkaLevel = Mathf.Max(0, newLevel); if (sosnovkaLevel == 0) { plankCharges = 0; armorActive = false; workshopReactionReady = false; } RefreshPersistentVfx(); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; stats = player.data.stats; if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj3 = stats; obj3.WasDealtDamageAction = (Action)Delegate.Combine(obj3.WasDealtDamageAction, new Action(OnDamaged)); } RefreshPersistentVfx(); } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj3 = stats; obj3.WasDealtDamageAction = (Action)Delegate.Remove(obj3.WasDealtDamageAction, new Action(OnDamaged)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "WoodArmorAura"); ReksikVfx.RemoveStatus(((Component)player).transform, "CarpenterCharges"); ReksikVfx.RemoveStatus(((Component)player).transform, "WorkshopAura"); ReksikVfx.RemoveStatus(((Component)player).transform, "WorkshopLabel"); ReksikVfx.RemoveStatus(((Component)player).transform, "PlankShotsText"); } } private void Update() { if (!HasAnyCarpenter) { Object.Destroy((Object)(object)this); } else { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { plankCharges = 0; heavyBeamCharges = 0; nailCadence = 0; armorActive = false; workshopReactionReady = false; RefreshPersistentVfx(); } else { if (armorActive && Time.time >= armorEndTime) { armorActive = false; workshopReactionReady = false; } RefreshPersistentVfx(); } } } private void OnDamaged(Vector2 damage, bool selfDamage) { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) if (armorActive && sosnovkaLevel > 0 && !((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !selfDamage) { float num = ((Vector2)(ref damage)).magnitude * ArmorRepairFraction; if (num > 0f) { ReksikUtils.Heal(player, num); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 0.9f + 0.05f * (float)sosnovkaLevel, 0.12f, new Color(ReksikVfx.WoodColor.r, ReksikVfx.WoodColor.g, ReksikVfx.WoodColor.b, 0.42f), ((Component)player).transform); } if (WorkshopActive && workshopReactionReady) { workshopReactionReady = false; plankCharges += sosnovkaLevel; heavyBeamCharges += artemLevel + ScaleCrossCardCharges(sosnovkaLevel); ReksikVfx.PlayMuzzleFlash(((Component)player).transform, 0.55f + 0.04f * (float)(artemLevel + sosnovkaLevel), new Color(1f, 0.72f, 0.28f, 0.82f)); UpdateChargeVfx(); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_0101: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !(Time.time - lastBlockTime < 0.2f)) { lastBlockTime = Time.time; if (sosnovkaLevel > 0) { plankCharges += PlankChargesPerBlock; armorActive = true; armorEndTime = Time.time + ArmorDuration; } if (artemLevel > 0) { heavyBeamCharges += HeavyBeamChargesPerBlock; } workshopReactionReady = WorkshopActive && armorActive; Color color = (WorkshopActive ? new Color(1f, 0.68f, 0.22f, 0.58f) : new Color(ReksikVfx.WoodColor.r, ReksikVfx.WoodColor.g, ReksikVfx.WoodColor.b, 0.52f)); ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)player).transform.position), 5.5f + 0.55f * (float)(artemLevel + sosnovkaLevel), 0.18f, color, ((Component)player).transform); RefreshPersistentVfx(); } } private void OnShootProjectile(GameObject projectile) { //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || (Object)(object)projectile == (Object)null) { return; } ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component == (Object)null) { return; } bool flag = false; bool flag2 = false; if (sosnovkaLevel > 0 && plankCharges > 0) { plankCharges--; flag = true; component.damage *= PlankDamageMultiplier; Transform transform = projectile.transform; transform.localScale *= PlankSizeMultiplier; MoveTransform component2 = projectile.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity *= PlankSpeedMultiplier; } } if (artemLevel > 0) { nailCadence++; component.damage *= NailDamageMultiplier; Transform transform2 = projectile.transform; transform2.localScale *= NailSizeMultiplier; bool num = nailCadence >= 4; bool flag3 = heavyBeamCharges > 0; flag2 = num || flag3; if (num) { nailCadence = 0; } if (flag3) { heavyBeamCharges--; } if (flag2) { component.damage *= HeavyBeamDamageMultiplier; Transform transform3 = projectile.transform; transform3.localScale *= HeavyBeamSizeMultiplier; MoveTransform component3 = projectile.GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.velocity *= HeavyBeamSpeedMultiplier; } } } if (flag2) { Color color = (WorkshopActive ? new Color(1f, 0.72f, 0.25f, 0.85f) : new Color(0.95f, 0.42f, 0.16f, 0.82f)); ReksikVfx.AttachSimpleTrail(projectile, color, 0.32f, 0.23f + 0.015f * (float)artemLevel, 0.025f); if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.65f + 0.05f * (float)artemLevel, color); } } else if (flag) { ReksikVfx.AttachSimpleTrail(projectile, new Color(ReksikVfx.WoodColor.r, ReksikVfx.WoodColor.g, ReksikVfx.WoodColor.b, 0.68f), 0.28f, 0.2f + 0.012f * (float)sosnovkaLevel, 0.025f); } UpdateChargeVfx(); } private void RefreshPersistentVfx() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { if (!WorkshopActive) { workshopReactionReady = false; } bool enabled = armorActive && sosnovkaLevel > 0; ReksikVfx.SetAura(((Component)player).transform, "WoodArmorAura", enabled, 1.22f + 0.06f * (float)sosnovkaLevel + (WorkshopActive ? (0.025f * (float)artemLevel) : 0f), new Color(ReksikVfx.WoodColor.r, ReksikVfx.WoodColor.g, ReksikVfx.WoodColor.b, 0.15f + 0.015f * (float)sosnovkaLevel)); if (WorkshopActive) { int num = artemLevel + sosnovkaLevel; Color color = default(Color); ((Color)(ref color))..ctor(1f, 0.72f, 0.28f, 0.94f); ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "WorkshopLabel", new Vector3(0f, 2.42f, 0f), "WORKSHOP", color).SetText($"WORKSHOP A{artemLevel} S{sosnovkaLevel}"); ReksikVfx.SetAura(((Component)player).transform, "WorkshopAura", enabled: true, 1.3f + 0.035f * (float)num, new Color(1f, 0.55f, 0.12f, 0.1f + 0.01f * (float)num)); } else { ReksikVfx.RemoveStatus(((Component)player).transform, "WorkshopLabel"); ReksikVfx.RemoveStatus(((Component)player).transform, "WorkshopAura"); } UpdateChargeVfx(); } } private void UpdateChargeVfx() { //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { string text = string.Empty; if (plankCharges > 0) { text = "PLANK " + plankCharges; } if (heavyBeamCharges > 0) { text = ((text.Length > 0) ? (text + " BEAM " + heavyBeamCharges) : ("BEAM " + heavyBeamCharges)); } if (text.Length == 0) { ReksikVfx.RemoveStatus(((Component)player).transform, "CarpenterCharges"); return; } Color color = (WorkshopActive ? new Color(1f, 0.72f, 0.28f, 0.95f) : new Color(ReksikVfx.WoodColor.r, ReksikVfx.WoodColor.g, ReksikVfx.WoodColor.b, 0.95f)); StatusTextVfxMono orCreateStatusText = ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "CarpenterCharges", new Vector3(0f, 2.08f, 0f), text, color); orCreateStatusText.SetText(text); orCreateStatusText.SetColor(color); } } } public class DaniilTankMono : MonoBehaviour { private Player player; private HealthHandler healthHandler; private CharacterStatModifiers stats; private Block block; private int level = 1; private bool initialized; private bool usedSecondWind; private float appliedPassiveRegenBonus; private float appliedSecondWindMoveMultiplier = 1f; private float appliedSecondWindSmoothingBoost; private float appliedFortressRegenBonus; private float appliedFortressSmoothingBoost; private bool secondWindActive; private bool fortressActive; private Coroutine? secondWindRoutine; private Coroutine? fortressRoutine; private const float RegenNerfMul = 0.55f; private const float BasePassiveRegenBonus = 35f; private const float PassiveRegenPerLevel = 20f; private const float BaseDamageRefundFraction = 0.43f; private const float DamageRefundPerLevel = 0.07f; private const float SecondWindThreshold = 0.2f; private const float BaseSecondWindRestoreFraction = 0.65f; private const float SecondWindRestorePerLevel = 0.06f; private const float BaseSecondWindDuration = 4f; private const float SecondWindDurationPerLevel = 0.6f; private const float BaseFortressDuration = 3.25f; private const float FortressDurationPerLevel = 0.5f; private const float BaseFortressRegenBonus = 28f; private const float FortressRegenPerLevel = 30f; private const float BaseFortressHealFraction = 0.12f; private const float FortressHealPerLevel = 0.05f; private float PassiveRegenBonus => (35f + 20f * (float)(level - 1)) * 0.55f; private float DamageRefundFraction => Mathf.Clamp(0.43f + 0.07f * (float)(level - 1), 0.1f, 0.92f); private float SecondWindRestoreFraction => Mathf.Clamp(0.65f + 0.06f * (float)(level - 1), 0.25f, 0.95f); private float SecondWindDuration => 4f + 0.6f * (float)(level - 1); private float FortressDuration => 3.25f + 0.5f * (float)(level - 1); private float FortressRegenBonus => (28f + 30f * (float)(level - 1)) * 0.55f; private float FortressHealFraction => Mathf.Clamp(0.12f + 0.05f * (float)(level - 1), 0.02f, 0.4f); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); if (initialized) { ApplyPassiveRegen(); if (secondWindActive) { RefreshSecondWindModifiers(); } if (fortressActive) { RefreshFortressModifiers(); } } } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } healthHandler = player.data.healthHandler; stats = player.data.stats; block = player.data.block; initialized = true; ApplyPassiveRegen(); usedSecondWind = false; if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj = stats; obj.WasDealtDamageAction = (Action)Delegate.Combine(obj.WasDealtDamageAction, new Action(OnDamaged)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); } } private void ApplyPassiveRegen() { if (!((Object)(object)healthHandler == (Object)null)) { healthHandler.regeneration = ReksikRuntimeStatMath.ApplyAdditive(healthHandler.regeneration, ref appliedPassiveRegenBonus, PassiveRegenBonus); } } private void OnDestroy() { if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj = stats; obj.WasDealtDamageAction = (Action)Delegate.Remove(obj.WasDealtDamageAction, new Action(OnDamaged)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if (secondWindRoutine != null) { ((MonoBehaviour)this).StopCoroutine(secondWindRoutine); secondWindRoutine = null; } if (fortressRoutine != null) { ((MonoBehaviour)this).StopCoroutine(fortressRoutine); fortressRoutine = null; } EndSecondWind(); EndFortress(); if ((Object)(object)healthHandler != (Object)null) { healthHandler.regeneration = ReksikRuntimeStatMath.RemoveAdditive(healthHandler.regeneration, ref appliedPassiveRegenBonus); } } private void Update() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { usedSecondWind = false; EndSecondWind(); EndFortress(); } else if (!usedSecondWind && ReksikUtils.HealthFraction(player) <= 0.2f) { usedSecondWind = true; Vector2 worldPos = Vector2.op_Implicit(((Component)player).transform.position); ReksikVfx.PlayShockwave(worldPos, 7f + 0.3f * (float)(level - 1), 0.22f, new Color(0.2f, 0.95f, 0.35f, 0.55f)); ReksikVfx.PlayPulse(worldPos, 1.25f, 0.2f, new Color(1f, 1f, 1f, 0.55f)); player.data.health = Mathf.Max(player.data.health, player.data.maxHealth * SecondWindRestoreFraction); if (secondWindRoutine != null) { ((MonoBehaviour)this).StopCoroutine(secondWindRoutine); } EndSecondWind(); secondWindRoutine = ((MonoBehaviour)this).StartCoroutine(SecondWindRoutine()); } } private IEnumerator SecondWindRoutine() { if (!((Object)(object)stats == (Object)null) && !((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { RefreshSecondWindModifiers(); yield return (object)new WaitForSeconds(SecondWindDuration); EndSecondWind(); secondWindRoutine = null; } } private void OnDamaged(Vector2 damage, bool selfDamage) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !selfDamage) { float num = ((Vector2)(ref damage)).magnitude * DamageRefundFraction; if (!(num <= 0f)) { ReksikUtils.Heal(player, num); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)player).transform.position), 8f + 0.35f * (float)(level - 1), 0.2f, new Color(0.2f, 0.95f, 0.35f, 0.45f)); if (fortressRoutine != null) { ((MonoBehaviour)this).StopCoroutine(fortressRoutine); fortressRoutine = null; } EndFortress(); fortressRoutine = ((MonoBehaviour)this).StartCoroutine(FortressRoutine()); } } private IEnumerator FortressRoutine() { if (!((Object)(object)healthHandler == (Object)null) && !((Object)(object)stats == (Object)null) && !((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { RefreshFortressModifiers(); ReksikUtils.Heal(player, player.data.maxHealth * FortressHealFraction); yield return (object)new WaitForSeconds(FortressDuration); EndFortress(); fortressRoutine = null; } } private void RefreshSecondWindModifiers() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)stats == (Object)null) && !((Object)(object)player.data == (Object)null)) { secondWindActive = true; ReksikVfx.SetAura(((Component)player).transform, "DaniilSecondWindAura", enabled: true, 1.45f, new Color(0.2f, 0.95f, 0.35f, 0.3f)); stats.secondsToTakeDamageOver = ReksikRuntimeStatMath.ApplyMinimumBoost(stats.secondsToTakeDamageOver, ref appliedSecondWindSmoothingBoost, 4f + 0.5f * (float)(level - 1)); stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedSecondWindMoveMultiplier, Mathf.Clamp(0.85f + 0.03f * (float)(level - 1), 0.85f, 1f), 0.01f); } } private void EndSecondWind() { if (secondWindActive) { secondWindActive = false; if ((Object)(object)stats != (Object)null) { stats.secondsToTakeDamageOver = ReksikRuntimeStatMath.RemoveMinimumBoost(stats.secondsToTakeDamageOver, ref appliedSecondWindSmoothingBoost); stats.movementSpeed = ReksikRuntimeStatMath.RemoveMultiplier(stats.movementSpeed, ref appliedSecondWindMoveMultiplier, 0.01f); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "DaniilSecondWindAura"); } } } private void RefreshFortressModifiers() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)healthHandler == (Object)null) && !((Object)(object)stats == (Object)null) && !((Object)(object)player.data == (Object)null)) { fortressActive = true; ReksikVfx.SetAura(((Component)player).transform, "DaniilFortressAura", enabled: true, 1.6f, new Color(0.2f, 0.95f, 0.35f, 0.25f)); healthHandler.regeneration = ReksikRuntimeStatMath.ApplyAdditive(healthHandler.regeneration, ref appliedFortressRegenBonus, FortressRegenBonus); stats.secondsToTakeDamageOver = ReksikRuntimeStatMath.ApplyMinimumBoost(stats.secondsToTakeDamageOver, ref appliedFortressSmoothingBoost, 5f + 0.4f * (float)(level - 1)); } } private void EndFortress() { if (fortressActive) { fortressActive = false; if ((Object)(object)healthHandler != (Object)null) { healthHandler.regeneration = ReksikRuntimeStatMath.RemoveAdditive(healthHandler.regeneration, ref appliedFortressRegenBonus); } if ((Object)(object)stats != (Object)null) { stats.secondsToTakeDamageOver = ReksikRuntimeStatMath.RemoveMinimumBoost(stats.secondsToTakeDamageOver, ref appliedFortressSmoothingBoost); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "DaniilFortressAura"); } } } } public class DmitriyArmorBrokerMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private CharacterStatModifiers stats; private HealthHandler healthHandler; private int level = 1; private float plates; private int shrapnelCharges; private int ironPactCharges; private int lastBlockFrame = -1; private bool reinforceActive; private float reinforceStartTime; private float reinforceEndTime; private bool reinforceUsedIronPact; private float reinforceUsedMechanicPower; private float reinforceAppliedSmoothingBoost; private float reinforceAppliedRegen; private bool HasDaniil { get { if ((Object)(object)player == (Object)null || !ReksikHostSettings.BondsEnabled) { return false; } return (Object)(object)((Component)player).gameObject.GetComponent() != (Object)null; } } private float IronPactPower { get { if (!HasDaniil) { return 0f; } return ReksikHostSettings.MechanicPower; } } private float PlateAbsorb => 0.45f + 0.08f * (float)(level - 1) + (0.08f + 0.02f * (float)(level - 1)) * IronPactPower; private float PlateCap => 300f + 220f * (float)(level - 1) + (100f + 40f * (float)(level - 1)) * IronPactPower; private float HealFactor => 1.15f + 0.25f * (float)(level - 1) + (0.2f + 0.05f * (float)(level - 1)) * IronPactPower; private float PiercingDamageMultiplier => 1.25f + 0.18f * (float)(level - 1) + (0.25f + 0.06f * (float)(level - 1)) * IronPactPower; private float PiercingSpeedMultiplier => 1.1f + 0.04f * (float)level + 0.05f * IronPactPower; private float ShrapnelDamageFraction => 0.35f + 0.08f * (float)(level - 1) + (0.18f + 0.04f * (float)(level - 1)) * IronPactPower; private float ShrapnelRadius => 3.25f + 0.55f * (float)(level - 1) + (0.9f + 0.1f * (float)(level - 1)) * IronPactPower; private float ReinforceDuration => 3f + 0.45f * (float)(level - 1) + (0.45f + 0.1f * (float)(level - 1)) * IronPactPower; private float ReinforceSmoothingAdd => 0.9f + 0.25f * (float)(level - 1) + (0.35f + 0.08f * (float)(level - 1)) * IronPactPower; private float ReinforceRegenBonus => 25f + 18f * (float)(level - 1) + (12f + 6f * (float)(level - 1)) * IronPactPower; private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; stats = player.data.stats; healthHandler = player.data.healthHandler; if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj = stats; obj.WasDealtDamageAction = (Action)Delegate.Combine(obj.WasDealtDamageAction, new Action(OnDamaged)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { Gun obj3 = gun; obj3.ShootPojectileAction = (Action)Delegate.Combine(obj3.ShootPojectileAction, new Action(OnShootProjectile)); } } public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); plates = Mathf.Min(plates, PlateCap); } private static int RoundBondCount(float value) { return Mathf.FloorToInt(value + 0.5f); } private int BaseChargesFromPlates(float spent) { return Mathf.CeilToInt(spent / 75f) + level; } private int IronPactChargesFromPlates() { return RoundBondCount((float)level * IronPactPower); } private void OnDestroy() { try { if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj = stats; obj.WasDealtDamageAction = (Action)Delegate.Remove(obj.WasDealtDamageAction, new Action(OnDamaged)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { Gun obj3 = gun; obj3.ShootPojectileAction = (Action)Delegate.Remove(obj3.ShootPojectileAction, new Action(OnShootProjectile)); } } catch { } EndReinforce(); if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "DmitriyPlates"); ReksikVfx.RemoveStatus(((Component)player).transform, "DmitriyPlatesAura"); ReksikVfx.RemoveStatus(((Component)player).transform, "DmitriyReinforceAura"); } } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { plates = 0f; shrapnelCharges = 0; ironPactCharges = 0; EndReinforce(); ReksikVfx.RemoveStatus(((Component)player).transform, "DmitriyPlates"); ReksikVfx.RemoveStatus(((Component)player).transform, "DmitriyPlatesAura"); return; } DiscardDisabledIronPactCharges(); plates = Mathf.Min(plates, PlateCap); if (reinforceActive && ReinforceSettingsChanged()) { RefreshReinforce(); } if (reinforceActive && Time.time >= reinforceEndTime) { EndReinforce(); } UpdateVfx(); } private void UpdateVfx() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { if (plates > 1f || shrapnelCharges > 0) { int num = Mathf.Max(0, Mathf.CeilToInt(plates)); string text = (HasDaniil ? " TANK" : string.Empty); string text2 = "PLATES " + num + " SHELLS " + shrapnelCharges + text; Color color = (HasDaniil ? new Color(0.2f, 0.9f, 0.42f, 0.95f) : new Color(0.25f, 0.6f, 0.95f, 0.95f)); ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "DmitriyPlates", new Vector3(0f, 2.05f, 0f), text2, color).SetText(text2); float num2 = plates / Mathf.Max(1f, PlateCap); float radius = 1.2f + 0.08f * (float)level + 0.3f * num2 + 0.02f * (float)shrapnelCharges; Color color2 = (HasDaniil ? new Color(0.2f, 0.8f, 0.35f, 0.18f) : new Color(0.25f, 0.6f, 0.95f, 0.18f)); ReksikVfx.SetAura(((Component)player).transform, "DmitriyPlatesAura", enabled: true, radius, color2); } else { ReksikVfx.RemoveStatus(((Component)player).transform, "DmitriyPlates"); ReksikVfx.RemoveStatus(((Component)player).transform, "DmitriyPlatesAura"); } if (reinforceActive) { Color color3 = (HasDaniil ? new Color(0.2f, 0.8f, 0.35f, 0.22f) : new Color(0.25f, 0.6f, 0.95f, 0.2f)); float radius2 = 1.5f + 0.08f * (float)level; ReksikVfx.SetAura(((Component)player).transform, "DmitriyReinforceAura", enabled: true, radius2, color3); } else { ReksikVfx.RemoveStatus(((Component)player).transform, "DmitriyReinforceAura"); } } } private void OnDamaged(Vector2 damage, bool selfDamage) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !selfDamage) { float num = ((Vector2)(ref damage)).magnitude * PlateAbsorb; plates = Mathf.Min(PlateCap, plates + num); } } private void OnBlock(BlockTriggerType triggerType) { //IL_00ea: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { return; } DiscardDisabledIronPactCharges(); if (lastBlockFrame != Time.frameCount) { lastBlockFrame = Time.frameCount; if (!(plates <= 2f)) { float num = plates; plates = 0f; ReksikUtils.Heal(player, num * HealFactor); int num2 = BaseChargesFromPlates(num); int num3 = IronPactChargesFromPlates(); shrapnelCharges += num2 + num3; ironPactCharges += num3; Color color = (HasDaniil ? new Color(0.2f, 0.9f, 0.42f, 0.6f) : new Color(0.25f, 0.6f, 0.95f, 0.55f)); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.1f + 0.05f * (float)level, 0.2f, color); ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)player).transform.position), 7f + 0.9f * (float)level, 0.2f, color); BeginReinforce(); UpdateVfx(); } } } private void OnShootProjectile(GameObject projectile) { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) DiscardDisabledIronPactCharges(); if (shrapnelCharges <= 0 || (Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || (Object)(object)projectile == (Object)null) { return; } ProjectileHit component = projectile.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.damage *= PiercingDamageMultiplier; Transform transform = projectile.transform; transform.localScale *= 1.12f + 0.035f * (float)level; MoveTransform component2 = projectile.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity *= PiercingSpeedMultiplier; } Color val = (HasDaniil ? new Color(0.2f, 0.95f, 0.42f, 0.8f) : new Color(0.35f, 0.72f, 1f, 0.8f)); ReksikVfx.AttachSimpleTrail(projectile, val, 0.44f, 0.18f + 0.025f * (float)level, 0.025f); DmitriyShrapnelProjectileMono dmitriyShrapnelProjectileMono = projectile.GetComponent(); if ((Object)(object)dmitriyShrapnelProjectileMono == (Object)null) { dmitriyShrapnelProjectileMono = projectile.AddComponent(); } dmitriyShrapnelProjectileMono.Configure(player, component.damage * ShrapnelDamageFraction, ShrapnelRadius, val); shrapnelCharges--; if (ironPactCharges > 0) { ironPactCharges--; } UpdateVfx(); } } private void DiscardDisabledIronPactCharges() { if (!HasDaniil && ironPactCharges > 0) { shrapnelCharges = Mathf.Max(0, shrapnelCharges - ironPactCharges); ironPactCharges = 0; } } private void BeginReinforce() { EndReinforce(); if (!((Object)(object)stats == (Object)null) && !((Object)(object)healthHandler == (Object)null)) { reinforceActive = true; reinforceStartTime = Time.time; RefreshReinforce(); } } private bool ReinforceSettingsChanged() { bool hasDaniil = HasDaniil; if (reinforceUsedIronPact == hasDaniil) { if (hasDaniil) { return reinforceUsedMechanicPower != ReksikHostSettings.MechanicPower; } return false; } return true; } private void RefreshReinforce() { if (reinforceActive && !((Object)(object)stats == (Object)null) && !((Object)(object)healthHandler == (Object)null)) { reinforceEndTime = reinforceStartTime + ReinforceDuration; reinforceUsedIronPact = HasDaniil; reinforceUsedMechanicPower = ReksikHostSettings.MechanicPower; float num = stats.secondsToTakeDamageOver - reinforceAppliedSmoothingBoost; stats.secondsToTakeDamageOver = ReksikRuntimeStatMath.ApplyMinimumBoost(stats.secondsToTakeDamageOver, ref reinforceAppliedSmoothingBoost, num + ReinforceSmoothingAdd); healthHandler.regeneration = ReksikRuntimeStatMath.ApplyAdditive(healthHandler.regeneration, ref reinforceAppliedRegen, ReinforceRegenBonus); } } private void EndReinforce() { if (!reinforceActive) { return; } reinforceActive = false; try { if ((Object)(object)healthHandler != (Object)null) { healthHandler.regeneration = ReksikRuntimeStatMath.RemoveAdditive(healthHandler.regeneration, ref reinforceAppliedRegen); } if ((Object)(object)stats != (Object)null) { stats.secondsToTakeDamageOver = ReksikRuntimeStatMath.RemoveMinimumBoost(stats.secondsToTakeDamageOver, ref reinforceAppliedSmoothingBoost); } } catch { } } } public class DmitriyShrapnelProjectileMono : MonoBehaviour { private Player owner; private float damage; private float radius; private Color color; private Vector2 previousPosition; private bool configured; private bool detonated; public void Configure(Player projectileOwner, float burstDamage, float burstRadius, Color burstColor) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) owner = projectileOwner; damage = Mathf.Max(0f, burstDamage); radius = Mathf.Max(0.1f, burstRadius); color = burstColor; previousPosition = Vector2.op_Implicit(((Component)this).transform.position); configured = true; } private void Update() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (!configured || detonated || (Object)(object)owner == (Object)null || (Object)(object)owner.data == (Object)null) { return; } Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); foreach (Player item in ReksikUtils.EnemyPlayers(owner)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead && !(DistanceToSegment(Vector2.op_Implicit(((Component)item).transform.position), previousPosition, val) > 1.35f)) { Detonate(val); return; } } previousPosition = val; } private static float DistanceToSegment(Vector2 point, Vector2 start, Vector2 end) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) Vector2 val = end - start; float sqrMagnitude = ((Vector2)(ref val)).sqrMagnitude; if (sqrMagnitude < 0.0001f) { return Vector2.Distance(point, start); } float num = Mathf.Clamp01(Vector2.Dot(point - start, val) / sqrMagnitude); return Vector2.Distance(point, start + val * num); } private void Detonate(Vector2 center) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) detonated = true; ReksikVfx.PlayShockwave(center, radius, 0.16f, color); ReksikVfx.PlayPulse(center, 1.08f, 0.14f, new Color(color.r, color.g, color.b, 0.62f)); foreach (Player item in ReksikUtils.EnemyPlayers(owner)) { if ((Object)(object)item == (Object)null || (Object)(object)item.data == (Object)null || item.data.dead) { continue; } Vector2 val = Vector2.op_Implicit(((Component)item).transform.position) - center; if (((Vector2)(ref val)).magnitude > radius) { continue; } Vector2 val2 = ((((Vector2)(ref val)).sqrMagnitude > 0.001f) ? ((Vector2)(ref val)).normalized : Vector2.up); try { Damagable component = ((Component)item.data.healthHandler).GetComponent(); if ((Object)(object)component != (Object)null) { component.TakeDamage(val2 * damage, Vector2.op_Implicit(((Component)item).transform.position), ((Component)owner).gameObject, owner, true, false); } } catch { } } } } public class EgorLongshotProjectileMono : MonoBehaviour { private ProjectileHit projectileHit; private Vector2 spawnPos; private float baseDamage; private bool hasBaseDamage; private float damageBonusPerUnit = 0.14f; private float maxMultiplier = 4.25f; public void SetBaseDamage(float dmg) { baseDamage = Mathf.Max(0.01f, dmg); hasBaseDamage = true; } public void SetParams(float bonusPerUnit, float maxMul) { damageBonusPerUnit = Mathf.Max(0f, bonusPerUnit); maxMultiplier = Mathf.Max(1f, maxMul); } private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) spawnPos = Vector2.op_Implicit(((Component)this).transform.position); projectileHit = ((Component)this).GetComponent(); if ((Object)(object)projectileHit == (Object)null) { Object.Destroy((Object)(object)this); } else if (!hasBaseDamage) { baseDamage = Mathf.Max(0.01f, projectileHit.damage); hasBaseDamage = true; } } private void Update() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectileHit == (Object)null) { return; } float num = Vector2.Distance(spawnPos, Vector2.op_Implicit(((Component)this).transform.position)); float num2 = Mathf.Clamp(1f + num * damageBonusPerUnit, 1f, maxMultiplier); projectileHit.damage = baseDamage * num2; try { TrailRenderer component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.startWidth = Mathf.Clamp(0.1f * num2, 0.1f, 0.75f); } } catch { } } } public class EgorSniperMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private GunAmmo gunAmmo; private int level = 1; private Vector3 lastPos; private float stillTime; private float longGameCharge; private int longGameIntervalsCredited; private const int AmmoCap = 1; private float nextAmmoEnforceTime; private const float BaseStillSpeedThreshold = 0.25f; private const float BaseFocusTime = 1f; private const float BaseFocusDamageMultiplier = 2.75f; private const float BaseFocusProjectileSpeedMultiplier = 1.25f; private const float BaseMovingDamageMultiplier = 0.85f; private const float BaseRepositionBackstepForce = 18f; private const float LongGameChargeInterval = 0.75f; private const float LongGameDamagePerCharge = 0.16f; private const float LongGameSpeedPerCharge = 0.06f; private const float LongGameSizePerCharge = 0.035f; private const float LongGameVfxRadiusPerCharge = 0.14f; private const float LongGameVfxDurationPerCharge = 0.006f; private float StillSpeedThreshold => 0.25f + 0.05f * (float)(level - 1); private float FocusTime => Mathf.Max(0.35f, 1f - 0.07f * (float)(level - 1)); private float FocusDamageMultiplier => 2.75f + 0.75f * (float)(level - 1); private float FocusProjectileSpeedMultiplier => 1.25f + 0.08f * (float)(level - 1); private float MovingDamageMultiplier => Mathf.Clamp(0.85f + 0.03f * (float)(level - 1), 0.85f, 1f); private float RepositionBackstepForce => 18f + 3f * (float)(level - 1); private float LongshotBonusPerUnit => 0.14f + 0.03f * (float)(level - 1); private float LongshotMaxMultiplier => 4.25f + 0.5f * (float)(level - 1); public void SetGunAmmo(GunAmmo ga) { gunAmmo = ga; EnforceAmmoCap(force: true); } private void EnforceAmmoCap(bool force = false) { if (!force && Time.time < nextAmmoEnforceTime) { return; } nextAmmoEnforceTime = Time.time + 0.15f; try { if ((Object)(object)gun != (Object)null) { gun.ammo = Mathf.Min(gun.ammo, 1); } } catch { } if ((Object)(object)gunAmmo == (Object)null) { return; } try { TrySetIntMember(gunAmmo, new string[4] { "maxAmmo", "MaxAmmo", "maxBullets", "maxNumberOfBullets" }, 1); if (TryGetIntMember(gunAmmo, new string[4] { "currentAmmo", "CurrentAmmo", "ammo", "curAmmo" }) > 1) { TrySetIntMember(gunAmmo, new string[4] { "currentAmmo", "CurrentAmmo", "ammo", "curAmmo" }, 1); } } catch { } } private static bool TrySetIntMember(object obj, string[] names, int value) { if (obj == null) { return false; } Type type = obj.GetType(); string[] array = names; foreach (string name in array) { FieldInfo field = type.GetField(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null && field.FieldType == typeof(int)) { field.SetValue(obj, value); return true; } PropertyInfo property = type.GetProperty(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.CanWrite && property.PropertyType == typeof(int)) { property.SetValue(obj, value, null); return true; } } array = new string[3] { "SetMaxAmmo", "SetAmmo", "SetAmmoCount" }; foreach (string name2 in array) { MethodInfo method = type.GetMethod(name2, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { continue; } ParameterInfo[] parameters = method.GetParameters(); if (parameters.Length == 1 && parameters[0].ParameterType == typeof(int)) { try { method.Invoke(obj, new object[1] { value }); return true; } catch { } } } return false; } private static int TryGetIntMember(object obj, string[] names) { if (obj == null) { return int.MinValue; } Type type = obj.GetType(); foreach (string name in names) { FieldInfo field = type.GetField(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null && field.FieldType == typeof(int)) { try { return (int)field.GetValue(obj); } catch { } } PropertyInfo property = type.GetProperty(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.CanRead && property.PropertyType == typeof(int)) { try { return (int)property.GetValue(obj, null); } catch { } } } return int.MinValue; } public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); } private void Start() { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; try { if ((Object)(object)gunAmmo == (Object)null) { gunAmmo = ((Component)player).GetComponentInChildren(); } } catch { } EnforceAmmoCap(force: true); lastPos = ((Component)player).transform.position; Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Combine(obj2.ShootPojectileAction, new Action(OnShootProjectile)); if ((Object)(object)block != (Object)null) { Block obj3 = block; obj3.BlockAction = (Action)Delegate.Combine(obj3.BlockAction, new Action(OnBlock)); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "EgorFocus"); ReksikVfx.RemoveStatus(((Component)player).transform, "EgorLongGame"); } } private void Update() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } EnforceAmmoCap(); if (player.data.dead) { stillTime = 0f; lastPos = ((Component)player).transform.position; longGameCharge = 0f; longGameIntervalsCredited = 0; ReksikVfx.RemoveStatus(((Component)player).transform, "EgorLongGame"); return; } Vector3 position = ((Component)player).transform.position; Vector3 val = position - lastPos; float num = ((Vector3)(ref val)).magnitude / Mathf.Max(Time.deltaTime, 0.0001f); lastPos = position; if (num <= StillSpeedThreshold) { stillTime += Time.deltaTime; } else { stillTime = 0f; } AccumulateLongGameCharge(); float focusTime = FocusTime; if (stillTime >= focusTime) { ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "EgorFocus", new Vector3(0f, 2.25f, 0f), "FOCUS", new Color(0.85f, 0.95f, 1f, 0.95f)).SetText("FOCUS"); } else if (stillTime > 0.1f) { int num2 = Mathf.Clamp(Mathf.RoundToInt(stillTime / focusTime * 100f), 0, 99); ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "EgorFocus", new Vector3(0f, 2.25f, 0f), "", new Color(0.85f, 0.95f, 1f, 0.95f)).SetText("FOCUS " + num2 + "%"); } else { ReksikVfx.RemoveStatus(((Component)player).transform, "EgorFocus"); } RefreshLongGameStatus(); } private void AccumulateLongGameCharge() { float num = ReksikBonds.BondPower(player, ReksikBondId.LongGame); if (num <= 0f) { longGameCharge = 0f; longGameIntervalsCredited = 0; return; } if (stillTime < FocusTime) { longGameIntervalsCredited = 0; return; } int num2 = 1 + Mathf.FloorToInt((stillTime - FocusTime) / 0.75f); int num3 = num2 - longGameIntervalsCredited; if (num3 > 0) { longGameCharge += (float)num3 * num; longGameIntervalsCredited = num2; } } private void RefreshLongGameStatus() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || longGameCharge <= 0f) { if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "EgorLongGame"); } } else { ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "EgorLongGame", new Vector3(0f, 2.45f, 0f), "", new Color(0.58f, 0.92f, 1f, 0.95f)).SetText("LONG GAME " + longGameCharge.ToString("0.#")); } } private void OnShootProjectile(GameObject projectile) { //IL_001f: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectile == (Object)null) { return; } ReksikVfx.AttachSimpleTrail(projectile, new Color(0.85f, 0.95f, 1f, 0.7f), 0.35f, 0.12f, 0.01f); ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component == (Object)null) { return; } if (stillTime >= FocusTime) { float num = ((ReksikBonds.BondPower(player, ReksikBondId.LongGame) > 0f) ? longGameCharge : 0f); component.damage *= FocusDamageMultiplier; component.damage *= 1f + 0.16f * num; if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.75f, new Color(0.85f, 0.95f, 1f, 0.95f)); } MoveTransform component2 = projectile.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity *= FocusProjectileSpeedMultiplier * (1f + 0.06f * num); } Transform transform = projectile.transform; transform.localScale *= 0.85f * (1f + 0.035f * num); if (num > 0f) { ReksikVfx.PlayPulse(Vector2.op_Implicit(projectile.transform.position), 1.1f + 0.14f * num, 0.18f + 0.006f * num, new Color(0.45f, 0.95f, 1f, 0.78f), ((Component)player).transform); } stillTime = 0f; longGameCharge = 0f; longGameIntervalsCredited = 0; RefreshLongGameStatus(); } else { component.damage *= MovingDamageMultiplier; } if ((Object)(object)projectile.GetComponent() == (Object)null) { EgorLongshotProjectileMono egorLongshotProjectileMono = projectile.AddComponent(); egorLongshotProjectileMono.SetBaseDamage(component.damage); egorLongshotProjectileMono.SetParams(LongshotBonusPerUnit, LongshotMaxMultiplier); } } private void OnBlock(BlockTriggerType triggerType) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { return; } ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)player).transform.position), 7f + 0.25f * (float)(level - 1), 0.16f, new Color(0.85f, 0.95f, 1f, 0.55f)); try { Vector2 val = Vector2.op_Implicit(((Component)player.data.weaponHandler.gun).transform.right); if (((Vector2)(ref val)).sqrMagnitude < 0.001f) { val = Vector2.right; } ReksikUtils.AddVelocity(player, -((Vector2)(ref val)).normalized * RepositionBackstepForce + Vector2.up * (5f + 0.35f * (float)(level - 1))); } catch { } stillTime = FocusTime; } } public class FearDebuffMono : MonoBehaviour { private Player player; private CharacterStatModifiers stats; private Gun gun; private Block block; private float endTime; private float moveMultiplier = 0.7f; private float reloadMultiplier = 1.3f; private float blockCdMultiplier = 1.35f; private float appliedMoveMultiplier = 1f; private float appliedReloadMultiplier = 1f; private float appliedBlockCdMultiplier = 1f; private bool applied; public static void ApplyOrRefresh(Player target, float duration, float moveMul = 0.7f, float reloadMul = 1.3f, float blockCdMul = 1.35f) { if (!((Object)(object)target == (Object)null)) { FearDebuffMono component = ((Component)target).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.moveMultiplier = Mathf.Min(component.moveMultiplier, moveMul); component.reloadMultiplier = Mathf.Max(component.reloadMultiplier, reloadMul); component.blockCdMultiplier = Mathf.Max(component.blockCdMultiplier, blockCdMul); component.endTime = Mathf.Max(component.endTime, Time.time + duration); component.RefreshAppliedMultipliers(); } else { FearDebuffMono fearDebuffMono = ((Component)target).gameObject.AddComponent(); fearDebuffMono.moveMultiplier = moveMul; fearDebuffMono.reloadMultiplier = reloadMul; fearDebuffMono.blockCdMultiplier = blockCdMul; fearDebuffMono.endTime = Time.time + duration; } } } private void Start() { //IL_00eb: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } stats = player.data.stats; gun = player.data.weaponHandler.gun; block = player.data.block; if ((Object)(object)stats == (Object)null || (Object)(object)gun == (Object)null || (Object)(object)block == (Object)null) { Object.Destroy((Object)(object)this); return; } Apply(); ReksikVfx.SetAura(((Component)player).transform, "FearDebuffAura", enabled: true, 1.25f, new Color(ReksikVfx.MindColor.r, ReksikVfx.MindColor.g, ReksikVfx.MindColor.b, 0.2f)); } private void Update() { if (applied && Time.time >= endTime) { Object.Destroy((Object)(object)this); } } private void OnDestroy() { Restore(); if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "FearDebuffAura"); } } private void Apply() { if (!applied) { applied = true; stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, moveMultiplier, 0.01f); gun.reloadTime = ReksikRuntimeStatMath.ApplyMultiplier(gun.reloadTime, ref appliedReloadMultiplier, reloadMultiplier, 0.01f); block.cdMultiplier = ReksikRuntimeStatMath.ApplyMultiplier(block.cdMultiplier, ref appliedBlockCdMultiplier, blockCdMultiplier, 0.01f); } } private void RefreshAppliedMultipliers() { if (applied && !((Object)(object)stats == (Object)null) && !((Object)(object)gun == (Object)null) && !((Object)(object)block == (Object)null)) { stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, moveMultiplier, 0.01f); gun.reloadTime = ReksikRuntimeStatMath.ApplyMultiplier(gun.reloadTime, ref appliedReloadMultiplier, reloadMultiplier, 0.01f); block.cdMultiplier = ReksikRuntimeStatMath.ApplyMultiplier(block.cdMultiplier, ref appliedBlockCdMultiplier, blockCdMultiplier, 0.01f); } } private void Restore() { if (applied) { applied = false; if ((Object)(object)stats != (Object)null) { stats.movementSpeed = ReksikRuntimeStatMath.RemoveMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, 0.01f); } if ((Object)(object)gun != (Object)null) { gun.reloadTime = ReksikRuntimeStatMath.RemoveMultiplier(gun.reloadTime, ref appliedReloadMultiplier, 0.01f); } if ((Object)(object)block != (Object)null) { block.cdMultiplier = ReksikRuntimeStatMath.RemoveMultiplier(block.cdMultiplier, ref appliedBlockCdMultiplier, 0.01f); } } } } public class FedrTechMono : MonoBehaviour { private const float RedlineFraction = 0.7f; private const float HeatDecayPerSecond = 8f; private Player player; private Gun gun; private GunAmmo gunAmmo; private Block block; private int level = 1; private float heat; private bool redlineActive; private bool wasDead; private float nextVisualUpdate; private float appliedDamageMultiplier = 1f; private float appliedReloadMultiplier = 1f; private float appliedProjectileSpeedMultiplier = 1f; private float HeatCapacity => 100f + 40f * (float)(level - 1); private float HeatGainPerProjectile => 24f + 10f * (float)(level - 1); private float RedlineDamageMultiplier => 1.35f + 0.2f * (float)(level - 1); private float RedlineProjectileSpeedMultiplier => 1.2f + 0.08f * (float)(level - 1); private float VentRadius => 7f + 1.4f * (float)(level - 1); private float VentDamageAtFullHeat => 95f + 40f * (float)(level - 1); private float VentForceAtFullHeat => 75f + 12f * (float)(level - 1); private float HeatFraction { get { if (!(HeatCapacity > 0f)) { return 0f; } return heat / HeatCapacity; } } public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); heat = Mathf.Min(heat, HeatCapacity); if (redlineActive && heat >= HeatCapacity * 0.7f) { ApplyRedlineStats(); } else { RefreshRedline(); } RefreshVisuals(force: true); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; gunAmmo = (((Object)(object)gun != (Object)null) ? ((Component)gun).GetComponentInChildren() : null); block = player.data.block; if ((Object)(object)gun == (Object)null || (Object)(object)block == (Object)null) { Object.Destroy((Object)(object)this); return; } wasDead = player.data.dead; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); RefreshVisuals(force: true); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { if (!wasDead) { wasDead = true; ResetHeat(); } return; } if (wasDead) { wasDead = false; ResetHeat(); } if (heat > 0f) { SetHeat(heat - 8f * Time.deltaTime); } RefreshVisuals(force: false); } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); RemoveRedlineStats(); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "FedrHeatAura"); ReksikVfx.RemoveStatus(((Component)player).transform, "FedrHeatLabel"); } } private void OnShootProjectile(GameObject projectile) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { SetHeat(heat + HeatGainPerProjectile); FeedRedDetonation(); if ((Object)(object)projectile != (Object)null) { float num = 1f + 0.18f * (float)(level - 1); ReksikVfx.AttachSimpleTrail(projectile, new Color(ReksikVfx.TechColor.r, ReksikVfx.TechColor.g, ReksikVfx.TechColor.b, 0.72f), 0.22f, 0.12f * num, 0.02f * num); } if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.82f + 0.12f * (float)(level - 1), new Color(ReksikVfx.TechColor.r, ReksikVfx.TechColor.g, ReksikVfx.TechColor.b, 0.9f)); } } } private void FeedRedDetonation() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) float num = ReksikBonds.BondPower(player, ReksikBondId.RedDetonation); if (num <= 0f) { return; } ViktorKamikazeMono component = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.AddRedDetonationCharge(num); if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.34f + 0.07f * num, new Color(1f, 0.22f, 0.1f, 0.72f)); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || heat <= 0f) { return; } float heatFraction = HeatFraction; float num = VentRadius * heatFraction; float num2 = VentDamageAtFullHeat * heatFraction; float num3 = VentForceAtFullHeat * heatFraction; heat = 0f; RefreshRedline(); RefreshVisuals(force: true); Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); ReksikVfx.PlayShockwave(val, num, 0.22f + 0.025f * (float)(level - 1), new Color(ReksikVfx.TechColor.r, ReksikVfx.TechColor.g, ReksikVfx.TechColor.b, 0.72f), ((Component)player).transform); ReksikVfx.PlayPulse(val, 0.95f + 0.16f * (float)(level - 1), 0.16f, new Color(1f, 1f, 1f, 0.62f), ((Component)player).transform); foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if ((Object)(object)item == (Object)null || (Object)(object)item.data == (Object)null || item.data.dead) { continue; } Vector2 val2 = Vector2.op_Implicit(((Component)item).transform.position) - val; float magnitude = ((Vector2)(ref val2)).magnitude; if (!(magnitude > num)) { Vector2 val3 = ((magnitude > 0.001f) ? (val2 / magnitude) : Vector2.up); ReksikUtils.AddVelocity(item, val3 * num3 / Mathf.Max(1f, magnitude)); try { ((Damagable)item.data.healthHandler).TakeDamage(val3 * num2, Vector2.zero, (GameObject)null, player, false, false); } catch { } ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)item).transform.position), 0.8f + 0.1f * (float)(level - 1), 0.13f, new Color(ReksikVfx.TechColor.r, ReksikVfx.TechColor.g, ReksikVfx.TechColor.b, 0.42f), ((Component)item).transform); } } } private void SetHeat(float newHeat) { heat = Mathf.Clamp(newHeat, 0f, HeatCapacity); RefreshRedline(); } private void ResetHeat() { heat = 0f; RefreshRedline(); RefreshVisuals(force: true); } private void RefreshRedline() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) bool flag = heat >= HeatCapacity * 0.7f; if (flag == redlineActive) { return; } redlineActive = flag; if (redlineActive) { ApplyRedlineStats(); if ((Object)(object)player != (Object)null) { ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.18f + 0.16f * (float)(level - 1), 0.18f, new Color(1f, 0.45f, 0.15f, 0.72f), ((Component)player).transform); } } else { RemoveRedlineStats(); } } private void ApplyRedlineStats() { if (!((Object)(object)gun == (Object)null)) { gun.damage = ReksikRuntimeStatMath.ApplyMultiplier(gun.damage, ref appliedDamageMultiplier, RedlineDamageMultiplier, 0.01f); if ((Object)(object)gunAmmo != (Object)null) { gunAmmo.reloadTimeMultiplier = ReksikRuntimeStatMath.ApplyMultiplier(gunAmmo.reloadTimeMultiplier, ref appliedReloadMultiplier, 0.72f, 0.05f); } gun.projectileSpeed = ReksikRuntimeStatMath.ApplyMultiplier(gun.projectileSpeed, ref appliedProjectileSpeedMultiplier, RedlineProjectileSpeedMultiplier, 0.01f); } } private void RemoveRedlineStats() { if (!((Object)(object)gun == (Object)null)) { gun.damage = ReksikRuntimeStatMath.RemoveMultiplier(gun.damage, ref appliedDamageMultiplier, 0.01f); if ((Object)(object)gunAmmo != (Object)null) { gunAmmo.reloadTimeMultiplier = ReksikRuntimeStatMath.RemoveMultiplier(gunAmmo.reloadTimeMultiplier, ref appliedReloadMultiplier, 0.05f); } gun.projectileSpeed = ReksikRuntimeStatMath.RemoveMultiplier(gun.projectileSpeed, ref appliedProjectileSpeedMultiplier, 0.01f); } } private void RefreshVisuals(bool force) { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && (force || !(Time.time < nextVisualUpdate))) { nextVisualUpdate = Time.time + 0.08f; float heatFraction = HeatFraction; float radius = 1.05f + 0.12f * (float)(level - 1) + heatFraction * (0.65f + 0.08f * (float)(level - 1)); Color color = (redlineActive ? new Color(1f, 0.3f, 0.1f, 0.24f + heatFraction * 0.18f) : new Color(ReksikVfx.TechColor.r, ReksikVfx.TechColor.g, ReksikVfx.TechColor.b, 0.12f + heatFraction * 0.16f)); ReksikVfx.SetAura(((Component)player).transform, "FedrHeatAura", enabled: true, radius, color); ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "FedrHeatLabel", new Vector3(0f, 2.05f, 0f), "", redlineActive ? new Color(1f, 0.35f, 0.12f, 0.95f) : new Color(ReksikVfx.TechColor.r, ReksikVfx.TechColor.g, ReksikVfx.TechColor.b, 0.95f)).SetText((redlineActive ? "REDLINE " : "HEAT ") + Mathf.CeilToInt(heat) + "/" + Mathf.CeilToInt(HeatCapacity)); } } } public class KsyushaSecondTakeMono : MonoBehaviour { private struct SafetySnapshot { public float time; public Vector3 position; public float health; public SafetySnapshot(float time, Vector3 position, float health) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) this.time = time; this.position = position; this.health = health; } } private static readonly FieldInfo? PlayerVelocityField = typeof(PlayerVelocity).GetField("velocity", BindingFlags.Instance | BindingFlags.NonPublic); private readonly List history = new List(); private Player player; private Block block; private int level = 1; private float nextSampleTime; private bool wasDead; private const float SampleInterval = 0.1f; private const int BaseHistorySamples = 30; private const int HistorySamplesPerStack = 15; private const float BaseRewindWindow = 2f; private const float RewindWindowPerStack = 1f; private const float RecoveryPerStack = 0.06f; private const float BaseVfxRadius = 3.2f; private const float VfxRadiusPerStack = 0.9f; private int HistoryCapacity => 30 + 15 * (level - 1); private float RewindWindow => 2f + 1f * (float)(level - 1); private float RecoveryFraction => 0.06f * (float)level; private float VfxRadius => 3.2f + 0.9f * (float)(level - 1); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); TrimHistory(); UpdateStatus(); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } block = player.data.block; nextSampleTime = Time.time; wasDead = player.data.dead; if (!wasDead) { RecordSnapshot(); } if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } UpdateStatus(); } private void OnDestroy() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "KsyushaSecondTake"); } } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { if (!wasDead) { history.Clear(); } wasDead = true; return; } if (wasDead) { history.Clear(); nextSampleTime = Time.time; wasDead = false; } if (Time.time >= nextSampleTime) { RecordSnapshot(); nextSampleTime = Time.time + 0.1f; UpdateStatus(); } } private void RecordSnapshot() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { Vector3 position = ((Component)player).transform.position; float health = player.data.health; if (IsFinite(position) && !float.IsNaN(health) && !float.IsInfinity(health) && !(health <= 0f)) { history.Add(new SafetySnapshot(Time.time, position, health)); TrimHistory(); } } } private void TrimHistory() { int num = history.Count - HistoryCapacity; if (num > 0) { history.RemoveRange(0, num); } } private void OnBlock(BlockTriggerType triggerType) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || history.Count == 0) { return; } float num = Time.time - RewindWindow; SafetySnapshot safetySnapshot = history[0]; for (int num2 = history.Count - 1; num2 >= 0; num2--) { if (history[num2].time <= num) { safetySnapshot = history[num2]; break; } } ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), VfxRadius, 0.2f, new Color(0.35f, 0.82f, 1f, 0.62f), ((Component)player).transform); ((Component)player).transform.position = safetySnapshot.position; ZeroVelocity(); float num3 = safetySnapshot.health + player.data.maxHealth * RecoveryFraction; if (num3 > player.data.health) { ReksikUtils.Heal(player, num3 - player.data.health); } ReksikVfx.PlayShockwave(Vector2.op_Implicit(safetySnapshot.position), VfxRadius, 0.25f, new Color(0.75f, 0.95f, 1f, 0.72f), ((Component)player).transform); ReksikVfx.PlayPulse(Vector2.op_Implicit(safetySnapshot.position), VfxRadius * 0.45f, 0.18f, new Color(1f, 1f, 1f, 0.58f), ((Component)player).transform); history.Clear(); RecordSnapshot(); nextSampleTime = Time.time + 0.1f; UpdateStatus(); } private void ZeroVelocity() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) try { if (PlayerVelocityField != null && (Object)(object)player.data.playerVel != (Object)null) { PlayerVelocityField.SetValue(player.data.playerVel, Vector2.zero); } } catch { } try { MoveTransform componentInChildren = ((Component)player).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.velocity = Vector3.zero; } } catch { } } private void UpdateStatus() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { float num = ((history.Count > 1) ? Mathf.Max(0f, history[history.Count - 1].time - history[0].time) : 0f); float num2 = Mathf.Min(RewindWindow, num); ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "KsyushaSecondTake", new Vector3(0f, 2.42f, 0f), string.Empty, new Color(0.65f, 0.92f, 1f, 0.92f)).SetText("TAKE 2 " + num2.ToString("0.0") + "s"); } } private static bool IsFinite(Vector3 value) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!float.IsNaN(value.x) && !float.IsInfinity(value.x) && !float.IsNaN(value.y) && !float.IsInfinity(value.y) && !float.IsNaN(value.z)) { return !float.IsInfinity(value.z); } return false; } } public class MatusovskyCurseMono : MonoBehaviour { private const float DebtThreshold = 100f; private const float SelfDamagePerShotFraction = 0.035f; private const float SelfDamagePerBlockFraction = 0.06f; private Player player; private Gun gun; private Block block; private int level = 1; private float curseDebt; private bool wasDead; private float ShotDebtGain => 18f + 8f * (float)(level - 1); private float BlockDebtGain => 35f + 14f * (float)(level - 1); private float BurstRadius => 7f + 1.5f * (float)(level - 1); private int BurstTargetCount => 1 + (level - 1); private float BurstDamage => 55f + 25f * (float)(level - 1); private float BurstForce => 30f + 10f * (float)(level - 1); private float BurstSlowDuration => 1.8f + 0.45f * (float)(level - 1); private float BurstFearDuration => 1.2f + 0.35f * (float)(level - 1); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); RefreshVisuals(); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; if ((Object)(object)gun == (Object)null || (Object)(object)block == (Object)null) { Object.Destroy((Object)(object)this); return; } curseDebt = 0f; wasDead = player.data.dead; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); RefreshVisuals(); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { if (!wasDead) { wasDead = true; ResetDebt(); } } else if (wasDead) { wasDead = false; ResetDebt(); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "MatusovskyDebt"); ReksikVfx.RemoveStatus(((Component)player).transform, "MatusovskyDebtAura"); } } private void OnShootProjectile(GameObject projectile) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { if ((Object)(object)projectile != (Object)null) { ReksikVfx.AttachSimpleTrail(projectile, new Color(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 0.72f), 0.28f, 0.15f + 0.025f * (float)(level - 1), 0.02f + 0.005f * (float)(level - 1)); } if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.78f + 0.12f * (float)(level - 1), new Color(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 0.88f)); } AddDebt(ShotDebtGain); DealSelfDamage(player.data.maxHealth * 0.035f); } } private void OnBlock(BlockTriggerType triggerType) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { AddDebt(BlockDebtGain); DealSelfDamage(player.data.maxHealth * 0.06f); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 0.95f + 0.12f * (float)(level - 1), 0.14f, new Color(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 0.52f), ((Component)player).transform); } } private void AddDebt(float amount) { curseDebt += amount; while (curseDebt >= 100f) { curseDebt -= 100f; BurstCurse(); } RefreshVisuals(); } private void BurstCurse() { //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } Vector2 center = Vector2.op_Implicit(((Component)player).transform.position); ReksikVfx.PlayShockwave(center, BurstRadius, 0.24f + 0.025f * (float)(level - 1), ReksikVfx.CurseColor, ((Component)player).transform); ReksikVfx.PlayPulse(center, 1.15f + 0.16f * (float)(level - 1), 0.18f, new Color(1f, 1f, 1f, 0.58f), ((Component)player).transform); List list = new List(); foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead && !(Vector2.Distance(center, Vector2.op_Implicit(((Component)item).transform.position)) > BurstRadius)) { list.Add(item); } } list.Sort(delegate(Player a, Player b) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Vector2 val3 = Vector2.op_Implicit(((Component)a).transform.position) - center; float sqrMagnitude = ((Vector2)(ref val3)).sqrMagnitude; val3 = Vector2.op_Implicit(((Component)b).transform.position) - center; float sqrMagnitude2 = ((Vector2)(ref val3)).sqrMagnitude; return sqrMagnitude.CompareTo(sqrMagnitude2); }); int num = 0; foreach (Player item2 in list) { if (num >= BurstTargetCount) { break; } num++; Vector2 val = Vector2.op_Implicit(((Component)item2).transform.position) - center; float magnitude = ((Vector2)(ref val)).magnitude; Vector2 val2 = ((magnitude > 0.001f) ? (val / magnitude) : Vector2.up); SlowDebuffMono.ApplyOrRefresh(item2, BurstSlowDuration, 0.6f); FearDebuffMono.ApplyOrRefresh(item2, BurstFearDuration, 0.8f, 1.12f, 1.12f); ReksikUtils.AddVelocity(item2, val2 * BurstForce); try { ((Damagable)item2.data.healthHandler).TakeDamage(val2 * BurstDamage, Vector2.zero, (GameObject)null, player, false, false); } catch { } ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)item2).transform.position), 0.95f + 0.12f * (float)(level - 1), 0.15f, new Color(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 0.62f), ((Component)item2).transform); } } private void DealSelfDamage(float amount) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) if (amount <= 0f || (Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || (Object)(object)player.data.healthHandler == (Object)null) { return; } try { ((Damagable)player.data.healthHandler).TakeDamage(Vector2.right * amount, Vector2.zero, (GameObject)null, player, true, false); } catch { } } private void ResetDebt() { curseDebt = 0f; RefreshVisuals(); } private void RefreshVisuals() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { float num = curseDebt / 100f; float radius = 1.1f + 0.12f * (float)(level - 1) + num * (0.55f + 0.07f * (float)(level - 1)); ReksikVfx.SetAura(((Component)player).transform, "MatusovskyDebtAura", enabled: true, radius, new Color(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 0.12f + 0.2f * num)); ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "MatusovskyDebt", new Vector3(0f, 2.05f, 0f), "", new Color(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 0.95f)).SetText("CURSE DEBT " + Mathf.CeilToInt(curseDebt) + "/" + Mathf.CeilToInt(100f)); } } } public class MatveyPofigMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private CharacterStatModifiers stats; private int level = 1; private Vector3 lastPos; private float stillTime; private int chillStacks; private float currentMoveMultiplier = 1f; private const float StillSpeedThreshold = 0.22f; private int MaxStacks => 10 + 4 * (level - 1); private float StackInterval => Mathf.Max(0.5f, 1.2f - 0.08f * (float)(level - 1)); private float DamagePerStack => 0.2f + 0.05f * (float)(level - 1); private float MovePenaltyPerStack => Mathf.Max(0.015f, 0.04f - 0.004f * (float)(level - 1)); private float ChillWaveRadius => 9f + 0.8f * (float)(level - 1); private float ChillWaveSlowMultiplier => Mathf.Clamp(0.7f - 0.03f * (float)(level - 1), 0.45f, 0.7f); private float ChillWaveDuration => 2.8f + 0.4f * (float)(level - 1); private float ChillWaveHealFractionPerEnemy => Mathf.Clamp(0.04f + 0.01f * (float)(level - 1), 0.04f, 0.1f); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); } private void Start() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; stats = player.data.stats; lastPos = ((Component)player).transform.position; stillTime = 0f; chillStacks = 0; currentMoveMultiplier = 1f; if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "MatveyStacks"); ReksikVfx.RemoveStatus(((Component)player).transform, "MatveyChillAura"); } RestoreMoveSpeed(); } private void RestoreMoveSpeed() { if (!((Object)(object)stats == (Object)null)) { if (Mathf.Abs(currentMoveMultiplier) < 0.001f) { currentMoveMultiplier = 1f; } if (Mathf.Abs(currentMoveMultiplier - 1f) < 0.001f) { currentMoveMultiplier = 1f; return; } stats.movementSpeed /= currentMoveMultiplier; currentMoveMultiplier = 1f; } } private void ApplyMoveMultiplier(float newMultiplier) { if (!((Object)(object)stats == (Object)null)) { if (Mathf.Abs(currentMoveMultiplier) < 0.001f) { currentMoveMultiplier = 1f; } float num = stats.movementSpeed / currentMoveMultiplier; stats.movementSpeed = num * newMultiplier; currentMoveMultiplier = newMultiplier; } } private void Update() { //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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { stillTime = 0f; chillStacks = 0; lastPos = ((Component)player).transform.position; ReksikVfx.RemoveStatus(((Component)player).transform, "MatveyStacks"); ReksikVfx.RemoveStatus(((Component)player).transform, "MatveyChillAura"); RestoreMoveSpeed(); return; } Vector3 position = ((Component)player).transform.position; Vector3 val = position - lastPos; float num = ((Vector3)(ref val)).magnitude / Mathf.Max(Time.deltaTime, 0.0001f); lastPos = position; if (num <= 0.22f) { stillTime += Time.deltaTime; int num2 = Mathf.Min(MaxStacks, Mathf.FloorToInt(stillTime / StackInterval)); if (num2 != chillStacks) { chillStacks = num2; float newMultiplier = Mathf.Max(0.2f, 1f - (float)chillStacks * MovePenaltyPerStack); ApplyMoveMultiplier(newMultiplier); float num3 = Mathf.Clamp(0.1f + 0.03f * (float)chillStacks, 0.1f, 0.55f); float radius = 1.1f + 0.04f * (float)chillStacks; ReksikVfx.SetAura(((Component)player).transform, "MatveyChillAura", enabled: true, radius, new Color(ReksikVfx.ChillColor.r, ReksikVfx.ChillColor.g, ReksikVfx.ChillColor.b, num3)); } } else { stillTime = 0f; if (chillStacks != 0) { chillStacks = 0; ReksikVfx.RemoveStatus(((Component)player).transform, "MatveyChillAura"); RestoreMoveSpeed(); } } if (chillStacks > 0) { ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "MatveyStacks", new Vector3(0f, 2.05f, 0f), "", ReksikVfx.ChillColor).SetText("CHILL " + chillStacks); } else { ReksikVfx.RemoveStatus(((Component)player).transform, "MatveyStacks"); } } private void OnShootProjectile(GameObject projectile) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !((Object)(object)projectile == (Object)null)) { ReksikVfx.AttachSimpleTrail(projectile, new Color(ReksikVfx.ChillColor.r, ReksikVfx.ChillColor.g, ReksikVfx.ChillColor.b, 0.7f), 0.35f, 0.14f, 0.01f); ProjectileHit component = projectile.GetComponent(); if (!((Object)(object)component == (Object)null) && chillStacks > 0) { float num = 1f + (float)chillStacks * DamagePerStack; component.damage *= num; Transform transform = projectile.transform; transform.localScale *= Mathf.Clamp(1f + 0.02f * (float)chillStacks, 1f, 1.25f); ReksikVfx.PlayPulse(Vector2.op_Implicit(projectile.transform.position), 1.1f, 0.16f, new Color(ReksikVfx.ChillColor.r, ReksikVfx.ChillColor.g, ReksikVfx.ChillColor.b, 0.55f)); chillStacks = 0; stillTime = 0f; ReksikVfx.RemoveStatus(((Component)player).transform, "MatveyChillAura"); RestoreMoveSpeed(); ReksikVfx.RemoveStatus(((Component)player).transform, "MatveyStacks"); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { return; } float num = ReksikBonds.BondPower(player, ReksikBondId.LongGame); float num2 = ChillWaveRadius + 0.9f * num; float duration = ChillWaveDuration + 0.45f * num; float num3 = ChillWaveHealFractionPerEnemy + 0.008f * num; Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); ReksikVfx.PlayShockwave(val, num2, 0.22f + 0.015f * num, new Color(ReksikVfx.ChillColor.r, ReksikVfx.ChillColor.g, ReksikVfx.ChillColor.b, 0.55f)); int num4 = 0; foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead && !(Vector2.Distance(val, Vector2.op_Implicit(((Component)item).transform.position)) > num2)) { SlowDebuffMono.ApplyOrRefresh(item, duration, ChillWaveSlowMultiplier); num4++; } } if (num4 > 0) { float num5 = num3 * (float)num4; ReksikUtils.Heal(player, player.data.maxHealth * num5); ReksikVfx.PlayPulse(val, 1.1f + 0.12f * num, 0.18f + 0.01f * num, new Color(1f, 1f, 1f, 0.4f)); } } } public class MaximGrowthMono : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private CharacterStatModifiers stats; private int level = 1; private int pendingRecalcFrames; private int growthStacks; private float nextTickTime; private float appliedDamageMultiplier = 1f; private float appliedReloadMultiplier = 1f; private float appliedMoveMultiplier = 1f; private float appliedSizeMultiplier = 1f; private float TickInterval => Mathf.Max(0.6f, 1.45f * Mathf.Pow(0.93f, (float)(level - 1))); private int MaxStacks => 10 + 3 * (level - 1); private float DamagePerStack => 0.18f + 0.06f * (float)(level - 1); private float ReloadReductionPerStack => 0.04f + 0.01f * (float)(level - 1); private float MoveSpeedPerStack => 0.03f + 0.01f * (float)(level - 1); private float SizePerStack => 0.015f + 0.005f * (float)(level - 1); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); pendingRecalcFrames = 2; } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; gunAmmo = (((Object)(object)gun != (Object)null) ? ((Component)gun).GetComponentInChildren() : null); stats = player.data.stats; if ((Object)(object)gun == (Object)null || (Object)(object)stats == (Object)null) { Object.Destroy((Object)(object)this); return; } growthStacks = 0; nextTickTime = Time.time + TickInterval; ApplyGrowth(); } private void Update() { //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { growthStacks = 0; nextTickTime = Time.time + TickInterval; ApplyGrowth(); ReksikVfx.RemoveStatus(((Component)player).transform, "MaximGrowth"); return; } if (pendingRecalcFrames > 0) { pendingRecalcFrames--; if (pendingRecalcFrames == 0) { ApplyGrowth(); } } if (Time.time >= nextTickTime) { nextTickTime = Time.time + TickInterval; if (growthStacks < MaxStacks) { growthStacks++; ApplyGrowth(); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.05f, 0.14f, new Color(ReksikVfx.GrowthColor.r, ReksikVfx.GrowthColor.g, ReksikVfx.GrowthColor.b, 0.45f)); } } if (growthStacks > 0) { ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "MaximGrowth", new Vector3(0f, 2.05f, 0f), "", new Color(ReksikVfx.GrowthColor.r, ReksikVfx.GrowthColor.g, ReksikVfx.GrowthColor.b, 0.95f)).SetText("GROWTH " + growthStacks); } else { ReksikVfx.RemoveStatus(((Component)player).transform, "MaximGrowth"); } } private void ApplyGrowth() { if (!((Object)(object)gun == (Object)null) && !((Object)(object)stats == (Object)null)) { float newMultiplier = 1f + (float)growthStacks * DamagePerStack; float newMultiplier2 = Mathf.Max(0.12f, 1f - (float)growthStacks * ReloadReductionPerStack); float newMultiplier3 = 1f + (float)growthStacks * MoveSpeedPerStack; float newMultiplier4 = 1f + (float)growthStacks * SizePerStack; gun.damage = ReksikRuntimeStatMath.ApplyMultiplier(gun.damage, ref appliedDamageMultiplier, newMultiplier, 0.01f); if ((Object)(object)gunAmmo != (Object)null) { gunAmmo.reloadTimeMultiplier = ReksikRuntimeStatMath.ApplyMultiplier(gunAmmo.reloadTimeMultiplier, ref appliedReloadMultiplier, newMultiplier2, 0.12f); } stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, newMultiplier3, 0.01f); stats.sizeMultiplier = ReksikRuntimeStatMath.ApplyMultiplier(stats.sizeMultiplier, ref appliedSizeMultiplier, newMultiplier4, 0.01f); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { gun.damage = ReksikRuntimeStatMath.RemoveMultiplier(gun.damage, ref appliedDamageMultiplier, 0.01f); } if ((Object)(object)gunAmmo != (Object)null) { gunAmmo.reloadTimeMultiplier = ReksikRuntimeStatMath.RemoveMultiplier(gunAmmo.reloadTimeMultiplier, ref appliedReloadMultiplier, 0.12f); } if ((Object)(object)stats != (Object)null) { stats.movementSpeed = ReksikRuntimeStatMath.RemoveMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, 0.01f); stats.sizeMultiplier = ReksikRuntimeStatMath.RemoveMultiplier(stats.sizeMultiplier, ref appliedSizeMultiplier, 0.01f); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "MaximGrowth"); } } } public class NazarNewbieMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private CharacterStatModifiers stats; private int level = 1; private bool firstShotReady; private bool trainingShotReady; private int trainingType; private float trainingExpireTime; private float nextPanicTime; private bool panicActive; private float panicEndTime; private float appliedPanicMoveMultiplier = 1f; private float appliedPanicBlockCdMultiplier = 1f; private float FirstShotDamageMultiplier => 1.8f + 0.25f * (float)(level - 1); private float PanicDuration => 1.8f + 0.35f * (float)(level - 1); private float PanicCooldown => Mathf.Max(1.6f, 4f * Mathf.Pow(0.88f, (float)(level - 1))); private float PanicMoveMultiplier => 1.4f + 0.08f * (float)(level - 1); private float PanicBlockCdMultiplier => Mathf.Clamp(0.5f - 0.03f * (float)(level - 1), 0.22f, 0.5f); private float PanicHealFraction => Mathf.Clamp(0.12f + 0.03f * (float)(level - 1), 0.05f, 0.35f); private float TrainingDuration => 4f + 0.5f * (float)(level - 1); private float TrainingDamageMultiplier => 1.35f + 0.12f * (float)(level - 1); private float TrainingProjectileSpeedMultiplier => 1.25f + 0.1f * (float)(level - 1); private float TrainingSizeMultiplier => 1.12f + 0.06f * (float)(level - 1); private float ComfortHealOnBlockFraction => Mathf.Clamp(0.03f + 0.01f * (float)(level - 1), 0.03f, 0.12f); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; stats = player.data.stats; firstShotReady = true; trainingShotReady = false; trainingType = 0; trainingExpireTime = 0f; nextPanicTime = 0f; panicActive = false; panicEndTime = 0f; if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj2 = stats; obj2.WasDealtDamageAction = (Action)Delegate.Combine(obj2.WasDealtDamageAction, new Action(OnDamaged)); } if ((Object)(object)block != (Object)null) { Block obj3 = block; obj3.BlockAction = (Action)Delegate.Combine(obj3.BlockAction, new Action(OnBlock)); } } private void OnDestroy() { EndPanic(); if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj2 = stats; obj2.WasDealtDamageAction = (Action)Delegate.Remove(obj2.WasDealtDamageAction, new Action(OnDamaged)); } if ((Object)(object)block != (Object)null) { Block obj3 = block; obj3.BlockAction = (Action)Delegate.Remove(obj3.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "NazarTraining"); ReksikVfx.RemoveStatus(((Component)player).transform, "NazarPanicAura"); } } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { firstShotReady = true; trainingShotReady = false; trainingExpireTime = 0f; if (panicActive) { EndPanic(); } } else { if (panicActive && Time.time >= panicEndTime) { EndPanic(); } if (trainingShotReady && Time.time > trainingExpireTime) { trainingShotReady = false; } } } private void OnShootProjectile(GameObject projectile) { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || (Object)(object)projectile == (Object)null) { return; } ProjectileHit component = projectile.GetComponent(); if (!((Object)(object)component == (Object)null)) { if (firstShotReady) { component.damage *= FirstShotDamageMultiplier; firstShotReady = false; Transform transform = projectile.transform; transform.localScale *= 1.05f; ReksikVfx.PlayPulse(Vector2.op_Implicit(projectile.transform.position), 1.05f, 0.14f, new Color(1f, 0.95f, 0.35f, 0.55f)); } if (trainingShotReady && Time.time <= trainingExpireTime) { ApplyTrainingBuff(projectile, component); trainingShotReady = false; } } } private void ApplyTrainingBuff(GameObject projectile, ProjectileHit ph) { //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectile == (Object)null || (Object)(object)ph == (Object)null) { return; } switch (trainingType) { case 0: ph.damage *= TrainingDamageMultiplier; break; case 1: { MoveTransform component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.velocity *= TrainingProjectileSpeedMultiplier; } break; } default: { Transform transform = projectile.transform; transform.localScale *= TrainingSizeMultiplier; break; } } ReksikVfx.AttachSimpleTrail(projectile, new Color(1f, 0.95f, 0.35f, 0.65f), 0.3f, 0.14f, 0.01f); } private void OnBlock(BlockTriggerType triggerType) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { trainingShotReady = true; trainingType = Random.Range(0, 3); trainingExpireTime = Time.time + TrainingDuration; string text = ((trainingType == 0) ? "TRAIN: DMG" : ((trainingType == 1) ? "TRAIN: SPEED" : "TRAIN: SIZE")); StatusTextVfxMono orCreateStatusText = ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "NazarTraining", new Vector3(0f, 2.05f, 0f), text, new Color(1f, 0.95f, 0.35f, 0.95f)); orCreateStatusText.SetText(text); orCreateStatusText.SetTimed(TrainingDuration); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.1f, 0.18f, new Color(1f, 0.95f, 0.35f, 0.55f)); ReksikUtils.Heal(player, player.data.maxHealth * ComfortHealOnBlockFraction); } } private void OnDamaged(Vector2 damage, bool selfDamage) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !selfDamage && !((Object)(object)player.data.lastSourceOfDamage == (Object)null) && player.data.lastSourceOfDamage.teamID != player.teamID && !(Time.time < nextPanicTime)) { nextPanicTime = Time.time + PanicCooldown; StartOrRefreshPanic(); } } private void StartOrRefreshPanic() { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)stats == (Object)null) && !((Object)(object)block == (Object)null)) { panicActive = true; panicEndTime = Mathf.Max(panicEndTime, Time.time + PanicDuration); stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedPanicMoveMultiplier, PanicMoveMultiplier, 0.01f); block.cdMultiplier = ReksikRuntimeStatMath.ApplyMultiplier(block.cdMultiplier, ref appliedPanicBlockCdMultiplier, PanicBlockCdMultiplier, 0.01f); if ((Object)(object)player != (Object)null) { ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)player).transform.position), 8f + 0.25f * (float)(level - 1), 0.18f, new Color(1f, 0.85f, 0.2f, 0.55f), ((Component)player).transform); ReksikVfx.SetAura(((Component)player).transform, "NazarPanicAura", enabled: true, 1.35f, new Color(1f, 0.85f, 0.2f, 0.22f)); } if ((Object)(object)player != (Object)null && (Object)(object)player.data != (Object)null) { float amount = player.data.maxHealth * PanicHealFraction; ReksikUtils.Heal(player, amount); } } } private void EndPanic() { if (!panicActive) { return; } panicActive = false; panicEndTime = 0f; try { if ((Object)(object)stats != (Object)null) { stats.movementSpeed = ReksikRuntimeStatMath.RemoveMultiplier(stats.movementSpeed, ref appliedPanicMoveMultiplier, 0.01f); } if ((Object)(object)block != (Object)null) { block.cdMultiplier = ReksikRuntimeStatMath.RemoveMultiplier(block.cdMultiplier, ref appliedPanicBlockCdMultiplier, 0.01f); } } catch { } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "NazarPanicAura"); } } } public class OneAndMinusOneMono : MonoBehaviour { private Player player; private Gun gun; private int level = 1; private bool preparationNext = true; private float storedCharge; private float lastProjectileTime = -999f; private bool burstIsPreparation; private float burstCharge; private const float BurstWindow = 0.035f; private const float PreparationDamageMultiplier = 0.62f; private const float PreparationSizeMultiplier = 0.78f; private const float PreparationSpeedMultiplier = 0.88f; private const float DamageBonusPerCharge = 0.55f; private const float SizeBonusPerCharge = 0.15f; private const float SpeedBonusPerCharge = 0.16f; private const float HealFractionPerCharge = 0.025f; private float ChargePerPreparation => level; public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); UpdateStatus(); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } UpdateStatus(); } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "OneAndMinusOne"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && player.data.dead) { preparationNext = true; storedCharge = 0f; burstCharge = 0f; } } private void OnShootProjectile(GameObject projectile) { if (!((Object)(object)projectile == (Object)null) && !((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { bool num = Time.time - lastProjectileTime > 0.035f; lastProjectileTime = Time.time; if (num) { BeginBurst(); } if (burstIsPreparation) { ApplyPreparation(projectile); } else { ApplyPayoff(projectile, burstCharge); } } } private void BeginBurst() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) burstIsPreparation = preparationNext; preparationNext = !preparationNext; if (burstIsPreparation) { storedCharge += ChargePerPreparation; burstCharge = 0f; ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.4f + 0.22f * (float)level, 0.14f, new Color(0.95f, 0.3f, 0.38f, 0.52f), ((Component)player).transform); } else { burstCharge = storedCharge; storedCharge = 0f; if (burstCharge > 0f) { ReksikUtils.Heal(player, player.data.maxHealth * 0.025f * burstCharge); } float num = 1.8f + 0.42f * burstCharge; ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)player).transform.position), num, 0.2f, new Color(0.4f, 1f, 0.58f, 0.68f), ((Component)player).transform); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), num * 0.45f, 0.15f, new Color(1f, 1f, 1f, 0.58f), ((Component)player).transform); } UpdateStatus(); } private void ApplyPreparation(GameObject projectile) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage *= 0.62f; } Transform transform = projectile.transform; transform.localScale *= 0.78f; MoveTransform component2 = projectile.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity *= 0.88f; } ReksikVfx.AttachSimpleTrail(projectile, new Color(1f, 0.28f, 0.38f, 0.7f), 0.18f, 0.1f + 0.012f * (float)level, 0.01f); if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.34f + 0.04f * (float)level, new Color(1f, 0.3f, 0.38f, 0.72f)); } } private void ApplyPayoff(GameObject projectile, float charge) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(0f, charge); ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage *= 1f + 0.55f * num; } Transform transform = projectile.transform; transform.localScale *= 1f + 0.15f * num; MoveTransform component2 = projectile.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity *= 1f + 0.16f * num; } ReksikVfx.AttachSimpleTrail(projectile, new Color(0.38f, 1f, 0.55f, 0.82f), 0.22f + 0.025f * num, 0.12f + 0.025f * num, 0.015f); if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.42f + 0.08f * num, new Color(0.42f, 1f, 0.58f, 0.88f)); } } private void UpdateStatus() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { bool num = preparationNext; Color color = (num ? new Color(1f, 0.48f, 0.52f, 0.95f) : new Color(0.5f, 1f, 0.62f, 0.95f)); string text = (num ? "-1 PREP" : ("+1 x" + storedCharge.ToString("0"))); StatusTextVfxMono orCreateStatusText = ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "OneAndMinusOne", new Vector3(0f, 2.18f, 0f), string.Empty, color); orCreateStatusText.SetColor(color); orCreateStatusText.SetText(text); } } } public class ReksikBondSystemMono : MonoBehaviour { private const string StatusKey = "ReksikBondsStatus"; private const string AuraKey = "ReksikBondsAura"; private const float RefreshInterval = 0.2f; private Player player; private float nextRefreshTime; private string lastSignature = string.Empty; private bool visualsVisible; public static ReksikBondSystemMono GetOrAdd(Player player) { if ((Object)(object)player == (Object)null) { return null; } ReksikBondSystemMono reksikBondSystemMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)reksikBondSystemMono == (Object)null) { reksikBondSystemMono = ((Component)player).gameObject.AddComponent(); } return reksikBondSystemMono; } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } nextRefreshTime = Time.time; RefreshVisuals(force: true); } private void OnEnable() { nextRefreshTime = Time.time; } private void OnDisable() { ClearVisuals(); } private void OnDestroy() { ClearVisuals(); } private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !(Time.time < nextRefreshTime)) { nextRefreshTime = Time.time + 0.2f; RefreshVisuals(force: false); } } public void RefreshNow() { RefreshVisuals(force: true); } private void RefreshVisuals(bool force) { //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || !ReksikHostSettings.BondsEnabled) { ClearVisuals(); return; } List list = new List(ReksikBonds.ActiveBonds(player)); if (list.Count == 0) { ClearVisuals(); return; } StringBuilder stringBuilder = new StringBuilder("BONDS"); StringBuilder stringBuilder2 = new StringBuilder(); int num = 0; for (int i = 0; i < list.Count; i++) { ReksikActiveBond reksikActiveBond = list[i]; num += reksikActiveBond.CombinedLevel; stringBuilder.Append((i == 0) ? " " : " | "); stringBuilder.Append(reksikActiveBond.Definition.CompactName); stringBuilder.Append(reksikActiveBond.CombinedLevel); stringBuilder2.Append((int)reksikActiveBond.Definition.Id); stringBuilder2.Append(':'); stringBuilder2.Append(reksikActiveBond.CombinedLevel); stringBuilder2.Append(';'); } string text = stringBuilder2.ToString(); if (force || !visualsVisible || !(text == lastSignature)) { lastSignature = text; visualsVisible = true; Color val = BondColor(list.Count); StatusTextVfxMono orCreateStatusText = ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "ReksikBondsStatus", new Vector3(0f, 2.62f, 0f), stringBuilder.ToString(), val); orCreateStatusText.SetColor(val); orCreateStatusText.SetText(stringBuilder.ToString()); float radius = 1.05f + 0.08f * (float)num; ReksikVfx.SetAura(((Component)player).transform, "ReksikBondsAura", enabled: true, radius, new Color(val.r, val.g, val.b, 0.1f)); } } private void ClearVisuals() { if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "ReksikBondsStatus"); ReksikVfx.RemoveStatus(((Component)player).transform, "ReksikBondsAura"); } visualsVisible = false; lastSignature = string.Empty; } private static Color BondColor(int activeCount) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Repeat((float)(activeCount - 1) * 0.17f, 1f); Color val = new Color(0.3f, 0.86f, 1f, 0.95f); Color val2 = default(Color); ((Color)(ref val2))..ctor(1f, 0.46f, 0.72f, 0.95f); return Color.Lerp(val, val2, num); } } public class ReksikStackTrackerMono : MonoBehaviour { private readonly Dictionary stacks = new Dictionary(); public static ReksikStackTrackerMono GetOrAdd(Player player) { if ((Object)(object)player == (Object)null) { return null; } ReksikStackTrackerMono reksikStackTrackerMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)reksikStackTrackerMono == (Object)null) { reksikStackTrackerMono = ((Component)player).gameObject.AddComponent(); } return reksikStackTrackerMono; } public int Get(string key) { if (string.IsNullOrEmpty(key)) { return 0; } if (stacks.TryGetValue(key, out var value)) { return value; } return 0; } public int Add(string key) { if (string.IsNullOrEmpty(key)) { return 0; } int num = Get(key) + 1; stacks[key] = num; return num; } public int Remove(string key) { if (string.IsNullOrEmpty(key)) { return 0; } int num = Get(key) - 1; if (num <= 0) { stacks.Remove(key); return 0; } stacks[key] = num; return num; } public void Set(string key, int value) { if (!string.IsNullOrEmpty(key)) { if (value <= 0) { stacks.Remove(key); } else { stacks[key] = value; } } } } public class RetiredTankerVeteranMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private int level = 1; private int veteranShots; private float lastChargeTime; private const string ShotsTextKey = "VeteranShots"; private const string AuraKey = "VeteranAura"; private int MaxStoredShots => 6 + 3 * (level - 1); private int ShotsPerBlock => 2 + Mathf.FloorToInt(0.5f * (float)(level - 1)); private float ChargeCooldown => Mathf.Max(0.35f, 0.9f * Mathf.Pow(0.92f, (float)(level - 1))); private float VeteranDamageMul => 1.85f + 0.28f * (float)(level - 1); private float VeteranSpeedMul => 1.25f + 0.08f * (float)(level - 1); private float VeteranSizeMul => 1.1f + 0.04f * (float)(level - 1); private float HealPerVeteranShot => 6f + 2f * (float)(level - 1); private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Combine(obj2.ShootPojectileAction, new Action(OnShootProjectile)); } } public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); veteranShots = Mathf.Clamp(veteranShots, 0, MaxStoredShots); } private void OnDestroy() { try { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Remove(obj2.ShootPojectileAction, new Action(OnShootProjectile)); } } catch { } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "VeteranShots"); ReksikVfx.RemoveStatus(((Component)player).transform, "VeteranAura"); } } private void Update() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { if (player.data.dead) { veteranShots = 0; } if (veteranShots > 0) { ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "VeteranShots", new Vector3(0f, 2.05f, 0f), "VET", new Color(0.65f, 0.65f, 0.7f, 0.95f)).SetText($"VET {veteranShots}"); ReksikVfx.SetAura(((Component)player).transform, "VeteranAura", enabled: true, 1.35f + 0.05f * (float)(level - 1), new Color(0.65f, 0.65f, 0.7f, 0.18f)); } else { ReksikVfx.RemoveStatus(((Component)player).transform, "VeteranShots"); ReksikVfx.RemoveStatus(((Component)player).transform, "VeteranAura"); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !(Time.time - lastChargeTime < ChargeCooldown)) { lastChargeTime = Time.time; veteranShots = Mathf.Clamp(veteranShots + ShotsPerBlock, 0, MaxStoredShots); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.05f, 0.14f, new Color(0.75f, 0.75f, 0.8f, 0.55f)); ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)player).transform.position), 6.5f, 0.14f, new Color(0.75f, 0.75f, 0.8f, 0.4f)); } } private void OnShootProjectile(GameObject projectile) { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !((Object)(object)projectile == (Object)null) && veteranShots > 0) { veteranShots = Mathf.Max(0, veteranShots - 1); ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage *= VeteranDamageMul; } MoveTransform component2 = projectile.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.localForce *= VeteranSpeedMul; } Transform transform = projectile.transform; transform.localScale *= VeteranSizeMul; ReksikUtils.Heal(player, HealPerVeteranShot); ReksikVfx.PlayMuzzleFlash(projectile.transform, 0.14f, new Color(0.85f, 0.85f, 0.9f, 0.75f)); } } } public class RexBossMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private CharacterStatModifiers stats; private int level = 1; private bool pendingRecalcBase; private float rageStored; private float bossProtocolCharge; private int currentPhase = -1; private bool wasDead; private float lastRoarTime; private float appliedDamageMultiplier = 1f; private float appliedReloadMultiplier = 1f; private float appliedProjSpeedMultiplier = 1f; private int appliedProjectilesAdd; private float appliedMoveMultiplier = 1f; private float appliedBlockCdMultiplier = 1f; private const float BaseRageAbsorb = 0.55f; private const float BaseRageCap = 550f; private const float BaseRoarRadius = 10f; private const float BaseRoarForce = 60f; private const float BaseRoarCooldown = 1.25f; private const float BaseRoarFearDuration = 2.25f; private float RageAbsorb => Mathf.Clamp(0.55f + 0.06f * (float)(level - 1), 0.25f, 0.95f); private float RageCap => 550f + 320f * (float)(level - 1); private float RoarRadius => 10f + 1.1f * (float)(level - 1); private float RoarForce => 60f + 14f * (float)(level - 1); private float RoarCooldown { get { float num = Mathf.Pow(0.9f, (float)(level - 1)); return Mathf.Max(0.4f, 1.25f * num); } } private float RoarFearDuration => 2.25f + 0.55f * (float)(level - 1); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); pendingRecalcBase = true; } private void Start() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; stats = player.data.stats; ReksikVfx.SetAura(((Component)player).transform, "RexBossAura", enabled: true, 1.35f, new Color(ReksikVfx.BossColor.r, ReksikVfx.BossColor.g, ReksikVfx.BossColor.b, 0.35f)); CharacterStatModifiers obj = stats; obj.WasDealtDamageAction = (Action)Delegate.Combine(obj.WasDealtDamageAction, new Action(WasDealtDamage)); Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Combine(obj2.ShootPojectileAction, new Action(OnShootProjectile)); Block obj3 = block; obj3.BlockAction = (Action)Delegate.Combine(obj3.BlockAction, new Action(OnBlock)); ApplyPhase(0); currentPhase = 0; wasDead = player.data.dead; pendingRecalcBase = false; } private void OnDestroy() { if ((Object)(object)stats != (Object)null) { CharacterStatModifiers obj = stats; obj.WasDealtDamageAction = (Action)Delegate.Remove(obj.WasDealtDamageAction, new Action(WasDealtDamage)); } if ((Object)(object)gun != (Object)null) { Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Remove(obj2.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj3 = block; obj3.BlockAction = (Action)Delegate.Remove(obj3.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { gun.damage = ReksikRuntimeStatMath.RemoveMultiplier(gun.damage, ref appliedDamageMultiplier, 0.01f); gun.reloadTime = ReksikRuntimeStatMath.RemoveMultiplier(gun.reloadTime, ref appliedReloadMultiplier, 0.15f); gun.projectileSpeed = ReksikRuntimeStatMath.RemoveMultiplier(gun.projectileSpeed, ref appliedProjSpeedMultiplier, 0.01f); gun.numberOfProjectiles = ReksikRuntimeStatMath.RemoveAdditive(gun.numberOfProjectiles, ref appliedProjectilesAdd, 1); } if ((Object)(object)stats != (Object)null) { stats.movementSpeed = ReksikRuntimeStatMath.RemoveMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, 0.01f); } if ((Object)(object)block != (Object)null) { block.cdMultiplier = ReksikRuntimeStatMath.RemoveMultiplier(block.cdMultiplier, ref appliedBlockCdMultiplier, 0.01f); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "RexBossAura"); ReksikVfx.RemoveStatus(((Component)player).transform, "RexRage"); } } private void Update() { //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { if (!wasDead) { bossProtocolCharge = 0f; } wasDead = true; return; } if (wasDead) { wasDead = false; bossProtocolCharge = 0f; } if (ReksikBonds.BondPower(player, ReksikBondId.BossProtocol) <= 0f) { bossProtocolCharge = 0f; } if (pendingRecalcBase) { pendingRecalcBase = false; ApplyPhase(Mathf.Max(0, currentPhase)); } float num = ReksikUtils.HealthFraction(player); int num2 = ((!(num > 0.66f)) ? ((num > 0.33f) ? 1 : 2) : 0); if (num2 != currentPhase) { ApplyPhase(num2); currentPhase = num2; } if (rageStored > 1f || bossProtocolCharge > 0f) { StatusTextVfxMono orCreateStatusText = ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "RexRage", new Vector3(0f, 2.05f, 0f), "", ReksikVfx.BossColor); string text = "RAGE " + Mathf.CeilToInt(rageStored); if (bossProtocolCharge > 0f) { text = text + " | PROTOCOL " + Mathf.CeilToInt(bossProtocolCharge); } orCreateStatusText.SetText(text); orCreateStatusText.SetColor(new Color(ReksikVfx.BossColor.r, ReksikVfx.BossColor.g, ReksikVfx.BossColor.b, 0.95f)); } else { ReksikVfx.RemoveStatus(((Component)player).transform, "RexRage"); } } private void GetPhaseModifiers(int phase, out float dmgMul, out float reloadMul, out float speedMul, out int projAdd, out float moveMul, out float blockCdMul) { switch (phase) { case 0: dmgMul = 1f; reloadMul = 1f; speedMul = 1f; projAdd = 0; moveMul = 0.9f; blockCdMul = 1f; break; case 1: dmgMul = 1.2f; reloadMul = 0.85f; speedMul = 1.15f; projAdd = 1; moveMul = 1f; blockCdMul = 0.85f; break; default: dmgMul = 1.5f; reloadMul = 0.65f; speedMul = 1.35f; projAdd = 1; moveMul = 1.1f; blockCdMul = 0.7f; break; } } private void ApplyPhase(int phase) { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)gun == (Object)null) && !((Object)(object)stats == (Object)null) && !((Object)(object)block == (Object)null) && !((Object)(object)player == (Object)null)) { GetPhaseModifiers(phase, out var dmgMul, out var reloadMul, out var speedMul, out var projAdd, out var moveMul, out var blockCdMul); ReksikVfx.SetAura(((Component)player).transform, "RexBossAura", enabled: true, phase switch { 1 => 1.55f, 0 => 1.35f, _ => 1.85f, }, new Color(ReksikVfx.BossColor.r, ReksikVfx.BossColor.g, ReksikVfx.BossColor.b, phase switch { 1 => 0.36f, 0 => 0.28f, _ => 0.48f, })); gun.damage = ReksikRuntimeStatMath.ApplyMultiplier(gun.damage, ref appliedDamageMultiplier, dmgMul, 0.01f); gun.reloadTime = ReksikRuntimeStatMath.ApplyMultiplier(gun.reloadTime, ref appliedReloadMultiplier, reloadMul, 0.15f); gun.projectileSpeed = ReksikRuntimeStatMath.ApplyMultiplier(gun.projectileSpeed, ref appliedProjSpeedMultiplier, speedMul, 0.01f); gun.numberOfProjectiles = ReksikRuntimeStatMath.ApplyAdditive(gun.numberOfProjectiles, ref appliedProjectilesAdd, projAdd, 1); stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, moveMul, 0.01f); block.cdMultiplier = ReksikRuntimeStatMath.ApplyMultiplier(block.cdMultiplier, ref appliedBlockCdMultiplier, blockCdMul, 0.01f); } } private void WasDealtDamage(Vector2 damage, bool selfDamage) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !selfDamage && !((Object)(object)player.data.lastSourceOfDamage == (Object)null) && player.data.lastSourceOfDamage.teamID != player.teamID) { float magnitude = ((Vector2)(ref damage)).magnitude; rageStored += magnitude * RageAbsorb; rageStored = Mathf.Min(rageStored, RageCap); float num = ReksikBonds.BondPower(player, ReksikBondId.BossProtocol); if (num > 0f && (Object)(object)((Component)player.data.lastSourceOfDamage).gameObject.GetComponent() != (Object)null) { bossProtocolCharge += magnitude * 0.22f * num; } } } private void OnShootProjectile(GameObject projectile) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.9f, ReksikVfx.BossColor); } if ((Object)(object)projectile != (Object)null) { ReksikVfx.AttachSimpleTrail(projectile, ReksikVfx.BossColor, 0.35f, 0.22f, 0.01f); } float num = ((ReksikBonds.BondPower(player, ReksikBondId.BossProtocol) > 0f) ? bossProtocolCharge : 0f); if ((!(rageStored <= 0f) || !(num <= 0f)) && !((Object)(object)projectile == (Object)null)) { ProjectileHit component = projectile.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.damage += rageStored + num; Transform transform = projectile.transform; transform.localScale *= 1.05f + 0.0025f * num; ReksikVfx.PlayPulse(Vector2.op_Implicit(projectile.transform.position), 1.2f + 0.008f * num, 0.18f + 0.0015f * num, ReksikVfx.BossColor); rageStored = 0f; bossProtocolCharge = 0f; } } } private void OnBlock(BlockTriggerType triggerType) { //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || Time.time - lastRoarTime < RoarCooldown) { return; } lastRoarTime = Time.time; float num = ReksikBonds.BondPower(player, ReksikBondId.BossProtocol); float num2 = RoarRadius + 1.25f * num; Vector2 worldPos = Vector2.op_Implicit(((Component)player).transform.position); ReksikVfx.PlayShockwave(worldPos, num2, 0.25f + 0.012f * num, ReksikVfx.BossColor); ReksikVfx.PlayPulse(worldPos, 1.25f + 0.1f * num, 0.2f + 0.008f * num, new Color(1f, 1f, 1f, 0.65f)); try { Vector2 val = Vector2.op_Implicit(((Component)player.data.weaponHandler.gun).transform.right); if (((Vector2)(ref val)).sqrMagnitude < 0.001f) { val = Vector2.right; } ReksikUtils.AddVelocity(player, ((Vector2)(ref val)).normalized * (8f + 1.25f * (float)(level - 1) + 1.5f * num) + Vector2.up * (6f + 0.35f * num)); } catch { } Vector2 val2 = Vector2.op_Implicit(((Component)player).transform.position); foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if ((Object)(object)item == (Object)null || (Object)(object)item.data == (Object)null || item.data.dead) { continue; } Vector2 val3 = Vector2.op_Implicit(((Component)item).transform.position) - val2; float magnitude = ((Vector2)(ref val3)).magnitude; if (!(magnitude <= 0.001f) && !(magnitude > num2)) { Vector2 val4 = val3 / magnitude; bool flag = num > 0f && (Object)(object)((Component)item).gameObject.GetComponent() != (Object)null; float num3 = RoarForce + 5f * num + (flag ? (8f * num) : 0f); float duration = RoarFearDuration + 0.25f * num + (flag ? (0.5f * num) : 0f); ReksikUtils.AddVelocity(item, val4 * num3 / Mathf.Max(1f, magnitude)); FearDebuffMono.ApplyOrRefresh(item, duration); if (flag) { ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)item).transform.position), 0.8f + 0.12f * num, 0.12f + 0.006f * num, ReksikVfx.BossColor, ((Component)item).transform); } } } } } public class RomanResetMono : MonoBehaviour { private const string StatusKey = "RomanAuthorityStatus"; private const float ResetDelay = 0.35f; private const float RebuildDelay = 0.3f; private static readonly HashSet ResetsInFlight = new HashSet(); private Player player; private Gun gun; private Block block; private int stacks = 1; private int authority; private int decrees; private bool subscribed; public static void RequestReset(Player target, int requestedStacks) { if (!((Object)(object)target == (Object)null) && ReksikHostSettings.IsHost) { int playerID = target.playerID; if (ResetsInFlight.Add(playerID)) { ((MonoBehaviour)ReksikCardsPlugin.Instance).StartCoroutine(ResetAndFoundRegime(target, Mathf.Max(1, requestedStacks))); } } } private static IEnumerator ResetAndFoundRegime(Player target, int requestedStacks) { yield return (object)new WaitForSeconds(0.35f); if ((Object)(object)target == (Object)null || (Object)(object)target.data == (Object)null || target.data.currentCards == null) { ResetsInFlight.Remove(((Object)(object)target != (Object)null) ? target.playerID : (-1)); yield break; } int playerId = target.playerID; List list = new List(); int romanCount = 0; for (int i = 0; i < target.data.currentCards.Count; i++) { CardInfo val = target.data.currentCards[i]; if ((Object)(object)val != (Object)null && val.cardName == "Roman") { romanCount++; } else { list.Add(i); } } romanCount = Mathf.Max(romanCount, requestedStacks); int erasedCount = list.Count; ReksikVfx.PlayShockwave(Vector2.op_Implicit(((Component)target).transform.position), 5f + 0.04f * (float)erasedCount, 0.24f, new Color(0.55f, 0.85f, 1f, 0.58f), ((Component)target).transform); if (erasedCount > 0) { Cards.instance.RemoveCardsFromPlayer(target, list.ToArray()); yield return (object)new WaitForSeconds(0.3f); } NetworkingManager.RPC(typeof(RomanResetMono), "RPCA_FoundRomanRegime", new object[3] { playerId, romanCount, erasedCount }); ResetsInFlight.Remove(playerId); } [UnboundRPC] public static void RPCA_FoundRomanRegime(int playerId, int romanStacks, int erasedCards) { Player val = FindPlayer(playerId); if (!((Object)(object)val == (Object)null) && !((Object)(object)val.data == (Object)null)) { ReksikStackTrackerMono.GetOrAdd(val).Set("Roman", Mathf.Max(1, romanStacks)); RomanResetMono romanResetMono = ((Component)val).gameObject.GetComponent(); if ((Object)(object)romanResetMono == (Object)null) { romanResetMono = ((Component)val).gameObject.AddComponent(); } romanResetMono.Configure(Mathf.Max(1, romanStacks), Mathf.Max(0, erasedCards)); } } private static Player FindPlayer(int playerId) { if ((Object)(object)PlayerManager.instance == (Object)null || PlayerManager.instance.players == null) { return null; } for (int i = 0; i < PlayerManager.instance.players.Count; i++) { Player val = PlayerManager.instance.players[i]; if ((Object)(object)val != (Object)null && val.playerID == playerId) { return val; } } return null; } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; Subscribe(); RefreshStatus(); } public void Configure(int romanStacks, int erasedCards) { stacks = Mathf.Max(1, romanStacks); authority += Mathf.Max(0, erasedCards); decrees += stacks + Mathf.Max(0, erasedCards) / 8; RefreshStatus(); } public void SetStacks(int romanStacks) { stacks = Mathf.Max(1, romanStacks); RefreshStatus(); } private void Subscribe() { if (!subscribed) { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Combine(obj2.ShootPojectileAction, new Action(OnShootProjectile)); } subscribed = true; } } private void OnDestroy() { try { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Remove(obj2.ShootPojectileAction, new Action(OnShootProjectile)); } } catch { } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "RomanAuthorityStatus"); } } private void OnBlock(BlockTriggerType triggerType) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { decrees += stacks; float mechanicPower = ReksikHostSettings.MechanicPower; float amount = (2f * (float)stacks + 0.14f * (float)authority * (float)stacks) * mechanicPower; ReksikUtils.Heal(player, amount); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.1f + 0.05f * (float)stacks + 0.006f * (float)authority, 0.16f, new Color(0.55f, 0.85f, 1f, 0.46f), ((Component)player).transform); RefreshStatus(); } } private void OnShootProjectile(GameObject projectile) { //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) if (decrees > 0 && !((Object)(object)projectile == (Object)null) && !((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { float mechanicPower = ReksikHostSettings.MechanicPower; float num = 1f + 0.018f * (float)authority * (float)stacks * mechanicPower; float num2 = 1f + 0.12f * (float)stacks * mechanicPower + 0.002f * (float)authority * mechanicPower; ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage *= num; } MoveTransform component2 = projectile.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity *= num2; } Transform transform = projectile.transform; transform.localScale *= 1f + 0.035f * (float)stacks; decrees--; ReksikVfx.AttachSimpleTrail(projectile, new Color(0.55f, 0.85f, 1f, 0.82f), 0.34f, 0.13f + 0.018f * (float)stacks); RefreshStatus(); } } private void RefreshStatus() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { string text = "ROMAN A" + authority + " | D" + decrees + " | x" + stacks; ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "RomanAuthorityStatus", new Vector3(0f, 2.92f, 0f), text, new Color(0.62f, 0.88f, 1f, 0.95f)).SetText(text); } } } public class RostislavRockMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private int level = 1; private float lastShotTime; private int riffStacks; private float lastSlamTime; private int MaxRiffStacks => 6 + 2 * (level - 1); private float RhythmWindowMin => 0.22f - 0.01f * (float)(level - 1); private float RhythmWindowMax => 0.5f + 0.02f * (float)(level - 1); private float DamagePerStack => 0.12f + 0.06f * (float)(level - 1); private float SlamCooldown => Mathf.Max(0.85f, 1.75f * Mathf.Pow(0.9f, (float)(level - 1))); private float SlamRadius => 9f + 1f * (float)(level - 1); private float SlamPush => 36f + 8f * (float)(level - 1); private float SlamSlowDuration => 2.25f + 0.35f * (float)(level - 1); private float SlamSlowMultiplier => Mathf.Clamp(0.6f - 0.03f * (float)(level - 1), 0.4f, 0.6f); private float SlamSilenceDuration => Mathf.Clamp(0.75f + 0.1f * (float)(level - 1), 0.6f, 1.2f); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); } lastShotTime = 0f; riffStacks = 0; lastSlamTime = 0f; } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "RostislavRiff"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && player.data.dead) { riffStacks = 0; lastShotTime = 0f; ReksikVfx.RemoveStatus(((Component)player).transform, "RostislavRiff"); } } private void OnShootProjectile(GameObject projectile) { //IL_003f: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || (Object)(object)projectile == (Object)null) { return; } ReksikVfx.AttachSimpleTrail(projectile, ReksikVfx.RockColor, 0.32f, 0.2f, 0.03f); float time = Time.time; float num = ((lastShotTime <= 0f) ? 999f : (time - lastShotTime)); lastShotTime = time; if (num >= Mathf.Max(0.08f, RhythmWindowMin) && num <= RhythmWindowMax) { riffStacks = Mathf.Clamp(riffStacks + 1, 1, MaxRiffStacks); } else { riffStacks = 1; } ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "RostislavRiff", new Vector3(0f, 2.05f, 0f), "", new Color(ReksikVfx.RockColor.r, ReksikVfx.RockColor.g, ReksikVfx.RockColor.b, 0.95f)).SetText("RIFF " + riffStacks); ProjectileHit component = projectile.GetComponent(); if (!((Object)(object)component == (Object)null)) { float num2 = 1f + (float)riffStacks * DamagePerStack; component.damage *= num2; if (riffStacks >= MaxRiffStacks) { component.damage *= 1.45f + 0.08f * (float)(level - 1); Transform transform = projectile.transform; transform.localScale *= Mathf.Clamp(1.25f + 0.03f * (float)(level - 1), 1.25f, 1.6f); ReksikVfx.PlayPulse(Vector2.op_Implicit(projectile.transform.position), 1.35f, 0.18f, new Color(ReksikVfx.RockColor.r, ReksikVfx.RockColor.g, ReksikVfx.RockColor.b, 0.65f)); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || Time.time - lastSlamTime < SlamCooldown) { return; } lastSlamTime = Time.time; riffStacks = MaxRiffStacks; Vector2 worldPos = Vector2.op_Implicit(((Component)player).transform.position); ReksikVfx.PlayShockwave(worldPos, SlamRadius, 0.22f, new Color(ReksikVfx.RockColor.r, ReksikVfx.RockColor.g, ReksikVfx.RockColor.b, 0.65f)); ReksikVfx.PlayPulse(worldPos, 1.35f, 0.2f, new Color(1f, 1f, 1f, 0.55f)); Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead) { Vector2 val2 = Vector2.op_Implicit(((Component)item).transform.position); float num = Vector2.Distance(val, val2); if (!(num > SlamRadius)) { Vector2 val3 = val2 - val; Vector2 normalized = ((Vector2)(ref val3)).normalized; float num2 = SlamPush / Mathf.Max(1f, num); ReksikUtils.AddVelocity(item, normalized * num2); SlowDebuffMono.ApplyOrRefresh(item, SlamSlowDuration, SlamSlowMultiplier); SilenceDebuffMono.ApplyOrRefresh(item, SlamSilenceDuration); } } } } } public class SilenceDebuffMono : MonoBehaviour { private Player player; private Block block; private bool prevBlockEnabled; private float endTime; public static void ApplyOrRefresh(Player target, float duration) { if (!((Object)(object)target == (Object)null)) { SilenceDebuffMono silenceDebuffMono = ((Component)target).gameObject.GetComponent(); if ((Object)(object)silenceDebuffMono == (Object)null) { silenceDebuffMono = ((Component)target).gameObject.AddComponent(); } silenceDebuffMono.Refresh(duration); } } private void Refresh(float duration) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) float num = Time.time + Mathf.Max(0.05f, duration); endTime = Mathf.Max(endTime, num); if ((Object)(object)player != (Object)null) { ReksikVfx.SetAura(((Component)player).transform, "SilenceDebuffAura", enabled: true, 1.1f, new Color(0.95f, 0.95f, 0.95f, 0.16f)); ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "SilenceDebuffLabel", new Vector3(0f, 2.35f, 0f), "SILENCED", new Color(0.95f, 0.95f, 0.95f, 0.95f)).SetText("SILENCED"); } } private void Start() { //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } block = player.data.block; if ((Object)(object)block != (Object)null) { prevBlockEnabled = ((Behaviour)block).enabled; ((Behaviour)block).enabled = false; } else { prevBlockEnabled = false; } if (endTime <= 0f) { endTime = Time.time + 0.75f; } ReksikVfx.SetAura(((Component)player).transform, "SilenceDebuffAura", enabled: true, 1.1f, new Color(0.95f, 0.95f, 0.95f, 0.16f)); ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "SilenceDebuffLabel", new Vector3(0f, 2.35f, 0f), "SILENCED", new Color(0.95f, 0.95f, 0.95f, 0.95f)).SetText("SILENCED"); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); } else if (player.data.dead) { Object.Destroy((Object)(object)this); } else if (Time.time >= endTime) { Object.Destroy((Object)(object)this); } } private void OnDestroy() { if ((Object)(object)block != (Object)null) { try { ((Behaviour)block).enabled = prevBlockEnabled; } catch { } } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "SilenceDebuffAura"); ReksikVfx.RemoveStatus(((Component)player).transform, "SilenceDebuffLabel"); } } } public class SlowDebuffMono : MonoBehaviour { private Player player; private CharacterStatModifiers stats; private float endTime; private float slowMultiplier = 0.65f; private float appliedSlowMultiplier = 1f; private bool applied; public static void ApplyOrRefresh(Player target, float duration, float slowMul = 0.65f) { if (!((Object)(object)target == (Object)null)) { SlowDebuffMono component = ((Component)target).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.slowMultiplier = Mathf.Min(component.slowMultiplier, slowMul); component.endTime = Mathf.Max(component.endTime, Time.time + duration); component.RefreshAppliedMultiplier(); } else { SlowDebuffMono slowDebuffMono = ((Component)target).gameObject.AddComponent(); slowDebuffMono.slowMultiplier = slowMul; slowDebuffMono.endTime = Time.time + duration; } } } private void Start() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } stats = player.data.stats; if ((Object)(object)stats == (Object)null) { Object.Destroy((Object)(object)this); return; } Apply(); ReksikVfx.SetAura(((Component)player).transform, "SlowDebuffAura", enabled: true, 1.2f, new Color(ReksikVfx.ChillColor.r, ReksikVfx.ChillColor.g, ReksikVfx.ChillColor.b, 0.18f)); } private void Update() { if (applied && Time.time >= endTime) { Object.Destroy((Object)(object)this); } } private void OnDestroy() { Restore(); if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "SlowDebuffAura"); } } private void Apply() { if (!applied) { applied = true; stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedSlowMultiplier, slowMultiplier, 0.01f); } } private void RefreshAppliedMultiplier() { if (applied && !((Object)(object)stats == (Object)null)) { stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedSlowMultiplier, slowMultiplier, 0.01f); } } private void Restore() { if (applied) { applied = false; if ((Object)(object)stats != (Object)null) { stats.movementSpeed = ReksikRuntimeStatMath.RemoveMultiplier(stats.movementSpeed, ref appliedSlowMultiplier, 0.01f); } } } } public class Subject8MindfogMono : MonoBehaviour { private Player player; private Block block; private CharacterStatModifiers stats; private Gun gun; private bool allowed; private float lastPulseTime; private float appliedMoveMultiplier = 1f; private float appliedDamageMultiplier = 1f; private float appliedReloadMultiplier = 1f; private float appliedProjSpeedMultiplier = 1f; private float appliedBlockCdMultiplier = 1f; private bool cursedDebuffsApplied; private int level = 1; private float AllowedPulseCooldown => Mathf.Max(0.35f, 1.25f - 0.08f * (float)(level - 1)); private float AllowedPulseRadius => 9.5f + 1.25f * (float)(level - 1); private float AllowedFearDuration => 2.4f + 0.3f * (float)(level - 1); private float AllowedSlowDuration => 2.8f + 0.35f * (float)(level - 1); private float AllowedSlowMultiplier => Mathf.Max(0.2f, 0.55f - 0.025f * (float)(level - 1)); private float AllowedOwnerHeal => 9f + 4f * (float)(level - 1); private float CursedPulseCooldown => Mathf.Max(0.55f, 2.1f - 0.1f * (float)(level - 1)); private float CursedPulseRadius => 9f + 1.1f * (float)(level - 1); private float CursedFearDuration => 1.75f + 0.25f * (float)(level - 1); private float CursedSlowDuration => 2.1f + 0.3f * (float)(level - 1); private float CursedSlowMultiplier => Mathf.Max(0.25f, 0.7f - 0.025f * (float)(level - 1)); private float CursedLeechDamage => 18f + 6f * (float)(level - 1); private float CursedLeechHeal => 14f + 5f * (float)(level - 1); private float CursedMoveMultiplier => Mathf.Max(0.2f, 0.75f - 0.04f * (float)(level - 1)); private float CursedDamageMultiplier => Mathf.Max(0.2f, 0.7f - 0.04f * (float)(level - 1)); private float CursedReloadMultiplier => 1.45f + 0.12f * (float)(level - 1); private float CursedProjSpeedMultiplier => Mathf.Max(0.2f, 0.75f - 0.04f * (float)(level - 1)); private float CursedBlockCdMultiplier => 1.45f + 0.12f * (float)(level - 1); public void SetLevel(int newLevel) { int num = Mathf.Max(1, newLevel); if (num != level) { bool num2 = cursedDebuffsApplied; if (num2) { RemoveCursedDebuffs(); } level = num; if (num2) { ApplyCursedDebuffs(); } } } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } block = player.data.block; stats = player.data.stats; gun = player.data.weaponHandler.gun; if ((Object)(object)block == (Object)null || (Object)(object)stats == (Object)null || (Object)(object)gun == (Object)null) { Object.Destroy((Object)(object)this); return; } string a = SafeGetPlayerName(player); allowed = string.Equals(a, "InetGyET", StringComparison.OrdinalIgnoreCase) || string.Equals(a, "Viktor", StringComparison.OrdinalIgnoreCase); if (!allowed) { ApplyCursedDebuffs(); } Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } private void OnDestroy() { try { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } } catch { } try { if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "Subject8Aura"); } } catch { } RemoveCursedDebuffs(); } private void Update() { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { if (allowed) { ReksikVfx.SetAura(((Component)player).transform, "Subject8Aura", enabled: true, 1.4f, new Color(ReksikVfx.MindColor.r, ReksikVfx.MindColor.g, ReksikVfx.MindColor.b, 0.24f)); } else { ReksikVfx.SetAura(((Component)player).transform, "Subject8Aura", enabled: true, 1.35f, new Color(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 0.24f)); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { return; } Vector2 val3; if (allowed) { if (Time.time - lastPulseTime < AllowedPulseCooldown) { return; } lastPulseTime = Time.time; Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); ReksikVfx.PlayShockwave(val, AllowedPulseRadius, 0.22f, new Color(ReksikVfx.MindColor.r, ReksikVfx.MindColor.g, ReksikVfx.MindColor.b, 0.55f), ((Component)player).transform); ReksikVfx.PlayPulse(val, 1.1f, 0.14f, new Color(ReksikVfx.MindColor.r, ReksikVfx.MindColor.g, ReksikVfx.MindColor.b, 0.35f), ((Component)player).transform); PlayMindfogCloud(val, AllowedPulseRadius, AllowedSlowDuration, new Color(ReksikVfx.MindColor.r, ReksikVfx.MindColor.g, ReksikVfx.MindColor.b, 1f), ((Component)player).transform); foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || player.teamID == this.player.teamID || Vector2.Distance(val, Vector2.op_Implicit(((Component)player).transform.position)) > AllowedPulseRadius) { continue; } SlowDebuffMono.ApplyOrRefresh(player, AllowedSlowDuration, AllowedSlowMultiplier); FearDebuffMono.ApplyOrRefresh(player, AllowedFearDuration, 0.7f, 1.1f, 1.1f); try { Damagable val2 = (((Object)(object)player.data.healthHandler != (Object)null) ? ((Component)player.data.healthHandler).GetComponent() : null); if ((Object)(object)val2 != (Object)null) { val3 = Vector2.op_Implicit(((Component)player).transform.position) - Vector2.op_Implicit(((Component)this.player).transform.position); Vector2 normalized = ((Vector2)(ref val3)).normalized; val2.TakeDamage(new Vector2(10f, 10f), normalized, (GameObject)null, this.player, true, false); } } catch { } ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 0.95f, 0.12f, new Color(ReksikVfx.MindColor.r, ReksikVfx.MindColor.g, ReksikVfx.MindColor.b, 0.55f), ((Component)player).transform); } ReksikUtils.Heal(this.player, AllowedOwnerHeal); } else { if (Time.time - lastPulseTime < CursedPulseCooldown) { return; } lastPulseTime = Time.time; Vector2 val4 = Vector2.op_Implicit(((Component)this.player).transform.position); Color val5 = default(Color); ((Color)(ref val5))..ctor(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 0.55f); ReksikVfx.PlayShockwave(val4, CursedPulseRadius, 0.22f, val5, ((Component)this.player).transform); ReksikVfx.PlayPulse(val4, 1.05f, 0.14f, new Color(val5.r, val5.g, val5.b, 0.35f), ((Component)this.player).transform); PlayMindfogCloud(val4, CursedPulseRadius, CursedSlowDuration, new Color(ReksikVfx.CurseColor.r, ReksikVfx.CurseColor.g, ReksikVfx.CurseColor.b, 1f), ((Component)this.player).transform); Player closestEnemy = ReksikUtils.GetClosestEnemy(this.player, CursedPulseRadius); if ((Object)(object)closestEnemy != (Object)null && (Object)(object)closestEnemy.data != (Object)null && !closestEnemy.data.dead) { try { Damagable component = ((Component)closestEnemy).GetComponent(); if ((Object)(object)component != (Object)null) { val3 = Vector2.op_Implicit(((Component)closestEnemy).transform.position) - val4; Vector2 normalized2 = ((Vector2)(ref val3)).normalized; component.TakeDamage(new Vector2(CursedLeechDamage, CursedLeechDamage), normalized2, (GameObject)null, this.player, true, false); } } catch { } ReksikUtils.Heal(this.player, CursedLeechHeal); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)closestEnemy).transform.position), 1.05f, 0.14f, val5, ((Component)closestEnemy).transform); } foreach (Player player2 in PlayerManager.instance.players) { if (!((Object)(object)player2 == (Object)null) && !((Object)(object)player2.data == (Object)null) && !player2.data.dead && player2.teamID != this.player.teamID && !(Vector2.Distance(val4, Vector2.op_Implicit(((Component)player2).transform.position)) > CursedPulseRadius)) { SlowDebuffMono.ApplyOrRefresh(player2, CursedSlowDuration, CursedSlowMultiplier); FearDebuffMono.ApplyOrRefresh(player2, CursedFearDuration, 0.85f, 1.15f, 1.15f); } } } } private void PlayMindfogCloud(Vector2 pos, float radius, float duration, Color color, Transform context) { //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(0.5f, radius * 2f); int sortingLayerID = 0; int sortingOrder = 25; try { if ((Object)(object)context != (Object)null) { Renderer componentInChildren = ((Component)context).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { sortingLayerID = componentInChildren.sortingLayerID; sortingOrder = componentInChildren.sortingOrder + 25; } } } catch { } Color startColor = default(Color); Color endColor = default(Color); for (int i = 0; i < 3; i++) { Vector2 val = Random.insideUnitCircle * (radius * 0.12f); float num2 = num * Random.Range(0.8f, 1f); float duration2 = Mathf.Max(0.25f, duration * Random.Range(0.85f, 1.1f)); GameObject val2 = new GameObject("MindFogCloud"); val2.transform.position = Vector2.op_Implicit(pos + val); if ((Object)(object)context != (Object)null) { val2.transform.SetParent(context, true); try { val2.layer = ((Component)context).gameObject.layer; } catch { } } SpriteRenderer val3 = val2.AddComponent(); val3.sprite = ReksikSpriteCache.Circle; ((Renderer)val3).sortingLayerID = sortingLayerID; ((Renderer)val3).sortingOrder = sortingOrder; ((Color)(ref startColor))..ctor(color.r, color.g, color.b, 0.18f); ((Color)(ref endColor))..ctor(color.r, color.g, color.b, 0f); val2.AddComponent().Init(val3, duration2, num2 * 0.95f, num2 * 1.05f, startColor, endColor); } } private void RemoveCursedDebuffs() { try { if (cursedDebuffsApplied && !((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)stats == (Object)null) && !((Object)(object)gun == (Object)null) && !((Object)(object)block == (Object)null)) { stats.movementSpeed = ReksikRuntimeStatMath.RemoveMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, 0.01f); gun.damage = ReksikRuntimeStatMath.RemoveMultiplier(gun.damage, ref appliedDamageMultiplier, 0.01f); gun.reloadTime = ReksikRuntimeStatMath.RemoveMultiplier(gun.reloadTime, ref appliedReloadMultiplier, 0.01f); gun.projectileSpeed = ReksikRuntimeStatMath.RemoveMultiplier(gun.projectileSpeed, ref appliedProjSpeedMultiplier, 0.01f); block.cdMultiplier = ReksikRuntimeStatMath.RemoveMultiplier(block.cdMultiplier, ref appliedBlockCdMultiplier, 0.01f); cursedDebuffsApplied = false; } } catch { } } private void ApplyCursedDebuffs() { try { stats.movementSpeed = ReksikRuntimeStatMath.ApplyMultiplier(stats.movementSpeed, ref appliedMoveMultiplier, CursedMoveMultiplier, 0.01f); gun.damage = ReksikRuntimeStatMath.ApplyMultiplier(gun.damage, ref appliedDamageMultiplier, CursedDamageMultiplier, 0.01f); gun.reloadTime = ReksikRuntimeStatMath.ApplyMultiplier(gun.reloadTime, ref appliedReloadMultiplier, CursedReloadMultiplier, 0.01f); gun.projectileSpeed = ReksikRuntimeStatMath.ApplyMultiplier(gun.projectileSpeed, ref appliedProjSpeedMultiplier, CursedProjSpeedMultiplier, 0.01f); block.cdMultiplier = ReksikRuntimeStatMath.ApplyMultiplier(block.cdMultiplier, ref appliedBlockCdMultiplier, CursedBlockCdMultiplier, 0.01f); cursedDebuffsApplied = true; } catch { } } private static string SafeGetPlayerName(Player p) { string nickname = ReksikUtils.GetNickname(p); if (!string.IsNullOrEmpty(nickname)) { return nickname; } try { return ((Object)(object)p != (Object)null) ? ((Object)p).name : string.Empty; } catch { return string.Empty; } } } public class ViktorKamikazeMono : MonoBehaviour { private const float LowHpThreshold = 0.35f; private const float SelfDamageFactor = 0.055f; private Player player; private Gun gun; private Block block; private int level = 1; private float blastDebt; private float redDetonationCharge; private bool explodedThisDeath; private int lastDetonationFrame = -1; private float DebtGainMultiplier => 0.35f + 0.15f * (float)(level - 1); private float LowHpDamageMultiplier => 1.35f + 0.18f * (float)(level - 1); private float ManualDamageMultiplier => 1.25f + 0.35f * (float)(level - 1); private float DeathDamageMultiplier => 1.8f + 0.5f * (float)(level - 1); private float ManualBaseRadius => 4.5f + 1.1f * (float)(level - 1); private float DeathBaseRadius => 6f + 1.4f * (float)(level - 1); private float ManualForce => 48f + 11f * (float)(level - 1); private float DeathForce => 72f + 16f * (float)(level - 1); public void SetLevel(int newLevel) { level = Mathf.Max(1, newLevel); RefreshVisuals(); } public void AddRedDetonationCharge(float amount) { if (!(amount <= 0f) && !(ReksikBonds.BondPower(player, ReksikBondId.RedDetonation) <= 0f)) { redDetonationCharge += amount; RefreshVisuals(); } } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; if ((Object)(object)gun == (Object)null || (Object)(object)block == (Object)null) { Object.Destroy((Object)(object)this); return; } blastDebt = 0f; redDetonationCharge = 0f; explodedThisDeath = player.data.dead; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); RefreshVisuals(); } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { return; } if (player.data.dead) { if (!explodedThisDeath) { explodedThisDeath = true; ReleaseDeathDebt(); } } else if (explodedThisDeath) { explodedThisDeath = false; blastDebt = 0f; redDetonationCharge = 0f; RefreshVisuals(); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "ViktorBlastDebtAura"); ReksikVfx.RemoveStatus(((Component)player).transform, "ViktorBlastDebt"); } } private void OnShootProjectile(GameObject projectile) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || (Object)(object)projectile == (Object)null) { return; } ProjectileHit component = projectile.GetComponent(); if (!((Object)(object)component == (Object)null)) { if (ReksikUtils.HealthFraction(player) <= 0.35f) { component.damage *= LowHpDamageMultiplier; } float num = component.damage * DebtGainMultiplier; blastDebt += num; RefreshVisuals(); float num2 = 1f + 0.18f * (float)(level - 1); ReksikVfx.AttachSimpleTrail(projectile, new Color(1f, 0.35f, 0.22f, 0.78f), 0.3f, 0.18f * num2, 0.02f * num2); if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.88f + 0.14f * (float)(level - 1), new Color(1f, 0.24f, 0.18f, 0.9f)); } DealSelfDamage(component.damage * 0.055f); } } private void OnBlock(BlockTriggerType triggerType) { //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || lastDetonationFrame == Time.frameCount) { return; } float num = ((ReksikBonds.BondPower(player, ReksikBondId.RedDetonation) > 0f) ? redDetonationCharge : 0f); if (!(blastDebt <= 0f) || !(num <= 0f)) { lastDetonationFrame = Time.frameCount; float num2 = blastDebt; blastDebt = 0f; redDetonationCharge = 0f; RefreshVisuals(); float radius = ManualBaseRadius + num2 * 0.018f + num * 0.35f; float damage = num2 * ManualDamageMultiplier + num * 16f; float force = ManualForce + num2 * 0.05f + num * 5f; Explode(radius, damage, force, deathRelease: false, num); Vector2 val = (((Object)(object)gun != (Object)null) ? Vector2.op_Implicit(((Component)gun).transform.right) : Vector2.right); if (((Vector2)(ref val)).sqrMagnitude < 0.001f) { val = Vector2.right; } float num3 = 14f + 3f * (float)(level - 1) + num2 * 0.03f; ReksikUtils.AddVelocity(player, -((Vector2)(ref val)).normalized * num3 + Vector2.up * (5f + 0.5f * (float)(level - 1))); } } private void ReleaseDeathDebt() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { float num = blastDebt; float num2 = ((ReksikBonds.BondPower(player, ReksikBondId.RedDetonation) > 0f) ? redDetonationCharge : 0f); blastDebt = 0f; redDetonationCharge = 0f; RefreshVisuals(); if (!(num <= 0f) || !(num2 <= 0f)) { float radius = DeathBaseRadius + num * 0.024f + num2 * 0.45f; float damage = num * DeathDamageMultiplier + num2 * 22f; float force = DeathForce + num * 0.07f + num2 * 6f; Explode(radius, damage, force, deathRelease: true, num2); } } } private void Explode(float radius, float damage, float force, bool deathRelease, float redCharge) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { return; } Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); Color explosionColor = ReksikVfx.ExplosionColor; ReksikVfx.PlayShockwave(val, radius, (deathRelease ? 0.28f : 0.22f) + 0.025f * (float)(level - 1) + 0.012f * redCharge, explosionColor, ((Component)player).transform); ReksikVfx.PlayPulse(val, (deathRelease ? 1.35f : 1.05f) + 0.18f * (float)(level - 1) + 0.1f * redCharge, 0.18f, new Color(1f, 1f, 1f, 0.65f), ((Component)player).transform); foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if ((Object)(object)item == (Object)null || (Object)(object)item.data == (Object)null || item.data.dead) { continue; } Vector2 val2 = Vector2.op_Implicit(((Component)item).transform.position) - val; float magnitude = ((Vector2)(ref val2)).magnitude; if (!(magnitude > radius)) { Vector2 val3 = ((magnitude > 0.001f) ? (val2 / magnitude) : Vector2.up); ReksikUtils.AddVelocity(item, val3 * force / Mathf.Max(1f, magnitude)); try { ((Damagable)item.data.healthHandler).TakeDamage(val3 * damage, Vector2.zero, (GameObject)null, player, false, false); } catch { } } } } private void DealSelfDamage(float amount) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) if (amount <= 0f || (Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || (Object)(object)player.data.healthHandler == (Object)null) { return; } try { ((Damagable)player.data.healthHandler).TakeDamage(Vector2.right * amount, Vector2.zero, (GameObject)null, player, true, false); } catch { } } private void RefreshVisuals() { //IL_0076: 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_00cc: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { float radius = 1.05f + 0.12f * (float)(level - 1) + blastDebt * 0.003f; float num = 0.1f + blastDebt * 0.0015f; ReksikVfx.SetAura(((Component)player).transform, "ViktorBlastDebtAura", enabled: true, radius, new Color(ReksikVfx.ExplosionColor.r, ReksikVfx.ExplosionColor.g, ReksikVfx.ExplosionColor.b, num)); StatusTextVfxMono orCreateStatusText = ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "ViktorBlastDebt", new Vector3(0f, 2.05f, 0f), "", new Color(ReksikVfx.ExplosionColor.r, ReksikVfx.ExplosionColor.g, ReksikVfx.ExplosionColor.b, 0.95f)); string text = "BLAST DEBT " + Mathf.CeilToInt(blastDebt); if (ReksikBonds.BondPower(player, ReksikBondId.RedDetonation) > 0f && redDetonationCharge > 0f) { text = text + " | RED " + Mathf.CeilToInt(redDetonationCharge); } orCreateStatusText.SetText(text); } } } public class YinYangPairMono : MonoBehaviour { private Player player; private Gun gun; private Block block; private int tuksonLevel; private int nesenLevel; private bool yinNext = true; private int harmonyStep; private int harmonyShotsRemaining; private int empoweredShotsRemaining; private int lastAbilityFrame = -1; private const float StealSlowMultiplier = 0.6f; private bool HasTukson => tuksonLevel > 0; private bool HasNesen => nesenLevel > 0; private bool PairActive { get { if (HasTukson && HasNesen) { return ReksikHostSettings.BondsEnabled; } return false; } } private float BondPower { get { if (!PairActive) { return 0f; } return ReksikHostSettings.MechanicPower; } } private int TotalLevel => tuksonLevel + nesenLevel; private float YangVisualLevel => (float)tuksonLevel + (float)nesenLevel * BondPower; private float StealRadius => 8.5f + 1.5f * (float)nesenLevel + 0.5f * (float)tuksonLevel * BondPower; private float StealDamage => 18f + 10f * (float)nesenLevel + 4f * (float)tuksonLevel * BondPower; private float StealHeal => 14f + 10f * (float)nesenLevel + 5f * (float)tuksonLevel * BondPower; private float StealSlowDuration => 1.75f + 0.35f * (float)nesenLevel; private float EmpowerDamageMultiplier => 1.35f + 0.3f * (float)tuksonLevel + 0.1f * (float)nesenLevel * BondPower; private float EmpowerSpeedMultiplier => 1.12f + 0.08f * (float)tuksonLevel + 0.03f * (float)nesenLevel * BondPower; private float EmpowerSizeMultiplier => 1.08f + 0.04f * (float)tuksonLevel + 0.02f * (float)nesenLevel * BondPower; private int FinaleShotCharges => RoundBondCount((1f + (float)tuksonLevel + (float)nesenLevel) * BondPower); private float FinaleRadius => (7.5f + 0.75f * (float)tuksonLevel + 1.25f * (float)nesenLevel) * BondPower; private float FinaleDamage => (10f + 5f * (float)tuksonLevel + 8f * (float)nesenLevel) * BondPower; private float FinaleHealPerEnemy => (5f + 4f * (float)tuksonLevel + 6f * (float)nesenLevel) * BondPower; private float FinaleFlatSustain => (6f + 6f * (float)tuksonLevel + 6f * (float)nesenLevel) * BondPower; public void SetTuksonLevel(int level) { bool pairActive = PairActive; tuksonLevel = Mathf.Max(0, level); ResetBrokenPair(pairActive); if (!HasTukson) { empoweredShotsRemaining = 0; } } public void SetNesenLevel(int level) { bool pairActive = PairActive; nesenLevel = Mathf.Max(0, level); ResetBrokenPair(pairActive); } private void ResetBrokenPair(bool wasPairActive) { if (wasPairActive && !PairActive) { ClearHarmonyState(); } } private void ClearHarmonyState() { empoweredShotsRemaining = Mathf.Max(0, empoweredShotsRemaining - harmonyShotsRemaining); harmonyShotsRemaining = 0; yinNext = true; harmonyStep = 0; } private static int RoundBondCount(float value) { return Mathf.FloorToInt(value + 0.5f); } private void Start() { player = ((Component)this).GetComponentInParent(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null) { Object.Destroy((Object)(object)this); return; } gun = player.data.weaponHandler.gun; block = player.data.block; if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Combine(obj2.BlockAction, new Action(OnBlock)); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action)Delegate.Remove(obj2.BlockAction, new Action(OnBlock)); } if ((Object)(object)player != (Object)null) { ReksikVfx.RemoveStatus(((Component)player).transform, "YinYangLabel"); ReksikVfx.RemoveStatus(((Component)player).transform, "YinYangAura"); } } private void Update() { if (!HasTukson && !HasNesen) { Object.Destroy((Object)(object)this); } else if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { EnsureHarmonyAvailability(); if (player.data.dead) { yinNext = true; harmonyStep = 0; harmonyShotsRemaining = 0; empoweredShotsRemaining = 0; ReksikVfx.RemoveStatus(((Component)player).transform, "YinYangLabel"); ReksikVfx.RemoveStatus(((Component)player).transform, "YinYangAura"); } else { UpdateYinYangVfx(); } } } private void UpdateYinYangVfx() { //IL_0027: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { Color val = default(Color); string text; if (PairActive) { bool num = yinNext; val = (num ? ReksikVfx.YinColor : ReksikVfx.YangColor); text = (num ? "YIN" : "YANG") + " HARMONY " + harmonyStep + "/2"; } else if (HasTukson && HasNesen) { ((Color)(ref val))..ctor(0.82f, 0.72f, 0.92f, 0.95f); text = "YIN + YANG"; } else if (HasTukson) { val = ReksikVfx.YangColor; text = "YANG"; } else { val = ReksikVfx.YinColor; text = "YIN"; } if (empoweredShotsRemaining > 0) { text = text + " SHOTS " + empoweredShotsRemaining; } ReksikVfx.GetOrCreateStatusText(((Component)player).transform, "YinYangLabel", new Vector3(0f, 2.25f, 0f), text, new Color(val.r, val.g, val.b, 0.95f)).SetText(text); float radius = 1.2f + 0.04f * (float)TotalLevel + 0.08f * (float)harmonyStep * BondPower; ReksikVfx.SetAura(((Component)player).transform, "YinYangAura", enabled: true, radius, new Color(val.r, val.g, val.b, 0.2f)); } } private void OnShootProjectile(GameObject projectile) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) EnsureHarmonyAvailability(); if (empoweredShotsRemaining <= 0 || (Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead || (Object)(object)projectile == (Object)null) { return; } ProjectileHit component = projectile.GetComponent(); if (!((Object)(object)component == (Object)null)) { component.damage *= EmpowerDamageMultiplier; Transform transform = projectile.transform; transform.localScale *= EmpowerSizeMultiplier; ReksikVfx.AttachSimpleTrail(projectile, ReksikVfx.YangColor, 0.4f, 0.18f + 0.025f * YangVisualLevel); if ((Object)(object)gun != (Object)null) { ReksikVfx.PlayMuzzleFlash(((Component)gun).transform, 0.8f + 0.06f * YangVisualLevel, new Color(ReksikVfx.YangColor.r, ReksikVfx.YangColor.g, ReksikVfx.YangColor.b, 0.95f)); } MoveTransform component2 = projectile.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.velocity *= EmpowerSpeedMultiplier; } empoweredShotsRemaining--; if (harmonyShotsRemaining > 0) { harmonyShotsRemaining--; } } } private void OnBlock(BlockTriggerType triggerType) { //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { return; } EnsureHarmonyAvailability(); if (lastAbilityFrame == Time.frameCount) { return; } lastAbilityFrame = Time.frameCount; if (PairActive) { if (yinNext) { DoStealPulse(); } else { empoweredShotsRemaining += tuksonLevel; ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.05f + 0.05f * (float)tuksonLevel + 0.05f * BondPower, 0.2f, new Color(ReksikVfx.YangColor.r, ReksikVfx.YangColor.g, ReksikVfx.YangColor.b, 0.55f)); ReksikUtils.Heal(player, (4f + 4f * (float)tuksonLevel + 2f * (float)nesenLevel) * BondPower); } harmonyStep++; yinNext = !yinNext; if (harmonyStep >= 2) { harmonyStep = 0; DoHarmonyFinale(); } } else { if (HasTukson) { empoweredShotsRemaining += tuksonLevel; ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), 1.05f + 0.05f * (float)tuksonLevel, 0.18f, new Color(ReksikVfx.YangColor.r, ReksikVfx.YangColor.g, ReksikVfx.YangColor.b, 0.55f)); } if (HasNesen) { DoStealPulse(); } } } private void DoStealPulse() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { Player closestEnemy = ReksikUtils.GetClosestEnemy(player); if (!((Object)(object)closestEnemy == (Object)null) && !((Object)(object)closestEnemy.data == (Object)null) && !closestEnemy.data.dead && !(Vector2.Distance(Vector2.op_Implicit(((Component)player).transform.position), Vector2.op_Implicit(((Component)closestEnemy).transform.position)) > StealRadius)) { float radius = 1.05f + 0.04f * (float)nesenLevel + 0.04f * (float)tuksonLevel * BondPower; ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)player).transform.position), radius, 0.18f, new Color(ReksikVfx.YinColor.r, ReksikVfx.YinColor.g, ReksikVfx.YinColor.b, 0.55f)); ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)closestEnemy).transform.position), radius, 0.18f, new Color(ReksikVfx.YinColor.r, ReksikVfx.YinColor.g, ReksikVfx.YinColor.b, 0.55f)); DealDamage(closestEnemy, StealDamage); ReksikUtils.Heal(player, StealHeal); SlowDebuffMono.ApplyOrRefresh(closestEnemy, StealSlowDuration, 0.6f); } } } private void DoHarmonyFinale() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || !PairActive || BondPower <= 0f) { return; } int finaleShotCharges = FinaleShotCharges; empoweredShotsRemaining += finaleShotCharges; harmonyShotsRemaining += finaleShotCharges; Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); ReksikVfx.PlayShockwave(val, FinaleRadius, 0.24f, new Color(0.82f, 0.58f, 1f, 0.58f)); ReksikVfx.PlayPulse(val, 1.2f + 0.06f * (float)TotalLevel * BondPower, 0.22f, new Color(1f, 0.92f, 0.5f, 0.65f)); int num = 0; foreach (Player item in ReksikUtils.EnemyPlayers(player)) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead && !(Vector2.Distance(val, Vector2.op_Implicit(((Component)item).transform.position)) > FinaleRadius)) { DealDamage(item, FinaleDamage); SlowDebuffMono.ApplyOrRefresh(item, StealSlowDuration * BondPower, 0.6f); num++; ReksikVfx.PlayPulse(Vector2.op_Implicit(((Component)item).transform.position), 1.05f + 0.03f * (float)TotalLevel * BondPower, 0.18f, new Color(0.76f, 0.45f, 1f, 0.52f)); } } ReksikUtils.Heal(player, FinaleFlatSustain + FinaleHealPerEnemy * (float)num); } private void EnsureHarmonyAvailability() { if (!PairActive && (harmonyStep > 0 || harmonyShotsRemaining > 0)) { ClearHarmonyState(); } } private void DealDamage(Player enemy, float damage) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_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) try { Damagable component = ((Component)enemy.data.healthHandler).GetComponent(); if (!((Object)(object)component == (Object)null)) { Vector2 val = Vector2.op_Implicit(((Component)enemy).transform.position) - Vector2.op_Implicit(((Component)player).transform.position); Vector2 val2 = ((Vector2)(ref val)).normalized; if (((Vector2)(ref val2)).sqrMagnitude < 0.001f) { val2 = Vector2.up; } component.TakeDamage(val2 * damage, Vector2.op_Implicit(((Component)enemy).transform.position), ((Component)player).gameObject, player, true, false); } } catch { } } } } namespace ReksikCards.Cards { public class AgentCard : ReksikCardsBase { private const string StackKey = "Agent"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.1f; statModifiers.movementSpeed = 1.25f; gun.damage = 1.2f; gun.reloadTime = 0.9f; gun.projectileSpeed = 1.15f; block.cdMultiplier = 0.9f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Agent"); AgentOperativeMono agentOperativeMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)agentOperativeMono == (Object)null) { agentOperativeMono = ((Component)player).gameObject.AddComponent(); } agentOperativeMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Agent") : 0); AgentOperativeMono component2 = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Agent"; } protected override string GetDescription() { return "EXTRACT: block targets the nearest enemy, steals HP, and applies a hacking debuff. Punishes Daniil harder. Stacks upgrade extraction."; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Move speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Extract", amount = "block -> steal", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Debuff", amount = "hack target", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Upgrade", amount = "stacks", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } } public class ArinaCard : ReksikCardsBase { private const string StackKey = "Arina"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.movementSpeed = 1.08f; statModifiers.jump = 1.04f; gun.projectileSpeed = 1.1f; block.cdMultiplier = 0.92f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Arina"); ArinaPolarityMono arinaPolarityMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)arinaPolarityMono == (Object)null) { arinaPolarityMono = ((Component)player).gameObject.AddComponent(); } arinaPolarityMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Arina") : 0); ArinaPolarityMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Arina: Polarity"; } protected override string GetDescription() { return "BLOCK toggles PULL / PUSH. PULL shots dash horizontally toward the nearest enemy; PUSH shots repel enemies and grow. Every stack linearly intensifies both poles."; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Block", amount = "toggle polarity", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "PULL", amount = "horizontal dash + speed", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "PUSH", amount = "repel + size", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Power", amount = "linear stacks", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } } public class ArtemCard : ReksikCardsBase { private const string StackKey = "Artem"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.2f; statModifiers.movementSpeed = 1.1f; gun.damage = 1.45f; gun.projectileSize = 1.18f; gun.projectileSpeed = 1.15f; gun.reloadTime = 0.82f; gun.ammo = 3; block.cdMultiplier = 0.9f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int artemLevel = ReksikStackTrackerMono.GetOrAdd(player).Add("Artem"); CarpenterPlankMono carpenterPlankMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)carpenterPlankMono == (Object)null) { carpenterPlankMono = ((Component)player).gameObject.AddComponent(); } carpenterPlankMono.SetArtemLevel(artemLevel); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int artemLevel = (((Object)(object)component != (Object)null) ? component.Remove("Artem") : 0); CarpenterPlankMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { component2.SetArtemLevel(artemLevel); if (!component2.HasAnyCarpenter) { Object.Destroy((Object)(object)component2); } } } protected override string GetTitle() { return "Artem"; } protected override string GetDescription() { return "FOREMAN: every shot is a nail; every fourth and every block-charged shot becomes a heavy beam. With Bonds ON, Sosnovka unlocks WORKSHOP."; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Nails", amount = "every shot", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Heavy beam", amount = "4th shot / block", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Stacks", amount = "more beams + power", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "WORKSHOP", amount = "Sosnovka + Bonds ON", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } } public class DaniilCard : ReksikCardsBase { private const string StackKey = "Daniil"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 4f; statModifiers.movementSpeed = 0.5f; statModifiers.jump = 0.95f; statModifiers.sizeMultiplier = 1.1f; gun.damage = 1.35f; gun.reloadTime = 0.95f; gun.ammo = 4; gun.projectileSpeed = 1.1f; gun.projectileSize = 0.85f; FieldInfo field = typeof(Gun).GetField("ammoReg", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null && field.FieldType == typeof(float)) { field.SetValue(gun, 0.25f); } block.cdMultiplier = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Daniil"); DaniilTankMono daniilTankMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)daniilTankMono == (Object)null) { daniilTankMono = ((Component)player).gameObject.AddComponent(); } daniilTankMono.SetLevel(level); try { if ((Object)(object)player.data != (Object)null && (Object)(object)player.data.stats != (Object)null) { player.data.stats.respawns = 0; } } catch { } try { if ((Object)(object)characterStats != (Object)null) { characterStats.respawns = 0; } } catch { } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Daniil") : 0); DaniilTankMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Daniil"; } protected override string GetDescription() { return "TANK: insane regeneration + Second Wind. Stacks upgrade the survivability."; } protected override Rarity GetRarity() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return ReksikRarities.Legendary; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[5] { new CardInfoStat { positive = true, stat = "HP", amount = "x4.0", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Regen", amount = "very high", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Second Wind", amount = "once per life", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Upgrades", amount = "stacks", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Speed", amount = "x0.50", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } } public class DmitriyCard : ReksikCardsBase { private const string StackKey = "Dmitriy"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.25f; statModifiers.movementSpeed = 1.05f; gun.damage = 1.1f; gun.reloadTime = 0.9f; gun.projectileSpeed = 1.1f; block.cdMultiplier = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Dmitriy"); DmitriyArmorBrokerMono dmitriyArmorBrokerMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)dmitriyArmorBrokerMono == (Object)null) { dmitriyArmorBrokerMono = ((Component)player).gameObject.AddComponent(); } dmitriyArmorBrokerMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Dmitriy") : 0); DmitriyArmorBrokerMono component2 = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Dmitriy"; } protected override string GetDescription() { return "ARMOR BROKER: damage becomes Plates. Block makes healing, Reinforce and shrapnel shells. With Bonds enabled, Daniil activates Iron Pact."; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[5] { new CardInfoStat { positive = true, stat = "HP", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block", amount = "-15% CD", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Plates", amount = "damage -> shells", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Shells", amount = "pierce + shrapnel", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Stacks", amount = "+capacity +charges", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)2; } } public class EgorCard : ReksikCardsBase { private const string StackKey = "Egor"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.35f; statModifiers.movementSpeed = 1.1f; statModifiers.jump = 1f; statModifiers.numberOfJumps = 1; gun.damage = 2.8f; gun.projectileSpeed = 3.2f; gun.reloadTime = 1.2f; gun.ammo = 1; gun.numberOfProjectiles = 1; gun.projectileSize = 0.35f; gun.gravity = 0f; gun.drag = 0f; block.cdMultiplier = 1f; block.forceToAdd = 0f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Egor"); EgorSniperMono egorSniperMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)egorSniperMono == (Object)null) { egorSniperMono = ((Component)player).gameObject.AddComponent(); } egorSniperMono.SetLevel(level); egorSniperMono.SetGunAmmo(gunAmmo); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Egor") : 0); EgorSniperMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Egor"; } protected override string GetDescription() { return "SNIPER: stand still to Focus. Focused shot hits like a truck. Stacks upgrade Focus."; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[6] { new CardInfoStat { positive = true, stat = "Damage", amount = "x2.8", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet speed", amount = "x3.2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ammo", amount = "1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Reload", amount = "x1.2", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Focus", amount = "stand still", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Upgrades", amount = "stacks", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } } public class FedrCard : ReksikCardsBase { private const string StackKey = "Fedr"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.1f; statModifiers.movementSpeed = 1.05f; gun.damage = 1.1f; gun.reloadTime = 0.9f; gun.projectileSpeed = 1.1f; gun.ammo = 1; block.cdMultiplier = 0.9f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Fedr"); FedrTechMono fedrTechMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)fedrTechMono == (Object)null) { fedrTechMono = ((Component)player).gameObject.AddComponent(); } fedrTechMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Fedr") : 0); FedrTechMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Fedr"; } protected override string GetDescription() { return "REDLINE: shots build Heat. High Heat overclocks the gun. Block vents all Heat in a scaling blast."; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Heat", amount = "shots charge", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Redline", amount = "gun overclock", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block", amount = "vent Heat", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Stacks", amount = "all scaling", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } } public class KsyushaCard : ReksikCardsBase { private const string StackKey = "Ksyusha"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.1f; statModifiers.movementSpeed = 1.03f; block.cdMultiplier = 0.88f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Ksyusha"); KsyushaSecondTakeMono ksyushaSecondTakeMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)ksyushaSecondTakeMono == (Object)null) { ksyushaSecondTakeMono = ((Component)player).gameObject.AddComponent(); } ksyushaSecondTakeMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Ksyusha") : 0); KsyushaSecondTakeMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Ksyusha: Second Take"; } protected override string GetDescription() { return "BLOCK rewinds you to a safe snapshot from seconds ago. Stacks linearly extend the take, recovery, timeline, and rewind VFX."; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Block", amount = "rewind", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Timeline", amount = "+1 sec / stack", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Recovery", amount = "+6% HP / stack", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block cooldown", amount = "x0.88", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } } public class MatusovskyCard : ReksikCardsBase { private const string StackKey = "Matusovsky"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 0.85f; statModifiers.movementSpeed = 0.95f; gun.damage = 0.75f; gun.reloadTime = 0.8f; gun.projectileSpeed = 0.9f; gun.ammo = 2; gun.spread = 0.15f; gun.recoil = 1.25f; gun.knockback = 0.85f; block.cdMultiplier = 0.9f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Matusovsky"); MatusovskyCurseMono matusovskyCurseMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)matusovskyCurseMono == (Object)null) { matusovskyCurseMono = ((Component)player).gameObject.AddComponent(); } matusovskyCurseMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Matusovsky") : 0); MatusovskyCurseMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Matusovsky"; } protected override string GetDescription() { return "CURSE DEBT: shots and blocks cost blood and build Debt. Full Debt bursts into nearby enemies."; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = false, stat = "Blood tax", amount = "shoot + block", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Curse Debt", amount = "build to burst", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Debt burst", amount = "damage + control", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Stacks", amount = "gain + range + targets", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } } public class MatveyCard : ReksikCardsBase { private const string StackKey = "Matvey"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.4f; statModifiers.movementSpeed = 1f; statModifiers.jump = 1f; statModifiers.numberOfJumps = 1; gun.damage = 1.15f; gun.reloadTime = 0.85f; gun.ammo = 4; gun.projectileSpeed = 1.25f; gun.projectileSize = 1f; block.cdMultiplier = 1f; block.forceToAdd = 0f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Matvey"); MatveyPofigMono matveyPofigMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)matveyPofigMono == (Object)null) { matveyPofigMono = ((Component)player).gameObject.AddComponent(); } matveyPofigMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Matvey") : 0); MatveyPofigMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Matvey"; } protected override string GetDescription() { return "CHILL: the longer you do nothing, the stronger your next shot. Stacks upgrade Chill."; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Chill", amount = "stacks up", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Next shot", amount = "more damage", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Speed", amount = "penalty while chilling", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Upgrades", amount = "stacks", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } } public class MaksimCard : ReksikCardsBase { private const string StackKey = "Maksim"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.2f; statModifiers.movementSpeed = 1.1f; gun.damage = 1.2f; gun.reloadTime = 0.9f; gun.ammo = 3; gun.projectileSpeed = 1.1f; block.cdMultiplier = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Maksim"); MaximGrowthMono maximGrowthMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)maximGrowthMono == (Object)null) { maximGrowthMono = ((Component)player).gameObject.AddComponent(); } maximGrowthMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Maksim") : 0); MaximGrowthMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Maksim"; } protected override string GetDescription() { return "MAXIMUM: permanently grows stronger over time. Stacks upgrade growth."; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Growth", amount = "+stacks over time", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Cap", amount = "very high", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Upgrades", amount = "stacks", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } } public class NazarCard : ReksikCardsBase { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.7f; statModifiers.movementSpeed = 1.15f; statModifiers.jump = 1.05f; gun.damage = 1.55f; gun.projectileSpeed = 1.35f; gun.reloadTime = 0.65f; gun.ammo = 4; gun.projectileSize = 0.95f; block.cdMultiplier = 0.75f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("Nazar"); NazarNewbieMono nazarNewbieMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)nazarNewbieMono == (Object)null) { nazarNewbieMono = ((Component)player).gameObject.AddComponent(); } nazarNewbieMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("Nazar") : 0); NazarNewbieMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "Nazar"; } protected override string GetDescription() { return "NEWBIE KIT: first shot, training reward and panic all grow with every copy; extra stacks extend the training window."; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "HP", amount = "x1.7", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Beginner's luck", amount = "first shot", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Panic", amount = "on hit", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Upgrades", amount = "per point", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)6; } } public class NesenCard : ReksikCardsBase { private const string StackKey = "Nesen"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.3f; statModifiers.movementSpeed = 1.15f; gun.damage = 1.7f; gun.projectileSpeed = 1.25f; gun.reloadTime = 0.75f; gun.ammo = 2; gun.projectileSize = 1.05f; block.cdMultiplier = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int nesenLevel = ReksikStackTrackerMono.GetOrAdd(player).Add("Nesen"); YinYangPairMono yinYangPairMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)yinYangPairMono == (Object)null) { yinYangPairMono = ((Component)player).gameObject.AddComponent(); } yinYangPairMono.SetNesenLevel(nesenLevel); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int nesenLevel = (((Object)(object)component != (Object)null) ? component.Remove("Nesen") : 0); YinYangPairMono component2 = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.SetNesenLevel(nesenLevel); } } } protected override string GetTitle() { return "Nesen"; } protected override string GetDescription() { return "YIN: block drains the closest enemy. With Bonds enabled, Tukson unlocks an area-draining Harmony cycle. Stacks scale every part."; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Gun", amount = "ultra buffs", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Yin", amount = "block -> drain", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Stacks", amount = "+range +sustain", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Harmony", amount = "pair with Tukson", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } } public class OneAndMinusOneCard : ReksikCardsBase { private const string StackKey = "OneAndMinusOne"; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; statModifiers.health = 1.05f; gun.reloadTime = 0.95f; gun.ammo = 1; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (!((Object)(object)player == (Object)null)) { int level = ReksikStackTrackerMono.GetOrAdd(player).Add("OneAndMinusOne"); OneAndMinusOneMono oneAndMinusOneMono = ((Component)player).gameObject.GetComponent(); if ((Object)(object)oneAndMinusOneMono == (Object)null) { oneAndMinusOneMono = ((Component)player).gameObject.AddComponent(); } oneAndMinusOneMono.SetLevel(level); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)player == (Object)null) { return; } ReksikStackTrackerMono component = ((Component)player).gameObject.GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.Remove("OneAndMinusOne") : 0); OneAndMinusOneMono component2 = ((Component)player).gameObject.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (num <= 0) { Object.Destroy((Object)(object)component2); } else { component2.SetLevel(num); } } } protected override string GetTitle() { return "1 and -1"; } protected override string GetDescription() { return "Shots alternate: -1 stores power, +1 releases it as damage, size, speed, and healing. Every stack linearly scales the stored charge and payoff."; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = false, stat = "-1", amount = "prepare", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "+1", amount = "payoff", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Payoff", amount = "damage + size + speed", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Stored charge", amount = "+1 / stack", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } } public abstract class ReksikCardsBase : CustomCard { public override string GetModName() { return "Reksik"; } protected override GameObject? GetCardArt() { try { return ReksikCardArtCache.GetOrCreate(((CustomCard)this).GetTitle()); } catch (Exception arg) { Debug.LogWarning(string.Format("[{0}] Card art generation failed: {1}", "Reksik", arg)); return null; } } } internal static class ReksikContentSettingsMenu { private sealed class View { private Toggle? _mechanics; private Toggle? _cultureVfx; private Toggle? _playerText; private TextMeshProUGUI? _mechanicsLabel; private TextMeshProUGUI? _cultureVfxLabel; private TextMeshProUGUI? _playerTextLabel; private TMP_InputField? _rate; private TMP_InputField? _common; private TMP_InputField? _uncommon; private TMP_InputField? _rare; private TMP_InputField? _legendary; private TextMeshProUGUI? _summary; private bool _refreshing; internal GameObject Root { get; } internal View(GameObject root) { Root = root; } internal void Build() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) AddText("REKSIKCARDS 3.0 / CONTENT CONTROL", 32, AccentColor, 42f); AddText("HOST-SYNCED | CLIENTS READ-ONLY | LONG-MATCH BUDGETS", 18, MutedColor, 28f); _mechanics = AddToggle("CULTURE CARD MECHANICS", ReksikHostSettings.CultureMechanicsEnabled, delegate(bool value) { ReksikHostSettings.SetCultureMechanicsEnabled(value); }, out _mechanicsLabel); _cultureVfx = AddToggle("CULTURE COMBAT VFX", ReksikHostSettings.CultureVfxEnabled, delegate(bool value) { ReksikHostSettings.SetCultureVfxEnabled(value); }, out _cultureVfxLabel); _playerText = AddToggle("TEXT ABOVE PLAYERS / DIAGNOSTIC", ReksikHostSettings.PlayerStatusTextEnabled, delegate(bool value) { ReksikHostSettings.SetPlayerStatusTextEnabled(value); }, out _playerTextLabel); AddText("CULTURE EFFECT RATE / 1-30 HZ", 20, TextColor, 28f); _rate = AddInput(delegate(float value) { ReksikHostSettings.SetCultureEffectRateHz(value); }); AddText("REKSIK DRAW WEIGHTS / 0.01-100", 20, TextColor, 30f); AddText("COMMON", 17, MutedColor, 22f); _common = AddInput(delegate(float value) { ApplyWeights(value); }); AddText("UNCOMMON", 17, MutedColor, 22f); _uncommon = AddInput(delegate(float value) { float? uncommon = value; ApplyWeights(null, uncommon); }); AddText("RARE", 17, MutedColor, 22f); _rare = AddInput(delegate(float value) { float? rare = value; ApplyWeights(null, null, rare); }); AddText("LEGENDARY", 17, MutedColor, 22f); _legendary = AddInput(delegate(float value) { float? legendary = value; ApplyWeights(null, null, null, legendary); }); AddText(string.Empty, 18, MutedColor, 56f, out _summary); AddText("Weights change probability only. Card eligibility remains in Toggle Cards.", 16, MutedColor, 32f); } internal void Refresh() { if ((Object)(object)_mechanics == (Object)null || (Object)(object)_cultureVfx == (Object)null || (Object)(object)_playerText == (Object)null || (Object)(object)_mechanicsLabel == (Object)null || (Object)(object)_cultureVfxLabel == (Object)null || (Object)(object)_playerTextLabel == (Object)null || (Object)(object)_rate == (Object)null || (Object)(object)_common == (Object)null || (Object)(object)_uncommon == (Object)null || (Object)(object)_rare == (Object)null || (Object)(object)_legendary == (Object)null || (Object)(object)_summary == (Object)null) { return; } bool isHost = ReksikHostSettings.IsHost; _refreshing = true; try { SetToggle(_mechanics, _mechanicsLabel, "CULTURE CARD MECHANICS", ReksikHostSettings.CultureMechanicsEnabled, isHost); SetToggle(_cultureVfx, _cultureVfxLabel, "CULTURE COMBAT VFX", ReksikHostSettings.CultureVfxEnabled, isHost); SetToggle(_playerText, _playerTextLabel, "TEXT ABOVE PLAYERS / DIAGNOSTIC", ReksikHostSettings.PlayerStatusTextEnabled, isHost); SetInput(_rate, ReksikHostSettings.CultureEffectRateHz, isHost); SetInput(_common, ReksikHostSettings.CommonWeight, isHost); SetInput(_uncommon, ReksikHostSettings.UncommonWeight, isHost); SetInput(_rare, ReksikHostSettings.RareWeight, isHost); SetInput(_legendary, ReksikHostSettings.LegendaryWeight, isHost); ((TMP_Text)_summary).text = "RATE " + Format(ReksikHostSettings.CultureEffectRateHz) + " Hz | COMMON x" + Format(ReksikHostSettings.CommonWeight) + " | UNCOMMON x" + Format(ReksikHostSettings.UncommonWeight) + "\nRARE x" + Format(ReksikHostSettings.RareWeight) + " | LEGENDARY x" + Format(ReksikHostSettings.LegendaryWeight) + " | PLAYER TEXT " + (ReksikHostSettings.PlayerStatusTextEnabled ? "ON" : "OFF"); } finally { _refreshing = false; } } private Toggle AddToggle(string label, bool initial, Action apply, out TextMeshProUGUI labelText) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) GameObject val = MenuHandler.CreateToggle(initial, label, Root, (UnityAction)delegate(bool value) { if (!_refreshing) { apply(value); } }, 22, false, (Color?)TextColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Toggle component = val.GetComponent(); labelText = val.GetComponentInChildren(); Compact(val, 38f); StyleToggle(component); return component; } private TMP_InputField AddInput(Action apply) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) GameObject val = MenuHandler.CreateInputField("value", 21, Root, (UnityAction)delegate { }); TMP_InputField componentInChildren = val.GetComponentInChildren(); ((UnityEventBase)componentInChildren.onValueChanged).RemoveAllListeners(); ((UnityEvent)(object)componentInChildren.onEndEdit).AddListener((UnityAction)delegate(string text) { if (!_refreshing) { if (TryParse(text, out var value)) { apply(value); } Refresh(); } }); Compact(val, 38f); StyleSelectable((Selectable)(object)componentInChildren); Image component = ((Component)componentInChildren).GetComponent(); if ((Object)(object)component != (Object)null) { ((Graphic)component).color = DarkControl; } return componentInChildren; } private void ApplyWeights(float? common = null, float? uncommon = null, float? rare = null, float? legendary = null) { ReksikHostSettings.SetRarityWeights(common ?? ReksikHostSettings.CommonWeight, uncommon ?? ReksikHostSettings.UncommonWeight, rare ?? ReksikHostSettings.RareWeight, legendary ?? ReksikHostSettings.LegendaryWeight); } private void AddText(string value, int size, Color color, float height) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) AddText(value, size, color, height, out TextMeshProUGUI _); } private void AddText(string value, int size, Color color, float height, out TextMeshProUGUI text) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) MenuHandler.CreateText(value, Root, ref text, size, false, (Color?)color, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)text).gameObject, height); } private static void SetToggle(Toggle toggle, TextMeshProUGUI label, string baseLabel, bool enabled, bool editable) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) ((Selectable)toggle).interactable = editable; toggle.isOn = enabled; ((TMP_Text)label).text = (enabled ? "[ON] " : "[OFF] ") + baseLabel; ((Graphic)label).color = ((!editable) ? LockedColor : (enabled ? AccentColor : TextColor)); if ((Object)(object)toggle.graphic != (Object)null && (Object)(object)((Selectable)toggle).targetGraphic != (Object)(object)toggle.graphic) { toggle.graphic.color = AccentColor; } } private static void SetInput(TMP_InputField input, float value, bool editable) { ((Selectable)input).interactable = editable; input.SetTextWithoutNotify(Format(value)); } private static bool TryParse(string text, out float value) { if ((float.TryParse(text, NumberStyles.Float, CultureInfo.InvariantCulture, out value) || float.TryParse(text, NumberStyles.Float, CultureInfo.CurrentCulture, out value)) && value >= 0.01f && value <= 100f && !float.IsNaN(value)) { return !float.IsInfinity(value); } return false; } private static string Format(float value) { return value.ToString("0.###", CultureInfo.InvariantCulture); } private static void Compact(GameObject gameObject, float height) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) RectTransform component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.sizeDelta = new Vector2(component.sizeDelta.x, height); } LayoutElement component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.preferredHeight = height; component2.minHeight = height; } } private static void StyleSelectable(Selectable selectable) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0058: Unknown result type (might be due to invalid IL or missing references) ColorBlock colors = selectable.colors; ((ColorBlock)(ref colors)).normalColor = DarkControl; ((ColorBlock)(ref colors)).highlightedColor = DarkHighlight; ((ColorBlock)(ref colors)).pressedColor = AccentColor; ((ColorBlock)(ref colors)).disabledColor = new Color(0.08f, 0.08f, 0.1f, 0.45f); ((ColorBlock)(ref colors)).colorMultiplier = 1f; selectable.colors = colors; } private static void StyleToggle(Toggle toggle) { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)toggle == (Object)null) { return; } Graphic graphic = toggle.graphic; if ((Object)(object)graphic != (Object)null && (Object)(object)((Selectable)toggle).targetGraphic == (Object)(object)graphic) { ColorBlock colors = ((Selectable)toggle).colors; ((ColorBlock)(ref colors)).normalColor = AccentColor; ((ColorBlock)(ref colors)).highlightedColor = new Color(0.58f, 0.95f, 1f, 1f); ((ColorBlock)(ref colors)).pressedColor = Color.white; ((ColorBlock)(ref colors)).disabledColor = new Color(AccentColor.r, AccentColor.g, AccentColor.b, 0.45f); ((ColorBlock)(ref colors)).colorMultiplier = 1f; ((Selectable)toggle).colors = colors; } else { StyleSelectable((Selectable)(object)toggle); if ((Object)(object)graphic != (Object)null) { graphic.color = AccentColor; } } } } private static readonly Color TextColor = new Color(0.9f, 0.92f, 0.96f, 1f); private static readonly Color MutedColor = new Color(0.55f, 0.58f, 0.65f, 1f); private static readonly Color AccentColor = new Color(0.35f, 0.88f, 1f, 1f); private static readonly Color LockedColor = new Color(1f, 0.55f, 0.42f, 1f); private static readonly Color DarkControl = new Color(0.08f, 0.09f, 0.13f, 0.96f); private static readonly Color DarkHighlight = new Color(0.1f, 0.22f, 0.28f, 1f); private static readonly List Views = new List(); private static bool _registered; internal static void Register() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown if (!_registered) { Unbound.RegisterMenu("REKSIK CONTENT", new UnityAction(RefreshAllViews), (Action)BuildMenu, (GameObject)null, true); _registered = true; } } internal static void RefreshAllViews() { for (int num = Views.Count - 1; num >= 0; num--) { if ((Object)(object)Views[num].Root == (Object)null) { Views.RemoveAt(num); } else { Views[num].Refresh(); } } } private static void BuildMenu(GameObject root) { View view = new View(root); Views.Add(view); view.Build(); view.Refresh(); } } public enum ReksikHostPreset { Marathon, Balanced, Chaos, Legacy } public static class ReksikHostSettings { private const int ProtocolVersion = 4; private const float ClientInitialRetryInterval = 6f; private const float ClientRecoveryRetryInterval = 45f; private const string SyncEvent = "ReksikCards.Settings.v4.Sync"; private const string RequestEvent = "ReksikCards.Settings.v4.Request"; private const string HandshakeId = "com.reksikcards.rounds.settings.v4"; private static ConfigEntry? _hostPreset; private static ConfigEntry? _bondsEnabled; private static ConfigEntry? _vfxIntensity; private static ConfigEntry? _mechanicPower; private static ConfigEntry? _cultureMechanicsEnabled; private static ConfigEntry? _cultureVfxEnabled; private static ConfigEntry? _playerStatusTextEnabled; private static ConfigEntry? _cultureEffectRateHz; private static ConfigEntry? _commonWeight; private static ConfigEntry? _uncommonWeight; private static ConfigEntry? _rareWeight; private static ConfigEntry? _legendaryWeight; private static bool _initialized; private static bool _networkingStarted; private static bool _suppressConfigEvents; private static bool _wasOnline; private static bool _wasHost = true; private static bool _clientHasSnapshot; private static float _nextClientRequestAt; private static long _hostRevision; private static long _lastAcceptedRevision = -1L; private static object? _sessionRoom; private static Type? _photonNetworkType; public static bool IsHost { get { Type type = ResolvePhotonNetworkType(); if (type == null) { return true; } if (!IsOnlineSession(type)) { return true; } bool value; return TryReadStaticBool(type, "IsMasterClient", out value) && value; } } public static float MechanicPower { get; private set; } = 1f; public static float VfxScale { get; private set; } = 1f; public static bool BondsEnabled { get; private set; } = true; public static bool CultureMechanicsEnabled { get; private set; } = true; public static bool CultureVfxEnabled { get; private set; } = true; public static bool PlayerStatusTextEnabled { get; private set; } public static float CultureEffectRateHz { get; private set; } = 10f; public static float CommonWeight { get; private set; } = 1f; public static float UncommonWeight { get; private set; } = 1f; public static float RareWeight { get; private set; } = 1f; public static float LegendaryWeight { get; private set; } = 1f; public static string PresetName { get; private set; } = ReksikHostPreset.Marathon.ToString(); public static void Initialize(ConfigFile config) { if (config == null) { throw new ArgumentNullException("config"); } if (!_initialized) { _hostPreset = config.Bind("Host Settings", "HostPreset", ReksikHostPreset.Marathon, "Starting profile for a lobby. Marathon is the ReksikCards 3.0 default."); _bondsEnabled = config.Bind("Host Settings", "BondsEnabled", true, "Enables cross-card bonds and combo mechanics. Only the room host can change the live value."); _vfxIntensity = config.Bind("Host Settings", "VfxIntensity", 1f, "Non-negative direct VFX multiplier. There is no upper cap."); _mechanicPower = config.Bind("Host Settings", "MechanicPowerMultiplier", 1f, "Non-negative direct linear mechanic multiplier. There are no diminishing returns or upper caps."); _cultureMechanicsEnabled = config.Bind("Host Content", "CultureMechanicsEnabled", true, "Enable the shared mechanics used by the 198 culture cards."); _cultureVfxEnabled = config.Bind("Host Content", "CultureVfxEnabled", true, "Enable synchronized gameplay VFX emitted by culture mechanics."); _playerStatusTextEnabled = config.Bind("Host Content", "PlayerStatusTextEnabled", false, "Show diagnostic text above players. Off by default to keep long matches readable."); _cultureEffectRateHz = config.Bind("Host Content", "CultureEffectRateHz", 10f, "Shared culture runtime update rate from 1 to 30 Hz."); _commonWeight = config.Bind("Host Rarity Weights", "Common", 1f, "Positive draw-weight multiplier for Reksik Common cards."); _uncommonWeight = config.Bind("Host Rarity Weights", "Uncommon", 1f, "Positive draw-weight multiplier for Reksik Uncommon cards."); _rareWeight = config.Bind("Host Rarity Weights", "Rare", 1f, "Positive draw-weight multiplier for Reksik Rare cards."); _legendaryWeight = config.Bind("Host Rarity Weights", "Legendary", 1f, "Positive draw-weight multiplier for Reksik Legendary cards."); _hostPreset.SettingChanged += OnLocalConfigChanged; _bondsEnabled.SettingChanged += OnLocalConfigChanged; _vfxIntensity.SettingChanged += OnLocalConfigChanged; _mechanicPower.SettingChanged += OnLocalConfigChanged; _cultureMechanicsEnabled.SettingChanged += OnLocalConfigChanged; _cultureVfxEnabled.SettingChanged += OnLocalConfigChanged; _playerStatusTextEnabled.SettingChanged += OnLocalConfigChanged; _cultureEffectRateHz.SettingChanged += OnLocalConfigChanged; _commonWeight.SettingChanged += OnLocalConfigChanged; _uncommonWeight.SettingChanged += OnLocalConfigChanged; _rareWeight.SettingChanged += OnLocalConfigChanged; _legendaryWeight.SettingChanged += OnLocalConfigChanged; _initialized = true; PullRuntimeFromConfig(); _hostRevision = 1L; } } public static void StartNetworking() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown if (!_networkingStarted) { NetworkingManager.RegisterEvent("ReksikCards.Settings.v4.Sync", new PhotonEvent(ReceiveHostState)); NetworkingManager.RegisterEvent("ReksikCards.Settings.v4.Request", new PhotonEvent(ReceiveStateRequest)); Unbound.RegisterHandshake("com.reksikcards.rounds.settings.v4", (Action)OnSettingsHandshake); _networkingStarted = true; UpdateHostSync(); } } public static void UpdateHostSync() { if (!_networkingStarted || !_initialized) { return; } object currentRoom = GetCurrentRoom(); bool num = currentRoom != null && IsOnlineSession(); bool isHost = IsHost; if (!num) { if (_wasOnline) { if (PullRuntimeFromConfig()) { AdvanceHostRevision(); } ReksikSettingsMenu.RefreshAllViews(); } ClearTrackedSession(); return; } int num2; int num3; if (_wasOnline) { num2 = ((currentRoom != _sessionRoom) ? 1 : 0); if (num2 == 0) { num3 = ((isHost != _wasHost) ? 1 : 0); goto IL_006c; } } else { num2 = 1; } num3 = 0; goto IL_006c; IL_006c: bool flag = (byte)num3 != 0; if (num2 != 0) { BeginSession(currentRoom, isHost); if (isHost) { BroadcastHostState(); } else { RequestHostStateAndScheduleRetry(); } ReksikSettingsMenu.RefreshAllViews(); } else if (flag) { ChangeHostRole(isHost); if (isHost) { BroadcastHostState(); } else { RequestHostStateAndScheduleRetry(); } ReksikSettingsMenu.RefreshAllViews(); } else if (!isHost && Time.unscaledTime >= _nextClientRequestAt) { RequestHostStateAndScheduleRetry(); } } internal static bool SelectPreset(ReksikHostPreset preset) { if (!CanEditLiveSettings() || _hostPreset == null || _bondsEnabled == null || _vfxIntensity == null || _mechanicPower == null) { return false; } bool value; float value2; float value3; switch (preset) { case ReksikHostPreset.Balanced: value = true; value2 = 0.9f; value3 = 0.85f; break; case ReksikHostPreset.Chaos: value = true; value2 = 1.35f; value3 = 1.5f; break; case ReksikHostPreset.Legacy: value = false; value2 = 1f; value3 = 1f; break; default: value = true; value2 = 1f; value3 = 1f; break; } _suppressConfigEvents = true; try { _hostPreset.Value = preset; _bondsEnabled.Value = value; _vfxIntensity.Value = value2; _mechanicPower.Value = value3; } finally { _suppressConfigEvents = false; } CommitHostConfigChange(); return true; } internal static bool SetBondsEnabled(bool enabled) { if (!CanEditLiveSettings() || _bondsEnabled == null) { return false; } _bondsEnabled.Value = enabled; return true; } internal static bool SetMechanicPower(float value) { if (!CanEditLiveSettings() || _mechanicPower == null || !IsValidMultiplier(value)) { return false; } _mechanicPower.Value = value; return true; } internal static bool SetVfxScale(float value) { if (!CanEditLiveSettings() || _vfxIntensity == null || !IsValidMultiplier(value)) { return false; } _vfxIntensity.Value = value; return true; } internal static bool SetCultureMechanicsEnabled(bool value) { if (!CanEditLiveSettings() || _cultureMechanicsEnabled == null) { return false; } _cultureMechanicsEnabled.Value = value; return true; } internal static bool SetCultureVfxEnabled(bool value) { if (!CanEditLiveSettings() || _cultureVfxEnabled == null) { return false; } _cultureVfxEnabled.Value = value; return true; } internal static bool SetPlayerStatusTextEnabled(bool value) { if (!CanEditLiveSettings() || _playerStatusTextEnabled == null) { return false; } _playerStatusTextEnabled.Value = value; return true; } internal static bool SetCultureEffectRateHz(float value) { if (!CanEditLiveSettings() || _cultureEffectRateHz == null || !IsValidEffectRate(value)) { return false; } _cultureEffectRateHz.Value = value; return true; } internal static bool SetRarityWeights(float common, float uncommon, float rare, float legendary) { if (!CanEditLiveSettings() || _commonWeight == null || _uncommonWeight == null || _rareWeight == null || _legendaryWeight == null || !IsValidRarityWeight(common) || !IsValidRarityWeight(uncommon) || !IsValidRarityWeight(rare) || !IsValidRarityWeight(legendary)) { return false; } _suppressConfigEvents = true; try { _commonWeight.Value = common; _uncommonWeight.Value = uncommon; _rareWeight.Value = rare; _legendaryWeight.Value = legendary; } finally { _suppressConfigEvents = false; } CommitHostConfigChange(); return true; } private static void OnLocalConfigChanged(object sender, EventArgs eventArgs) { if (!_suppressConfigEvents) { RepairInvalidConfigEntries(); if (CanEditLiveSettings()) { CommitHostConfigChange(); } } } private static void CommitHostConfigChange() { if (PullRuntimeFromConfig()) { AdvanceHostRevision(); if (_networkingStarted && IsOnlineSession()) { BroadcastHostState(); } } ReksikSettingsMenu.RefreshAllViews(); } private static bool PullRuntimeFromConfig() { if (_hostPreset == null || _bondsEnabled == null || _vfxIntensity == null || _mechanicPower == null || _cultureMechanicsEnabled == null || _cultureVfxEnabled == null || _playerStatusTextEnabled == null || _cultureEffectRateHz == null || _commonWeight == null || _uncommonWeight == null || _rareWeight == null || _legendaryWeight == null) { return false; } float num = ValidOrFallback(_vfxIntensity, VfxScale, IsValidMultiplier, "VFX intensity"); float num2 = ValidOrFallback(_mechanicPower, MechanicPower, IsValidMultiplier, "mechanic power"); float num3 = ValidOrFallback(_cultureEffectRateHz, CultureEffectRateHz, IsValidEffectRate, "culture effect rate"); float num4 = ValidOrFallback(_commonWeight, CommonWeight, IsValidRarityWeight, "Common weight"); float num5 = ValidOrFallback(_uncommonWeight, UncommonWeight, IsValidRarityWeight, "Uncommon weight"); float num6 = ValidOrFallback(_rareWeight, RareWeight, IsValidRarityWeight, "Rare weight"); float num7 = ValidOrFallback(_legendaryWeight, LegendaryWeight, IsValidRarityWeight, "Legendary weight"); string text = _hostPreset.Value.ToString(); bool value = _bondsEnabled.Value; bool value2 = _cultureMechanicsEnabled.Value; bool value3 = _cultureVfxEnabled.Value; bool value4 = _playerStatusTextEnabled.Value; bool num8 = !string.Equals(PresetName, text, StringComparison.Ordinal) || BondsEnabled != value || VfxScale != num || MechanicPower != num2 || CultureMechanicsEnabled != value2 || CultureVfxEnabled != value3 || PlayerStatusTextEnabled != value4 || CultureEffectRateHz != num3 || CommonWeight != num4 || UncommonWeight != num5 || RareWeight != num6 || LegendaryWeight != num7; PresetName = text; BondsEnabled = value; VfxScale = num; MechanicPower = num2; CultureMechanicsEnabled = value2; CultureVfxEnabled = value3; PlayerStatusTextEnabled = value4; CultureEffectRateHz = num3; CommonWeight = num4; UncommonWeight = num5; RareWeight = num6; LegendaryWeight = num7; if (num8) { ReksikRarityWeights.RequestApply(); } return num8; } private static void RepairInvalidConfigEntries() { RepairIfInvalid(_vfxIntensity, VfxScale, IsValidMultiplier, "VFX intensity"); RepairIfInvalid(_mechanicPower, MechanicPower, IsValidMultiplier, "mechanic power"); RepairIfInvalid(_cultureEffectRateHz, CultureEffectRateHz, IsValidEffectRate, "culture effect rate"); RepairIfInvalid(_commonWeight, CommonWeight, IsValidRarityWeight, "Common weight"); RepairIfInvalid(_uncommonWeight, UncommonWeight, IsValidRarityWeight, "Uncommon weight"); RepairIfInvalid(_rareWeight, RareWeight, IsValidRarityWeight, "Rare weight"); RepairIfInvalid(_legendaryWeight, LegendaryWeight, IsValidRarityWeight, "Legendary weight"); } private static void RepairIfInvalid(ConfigEntry? entry, float fallback, Func validator, string label) { if (entry != null && !validator(entry.Value)) { Debug.LogWarning("[ReksikCards] Rejected invalid " + label + "."); RepairConfigEntry(entry, fallback); } } private static float ValidOrFallback(ConfigEntry entry, float fallback, Func validator, string label) { float value = entry.Value; if (validator(value)) { return value; } Debug.LogWarning("[ReksikCards] Rejected invalid " + label + "."); RepairConfigEntry(entry, fallback); return fallback; } private static void RepairConfigEntry(ConfigEntry entry, float fallback) { bool suppressConfigEvents = _suppressConfigEvents; _suppressConfigEvents = true; try { entry.Value = fallback; } finally { _suppressConfigEvents = suppressConfigEvents; } } private static void OnSettingsHandshake() { if (EnsureCallbackSessionTracked(out var host)) { if (host) { BroadcastHostState(); } else { RequestHostStateAndScheduleRetry(); } } } private static void ReceiveStateRequest(object[] payload) { if (IsHost && EnsureCallbackSessionTracked(out var host) && host) { BroadcastHostState(); } } private static void ReceiveHostState(object[] payload) { if (IsHost || payload == null || payload.Length < 14 || !EnsureCallbackSessionTracked(out var host) || host || !TryConvertInt(payload[0], out var result) || result != 4 || !TryConvertLong(payload[1], out var result2) || result2 < 0) { return; } ReksikHostPreset result3; float result4; float result5; float result6; float result7; float result8; float result9; float result10; if (result2 <= _lastAcceptedRevision) { if (result2 == _lastAcceptedRevision) { _clientHasSnapshot = true; _nextClientRequestAt = Time.unscaledTime + 45f; } } else if (payload[2] is string value && Enum.TryParse(value, ignoreCase: true, out result3) && payload[3] is bool bondsEnabled && TryConvertFloat(payload[4], out result4) && TryConvertFloat(payload[5], out result5) && payload[6] is bool cultureMechanicsEnabled && payload[7] is bool cultureVfxEnabled && payload[8] is bool playerStatusTextEnabled && TryConvertFloat(payload[9], out result6) && TryConvertFloat(payload[10], out result7) && TryConvertFloat(payload[11], out result8) && TryConvertFloat(payload[12], out result9) && TryConvertFloat(payload[13], out result10) && IsValidMultiplier(result4) && IsValidMultiplier(result5) && IsValidEffectRate(result6) && IsValidRarityWeight(result7) && IsValidRarityWeight(result8) && IsValidRarityWeight(result9) && IsValidRarityWeight(result10)) { PresetName = result3.ToString(); BondsEnabled = bondsEnabled; MechanicPower = result4; VfxScale = result5; CultureMechanicsEnabled = cultureMechanicsEnabled; CultureVfxEnabled = cultureVfxEnabled; PlayerStatusTextEnabled = playerStatusTextEnabled; CultureEffectRateHz = result6; CommonWeight = result7; UncommonWeight = result8; RareWeight = result9; LegendaryWeight = result10; ReksikRarityWeights.RequestApply(); _lastAcceptedRevision = result2; _clientHasSnapshot = true; _nextClientRequestAt = Time.unscaledTime + 45f; ReksikSettingsMenu.RefreshAllViews(); } } private static void RequestHostStateAndScheduleRetry() { if (_networkingStarted && !IsHost && IsOnlineSession()) { NetworkingManager.RaiseEventOthers("ReksikCards.Settings.v4.Request", new object[2] { 4, _lastAcceptedRevision }); _nextClientRequestAt = Time.unscaledTime + (_clientHasSnapshot ? 45f : 6f); } } private static void BroadcastHostState() { if (_networkingStarted && IsHost && IsOnlineSession()) { NetworkingManager.RaiseEventOthers("ReksikCards.Settings.v4.Sync", new object[14] { 4, _hostRevision, PresetName, BondsEnabled, MechanicPower, VfxScale, CultureMechanicsEnabled, CultureVfxEnabled, PlayerStatusTextEnabled, CultureEffectRateHz, CommonWeight, UncommonWeight, RareWeight, LegendaryWeight }); } } private static void BeginSession(object room, bool host) { _sessionRoom = room; _wasOnline = true; _wasHost = host; ResetClientRevision(); if (host) { AdvanceHostRevision(); } } private static void ChangeHostRole(bool host) { long lastAcceptedRevision = _lastAcceptedRevision; _wasHost = host; ResetClientRevision(); if (host) { if (lastAcceptedRevision > _hostRevision) { _hostRevision = lastAcceptedRevision; } AdvanceHostRevision(); } } private static bool EnsureCallbackSessionTracked(out bool host) { host = IsHost; object currentRoom = GetCurrentRoom(); if (currentRoom == null || !IsOnlineSession()) { return false; } if (!_wasOnline || currentRoom != _sessionRoom) { BeginSession(currentRoom, host); } else if (host != _wasHost) { ChangeHostRole(host); } return true; } private static void ClearTrackedSession() { _sessionRoom = null; _wasOnline = false; _wasHost = true; ResetClientRevision(); } private static void ResetClientRevision() { _lastAcceptedRevision = -1L; _clientHasSnapshot = false; _nextClientRequestAt = 0f; } private static void AdvanceHostRevision() { if (_hostRevision < long.MaxValue) { _hostRevision++; } } private static bool CanEditLiveSettings() { if (_initialized) { return IsHost; } return false; } private static object? GetCurrentRoom() { Type type = ResolvePhotonNetworkType(); if (type == null || !TryReadStaticProperty(type, "CurrentRoom", out object value)) { return null; } return value; } private static bool IsOnlineSession() { Type type = ResolvePhotonNetworkType(); if (type != null) { return IsOnlineSession(type); } return false; } private static bool IsOnlineSession(Type photonNetwork) { if (TryReadStaticBool(photonNetwork, "OfflineMode", out var value) && value) { return false; } if (TryReadStaticBool(photonNetwork, "IsConnected", out var value2) && !value2) { return false; } if (TryReadStaticProperty(photonNetwork, "CurrentRoom", out object value3)) { return value3 != null; } return TryReadStaticBool(photonNetwork, "IsConnected", out value2) && value2; } private static Type? ResolvePhotonNetworkType() { if (_photonNetworkType != null) { return _photonNetworkType; } _photonNetworkType = Type.GetType("Photon.Pun.PhotonNetwork, PhotonUnityNetworking", throwOnError: false); if (_photonNetworkType != null) { return _photonNetworkType; } Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); for (int i = 0; i < assemblies.Length; i++) { Type type = assemblies[i].GetType("Photon.Pun.PhotonNetwork", throwOnError: false); if (type != null) { _photonNetworkType = type; break; } } return _photonNetworkType; } private static bool TryReadStaticBool(Type type, string propertyName, out bool value) { value = false; if (!TryReadStaticProperty(type, propertyName, out object value2) || !(value2 is bool flag)) { return false; } value = flag; return true; } private static bool TryReadStaticProperty(Type type, string propertyName, out object? value) { value = null; try { PropertyInfo property = type.GetProperty(propertyName, BindingFlags.Static | BindingFlags.Public); if (property == null) { return false; } value = property.GetValue(null, null); return true; } catch { return false; } } private static bool TryConvertInt(object value, out int result) { try { result = Convert.ToInt32(value, CultureInfo.InvariantCulture); return true; } catch { result = 0; return false; } } private static bool TryConvertLong(object value, out long result) { try { result = Convert.ToInt64(value, CultureInfo.InvariantCulture); return true; } catch { result = 0L; return false; } } private static bool TryConvertFloat(object value, out float result) { try { result = Convert.ToSingle(value, CultureInfo.InvariantCulture); return true; } catch { result = 0f; return false; } } private static bool IsValidMultiplier(float value) { if (value >= 0f && !float.IsNaN(value)) { return !float.IsInfinity(value); } return false; } private static bool IsValidEffectRate(float value) { if (value >= 1f && value <= 30f && !float.IsNaN(value)) { return !float.IsInfinity(value); } return false; } private static bool IsValidRarityWeight(float value) { if (value >= 0.01f && value <= 100f && !float.IsNaN(value)) { return !float.IsInfinity(value); } return false; } } internal static class ReksikRarities { private const string LegendaryName = "Legendary"; internal static Rarity Legendary => RarityUtils.GetRarity("Legendary"); } internal static class ReksikRarityWeights { private static readonly Dictionary Samples = new Dictionary(); private static bool _applyRequested = true; private static float _nextCheckAt; private static int _knownCardCount; private static int _stableScans; internal static void RequestApply() { _applyRequested = true; _stableScans = 0; } internal static void Update() { if (!(Time.unscaledTime < _nextCheckAt)) { _nextCheckAt = Time.unscaledTime + ((_stableScans >= 2) ? 5f : 1f); if (_applyRequested || !SamplesMatch()) { ApplyAll(); } } } private static void ApplyAll() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) List all = Cards.all; int num = 0; Samples.Clear(); for (int i = 0; i < all.Count; i++) { CardInfo val = all[i]; if (IsReksikCard(val)) { num++; float num2 = WeightFor(val.rarity); if (Math.Abs(RarityUtils.GetCardRarityModifier(val) - num2) > 0.0001f) { RarityUtils.SetCardRarityModifier(val, num2); } if (!Samples.ContainsKey(val.rarity)) { Samples.Add(val.rarity, val); } } } _stableScans = ((num == _knownCardCount) ? (_stableScans + 1) : 0); _knownCardCount = num; _applyRequested = false; } private static bool SamplesMatch() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair sample in Samples) { if ((Object)(object)sample.Value == (Object)null) { return false; } float num = WeightFor(sample.Key); if (Math.Abs(RarityUtils.GetCardRarityModifier(sample.Value) - num) > 0.0001f) { return false; } } return Samples.Count > 0; } private static bool IsReksikCard(CardInfo card) { if ((Object)(object)card == (Object)null) { return false; } CustomCard component = ((Component)card).GetComponent(); if ((Object)(object)component == (Object)null) { return false; } Type type = ((object)component).GetType(); if (!(component is ReksikCardsBase)) { if (type.Namespace != null) { return type.Namespace.StartsWith("ReksikCards.Cards.Culture", StringComparison.Ordinal); } return false; } return true; } private unsafe static float WeightFor(Rarity rarity) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Invalid comparison between Unknown and I4 if (((object)(*(Rarity*)(&rarity))/*cast due to .constrained prefix*/).Equals((object?)ReksikRarities.Legendary)) { return ReksikHostSettings.LegendaryWeight; } if ((int)rarity != 1) { if ((int)rarity == 2) { return ReksikHostSettings.RareWeight; } return ReksikHostSettings.CommonWeight; } return ReksikHostSettings.UncommonWeight; } } public static class ReksikSettingsMenu { private sealed class SettingsView { private readonly Dictionary _presetButtons = new Dictionary(); private TextMeshProUGUI? _status; private TextMeshProUGUI? _liveSummary; private Toggle? _bondsToggle; private TextMeshProUGUI? _bondsLabel; private TMP_InputField? _mechanicInput; private TMP_InputField? _vfxInput; private bool _refreshing; public GameObject Root { get; } public SettingsView(GameObject root) { Root = root; } public void Build() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) TextMeshProUGUI val = default(TextMeshProUGUI); MenuHandler.CreateText("REKSIKCARDS 3.0 / HOST RULES", Root, ref val, 34, false, (Color?)AccentColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)val).gameObject, 42f); TextMeshProUGUI val2 = default(TextMeshProUGUI); MenuHandler.CreateText("LINEAR STACKS | NO DIMINISHING | NO HIDDEN CAPS", Root, ref val2, 19, false, (Color?)MutedColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)val2).gameObject, 28f); MenuHandler.CreateText(string.Empty, Root, ref _status, 22, false, (Color?)HostColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)_status).gameObject, 32f); TextMeshProUGUI val3 = default(TextMeshProUGUI); MenuHandler.CreateText("PRESET", Root, ref val3, 22, false, (Color?)TextColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)val3).gameObject, 30f); AddPresetButton(ReksikHostPreset.Marathon, "MARATHON - LONG-GAME DEFAULT"); AddPresetButton(ReksikHostPreset.Balanced, "BALANCED - GENTLER MECHANICS"); AddPresetButton(ReksikHostPreset.Chaos, "CHAOS - 1.5x MECHANICS"); AddPresetButton(ReksikHostPreset.Legacy, "LEGACY - BONDS OFF"); GameObject val4 = MenuHandler.CreateToggle(ReksikHostSettings.BondsEnabled, "ENABLE CROSS-CARD BONDS", Root, (UnityAction)delegate(bool enabled) { if (!_refreshing) { ReksikHostSettings.SetBondsEnabled(enabled); } }, 24, false, (Color?)TextColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); _bondsToggle = val4.GetComponent(); _bondsLabel = val4.GetComponentInChildren(); Compact(val4, 40f); StyleToggle(_bondsToggle); TextMeshProUGUI val5 = default(TextMeshProUGUI); MenuHandler.CreateText("MECHANIC POWER - NON-NEGATIVE, NO UPPER CAP", Root, ref val5, 20, false, (Color?)TextColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)val5).gameObject, 28f); _mechanicInput = CreateNumberInput(delegate(float value) { ReksikHostSettings.SetMechanicPower(value); }); TextMeshProUGUI val6 = default(TextMeshProUGUI); MenuHandler.CreateText("VFX INTENSITY - NON-NEGATIVE, NO UPPER CAP", Root, ref val6, 20, false, (Color?)TextColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)val6).gameObject, 28f); _vfxInput = CreateNumberInput(delegate(float value) { ReksikHostSettings.SetVfxScale(value); }); MenuHandler.CreateText(string.Empty, Root, ref _liveSummary, 20, false, (Color?)MutedColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)_liveSummary).gameObject, 48f); TextMeshProUGUI val7 = default(TextMeshProUGUI); MenuHandler.CreateText("Host sends on join/change/request. Clients retry slowly for recovery.", Root, ref val7, 17, false, (Color?)MutedColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Compact(((Component)val7).gameObject, 34f); } public void Refresh() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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) if ((Object)(object)_status == (Object)null || (Object)(object)_liveSummary == (Object)null || (Object)(object)_bondsToggle == (Object)null || (Object)(object)_bondsLabel == (Object)null || (Object)(object)_mechanicInput == (Object)null || (Object)(object)_vfxInput == (Object)null) { return; } _refreshing = true; try { bool isHost = ReksikHostSettings.IsHost; ((TMP_Text)_status).text = (isHost ? "HOST AUTHORITY / EDITING ENABLED" : "CLIENT VIEW / HOST SETTINGS ARE READ-ONLY"); ((Graphic)_status).color = (isHost ? HostColor : LockedColor); foreach (KeyValuePair presetButton in _presetButtons) { ((Selectable)presetButton.Value).interactable = isHost; ((Graphic)((Component)presetButton.Value).GetComponentInChildren()).color = (string.Equals(presetButton.Key.ToString(), ReksikHostSettings.PresetName, StringComparison.OrdinalIgnoreCase) ? AccentColor : TextColor); } SetToggleState(_bondsToggle, _bondsLabel, "ENABLE CROSS-CARD BONDS", ReksikHostSettings.BondsEnabled, isHost); ((Selectable)_mechanicInput).interactable = isHost; ((Selectable)_vfxInput).interactable = isHost; _mechanicInput.SetTextWithoutNotify(FormatValue(ReksikHostSettings.MechanicPower)); _vfxInput.SetTextWithoutNotify(FormatValue(ReksikHostSettings.VfxScale)); ((TMP_Text)_liveSummary).text = "LIVE / " + ReksikHostSettings.PresetName.ToUpperInvariant() + " | BONDS " + (ReksikHostSettings.BondsEnabled ? "ON" : "OFF") + " | MECHANICS x" + FormatValue(ReksikHostSettings.MechanicPower) + " | VFX x" + FormatValue(ReksikHostSettings.VfxScale); } finally { _refreshing = false; } } private void AddPresetButton(ReksikHostPreset preset, string label) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown GameObject obj = MenuHandler.CreateButton(label, Root, (UnityAction)delegate { if (!_refreshing) { ReksikHostSettings.SelectPreset(preset); } }, 23, false, (Color?)TextColor, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); Button component = obj.GetComponent