using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using TMPro; using UnboundLib; using UnboundLib.Cards; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("RoundsEliteClasses")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("RoundsEliteClasses")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("828cc942-ce5c-4bdc-979f-41561952d540")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace RoundsEliteClasses; public enum CardRarity { Common, Rare, Legendary, Mythic } public enum CardCategory { Universal, ClassExclusive, Chaos, Environment, Utility } public class CardData { public string Name; public string Description; public CardRarity Rarity; public CardCategory Category; public ClassType? ExclusiveClass; public Color RarityColor; public float SpawnWeight; public bool IsStackable = true; public void ApplyEffect(int playerID, int stackCount) { Plugin.Log.LogInfo((object)$"Carte {Name} appliquée x{stackCount} au joueur {playerID}"); } } public static class CardManager { public static List AllCards = new List(); public static Dictionary RarityColors = new Dictionary { { CardRarity.Common, new Color(0.8f, 0.8f, 0.8f) }, { CardRarity.Rare, new Color(0.2f, 0.4f, 1f) }, { CardRarity.Legendary, new Color(0.6f, 0f, 1f) }, { CardRarity.Mythic, new Color(1f, 0.5f, 0f) } }; public static void Initialize() { RegisterUniversalCards(); RegisterChaosCards(); RegisterEnvironmentCards(); RegisterUtilityCards(); RegisterUniversalCards(); RegisterDefenseCards(); RegisterClassCards(); Plugin.Log.LogInfo((object)("CardManager initialisé — " + AllCards.Count + " cartes chargées")); } private static void RegisterUniversalCards() { Add("Double Saut", "Permet de sauter une deuxième fois en l'air", CardRarity.Common, CardCategory.Universal, 1f); Add("Triple Saut", "Permet de sauter trois fois en l'air", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Wall Jump", "Permet de sauter contre les murs", CardRarity.Common, CardCategory.Universal, 1f); Add("Dash Avant", "Courte impulsion vers l'avant", CardRarity.Common, CardCategory.Universal, 1f); Add("Dash Arrière", "Courte impulsion vers l'arrière", CardRarity.Common, CardCategory.Universal, 1f); Add("Gravité Réduite", "Tu flottes légèrement", CardRarity.Common, CardCategory.Universal, 1f); Add("Super Saut", "Sauts beaucoup plus hauts", CardRarity.Rare, CardCategory.Universal, 0.7f); Add("Glissement", "Glisse rapidement au sol", CardRarity.Common, CardCategory.Universal, 1f); Add("Téléportation Courte", "Téléportation aléatoire à chaque saut", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Sprint Passif", "Vitesse de déplacement augmentée en permanence", CardRarity.Common, CardCategory.Universal, 1f); Add("Rebond Mural", "Tu rebondis sur les murs", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Vol Court", "Vole pendant 3 secondes", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Atterrissage Silencieux", "Aucun son à l'atterrissage, position masquée", CardRarity.Common, CardCategory.Universal, 1f); Add("Esquive Auto", "Esquive automatiquement une balle une fois par vie", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Inertie Réduite", "Changements de direction instantanés", CardRarity.Common, CardCategory.Universal, 1f); Add("Balle Jumelle", "Chaque tir produit 2 balles", CardRarity.Common, CardCategory.Universal, 1f); Add("Balle Triple", "Chaque tir produit 3 balles", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Tir Rapide", "Cadence de tir augmentée", CardRarity.Common, CardCategory.Universal, 1f); Add("Balle Lourde", "Balles plus lentes mais plus puissantes", CardRarity.Common, CardCategory.Universal, 1f); Add("Balle Légère", "Balles plus rapides mais moins puissantes", CardRarity.Common, CardCategory.Universal, 1f); Add("Recul Réduit", "Recul lors du tir réduit", CardRarity.Common, CardCategory.Universal, 1f); Add("Recul Augmenté", "Recul massif mais balles ultra puissantes", CardRarity.Common, CardCategory.Universal, 1f); Add("Balle Rebondissante", "Les balles rebondissent sur les murs", CardRarity.Common, CardCategory.Universal, 1f); Add("Balle Perforante", "Traverse les obstacles", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Balle Explosive", "Explose à l'impact", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Tir en Rafale", "Tire 3 balles rapidement", CardRarity.Common, CardCategory.Universal, 1f); Add("Tir Chargé", "Maintiens pour charger un tir puissant", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Balle Magnétique", "Attire légèrement vers la cible", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Balle Gravité", "Tombe en arc de cercle", CardRarity.Common, CardCategory.Universal, 1f); Add("Balle Fantôme", "Traverse un ennemi sans le tuer mais le ralentit", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Sniper", "Une seule munition par vie mais ultra puissante", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Balle Inversée", "Part dans le sens opposé puis fait demi-tour", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Balle Spirale", "Tourne en spirale vers l'adversaire", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Tir Diagonal", "Tire en diagonale en plus du tir normal", CardRarity.Common, CardCategory.Universal, 1f); Add("Balle Fumigène", "Crée un nuage de fumée à l'impact", CardRarity.Common, CardCategory.Universal, 1f); Add("Rebond Infini", "Les balles rebondissent indéfiniment", CardRarity.Legendary, CardCategory.Universal, 0.3f); } private static void RegisterDefenseCards() { Add("Vie Supplémentaire", "+1 vie supplémentaire", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Bouclier Temporaire", "Bouclier qui absorbe 2 balles", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Régénération Lente", "Récupère lentement de la vie", CardRarity.Common, CardCategory.Universal, 1f); Add("Armure Légère", "+10% résistance aux dégâts", CardRarity.Common, CardCategory.Universal, 1f); Add("Miroir Défensif", "Renvoie une balle sur deux", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Clone Défensif", "Un faux toi absorbe une balle", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Invincibilité Courte", "1 seconde d'invincibilité après avoir reçu des dégâts", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Réduction Recul", "Recul reçu réduit", CardRarity.Common, CardCategory.Universal, 1f); Add("Absorption Partielle", "Absorbe 20% des dégâts reçus", CardRarity.Rare, CardCategory.Universal, 0.6f); Add("Barrière Énergétique", "Barrière qui bloque la prochaine balle", CardRarity.Rare, CardCategory.Universal, 0.5f); Add("Esquive Passive", "5% de chance d'esquiver automatiquement", CardRarity.Common, CardCategory.Universal, 1f); Add("Second Souffle", "Survie à une balle fatale une fois par partie", CardRarity.Legendary, CardCategory.Universal, 0.3f); Add("Ancrage", "Impossible d'être repoussé", CardRarity.Common, CardCategory.Universal, 1f); Add("Résistance Explosion", "Réduit les dégâts des explosions de 50%", CardRarity.Common, CardCategory.Universal, 1f); Add("Carapace", "La première balle reçue est absorbée", CardRarity.Rare, CardCategory.Universal, 0.6f); } private static void RegisterChaosCards() { Add("Fusion", "Mélange toutes les cartes des deux joueurs", CardRarity.Legendary, CardCategory.Chaos, 0.3f); Add("Vol", "Prend une carte aléatoire de l'adversaire", CardRarity.Rare, CardCategory.Chaos, 0.5f); Add("Échange Total", "Échange toutes vos cartes", CardRarity.Legendary, CardCategory.Chaos, 0.3f); Add("Carte Miroir", "Copie une carte aléatoire de l'adversaire", CardRarity.Rare, CardCategory.Chaos, 0.5f); Add("Carte Ruine", "Détruit une carte aléatoire de l'adversaire", CardRarity.Rare, CardCategory.Chaos, 0.5f); Add("Carte Bénie", "Double une carte aléatoire que tu possèdes", CardRarity.Legendary, CardCategory.Chaos, 0.3f); Add("Chaos Total", "Redistribue toutes les cartes aléatoirement", CardRarity.Mythic, CardCategory.Chaos, 0.1f); Add("Carte Pari", "50/50 entre un gros buff et un gros debuff", CardRarity.Rare, CardCategory.Chaos, 0.5f); Add("Sacrifice", "Perd 1 vie pour doubler tous tes stats", CardRarity.Legendary, CardCategory.Chaos, 0.3f); Add("Rebirth", "Si tu perds ce round tu gardes toutes tes cartes", CardRarity.Legendary, CardCategory.Chaos, 0.3f); Add("Equalizer", "Les deux joueurs ont les mêmes cartes pendant 1 round", CardRarity.Rare, CardCategory.Chaos, 0.4f); Add("Invisibilité Totale", "Invisibilité complète pendant 1 round", CardRarity.Legendary, CardCategory.Chaos, 0.2f); Add("Carte Temps", "Ralentit tout pendant 3 secondes", CardRarity.Legendary, CardCategory.Chaos, 0.3f); Add("Gravité Inversée", "Gravité inversée pendant 1 round", CardRarity.Legendary, CardCategory.Chaos, 0.3f); Add("Magnétisme", "Attire les balles adverses puis les renvoie", CardRarity.Mythic, CardCategory.Chaos, 0.1f); Add("Doublon", "Duplique une carte aléatoire que tu possèdes", CardRarity.Rare, CardCategory.Chaos, 0.5f); Add("Amnésie", "L'adversaire perd une carte aléatoire", CardRarity.Rare, CardCategory.Chaos, 0.5f); Add("Carte Mystère", "Effet complètement aléatoire", CardRarity.Common, CardCategory.Chaos, 1f); Add("Carte Malédiction", "Gros buff mais aussi un debuff aléatoire", CardRarity.Rare, CardCategory.Chaos, 0.5f); Add("Carte Handicap", "Te handicape pour recevoir 2 cartes au lieu d'une", CardRarity.Common, CardCategory.Chaos, 1f); } private static void RegisterEnvironmentCards() { Add("Brouillard de Guerre", "Écran partiellement masqué", CardRarity.Rare, CardCategory.Environment, 0.5f); Add("Pluie de Balles", "Balles tombent du ciel aléatoirement", CardRarity.Legendary, CardCategory.Environment, 0.3f); Add("Plateforme Fantôme", "Plateforme temporaire sous tes pieds", CardRarity.Rare, CardCategory.Environment, 0.5f); Add("Tremblement de Terre", "Vibration de la map pendant 3 secondes", CardRarity.Rare, CardCategory.Environment, 0.5f); Add("Zone Ralentissement", "Zone bleue au sol qui ralentit", CardRarity.Common, CardCategory.Environment, 1f); Add("Zone Accélération", "Zone verte au sol qui accélère", CardRarity.Common, CardCategory.Environment, 1f); Add("Mur Invisible", "Mur temporaire au centre de la map", CardRarity.Rare, CardCategory.Environment, 0.5f); Add("Portail", "2 portails téléportent les balles", CardRarity.Legendary, CardCategory.Environment, 0.3f); Add("Gravité Locale", "Zone à gravité modifiée", CardRarity.Rare, CardCategory.Environment, 0.4f); Add("Pièges au Sol", "Mines invisibles placées aléatoirement", CardRarity.Legendary, CardCategory.Environment, 0.3f); } private static void RegisterUtilityCards() { Add("Reload Instantané", "Recharge instantanément les munitions", CardRarity.Common, CardCategory.Utility, 1f); Add("Munitions Infinies", "Munitions infinies pendant 5 secondes", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Vision Améliorée", "Léger zoom permanent", CardRarity.Common, CardCategory.Utility, 1f); Add("Détection Adverse", "Vois la position adverse en permanence", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Silence", "Aucun son pendant 1 round", CardRarity.Rare, CardCategory.Utility, 0.4f); Add("Tremblement Adverse", "La visée adverse tremble", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Ralentissement Adverse", "L'adversaire ralentit pendant 3 secondes", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Accélération", "Tu accélères pendant 5 secondes", CardRarity.Common, CardCategory.Utility, 1f); Add("Carte Copie", "Copie le dernier power-up pris par l'adversaire", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Boost Démarrage", "Sprint au début de chaque round", CardRarity.Common, CardCategory.Utility, 1f); Add("Stabilisateur", "Aucun recul pendant 1 round", CardRarity.Common, CardCategory.Utility, 1f); Add("Ciblage Assisté", "Légère assistance à la visée", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Portée Augmentée", "Les balles vont plus loin", CardRarity.Common, CardCategory.Utility, 1f); Add("Portée Adverse Réduite", "Les balles adverses vont moins loin", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Balle Traçante", "Vois la trajectoire de tes balles", CardRarity.Common, CardCategory.Utility, 1f); Add("Radar de Balle", "Les balles adverses apparaissent en rouge", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Bouclier de Mana", "Absorbe 2 balles puis disparaît", CardRarity.Rare, CardCategory.Utility, 0.5f); Add("Turbo", "Vitesse x1.5 pendant 3 secondes", CardRarity.Common, CardCategory.Utility, 1f); Add("Carte Finale", "La prochaine balle fait x3 dégâts", CardRarity.Legendary, CardCategory.Utility, 0.3f); Add("Reload Instantané 2", "Double la vitesse de rechargement", CardRarity.Common, CardCategory.Utility, 1f); } private static void RegisterClassCards() { AddExclusive("Boule de Feu", "Explosion massive à l'impact", CardRarity.Rare, ClassType.Mage); AddExclusive("Tempête Arcanique", "Balles tourbillonnantes autour de toi", CardRarity.Legendary, ClassType.Mage); AddExclusive("Singularité", "Crée un trou noir qui aspire l'adversaire", CardRarity.Mythic, ClassType.Mage); AddExclusive("Frappe Létale", "One-shot si dans le dos de l'adversaire", CardRarity.Rare, ClassType.Assassin); AddExclusive("Ombre Totale", "Invisibilité totale pendant 5 secondes", CardRarity.Legendary, ClassType.Assassin); AddExclusive("Exécution", "Instakill si l'adversaire est sous 30% de vie", CardRarity.Mythic, ClassType.Assassin); AddExclusive("Forteresse", "Bouclier absorbant 3 balles", CardRarity.Rare, ClassType.Tank); AddExclusive("Séisme", "Onde de choc qui repousse tout", CardRarity.Legendary, ClassType.Tank); AddExclusive("Indestructible", "Invincible pendant 1 round entier", CardRarity.Mythic, ClassType.Tank); AddExclusive("Flèche Explosive", "Flèche qui explose à l'impact", CardRarity.Rare, ClassType.Archer); AddExclusive("Pluie de Flèches", "5 balles simultanées", CardRarity.Legendary, ClassType.Archer); AddExclusive("Flèche Divine", "Traverse tout et rebondit 10 fois", CardRarity.Mythic, ClassType.Archer); AddExclusive("Malédiction", "L'adversaire perd une carte aléatoire", CardRarity.Rare, ClassType.Demon); AddExclusive("Pacte de Sang", "Vole la moitié des cartes adverses", CardRarity.Legendary, ClassType.Demon); AddExclusive("Apocalypse", "Explosion massive sur toute la map", CardRarity.Mythic, ClassType.Demon); AddExclusive("Dédoublement", "2 clones qui tirent simultanément", CardRarity.Rare, ClassType.Specter); AddExclusive("Dimension Fantôme", "Intouchable pendant 3 secondes", CardRarity.Legendary, ClassType.Specter); AddExclusive("Possession", "Contrôle l'adversaire pendant 2 secondes", CardRarity.Mythic, ClassType.Specter); AddExclusive("Rage", "Dégâts x2 quand sous 20% de vie", CardRarity.Rare, ClassType.Berserker); AddExclusive("Frénésie", "Vitesse et dégâts x2 pendant 5 secondes", CardRarity.Legendary, ClassType.Berserker); AddExclusive("Dernière Rage", "À ta mort une explosion couvre tout l'écran", CardRarity.Mythic, ClassType.Berserker); AddExclusive("Réflexion Totale", "Renvoie 100% des balles pendant 3 secondes", CardRarity.Rare, ClassType.Mirror); AddExclusive("Double Miroir", "Crée un miroir flottant qui renvoie les balles", CardRarity.Legendary, ClassType.Mirror); AddExclusive("Monde Inversé", "Inverse les contrôles adverses pendant 1 round", CardRarity.Mythic, ClassType.Mirror); AddExclusive("Rembobinage", "Retourne 2 secondes en arrière", CardRarity.Rare, ClassType.Time); AddExclusive("Freeze", "Gèle tout pendant 1.5 secondes", CardRarity.Legendary, ClassType.Time); AddExclusive("Paradoxe", "Deux versions de toi tirent simultanément", CardRarity.Mythic, ClassType.Time); AddExclusive("Chaîne Électrique", "La balle rebondit sur l'adversaire 3 fois", CardRarity.Rare, ClassType.Electric); AddExclusive("EMP", "Désactive les power-ups adverses 2 secondes", CardRarity.Legendary, ClassType.Electric); AddExclusive("Tempête Électrique", "Balles aléatoires partent dans toutes les directions", CardRarity.Mythic, ClassType.Electric); AddExclusive("Congélation", "Fige l'adversaire pendant 1.5 secondes", CardRarity.Rare, ClassType.Ice); AddExclusive("Mur de Glace", "Mur temporaire indestructible", CardRarity.Legendary, ClassType.Ice); AddExclusive("Blizzard", "Visibilité réduite pour l'adversaire pendant 1 round", CardRarity.Mythic, ClassType.Ice); AddExclusive("Trou Noir", "Aspire l'adversaire vers toi", CardRarity.Rare, ClassType.Gravity); AddExclusive("Antigravité", "L'adversaire flotte sans contrôle pendant 2 secondes", CardRarity.Legendary, ClassType.Gravity); AddExclusive("Écrasement", "Ta gravité augmente, tu tombes comme un marteau", CardRarity.Mythic, ClassType.Gravity); AddExclusive("Racines", "Immobilise l'adversaire pendant 2 secondes", CardRarity.Rare, ClassType.Nature); AddExclusive("Spores", "Nuage de poison en zone", CardRarity.Legendary, ClassType.Nature); AddExclusive("Floraison", "Explosion de pétales qui font des dégâts en zone", CardRarity.Mythic, ClassType.Nature); AddExclusive("Drone", "Drone autonome qui suit et tire sur l'adversaire", CardRarity.Rare, ClassType.Technology); AddExclusive("Hack", "Inverse les contrôles adverses", CardRarity.Legendary, ClassType.Technology); AddExclusive("Surcharge Système", "Toutes tes cartes boostées à x1.5 pendant 1 round", CardRarity.Mythic, ClassType.Technology); AddExclusive("Hémorragie", "L'adversaire perd de la vie progressivement", CardRarity.Rare, ClassType.Blood); AddExclusive("Vampirisme", "Récupère de la vie sur chaque balle touchée", CardRarity.Legendary, ClassType.Blood); AddExclusive("Explosion de Sang", "À ta mort des projectiles partent dans tous les sens", CardRarity.Mythic, ClassType.Blood); AddExclusive("Flash", "Aveuglement total de l'adversaire pendant 2 secondes", CardRarity.Rare, ClassType.Light); AddExclusive("Rayon Divin", "Balle ultra puissante qui traverse tout", CardRarity.Legendary, ClassType.Light); AddExclusive("Jugement", "Si l'adversaire a plus de cartes que toi, dégâts x3", CardRarity.Mythic, ClassType.Light); AddExclusive("Disparition", "Invisibilité totale pendant 3 secondes", CardRarity.Rare, ClassType.Shadow); AddExclusive("Monde des Ombres", "Toute la map devient sombre pendant 1 round", CardRarity.Legendary, ClassType.Shadow); AddExclusive("Absorption Sombre", "Absorbe la lumière adverse et la convertit en bouclier", CardRarity.Mythic, ClassType.Shadow); } private static void Add(string name, string desc, CardRarity rarity, CardCategory category, float weight) { //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) AllCards.Add(new CardData { Name = name, Description = desc, Rarity = rarity, Category = category, ExclusiveClass = null, RarityColor = RarityColors[rarity], SpawnWeight = weight }); } private static void AddExclusive(string name, string desc, CardRarity rarity, ClassType classType) { //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) AllCards.Add(new CardData { Name = name, Description = desc, Rarity = rarity, Category = CardCategory.ClassExclusive, ExclusiveClass = classType, RarityColor = RarityColors[rarity], SpawnWeight = rarity switch { CardRarity.Legendary => 0.2f, CardRarity.Mythic => 0.1f, _ => 0.4f, } }); } public static List GetCardsForClass(ClassType classType) { return AllCards.FindAll((CardData c) => !c.ExclusiveClass.HasValue || c.ExclusiveClass == classType); } public static List GetCardsByRarity(CardRarity rarity) { return AllCards.FindAll((CardData c) => c.Rarity == rarity); } } public static class CardPicker { private const int CARDS_TO_SHOW = 5; private static readonly Dictionary RarityWeights = new Dictionary { { CardRarity.Common, 50f }, { CardRarity.Rare, 28f }, { CardRarity.Legendary, 15f }, { CardRarity.Mythic, 7f } }; private static Dictionary> playerStacks = new Dictionary>(); public static List GetCardsForPlayer(int playerID, int count = 5) { List list = new List(); ClassType classType = ClassType.Mage; if (ClassManager.PlayerClasses.ContainsKey(playerID)) { classType = ClassManager.PlayerClasses[playerID]; } List cardsForClass = CardManager.GetCardsForClass(classType); List ownedCards = GetOwnedCards(playerID); int num = 0; while (list.Count < count && num < 200) { num++; CardRarity rarity = RollRarity(); List list2 = cardsForClass.FindAll((CardData c) => c.Rarity == rarity); if (list2.Count != 0) { CardData card = list2[Random.Range(0, list2.Count)]; if (!list.Exists((CardData c) => c.Name == card.Name)) { list.Add(card); } } } Plugin.Log.LogInfo((object)($"Joueur {playerID} ({classType}) — " + $"{list.Count} cartes proposées :")); foreach (CardData item in list) { Plugin.Log.LogInfo((object)$" → [{item.Rarity}] {item.Name}"); } return list; } public static void ApplyCard(int playerID, CardData card) { if (!playerStacks.ContainsKey(playerID)) { playerStacks[playerID] = new Dictionary(); } Dictionary dictionary = playerStacks[playerID]; if (!dictionary.ContainsKey(card.Name)) { dictionary[card.Name] = 0; } dictionary[card.Name]++; int num = dictionary[card.Name]; card.ApplyEffect(playerID, num); Plugin.Log.LogInfo((object)$"Joueur {playerID} — {card.Name} x{num}"); } public static int GetStackCount(int playerID, string cardName) { if (!playerStacks.ContainsKey(playerID)) { return 0; } if (!playerStacks[playerID].ContainsKey(cardName)) { return 0; } return playerStacks[playerID][cardName]; } public static void ResetStacks(int playerID) { if (playerStacks.ContainsKey(playerID)) { playerStacks[playerID].Clear(); } } public static void ResetAllStacks() { playerStacks.Clear(); Plugin.Log.LogInfo((object)"Tous les stacks réinitialisés"); } private static List GetOwnedCards(int playerID) { List list = new List(); if (!playerStacks.ContainsKey(playerID)) { return list; } foreach (string key in playerStacks[playerID].Keys) { list.Add(key); } return list; } private static CardRarity RollRarity() { float num = 0f; foreach (float value in RarityWeights.Values) { num += value; } float num2 = Random.Range(0f, num); float num3 = 0f; foreach (KeyValuePair rarityWeight in RarityWeights) { num3 += rarityWeight.Value; if (num2 <= num3) { return rarityWeight.Key; } } return CardRarity.Common; } public static void ApplyFusion(int playerID1, int playerID2) { if (!playerStacks.ContainsKey(playerID1) || !playerStacks.ContainsKey(playerID2)) { return; } List list = new List(); foreach (string key2 in playerStacks[playerID1].Keys) { list.Add(key2); } foreach (string key3 in playerStacks[playerID2].Keys) { list.Add(key3); } playerStacks[playerID1].Clear(); playerStacks[playerID2].Clear(); for (int num = list.Count - 1; num > 0; num--) { int index = Random.Range(0, num + 1); string value = list[num]; list[num] = list[index]; list[index] = value; } for (int i = 0; i < list.Count; i++) { int key = ((i % 2 == 0) ? playerID1 : playerID2); if (!playerStacks[key].ContainsKey(list[i])) { playerStacks[key][list[i]] = 0; } playerStacks[key][list[i]]++; } Plugin.Log.LogInfo((object)$"Fusion appliquée entre joueur {playerID1} et {playerID2}"); } public static void ApplySteal(int thiefID, int victimID) { if (playerStacks.ContainsKey(victimID) && playerStacks[victimID].Count != 0) { List list = new List(playerStacks[victimID].Keys); string text = list[Random.Range(0, list.Count)]; playerStacks[victimID][text]--; if (playerStacks[victimID][text] <= 0) { playerStacks[victimID].Remove(text); } if (!playerStacks.ContainsKey(thiefID)) { playerStacks[thiefID] = new Dictionary(); } if (!playerStacks[thiefID].ContainsKey(text)) { playerStacks[thiefID][text] = 0; } playerStacks[thiefID][text]++; Plugin.Log.LogInfo((object)$"Joueur {thiefID} a volé {text} au joueur {victimID}"); } } public static void ApplySwap(int playerID1, int playerID2) { Dictionary value = (playerStacks.ContainsKey(playerID1) ? new Dictionary(playerStacks[playerID1]) : new Dictionary()); playerStacks[playerID1] = (playerStacks.ContainsKey(playerID2) ? new Dictionary(playerStacks[playerID2]) : new Dictionary()); playerStacks[playerID2] = value; Plugin.Log.LogInfo((object)$"Échange total entre joueur {playerID1} et {playerID2}"); } public static void ApplyRuin(int targetID) { if (playerStacks.ContainsKey(targetID) && playerStacks[targetID].Count != 0) { List list = new List(playerStacks[targetID].Keys); string text = list[Random.Range(0, list.Count)]; playerStacks[targetID][text]--; if (playerStacks[targetID][text] <= 0) { playerStacks[targetID].Remove(text); } Plugin.Log.LogInfo((object)$"Carte {text} supprimée du joueur {targetID}"); } } } public static class CardRegistrar { public static void RegisterAllCards() { foreach (CardData allCard in CardManager.AllCards) { RegisterCard(allCard); } Plugin.Log.LogInfo((object)$"CardRegistrar — {CardManager.AllCards.Count} cartes enregistrées dans ROUNDS"); } private static void RegisterCard(CardData cardData) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown try { GameObject val = new GameObject(cardData.Name); BaseEliteCard baseEliteCard = val.AddComponent(); baseEliteCard.EliteCardData = cardData; CustomCard.RegisterUnityCard(val, (Action)delegate { }); } catch (Exception ex) { Plugin.Log.LogError((object)("Erreur enregistrement carte " + cardData.Name + " : " + ex.Message)); } } } public class BaseEliteCard : CustomCard { public CardData EliteCardData; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers) { cardInfo.cardName = EliteCardData?.Name ?? "Unknown"; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers statModifiers) { if (EliteCardData != null) { int playerID = player.playerID; int num = CardPicker.GetStackCount(playerID, EliteCardData.Name) + 1; ApplyCardEffect(player, gun, data, health, statModifiers, num); CardPicker.ApplyCard(playerID, EliteCardData); Plugin.Log.LogInfo((object)($"Carte appliquée : {EliteCardData.Name} x{num} " + $"au joueur {playerID}")); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers statModifiers) { } protected override string GetTitle() { return EliteCardData?.Name ?? "Unknown"; } protected override string GetDescription() { return EliteCardData?.Description ?? ""; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override Rarity GetRarity() { //IL_000f: 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_003b: 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_0046: 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) if (EliteCardData == null) { return (Rarity)0; } return (Rarity)(EliteCardData.Rarity switch { CardRarity.Rare => 1, CardRarity.Legendary => 2, CardRarity.Mythic => 2, _ => 0, }); } protected override GameObject GetCardArt() { return null; } protected override CardThemeColorType GetTheme() { //IL_000f: 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_003b: 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_0046: 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) if (EliteCardData == null) { return (CardThemeColorType)4; } return (CardThemeColorType)(EliteCardData.Rarity switch { CardRarity.Mythic => 1, CardRarity.Legendary => 4, CardRarity.Rare => 7, _ => 6, }); } private void ApplyCardEffect(Player player, Gun gun, CharacterData data, HealthHandler health, CharacterStatModifiers statModifiers, int stackCount) { if (EliteCardData != null) { switch (EliteCardData.Name) { case "Double Saut": statModifiers.numberOfJumps += stackCount; break; case "Triple Saut": statModifiers.numberOfJumps += 2 * stackCount; break; case "Sprint Passif": statModifiers.movementSpeed += 0.2f * (float)stackCount; break; case "Gravité Réduite": statModifiers.gravity -= 0.2f * (float)stackCount; break; case "Super Saut": statModifiers.jump += 0.5f * (float)stackCount; break; case "Dash Avant": statModifiers.movementSpeed += 0.3f * (float)stackCount; break; case "Dash Arrière": statModifiers.movementSpeed += 0.3f * (float)stackCount; break; case "Glissement": statModifiers.movementSpeed += 0.25f * (float)stackCount; break; case "Turbo": statModifiers.movementSpeed += 0.3f * (float)stackCount; break; case "Accélération": statModifiers.movementSpeed += 0.2f * (float)stackCount; break; case "Balle Jumelle": gun.numberOfProjectiles += stackCount; break; case "Balle Triple": gun.numberOfProjectiles += 2 * stackCount; break; case "Tir Rapide": gun.attackSpeed *= Mathf.Pow(0.8f, (float)stackCount); break; case "Balle Lourde": gun.damage += 0.3f * (float)stackCount; gun.projectileSpeed -= 0.2f * (float)stackCount; break; case "Balle Légère": gun.projectileSpeed += 0.3f * (float)stackCount; gun.damage -= 0.1f * (float)stackCount; break; case "Balle Explosive": gun.explodeNearEnemyDamage += 0.5f * (float)stackCount; gun.explodeNearEnemyRange += 0.5f * (float)stackCount; break; case "Tir en Rafale": gun.bursts += 2 * stackCount; gun.timeBetweenBullets -= 0.05f * (float)stackCount; break; case "Balle Rebondissante": gun.reflects += 2 * stackCount; break; case "Rebond Infini": gun.reflects += 10 * stackCount; break; case "Sniper": gun.projectileSpeed += 2f * (float)stackCount; gun.damage += 1f * (float)stackCount; gun.ammo = 1; break; case "Balle Perforante": gun.damage += 0.2f * (float)stackCount; break; case "Tir Diagonal": gun.spread += 0.2f * (float)stackCount; gun.numberOfProjectiles += stackCount; break; case "Balle Spirale": gun.reflects += 3 * stackCount; gun.spread += 0.1f * (float)stackCount; break; case "Balle Magnétique": gun.drag += 0.1f * (float)stackCount; break; case "Balle Gravité": gun.gravity += 0.3f * (float)stackCount; break; case "Balle Inversée": gun.reflects += stackCount; gun.projectileSpeed += 0.5f * (float)stackCount; break; case "Recul Augmenté": gun.damage += 0.4f * (float)stackCount; gun.knockback += 0.5f * (float)stackCount; break; case "Recul Réduit": gun.recoil -= 0.2f * (float)stackCount; break; case "Vie Supplémentaire": data.maxHealth += 50f * (float)stackCount; break; case "Armure Légère": statModifiers.slow += 0.1f * (float)stackCount; break; case "Régénération Lente": statModifiers.lifeSteal += 0.05f * (float)stackCount; break; case "Absorption Partielle": statModifiers.slow += 0.1f * (float)stackCount; break; case "Réduction Recul": gun.recoil -= 0.3f * (float)stackCount; break; case "Second Souffle": statModifiers.respawns += stackCount; break; case "Portée Augmentée": gun.projectileSpeed += 0.3f * (float)stackCount; break; case "Munitions Infinies": gun.ammo += 5 * stackCount; break; case "Reload Instantané": gun.reloadTime -= 0.2f * (float)stackCount; break; case "Reload Instantané 2": gun.reloadTime -= 0.3f * (float)stackCount; break; case "Ciblage Assisté": gun.spread -= 0.1f * (float)stackCount; break; case "Stabilisateur": gun.recoil -= 0.5f * (float)stackCount; break; case "Balle Traçante": gun.projectileSpeed += 0.2f * (float)stackCount; break; case "Radar de Balle": gun.projectileSpeed += 0.1f * (float)stackCount; break; case "Portée Adverse Réduite": gun.damage += 0.1f * (float)stackCount; break; case "Boule de Feu": gun.explodeNearEnemyDamage += 1f * (float)stackCount; gun.explodeNearEnemyRange += 1f * (float)stackCount; gun.damage += 0.5f * (float)stackCount; break; case "Tempête Arcanique": gun.numberOfProjectiles += 3 * stackCount; gun.spread += 0.3f * (float)stackCount; gun.damage += 0.3f * (float)stackCount; break; case "Frappe Létale": gun.damage += 1f * (float)stackCount; gun.projectileSpeed += 0.5f * (float)stackCount; break; case "Ombre Totale": statModifiers.movementSpeed += 0.5f * (float)stackCount; gun.damage += 0.5f * (float)stackCount; break; case "Forteresse": data.maxHealth += 100f * (float)stackCount; statModifiers.slow += 0.2f * (float)stackCount; break; case "Séisme": gun.knockback += 1f * (float)stackCount; gun.explodeNearEnemyDamage += 0.5f * (float)stackCount; gun.explodeNearEnemyRange += 1f * (float)stackCount; break; case "Flèche Explosive": gun.explodeNearEnemyDamage += 0.8f * (float)stackCount; gun.projectileSpeed += 1f * (float)stackCount; gun.damage += 0.3f * (float)stackCount; break; case "Pluie de Flèches": gun.numberOfProjectiles += 4 * stackCount; gun.spread += 0.5f * (float)stackCount; break; case "Rage": gun.damage += 0.5f * (float)stackCount; statModifiers.movementSpeed += 0.3f * (float)stackCount; break; case "Frénésie": gun.damage += 1f * (float)stackCount; statModifiers.movementSpeed += 0.5f * (float)stackCount; gun.attackSpeed *= Mathf.Pow(0.7f, (float)stackCount); break; case "Réflexion Totale": gun.reflects += 5 * stackCount; gun.damage += 0.3f * (float)stackCount; break; case "Congélation": gun.slow += 0.3f * (float)stackCount; gun.damage += 0.1f * (float)stackCount; break; case "Mur de Glace": gun.slow += 0.5f * (float)stackCount; statModifiers.slow += 0.3f * (float)stackCount; break; case "Chaîne Électrique": gun.reflects += 3 * stackCount; gun.damage += 0.2f * (float)stackCount; break; case "Trou Noir": gun.gravity += 0.5f * (float)stackCount; gun.damage += 0.2f * (float)stackCount; break; case "Racines": gun.slow += 0.4f * (float)stackCount; gun.damage += 0.1f * (float)stackCount; break; case "Spores": gun.slow += 0.3f * (float)stackCount; gun.explodeNearEnemyDamage += 0.3f * (float)stackCount; gun.explodeNearEnemyRange += 0.5f * (float)stackCount; break; case "Drone": gun.numberOfProjectiles += stackCount; gun.attackSpeed *= Mathf.Pow(0.9f, (float)stackCount); break; case "Hémorragie": gun.damage += 0.3f * (float)stackCount; statModifiers.lifeSteal += 0.1f * (float)stackCount; break; case "Vampirisme": statModifiers.lifeSteal += 0.2f * (float)stackCount; break; case "Flash": gun.slow += 0.5f * (float)stackCount; break; case "Rayon Divin": gun.damage += 1f * (float)stackCount; gun.projectileSpeed += 1f * (float)stackCount; break; case "Disparition": statModifiers.movementSpeed += 0.4f * (float)stackCount; gun.damage += 0.3f * (float)stackCount; break; case "Singularité": gun.gravity += 1f * (float)stackCount; gun.explodeNearEnemyDamage += 1f * (float)stackCount; gun.explodeNearEnemyRange += 2f * (float)stackCount; break; case "Exécution": gun.damage += 2f * (float)stackCount; gun.projectileSpeed += 1f * (float)stackCount; break; case "Indestructible": data.maxHealth += 200f * (float)stackCount; statModifiers.slow += 0.5f * (float)stackCount; break; case "Flèche Divine": gun.reflects += 10 * stackCount; gun.damage += 1f * (float)stackCount; gun.projectileSpeed += 2f * (float)stackCount; break; case "Apocalypse": gun.explodeNearEnemyDamage += 2f * (float)stackCount; gun.explodeNearEnemyRange += 3f * (float)stackCount; gun.damage += 1f * (float)stackCount; break; case "Possession": statModifiers.movementSpeed += 1f * (float)stackCount; gun.damage += 0.5f * (float)stackCount; break; case "Dernière Rage": gun.explodeNearEnemyDamage += 2f * (float)stackCount; gun.explodeNearEnemyRange += 5f * (float)stackCount; statModifiers.movementSpeed += 0.5f * (float)stackCount; break; case "Paradoxe": gun.numberOfProjectiles += 2 * stackCount; gun.damage += 0.5f * (float)stackCount; break; case "Tempête Électrique": gun.numberOfProjectiles += 5 * stackCount; gun.spread += 1f * (float)stackCount; gun.damage += 0.3f * (float)stackCount; break; case "Blizzard": gun.slow += 1f * (float)stackCount; gun.numberOfProjectiles += 3 * stackCount; break; case "Floraison": gun.explodeNearEnemyDamage += 1f * (float)stackCount; gun.explodeNearEnemyRange += 2f * (float)stackCount; statModifiers.lifeSteal += 0.1f * (float)stackCount; break; case "Surcharge Système": gun.damage += 1f * (float)stackCount; gun.attackSpeed *= Mathf.Pow(0.6f, (float)stackCount); statModifiers.movementSpeed += 0.5f * (float)stackCount; break; case "Explosion de Sang": gun.explodeNearEnemyDamage += 1.5f * (float)stackCount; gun.explodeNearEnemyRange += 2f * (float)stackCount; statModifiers.lifeSteal += 0.2f * (float)stackCount; break; case "Jugement": gun.damage += 1.5f * (float)stackCount; gun.projectileSpeed += 0.5f * (float)stackCount; break; case "Absorption Sombre": statModifiers.movementSpeed += 0.3f * (float)stackCount; data.maxHealth += 50f * (float)stackCount; gun.damage += 0.5f * (float)stackCount; break; } } } } public class CardSelectionUI : MonoBehaviour { [CompilerGenerated] private sealed class d__19 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CardSelectionUI <>4__this; private float 5__1; private List.Enumerator <>s__2; private GameObject 5__3; private float 5__4; private int 5__5; private float 5__6; private float 5__7; private float 5__8; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__2 = default(List.Enumerator); 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0067: 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) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__2 = <>4__this.cardObjects.GetEnumerator(); try { while (<>s__2.MoveNext()) { 5__3 = <>s__2.Current; 5__3.transform.localPosition = new Vector3(0f, -80f, 0f); 5__3 = null; } } finally { ((IDisposable)<>s__2).Dispose(); } <>s__2 = default(List.Enumerator); 5__1 = 0f; break; case 1: <>1__state = -1; break; } if (5__1 < 1f) { 5__1 += Time.deltaTime / 0.45f; 5__4 = Mathf.SmoothStep(0f, 1f, 5__1); <>4__this.canvasGroup.alpha = 5__4; 5__5 = 0; while (5__5 < <>4__this.cardObjects.Count) { 5__6 = (float)5__5 * 0.08f; 5__7 = Mathf.Clamp01((5__1 - 5__6) / (1f - 5__6)); 5__8 = Mathf.SmoothStep(0f, 1f, 5__7); <>4__this.cardObjects[5__5].transform.localPosition = Vector3.Lerp(new Vector3(0f, -80f, 0f), Vector3.zero, 5__8); 5__5++; } <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__20 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CardSelectionUI <>4__this; private float 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__20(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //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_00cc: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.4f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = 0f; break; case 2: <>1__state = -1; break; } if (5__1 < 1f) { 5__1 += Time.deltaTime / 0.3f; <>4__this.canvasGroup.alpha = Mathf.SmoothStep(1f, 0f, 5__1); <>4__this.panel.transform.localScale = Vector3.Lerp(Vector3.one, new Vector3(1.04f, 1.04f, 1f), 5__1); <>2__current = null; <>1__state = 2; return true; } Object.Destroy((Object)(object)((Component)<>4__this).gameObject); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private GameObject panel; private List cardObjects = new List(); private CanvasGroup canvasGroup; private TextMeshProUGUI titleText; private TextMeshProUGUI subtitleText; private int playerID; private List cards; private bool chosen = false; private float animTimer = 0f; private static readonly Color BG_COLOR = new Color(0.04f, 0.04f, 0.06f, 0.95f); private static readonly Color CARD_BG = new Color(0.1f, 0.1f, 0.15f, 1f); private static readonly Color CARD_HOVER = new Color(0.18f, 0.18f, 0.25f, 1f); private static readonly Color WHITE = new Color(1f, 1f, 1f, 1f); private static readonly Color GREY = new Color(0.6f, 0.6f, 0.65f, 1f); private static readonly Color ACCENT = new Color(0.85f, 0.25f, 0.25f, 1f); public static CardSelectionUI Show(int playerID, List cards) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("CardSelectionUI"); Object.DontDestroyOnLoad((Object)(object)val); CardSelectionUI cardSelectionUI = val.AddComponent(); cardSelectionUI.playerID = playerID; cardSelectionUI.cards = cards; cardSelectionUI.Build(); return cardSelectionUI; } private void Build() { //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_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_00a2: 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_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_00d6: 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_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_0110: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_021e: Unknown result type (might be due to invalid IL or missing references) //IL_022d: 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_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: 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_0295: Unknown result type (might be due to invalid IL or missing references) Canvas val = ((Component)this).gameObject.AddComponent(); val.renderMode = (RenderMode)0; val.sortingOrder = 998; ((Component)this).gameObject.AddComponent().uiScaleMode = (ScaleMode)1; ((Component)this).gameObject.AddComponent(); panel = CreatePanel(((Component)this).gameObject, "Panel", Vector2.zero, Vector2.one, Vector2.zero, BG_COLOR); canvasGroup = panel.AddComponent(); canvasGroup.alpha = 0f; GameObject val2 = CreatePanel(panel, "TopLine", new Vector2(0f, 1f), new Vector2(1f, 1f), Vector2.zero, ACCENT); val2.GetComponent().sizeDelta = new Vector2(0f, 3f); GameObject val3 = CreatePanel(panel, "BotLine", new Vector2(0f, 0f), new Vector2(1f, 0f), Vector2.zero, ACCENT); val3.GetComponent().sizeDelta = new Vector2(0f, 3f); titleText = CreateText(panel, "Title", "CHOOSE A CARD", 48f, (FontStyles)1, WHITE, new Vector2(0.05f, 0.82f), new Vector2(0.95f, 0.96f)); ((TMP_Text)titleText).alignment = (TextAlignmentOptions)514; ((TMP_Text)titleText).characterSpacing = 8f; ClassType type = (ClassManager.PlayerClasses.ContainsKey(playerID) ? ClassManager.PlayerClasses[playerID] : ClassType.Mage); ClassData @class = ClassManager.GetClass(type); subtitleText = CreateText(panel, "Subtitle", (@class != null) ? $"Joueur {playerID + 1} — Classe {@class.Name.ToUpper()}" : $"Joueur {playerID + 1}", 16f, (FontStyles)2, GREY, new Vector2(0.05f, 0.76f), new Vector2(0.95f, 0.83f)); ((TMP_Text)subtitleText).alignment = (TextAlignmentOptions)514; CreatePanel(panel, "Sep", new Vector2(0.1f, 0.748f), new Vector2(0.9f, 0.752f), Vector2.zero, ACCENT * 0.6f); BuildCards(); ((MonoBehaviour)this).StartCoroutine(AnimateIn()); } private void BuildCards() { //IL_007c: 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_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_00b4: 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_00cd: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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) //IL_0124: 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_015a: 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_0164: 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_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: 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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0322: 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_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_0374: 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_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_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0424: 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_01cf: 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_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_021c: 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) int count = cards.Count; float num = 0.02f; float num2 = 1f - num * (float)(count + 1); float num3 = num2 / (float)count; for (int i = 0; i < count; i++) { CardData cardData = cards[i]; float num4 = num + (float)i * (num3 + num); float num5 = num4 + num3; GameObject val = CreatePanel(panel, "Card_" + i, new Vector2(num4, 0.08f), new Vector2(num5, 0.72f), new Vector2(6f, 6f), CARD_BG); Color val2 = CardManager.RarityColors[cardData.Rarity]; CreatePanel(val, "RarityBar", new Vector2(0f, 0.92f), new Vector2(1f, 1f), Vector2.zero, val2); ((TMP_Text)CreateText(val, "RarityLabel", GetRarityLabel(cardData.Rarity), 10f, (FontStyles)1, val2, new Vector2(0.05f, 0.84f), new Vector2(0.95f, 0.92f))).alignment = (TextAlignmentOptions)514; CreatePanel(val, "RaritySep", new Vector2(0.1f, 0.838f), new Vector2(0.9f, 0.841f), Vector2.zero, val2 * 0.5f); if (cardData.ExclusiveClass.HasValue) { ClassData @class = ClassManager.GetClass(cardData.ExclusiveClass.Value); if (@class != null) { GameObject parent = CreatePanel(val, "ClassTag", new Vector2(0.05f, 0.74f), new Vector2(0.95f, 0.83f), Vector2.zero, @class.PrimaryColor * 0.3f); ((TMP_Text)CreateText(parent, "ClassTagText", @class.Name.ToUpper(), 9f, (FontStyles)1, @class.PrimaryColor, new Vector2(0.05f, 0.1f), new Vector2(0.95f, 0.9f))).alignment = (TextAlignmentOptions)514; } } GameObject parent2 = CreatePanel(val, "IconZone", new Vector2(0.15f, 0.52f), new Vector2(0.85f, 0.74f), Vector2.zero, val2 * 0.15f); ((TMP_Text)CreateText(parent2, "IconText", GetCardIcon(cardData), 28f, (FontStyles)1, val2, Vector2.zero, Vector2.one)).alignment = (TextAlignmentOptions)514; TextMeshProUGUI val3 = CreateText(val, "Name", cardData.Name.ToUpper(), 13f, (FontStyles)1, WHITE, new Vector2(0.05f, 0.38f), new Vector2(0.95f, 0.52f)); ((TMP_Text)val3).alignment = (TextAlignmentOptions)514; ((TMP_Text)val3).characterSpacing = 2f; CreatePanel(val, "NameSep", new Vector2(0.1f, 0.378f), new Vector2(0.9f, 0.381f), Vector2.zero, WHITE * 0.15f); ((TMP_Text)CreateText(val, "Desc", cardData.Description, 11f, (FontStyles)0, GREY, new Vector2(0.06f, 0.14f), new Vector2(0.94f, 0.375f))).alignment = (TextAlignmentOptions)514; int stackCount = CardPicker.GetStackCount(playerID, cardData.Name); if (stackCount > 0) { GameObject parent3 = CreatePanel(val, "StackBadge", new Vector2(0.7f, 0.02f), new Vector2(0.98f, 0.13f), Vector2.zero, val2 * 0.8f); ((TMP_Text)CreateText(parent3, "StackText", $"x{stackCount + 1}", 14f, (FontStyles)1, WHITE, Vector2.zero, Vector2.one)).alignment = (TextAlignmentOptions)514; } CardData captured = cardData; int index = i; AddButton(val, delegate { OnCardChosen(captured, index); }, CARD_BG, CARD_HOVER); cardObjects.Add(val); } } private void OnCardChosen(CardData card, int index) { //IL_0041: 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) if (chosen) { return; } chosen = true; for (int i = 0; i < cardObjects.Count; i++) { if (i == index) { ((Graphic)cardObjects[i].GetComponent()).color = CardManager.RarityColors[card.Rarity] * 0.3f; continue; } CanvasGroup val = cardObjects[i].AddComponent(); val.alpha = 0.3f; } GameManager.OnCardSelected(playerID, card); Plugin.Log.LogInfo((object)$"Joueur {playerID + 1} a choisi : {card.Name} [{card.Rarity}]"); ((MonoBehaviour)this).StartCoroutine(AnimateOut()); } [IteratorStateMachine(typeof(d__19))] private IEnumerator AnimateIn() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__19(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__20))] private IEnumerator AnimateOut() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__20(0) { <>4__this = this }; } private void Update() { //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_0072: 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_007f: Unknown result type (might be due to invalid IL or missing references) animTimer += Time.deltaTime; if (!chosen) { for (int i = 0; i < cardObjects.Count; i++) { float num = Mathf.Sin(animTimer * 1.5f + (float)i * 0.8f) * 3f; Vector3 localPosition = cardObjects[i].transform.localPosition; cardObjects[i].transform.localPosition = new Vector3(localPosition.x, num, localPosition.z); } } } private string GetRarityLabel(CardRarity rarity) { return rarity switch { CardRarity.Common => "⚪ COMMUN", CardRarity.Rare => "\ud83d\udd35 RARE", CardRarity.Legendary => "\ud83d\udfe3 LÉGENDAIRE", CardRarity.Mythic => "\ud83d\udfe0 MYTHIQUE", _ => "INCONNU", }; } private string GetCardIcon(CardData card) { if (card.Category == CardCategory.Chaos) { return "\ud83c\udfb2"; } if (card.Category == CardCategory.Environment) { return "\ud83c\udf0d"; } if (card.Category == CardCategory.Utility) { return "⚙"; } if (card.ExclusiveClass.HasValue) { return "⭐"; } return card.Rarity switch { CardRarity.Mythic => "\ud83d\udc51", CardRarity.Legendary => "\ud83d\udc8e", CardRarity.Rare => "✦", _ => "•", }; } private GameObject CreatePanel(GameObject parent, string name, Vector2 anchorMin, Vector2 anchorMax, Vector2 offset, Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0023: 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_0034: 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_003f: 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) GameObject val = new GameObject(name); val.transform.SetParent(parent.transform, false); RectTransform val2 = val.AddComponent(); val2.anchorMin = anchorMin; val2.anchorMax = anchorMax; val2.offsetMin = offset; val2.offsetMax = -offset; ((Graphic)val.AddComponent()).color = color; return val; } private TextMeshProUGUI CreateText(GameObject parent, string name, string text, float size, FontStyles style, Color color, Vector2 anchorMin, Vector2 anchorMax) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0023: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0063: 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) GameObject val = new GameObject(name); val.transform.SetParent(parent.transform, false); RectTransform val2 = val.AddComponent(); val2.anchorMin = anchorMin; val2.anchorMax = anchorMax; Vector2 offsetMin = (val2.offsetMax = Vector2.zero); val2.offsetMin = offsetMin; TextMeshProUGUI val3 = val.AddComponent(); ((TMP_Text)val3).text = text; ((TMP_Text)val3).fontSize = size; ((TMP_Text)val3).fontStyle = style; ((Graphic)val3).color = color; return val3; } private void AddButton(GameObject go, Action onClick, Color normal, Color hover) { //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_0025: 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_0038: 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_004b: 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_0071: Expected O, but got Unknown Button val = go.AddComponent