From 76aad2bc91a8cdd3fe52f168596bcf488ff3c791 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 18:57:34 -0800 Subject: [PATCH 01/42] Add XML for CardAppearanceBehaviourManager --- .../Card/CardAppearanceBehaviourManager.cs | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs b/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs index 638b54bb..8212e1b9 100644 --- a/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs +++ b/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs @@ -5,13 +5,29 @@ namespace InscryptionAPI.Card; -public static class CardAppearanceBehaviourManager -{ +/// +/// Class for managing custom CardAppearanceBehaviours. +/// +public static class CardAppearanceBehaviourManager { + /// + /// A utility class that holds all of the required information about an appearance behaviour + /// in order to be able to use it in-game. + /// public class FullCardAppearanceBehaviour { + /// + /// Appearance enum id for the appearance behaviour. + /// public readonly CardAppearanceBehaviour.Appearance Id; + /// + /// Type of the appearance behaviour. + /// public readonly Type AppearanceBehaviour; - + /// + /// Creates a new instance of FullCardAppearanceBehaviour and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// + /// Appearance enum id. + /// Type of the custom CardAppearanceBehaviour class. public FullCardAppearanceBehaviour(CardAppearanceBehaviour.Appearance id, Type appearanceBehaviour) { Id = id; @@ -21,9 +37,15 @@ public FullCardAppearanceBehaviour(CardAppearanceBehaviour.Appearance id, Type a } } + /// + /// A collection of all CardAppearanceBehaviours from the base game. + /// public readonly static ReadOnlyCollection BaseGameAppearances = new(GenBaseGameAppearanceList()); private readonly static ObservableCollection NewAppearances = new(); + /// + /// All of CardAppearanceBehaviours, including vanilla and custom. + /// public static List AllAppearances { get; private set; } = BaseGameAppearances.ToList(); static CardAppearanceBehaviourManager() @@ -45,7 +67,13 @@ private static List GenBaseGameAppearanceList() } return baseGame; } - + /// + /// Registers a custom CardAppearanceBehaviour with the API. + /// + /// The GUID of the mod adding the behaviour. + /// The internal name identifier for the behaviour. + /// The Type of the custom CardAppearanceBehaviour class. + /// A FullCardAppearanceBehaviour object containing all the custom CardAppearanceBehaviour's data. public static FullCardAppearanceBehaviour Add(string guid, string abilityName, Type behavior) { FullCardAppearanceBehaviour full = new(GuidManager.GetEnumValue(guid, abilityName), behavior); @@ -53,6 +81,14 @@ public static FullCardAppearanceBehaviour Add(string guid, string abilityName, T return full; } + /// + /// Unregisters a CardAppearanceBehaviour from the API. + /// + /// The Appearance enum of the behaviour to remove. public static void Remove(CardAppearanceBehaviour.Appearance id) => NewAppearances.Remove(NewAppearances.FirstOrDefault(x => x.Id == id)); + /// + /// Unregisters a CardAppearanceBehaviour from the API. + /// + /// The FullCardAppearanceBehaviour object of the behaviour to remove. public static void Remove(FullCardAppearanceBehaviour ability) => NewAppearances.Remove(ability); } From 27c218e88bb6253da08fd1ff6569e6175cef3146 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 19:05:32 -0800 Subject: [PATCH 02/42] Add XML for AbilityManager --- InscryptionAPI/Card/AbilityManager.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index b8f85825..658219cb 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -204,6 +204,9 @@ public FullAbility Clone() /// public static event Func, List> ModifyAbilityList; + /// + /// Custom AbilityMetaCategory enum for marking an ability as modular in Part 2. + /// public static AbilityMetaCategory Part2Modular => GuidManager.GetEnumValue(InscryptionAPIPlugin.ModGUID, "Part2Modular"); /// /// Resynchronizes the ablity list. @@ -362,6 +365,9 @@ internal static Dictionary GetAbilityExtensionTable(this Ability } #region LoadAbilityIcon + /// + /// Reverse patch that provides access to the original, unmodified LoadAbilityIcon method. + /// [HarmonyReversePatch(HarmonyReversePatchType.Original)] [HarmonyPatch(typeof(AbilitiesUtil), nameof(AbilitiesUtil.LoadAbilityIcon))] [MethodImpl(MethodImplOptions.NoInlining)] @@ -420,6 +426,10 @@ private static bool GetLearnedAbilitesReplacement(bool opponentUsable, int minPo } #region Rulebook Description + /// + /// Prefix string for activated sigils with dynamic activation costs. + /// Used by the API to determine what part of a sigil's description should be updated. + /// public const string SIGILCOST = "[sigilcost:"; [HarmonyPostfix, HarmonyPatch(typeof(AbilityInfo), nameof(AbilityInfo.ParseAndTranslateDescription))] private static void CleanUpParsedDescription(ref string __result) @@ -652,7 +662,7 @@ IEnumerator OnTrigger(CardTriggerHandler r, Trigger trigger, params object[] oth } [HarmonyTranspiler, HarmonyPatch(typeof(AbilityIconInteractable), nameof(AbilityIconInteractable.AssignAbility))] - public static IEnumerable AbilityIconInteractable_AssignAbility(IEnumerable instructions) + private static IEnumerable AbilityIconInteractable_AssignAbility(IEnumerable instructions) { // === We want to turn this: // AbilityInfo info2 = AbilitiesUtil.GetInfo(ability); From 1e4915a7fc310cfe89f5fba4dae10c440b6e253e Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 19:12:51 -0800 Subject: [PATCH 03/42] Add XML to CostProperties **Comment out unusued duplicate field** --- InscryptionAPI/Card/CostProperties.cs | 29 +++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/InscryptionAPI/Card/CostProperties.cs b/InscryptionAPI/Card/CostProperties.cs index 877d85e4..ac1b5d2d 100644 --- a/InscryptionAPI/Card/CostProperties.cs +++ b/InscryptionAPI/Card/CostProperties.cs @@ -7,11 +7,18 @@ namespace InscryptionAPI.Card.CostProperties; +/// +/// Class that handles dynamic costs on PlayableCards. +/// [HarmonyPatch] -public static class CostProperties -{ - public class RefreshCostMonoBehaviour : MonoBehaviour - { +public static class CostProperties { + /// + /// Class that's attached to PlayableCard objects to ensure their costs are updated appropriately. + /// + public class RefreshCostMonoBehaviour : MonoBehaviour { + /// + /// PlayableCard instance this behaviour is attached to. + /// public PlayableCard playableCard; private int cachedBloodCost = -1, cachedBoneCost = -1; private readonly List cachedGemsCost = new(); @@ -52,6 +59,13 @@ private bool DidCostsChangeThisFrame() return refreshCost; } + /// + /// Determines if a card's list of Gem costs has been updated. + /// + /// + /// + /// + /// public bool GemsChanged(List a, List b) { if (a.Count != b.Count) @@ -67,11 +81,14 @@ public bool GemsChanged(List a, List b) } } + /// + /// A table that maps a CardInfo object to a list of weak references to every PlayableCard that uses that same CardInfo + /// public static ConditionalWeakTable>> CardInfoToCard = new(); - // a table that maps a CardInfo object to a list of weak references to every PlayableCard that uses that same CardInfo - public static ConditionalWeakTable>> CardInfoToPlayableCardReferences = new(); + + //public static ConditionalWeakTable>> CardInfoToPlayableCardReferences = new(); /// From 90a6226f1fdafd3c9097d030499028aab1a50ac4 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 19:20:39 -0800 Subject: [PATCH 04/42] Add/fix XML for CardExtensionsHelpers --- InscryptionAPI/Card/CardExtensionsHelpers.cs | 43 ++++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/InscryptionAPI/Card/CardExtensionsHelpers.cs b/InscryptionAPI/Card/CardExtensionsHelpers.cs index d953c771..537e785e 100644 --- a/InscryptionAPI/Card/CardExtensionsHelpers.cs +++ b/InscryptionAPI/Card/CardExtensionsHelpers.cs @@ -214,7 +214,15 @@ public static bool HasAnyOfTraits(this CardInfo cardInfo, params Trait[] traits) return false; } + /// + /// Returns whether or not the given CardInfo has the Pelt Trait. + /// public static bool IsPelt(this CardInfo cardInfo) => cardInfo.HasTrait(Trait.Pelt); + /// + /// Returns whether or not the given CardInfo has the Terrain Trait. + /// + /// + /// public static bool IsTerrain(this CardInfo cardInfo) => cardInfo.HasTrait(Trait.Terrain); #endregion @@ -223,7 +231,7 @@ public static bool HasAnyOfTraits(this CardInfo cardInfo, params Trait[] traits) /// Checks if the CardInfo has a specific CardMetaCategory. /// /// CardInfo to access. - /// The CardMetaCategory to check for. + /// The CardMetaCategory to check for. /// Returns true if the card is does not have the specified CardMetaCategory. public static bool HasCardMetaCategory(this CardInfo cardInfo, CardMetaCategory metaCategory) => cardInfo.metaCategories.Contains(metaCategory); @@ -307,7 +315,7 @@ public static int GetAbilityStacks(this PlayableCard card, Ability ability) /// /// Gets the number of Ability stacks a card has. /// - /// The PlayableCard to access. + /// The CardInfo to access. /// The Ability to check for. /// The number of Ability stacks the card has. public static int GetAbilityStacks(this CardInfo info, Ability ability) @@ -666,11 +674,22 @@ public static bool HasAnyOfSpecialAbilities(this PlayableCard playableCard, para /// The card in the opposing slot, otherwise return null. public static PlayableCard OpposingCard(this PlayableCard playableCard) => playableCard.OpposingSlot()?.Card; + /// + /// Adds all given CardModificationInfos to a PlayableCard as temporary mods. + /// + /// The PlayableCard to access. + /// The collection of CardModificationInfos to add as temporary mods to the card. public static void AddTemporaryMods(this PlayableCard card, params CardModificationInfo[] mods) { foreach (CardModificationInfo mod in mods) card.AddTemporaryMod(mod); } + + /// + /// Removes all given CardModificationInfos from a PlayableCard's list of temporary mods. + /// + /// The PlayableCard to access. + /// The collection of CardModificationInfos to remove from the card's temporary mods. public static void RemoveTemporaryMods(this PlayableCard card, params CardModificationInfo[] mods) { foreach (CardModificationInfo mod in mods) @@ -750,11 +769,10 @@ public static void AddShieldCount(this PlayableCard card, int amount, bool up } /// - /// Reduces the amount of shields a specific ability is currently giving. + /// Removes shields from the given PlayableCard. /// /// The PlayableCard to access. /// How many shields to add. - /// The shield-giving ability to add more shields to. /// Whether to update the card's display, meaning sigil stack numbers and any shield effects. public static void RemoveShieldCount(this PlayableCard card, int amount, bool updateDisplay = true) { @@ -777,6 +795,13 @@ public static void RemoveShieldCount(this PlayableCard card, int amount, Ability } component.RemoveShields(amount, updateDisplay); } + /// + /// Reduces a card's shield count from a specific shield-giving ability. + /// + /// The class of the ability to remove shield count from. + /// PlayableCard instance to remove shield from. + /// How many shields to remove. + /// Whether or not to update the card's rendering. public static void RemoveShieldCount(this PlayableCard card, int amount, bool updateDisplay = true) where T : DamageShieldBehaviour { card.GetComponent()?.RemoveShields(amount, updateDisplay); @@ -856,10 +881,20 @@ public static void ResetShield(this PlayableCard card, Ability ability) card.Status.lostShield = false; } + /// + /// Determines whether the given Ability enum id corresponds to a shield-giving ability. + /// + /// The enum for the ability to check. + /// True if the id is for an ability that gives sigils using the API's features. public static bool IsShieldAbility(this Ability ability) { return ShieldManager.AllShieldInfos.AbilityByID(ability) != null; } + /// + /// Determines whether the given AbilityInfo corresponds to a shield-giving ability. + /// + /// The AbilityInfo for the ability to check. + /// True if the AbilityInfo is for an ability that gives sigils using the API's features. public static bool IsShieldAbility(this AbilityInfo abilityInfo) { return ShieldManager.AllShieldInfos.Contains(abilityInfo); From 47e775ac4899f4cd283a448db9b5fcbb6c385621 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 20:06:30 -0800 Subject: [PATCH 05/42] Add/fix XML for CardExtensionsPortraits --- .../Card/CardExtensionsPortraits.cs | 209 +++++++++++++++++- 1 file changed, 205 insertions(+), 4 deletions(-) diff --git a/InscryptionAPI/Card/CardExtensionsPortraits.cs b/InscryptionAPI/Card/CardExtensionsPortraits.cs index 706353f3..0c238638 100644 --- a/InscryptionAPI/Card/CardExtensionsPortraits.cs +++ b/InscryptionAPI/Card/CardExtensionsPortraits.cs @@ -40,6 +40,7 @@ public static CardInfo SetPortrait(this CardInfo info, Texture2D portrait, Filte /// /// Sets the cards portrait and emission at the same time. /// + /// The CardInfon to access. /// The texture containing the card portrait. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. @@ -202,6 +203,11 @@ public static CardInfo SetEmissivePortrait(this CardInfo info, Sprite sprite) return info; } + /// + /// Retrieves the given CardInfo's emissive portrait. + /// + /// The CardInfo to access. + /// Null if there is no emissive portrait. public static Sprite GetEmissivePortrait(this CardInfo info) => info.portraitTex.GetEmissionSprite(); /// @@ -243,6 +249,11 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Sprite portrai return info; } + /// + /// Retrives the given CardInfo's emissive alternate portrait. + /// + /// The CardInfo to access. + /// Null if there is no emissive alternate portrait. public static Sprite GetEmissiveAltPortrait(this CardInfo info) => info.alternatePortrait.GetEmissionSprite(); #endregion @@ -287,6 +298,11 @@ public static CardInfo SetPixelPortrait(this CardInfo info, Sprite portrait) return info; } + /// + /// Retrieves the given CardInfo's pixel portrait. + /// + /// The CardInfo to access. + /// Null if there is no pixel portrait. public static Sprite GetPixelPortrait(this CardInfo info) { return info.pixelPortrait; @@ -469,8 +485,7 @@ public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Textu /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// /// Tail to access. - /// The sprite containing the card portrait. - /// The filter mode for the texture, or null if no change. + /// The Sprite containing the card portrait. /// The same TailParams so a chain can continue. public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Sprite portrait) { @@ -480,6 +495,12 @@ public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Sprit info.tailLostPortrait.RegisterEmissionForSprite(portrait); return info; } + + /// + /// Retrieves the given CardInfo's emissive tail lost portrait. + /// + /// The CardInfo to access. + /// Null if there is no emissive tail lost portrait. public static Sprite GetEmissiveTailLostPortrait(this TailParams info) => info.tailLostPortrait?.GetEmissionSprite(); #endregion @@ -521,6 +542,11 @@ public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Sprite port return info; } + /// + /// Retrieves the given CardInfo's alternate Act 2 portrait. + /// + /// The CardInfo to access. + /// Null if there is no alternate pixel portrait. public static Sprite GetPixelAlternatePortrait(this CardInfo info) => info.PixelAlternatePortrait(); #endregion @@ -536,11 +562,24 @@ public static CardInfo SetSteelTrapPortrait(this CardInfo info, string pathToArt return info.SetSteelTrapPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } + /// + /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// + /// CardInfo to access. + /// The texture containing the card portrait. + /// The filter mode for the texture, or null if no change. + /// The same CardInfo so a chain can continue. public static CardInfo SetSteelTrapPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetSteelTrapPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); } + /// + /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// + /// CardInfo to access. + /// The Sprite containing the card portrait. + /// The same CardInfo so a chain can continue. public static CardInfo SetSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -571,6 +610,13 @@ public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Texture2D p { return info.SetPixelSteelTrapPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); } + + /// + /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// + /// CardInfo to access. + /// The Sprite containing the card portrait. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -590,10 +636,25 @@ public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, string p { return info.SetEmissiveSteelTrapPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } + + /// + /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// + /// CardInfo to access. + /// The texture containing the card portrait. + /// The filter mode for the texture, or null if no change. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveSteelTrapPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); } + + /// + /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// + /// CardInfo to access. + /// The Sprite containing the card portrait. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (info.SteelTrapPortrait() == null) @@ -602,12 +663,18 @@ public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Sprite p info.SteelTrapPortrait().RegisterEmissionForSprite(portrait); return info; } + + /// + /// Retrieves the given CardInfo's emissive steel trap portrait. + /// + /// + /// Null if there is no emissive steel trap portrait. public static Sprite GetEmissiveSteelTrapPortrait(this CardInfo info) => info.SteelTrapPortrait()?.GetEmissionSprite(); #endregion #region Shield Alt /// - /// Sets the card's alternate broken shield portrait. This portrait is only used when a card with a shield-giving sigil loses all its shields. + /// Sets the card's alternate broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. /// /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). @@ -616,10 +683,25 @@ public static CardInfo SetBrokenShieldPortrait(this CardInfo info, string pathTo { return info.SetBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } + + /// + /// Sets the card's broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. + /// + /// CardInfo to access. + /// The sacrificable portrait's Texture. + /// Filter mode to apply to the texture in-game. Defaults to Point. + /// The same CardInfo so a chain can continue. public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetBrokenShieldPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); } + + /// + /// Sets the card's broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. + /// + /// CardInfo to access. + /// The sacrificable portrait's Portrait. + /// The same CardInfo so a chain can continue. public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -639,10 +721,25 @@ public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, string p { return info.SetPixelBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } + + /// + /// Sets the card's broken shield portrait. This portrait is only used in Act 2. + /// + /// CardInfo to access. + /// The sacrificable portrait's Texture. + /// Filter mode to apply to the texture in-game. Defaults to Point. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelBrokenShieldPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); } + + /// + /// Sets the card's broken shield portrait. This portrait is only used in Act 2. + /// + /// CardInfo to access. + /// The sacrificable portrait's Sprite. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -662,10 +759,25 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, strin { return info.SetEmissiveBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } + + /// + /// Sets the emissive broken shield portrait for the card. This can only be done after the default broken shield portrait has been set (SetBrokenShieldPortrait). + /// + /// CardInfo to access. + /// The sacrificable portrait's Texture. + /// Filter mode to apply to the texture in-game. Defaults to Point. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveBrokenShieldPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); } + + /// + /// Sets the emissive broken shield portrait for the card. This can only be done after the default broken shield portrait has been set (SetBrokenShieldPortrait). + /// + /// CardInfo to access. + /// The sacrificable portrait's Sprite. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (info.BrokenShieldPortrait() == null) @@ -674,6 +786,12 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Sprit info.BrokenShieldPortrait().RegisterEmissionForSprite(portrait); return info; } + + /// + /// Retrieves the given CardInfo's emissive broken shield portrait. + /// + /// The CardInfo to access. + /// Null if there is no emissive broken shield portrait. public static Sprite GetEmissiveBrokenShieldPortrait(this CardInfo info) => info.BrokenShieldPortrait()?.GetEmissionSprite(); #endregion @@ -688,10 +806,23 @@ public static CardInfo SetSacrificablePortrait(this CardInfo info, string pathTo { return info.SetSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); } + /// + /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this CardInfo is on the board when the player is selecting sacrifices. + /// + /// CardInfo to access. + /// The sacrificable portrait's Texture. + /// Filter mode to apply to the texture in-game. Defaults to Point. + /// The same CardInfo so a chain can continue. public static CardInfo SetSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetSacrificablePortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); } + /// + /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this CardInfo is on the board when the player is selecting sacrifices. + /// + /// CardInfo to access. + /// The sacrificable portrait's Sprite. + /// The same CardInfo so a chain can continue. public static CardInfo SetSacrificablePortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -711,10 +842,25 @@ public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, string p { return info.SetPixelSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); } + + /// + /// Sets the card's pixel sacrificable portrait. This portrait is only used in Act 2. + /// + /// CardInfo to access. + /// The card portrait's Texture. + /// The filter mode applied to the portrait in-game (defaults to Point). + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelSacrificablePortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); } + + /// + /// Sets the card's pixel sacrificable portrait. This portrait is only used in Act 2. + /// + /// CardInfo to access. + /// The card portrait's Sprite. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -725,7 +871,7 @@ public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Sprite p } /// - /// Sets the emissive sacrifcable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). + /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). /// /// CardInfo to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). @@ -734,10 +880,25 @@ public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, strin { return info.SetEmissiveSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); } + + /// + /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). + /// + /// CardInfo to access. + /// The card portrait's Texture. + /// The filter mode applied to the portrait in-game (defaults to Point). + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveSacrificablePortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); } + + /// + /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). + /// + /// CardInfo to access. + /// The card portrait's Sprite. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Sprite portrait) { if (info.SacrificablePortrait() == null) @@ -746,6 +907,11 @@ public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Sprit info.SacrificablePortrait().RegisterEmissionForSprite(portrait); return info; } + /// + /// Retrieves the given CardInfo's sacrificable portrait's emission. + /// + /// + /// The CardInfo's emissive sacrificable portrait, or null if one doesn't exist. public static Sprite GetEmissiveSacrificablePortrait(this CardInfo info) => info.SacrificablePortrait().GetEmissionSprite(); #endregion @@ -761,13 +927,48 @@ public static CardInfo SetAnimatedPortrait(this CardInfo info, GameObject portra return info; } + /// + /// Returns whether or not the given PlayableCard's CardInfo has an alternate card portrait. + /// public static bool HasAlternatePortrait(this PlayableCard card) => card.Info.HasAlternatePortrait(); + + /// + /// Returns whether or not the given CardInfo has an alternate card portrait. + /// public static bool HasAlternatePortrait(this CardInfo info) => info.alternatePortrait != null; + + /// + /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait. + /// public static bool HasPixelAlternatePortrait(this CardInfo info) => info.PixelAlternatePortrait() != null; + + /// + /// Returns whether or not the given CardInfo has an alternate Steel Trap card portrait for when Steel Trap triggers on a card. + /// public static bool HasSteelTrapPortrait(this CardInfo info) => info.SteelTrapPortrait() != null; + + /// + /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait for when Steel Trap triggers on a card. + /// public static bool HasPixelSteelTrapPortrait(this CardInfo info) => info.PixelSteelTrapPortrait() != null; + + /// + /// Returns whether or not the given CardInfo has an alternate card portrait for when a card's shield is broken. + /// public static bool HasBrokenShieldPortrait(this CardInfo info) => info.BrokenShieldPortrait() != null; + + /// + /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait for when a card's shield is broken. + /// public static bool HasPixelBrokenShieldPortrait(this CardInfo info) => info.PixelBrokenShieldPortrait() != null; + + /// + /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait for when a card can be sacrificed. + /// public static bool HasSacrificablePortrait(this CardInfo info) => info.SacrificablePortrait() != null; + + /// + /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait for when a card can be sacrificed. + /// public static bool HasPixelSacrificablePortrait(this CardInfo info) => info.PixelSacrificablePortrait() != null; } \ No newline at end of file From a94ba78441ca1e8a1d7506ae1fd3ccd7a8a3879a Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 20:10:51 -0800 Subject: [PATCH 06/42] Add XML for CardExtensions class --- InscryptionAPI/Card/CardExtensions.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/InscryptionAPI/Card/CardExtensions.cs b/InscryptionAPI/Card/CardExtensions.cs index dd8dcebf..52355ee3 100644 --- a/InscryptionAPI/Card/CardExtensions.cs +++ b/InscryptionAPI/Card/CardExtensions.cs @@ -4,6 +4,9 @@ namespace InscryptionAPI.Card; +/// +/// Class containing a large number of helper extension methods for PlayableCard and CardInfo objects. +/// public static partial class CardExtensions { /// From 7f546d13ab16899a047f7c95ff04cfe0eb538dac Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 20:34:38 -0800 Subject: [PATCH 07/42] Add XML for CardExtensionsProperties --- .../Card/CardExtensionsProperties.cs | 99 +++++++++++++++++-- 1 file changed, 92 insertions(+), 7 deletions(-) diff --git a/InscryptionAPI/Card/CardExtensionsProperties.cs b/InscryptionAPI/Card/CardExtensionsProperties.cs index 67890269..e4b14332 100644 --- a/InscryptionAPI/Card/CardExtensionsProperties.cs +++ b/InscryptionAPI/Card/CardExtensionsProperties.cs @@ -5,8 +5,7 @@ namespace InscryptionAPI.Card; -public static partial class CardExtensions -{ +public static partial class CardExtensions { /// /// Adds a custom property value to the card. /// @@ -86,6 +85,7 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// Sets whether the card should be killed by Tidal Lock's effect. /// /// CardInfo to access. + /// Whether or not this card should be affected by Tidal Lock. /// The same CardInfo so a chain can continue. public static CardInfo SetAffectedByTidalLock(this CardInfo info, bool affectedByTidalLock = true) { @@ -112,6 +112,7 @@ public static CardInfo SetAffectedByTidalLock(this CardInfo info, bool affectedB /// Sets whether the card should be killed by Tidal Lock's effect. /// /// CardInfo to access. + /// The internal name of the card this card should transform into. /// The same CardInfo so a chain can continue. public static CardInfo SetTransformerCardId(this CardInfo info, string transformerCardId) { @@ -122,6 +123,12 @@ public static CardInfo SetTransformerCardId(this CardInfo info, string transform #endregion #region Custom Costs + /// + /// Determines if the given CardInfo has the given custom card cost. + /// + /// The CardInfo to access. + /// The custom card cost to check for. + /// True if the CardInfo needs the given custom cost to be played. public static bool HasCustomCost(this CardInfo info, FullCardCost customCost) => info.GetCustomCost(customCost) != 0; @@ -142,6 +149,13 @@ public static CardInfo SetTransformerCardId(this CardInfo info, string transform /// How much of the custom cost the CardInfo should need to be played. /// The same CardInfo so a chain can continue. public static CardInfo SetCustomCost(this CardInfo info, string costName, int amount) => info.SetExtendedProperty(costName, amount); + /// + /// A variant of SetExtendedProperty intended to be used to set properties representing custom costs. Primarily provided for clarity of purpose. + /// + /// The CardInfo to modify. + /// The class of the cost we want to set. + /// How much of the custom cost the CardInfo should need to be played. + /// The same CardInfo so a chain can continue. public static CardInfo SetCustomCost(this CardInfo info, int amount) where T : CustomCardCost { FullCardCost cost = CardCostManager.AllCustomCosts.Find(x => x.CostBehaviour == typeof(T)); @@ -149,15 +163,37 @@ public static CardInfo SetCustomCost(this CardInfo info, int amount) where T } /// - /// Variant of GetCustomCost that automatically retrieves the given cost's canBeNegative value. + /// Variant of GetCustomCost that automatically retrieves the given cost's canBeNegative value when retrieving the cost amount. /// - /// - /// - /// + /// The PlayableCard to access. + /// The name of the custom card cost. + /// How much of the given cost is needed for the given card to be played. public static int GetCustomCostAmount(this PlayableCard card, string costName) => card.Info.GetCustomCostAmount(costName); + + /// + /// Variant of GetCustomCost that automatically retrieves the given cost's canBeNegative value when retrieving the cost amount. + /// + /// The CardInfo to access. + /// The name of the custom card cost. + /// How much of the given cost is needed for the given card to be played. public static int GetCustomCostAmount(this CardInfo cardInfo, string costName) => cardInfo.GetCustomCost(costName, AllCustomCosts.Find(x => x.CostName == costName).CanBeNegative); + /// + /// Retrieves the given PlayableCard's custom card cost amount. + /// + /// The PlayableCard to access. + /// The name of the custom card cost. + /// Whether the card cost amount can be negative. If false, returns 0 for negative cost values. + /// How much of the given cost is needed for the given card to be played. public static int GetCustomCost(this PlayableCard card, string costName, bool canBeNegative = false) => card.Info.GetCustomCost(costName, canBeNegative); + + /// + /// Retrieves the given CardInfo's custom card cost amount. + /// + /// The CardInfo to access. + /// The name of the custom card cost. + /// Whether the card cost amount can be negative. If false, returns 0 for negative cost values. + /// How much of the given cost is needed for the given card to be played. public static int GetCustomCost(this CardInfo cardInfo, string costName, bool canBeNegative = false) { int retval = cardInfo.GetExtendedPropertyAsInt(costName) ?? 0; @@ -171,39 +207,83 @@ public static int GetCustomCost(this CardInfo cardInfo, string costName, bool ca return retval; } + /// + /// Retrieves the custom card cost amount of the given class Type from the given PlayableCard. + /// + /// The class of the card cost to check. + /// The PlayableCard to access. + /// If the returned value can be negative. If false, returns 0 instead. + /// The card cost amount this card costs. public static int GetCustomCost(this PlayableCard card, bool canBeNegative = false) where T : CustomCardCost { FullCardCost cost = CardCostManager.AllCustomCosts.Find(x => x.CostBehaviour == typeof(T)); return card.Info.GetCustomCost(cost.CostName, canBeNegative); } + /// + /// Retrieves the custom card cost amount of the given class Type from the given CardInfo. + /// + /// The class of the card cost to check. + /// The CardInfo to access. + /// If the returned value can be negative. If false, returns 0 instead. + /// The card cost amount this card costs. public static int GetCustomCost(this CardInfo cardInfo, bool canBeNegative = false) where T : CustomCardCost { FullCardCost cost = CardCostManager.AllCustomCosts.Find(x => x.CostBehaviour == typeof(T)); return cardInfo.GetCustomCost(cost.CostName, canBeNegative); } + /// + /// Retrieves the custom card cost amount of the given class Type from the given PlayableCard. + /// + /// The class of the card cost to check. + /// The PlayableCard to access. + /// The card cost amount this card costs. public static int GetCustomCostAmount(this PlayableCard card) where T : CustomCardCost { FullCardCost cost = CardCostManager.AllCustomCosts.Find(x => x.CostBehaviour == typeof(T)); return card.GetCustomCost(cost); } + /// + /// Retrieves the custom card cost amount of the given class Type from the given CardInfo. + /// + /// The class of the card cost to check. + /// The CardInfo to access. + /// The card cost amount this card costs. public static int GetCustomCostAmount(this CardInfo cardInfo) where T : CustomCardCost { FullCardCost cost = CardCostManager.AllCustomCosts.Find(x => x.CostBehaviour == typeof(T)); return cardInfo.GetCustomCost(cost); } + /// + /// Retrieves the given custom card cost amount from the given PlayableCard. + /// Only returns negative values if the custom cost allows it. + /// + /// The PlayableCard to access. + /// The custom card cost to check for. + /// The card cost amount this card costs. public static int GetCustomCost(this PlayableCard card, FullCardCost fullCardCost) { return card.GetCustomCostAmount(fullCardCost.CostName); } + /// + /// Retrieves the given custom card cost amount from the given CardInfo. + /// Only returns negative values if the custom cost allows it. + /// + /// The CardInfo to access. + /// The custom card cost to check for. + /// The card cost amount this card costs. public static int GetCustomCost(this CardInfo cardInfo, FullCardCost fullCardCost) { return cardInfo.GetCustomCostAmount(fullCardCost.CostName); } - + /// + /// Retrieves all custom card costs from the given Card. + /// + /// The Card to access. + /// A List of CustomCardCost objects for each custom cost the Card needs to be played. public static List GetCustomCardCosts(this DiskCardGame.Card card) { try @@ -227,6 +307,11 @@ public static List GetCustomCardCosts(this DiskCardGame.Card car return new(); } + /// + /// Retrieves all custom card costs from the given CardInfo. + /// + /// The CardInfo to access. + /// A List of CustomCardCost objects for each custom cost the CardInfo needs to be played. public static List GetCustomCosts(this CardInfo info) { List costs = new(); From 992689606a87ac51e4a52e3c28d71ed0bd2311db Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 20:37:46 -0800 Subject: [PATCH 08/42] Add missing XML for CardExtensionsSetters --- InscryptionAPI/Card/CardExtensionsSetters.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InscryptionAPI/Card/CardExtensionsSetters.cs b/InscryptionAPI/Card/CardExtensionsSetters.cs index 7df54ab3..104ee229 100644 --- a/InscryptionAPI/Card/CardExtensionsSetters.cs +++ b/InscryptionAPI/Card/CardExtensionsSetters.cs @@ -261,6 +261,7 @@ public static CardInfo SetTerrain(this CardInfo info) /// Adds the Terrain trait and background to this card, with the option to not use TerrainLayout. /// /// CardInfo to access. + /// Whether or not the CardInfo should be given the TerrainLayout appearance behaviour. /// The same CardInfo so a chain can continue. public static CardInfo SetTerrain(this CardInfo info, bool useTerrainLayout) { @@ -275,6 +276,7 @@ public static CardInfo SetTerrain(this CardInfo info, bool useTerrainLayout) /// Adds the Pelt trait and background to this card, and optionally adds the SpawnLice special ability. /// /// CardInfo to access. + /// Whether or not the given CardInfo should also spawn lice. /// The same CardInfo so a chain can continue. public static CardInfo SetPelt(this CardInfo info, bool spawnLice = true) { @@ -453,8 +455,6 @@ public static CardInfo SetTail(this CardInfo info, string tailName, IEnumerable< /// /// CardInfo to access. /// The card that will be generated as the "tail" when the first hit is dodged. - /// The texture containing the card portrait. - /// The filter mode for the texture, or null if no change. /// A set of card mods to be applied to the tail. /// The same CardInfo so a chain can continue. public static CardInfo SetTail(this CardInfo info, CardInfo tail, IEnumerable mods = null) From c9061a462e68a1421590039ee6f63060d542d403 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 20:40:15 -0800 Subject: [PATCH 09/42] Add missing XML to CardManager --- InscryptionAPI/Card/CardManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/InscryptionAPI/Card/CardManager.cs b/InscryptionAPI/Card/CardManager.cs index cad99a63..4a9bb9c7 100644 --- a/InscryptionAPI/Card/CardManager.cs +++ b/InscryptionAPI/Card/CardManager.cs @@ -608,6 +608,12 @@ private static IEnumerable Transpiler(IEnumerable + /// Adds a null check when calling GetCardByName. If the returned CardInfo is null, outputs a console log error. + /// + /// The CardInfo being returned by GetCardByName. + /// The internal name of the CardInfo attempting to be retrieved. + /// The return value of GetCardByName. public static CardInfo LogCardInfo(CardInfo info, string cardInfoName) { if (info == null) From d961848e15eb373d2a6b55560687bd1c9d4ecc40 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 23:14:54 -0800 Subject: [PATCH 10/42] Add missing XML to CardCostManager --- InscryptionAPI/Costs/CardCostManager.cs | 83 ++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/InscryptionAPI/Costs/CardCostManager.cs b/InscryptionAPI/Costs/CardCostManager.cs index 901ccf4b..5beab146 100644 --- a/InscryptionAPI/Costs/CardCostManager.cs +++ b/InscryptionAPI/Costs/CardCostManager.cs @@ -2,10 +2,8 @@ using GBC; using HarmonyLib; using InscryptionAPI.Card; -using InscryptionAPI.Card.CostProperties; using InscryptionAPI.Dialogue; using InscryptionAPI.Guid; -using InscryptionAPI.Helpers; using Sirenix.Utilities; using System.Collections; using System.Collections.ObjectModel; @@ -19,8 +17,10 @@ namespace InscryptionAPI.CardCosts; /// Class for managing custom card costs. /// [HarmonyPatch] -public static class CardCostManager -{ +public static class CardCostManager { + /// + /// A utility class that holds all of the required information about a card cost in order to be able to use it in-game. + /// public class FullCardCost { /// @@ -151,6 +151,20 @@ public bool CanBePlayedByTurn2WithHand(int amount, CardInfo card, List return GetCanBePlayedByTurn2WithHand(amount, card, hand); } + /// + /// Creates a new instance of FullCardCost and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// + /// The GUID of the mod that added this. + /// The unique id/name for this cost. + /// A subclass of CustomCardCost that implements the logic for the cost. + /// The method used to retrieve a card's cost texture based on its cost value. + /// The method used to retrieve a card's pixel cost texture based on its cost value. + /// The method used to determine this cost's tier. + /// The method used to determine if cards with this cost can be drawn in the opening hand. + /// The method used to determine what texture this cost's reward card should use when choosing it in a card cost choice node. + /// Whether or not this cost can have a valid negative value (if false, negative values default to 0). + /// The ResourceType id for this cost. Used in card cost choice nodes. + /// What amounts of this cost card cost choice nodes can offer the player as an option (think how the nodes let you choose from cards with 1, 2, or 3 Blood). public FullCardCost(string modGUID, string costName, Type costBehaviour, Func getCostTexture, Func getPixelCostTexture, @@ -174,6 +188,15 @@ public FullCardCost(string modGUID, string costName, Type costBehaviour, TypeManager.Add(costName, costBehaviour); } + /// + /// Creates a new instance of FullCardCost and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Simplified version of the full constructor. + /// + /// The GUID of the mod that added this. + /// The unique id/name for this cost. + /// A subclass of CustomCardCost that implements the logic for the cost. + /// The method used to retrieve a card's cost texture based on its cost value. + /// The method used to retrieve a card's pixel cost texture based on its cost value. public FullCardCost(string modGUID, string costName, Type costBehaviour, Func getCostTexture, Func getPixelCostTexture) @@ -344,8 +367,6 @@ public static FullCardCost SetCanBeNegative(this FullCardCost fullCardCost, bool /// Sets the ResourceType and RewardBackTexture for this cost, allowing it to be selected at cost choice nodes in Act 1. /// /// The FullCardCost object to modify. - /// The GUID of the mod adding the cost. - /// The internal name of the cost. /// Whether this card cost should appear at cost choice nodes. Sets the ResourceType to a unique value if true. Sets the ResourceType to None if false. /// The texture to use at the cost choice node. /// The same FullCardCost so a chain can continue. @@ -354,6 +375,15 @@ public static FullCardCost SetFoundAtChoiceNodes(this FullCardCost fullCardCost, return fullCardCost.SetFoundAtChoiceNodes(isChoice, (int i) => rewardBack, null); } + /// + /// Sets the ResourceType and RewardBackTexture for this cost, allowing it to be selected at cost choice nodes in Act 1. + /// This version of the method is intended for when custom costs may be offered in different amounts (like Blood and Bones) at the cost choice node. + /// + /// The FullCardCost object to modify. + /// Whether this card cost should appear at cost choice nodes. Sets the ResourceType to a unique value if true. Sets the ResourceType to None if false. + /// The method for determining the texture to use at the cost choice node. + /// The cost amounts the cost choice node may offer to the player. + /// The same FullCardCost so a chain can continue. public static FullCardCost SetFoundAtChoiceNodes(this FullCardCost fullCardCost, bool isChoice, Func rewardBackFunc, params int[] choiceAmounts) { if (isChoice) @@ -771,18 +801,37 @@ private static IEnumerator CustomCostChoiceChosen(IEnumerator enumerator, CardSi yield break; } + /// + /// Gets a random choosable Nature card that costs Energy. + /// For use in the Act 1 card cost choice node. + /// + /// The random seed for the current run. + /// The CardInfo of a valid Energy card, or null if none exists. public static CardInfo GetRandomChoosableEnergyCard(int randomSeed) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature).FindAll(x => x.energyCost > 0); return list.Count == 0 ? null : CardLoader.Clone(list[SeededRandom.Range(0, list.Count, randomSeed)]); } + /// + /// Gets a random choosable Nature card that costs Gems. + /// For use in the Act 1 card cost choice node. + /// + /// The random seed for the current run. + /// The gem colour valid cards must have to be valid. + /// The CardInfo of a valid Gems card, or null if none exists. public static CardInfo GetRandomChoosableMoxCard(int randomSeed, GemType gem) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature).FindAll(x => x.gemsCost.Count > 0 && x.gemsCost.Contains(gem)); return list.Count == 0 ? null : CardLoader.Clone(list[SeededRandom.Range(0, list.Count, randomSeed)]); } - // chooses a random card that has at least 1 of the provided custom costs + /// + /// Gets a random choosable Nature card that costs at least one of the given custom costs. + /// For use in the Act 1 card cost choice node. + /// + /// The random seed for the current run. + /// The List of custom costs to check for a random card for. + /// The CardInfo of a valid custom cost card, or null if none exists. public static CardInfo GetRandomChoosableCustomCostCard(int randomSeed, List customCosts) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature) @@ -793,6 +842,14 @@ public static CardInfo GetRandomChoosableCustomCostCard(int randomSeed, List + /// Gets a random choosable Nature card with the given custom play cost that requires an owned amount within the given collection of integers. + /// For use in the Act 1 card cost choice node. + /// + /// The random seed for the current run. + /// The custom cost valid cards will have. + /// The collection of cost amounts to search for. + /// The CardInfo of a valid card, or null if none exists. public static CardInfo GetRandomChoosableCustomCostCardWithAmounts(int randomSeed, FullCardCost customCost, params int[] costAmounts) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature) @@ -801,6 +858,12 @@ public static CardInfo GetRandomChoosableCustomCostCardWithAmounts(int randomSee InscryptionAPIPlugin.Logger.LogDebug($"Choice amounts for {customCost.CostName}: {costAmounts.Length}. Found {list.Count} card(s)."); return list.Count == 0 ? null : CardLoader.Clone(list[SeededRandom.Range(0, list.Count, randomSeed)]); } + /// + /// Determines what gem colour to offer in a card cost choice node if one can be offered. + /// Only one gem colour can be offered at a time, for use with the Act 1 card cost choice node. + /// + /// The random seed of the current run. + /// A number between 1-3 corresponding to Green, Orange, and Blue respectively; or 0 if no valid gem cards exist. public static int GetRandomMoxIndex(int randomSeed) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature).FindAll((CardInfo x) => x.gemsCost.Count > 0); @@ -832,7 +895,13 @@ public abstract class CustomCardCost : ManagedBehaviour /// The internal name of the cost. Used to check for the cost's extended property by the API. /// public abstract string CostName { get; } + /// + /// How many attempts must be made before the play hint can be shown again. + /// public virtual int PlayHintFrequency { get; } = 1; + /// + /// How many times the game has tried to show this cost's play hint. + /// public int playHintAttempts = 0; /// From 4619e29d07e4c754d446537a8adf56b6cbdada6d Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 23:35:59 -0800 Subject: [PATCH 11/42] Add XML for CardModificationInfoExtensions Considering if the custom costs ID system can be deprecated, but it may have a use as a way of providing custom cost adjustments on CardModInfos --- .../Card/CardModificationInfoExtensions.cs | 325 +++++++++++++++++- 1 file changed, 322 insertions(+), 3 deletions(-) diff --git a/InscryptionAPI/Card/CardModificationInfoExtensions.cs b/InscryptionAPI/Card/CardModificationInfoExtensions.cs index f299b425..e06a3b80 100644 --- a/InscryptionAPI/Card/CardModificationInfoExtensions.cs +++ b/InscryptionAPI/Card/CardModificationInfoExtensions.cs @@ -4,11 +4,25 @@ using static InscryptionAPI.Card.CardModificationInfoManager; namespace InscryptionAPI.Card; +/// +/// Class of helper extensions for CardModificationInfo objects. +/// public static class CardModificationInfoExtensions { + /// + /// Determines if the given CardModificationInfo contains info for a death card. + /// + /// The CardModificationInfo to access. + /// True if the CardModificationInfo has death card info. public static bool HasDeathCardInfo(this CardModificationInfo mod) => mod.deathCardInfo != null; #region Adders + /// + /// Adds decal ID strings to the given CardModificationInfo. + /// + /// The CardModificationInfo to access. + /// The decal IDs to add. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo AddDecalIds(this CardModificationInfo mod, params string[] decalIds) { foreach (string decalId in decalIds) @@ -18,6 +32,13 @@ public static CardModificationInfo AddDecalIds(this CardModificationInfo mod, pa } return mod; } + /// + /// Adds the given abilities to the given CardModificationInfos list of negated abilities. + /// THIS WILL NOT NEGATE THE GIVEN ABILITIES ON ITS OWN. + /// + /// The CardModificationInfo to access. + /// The list of abilities to negate. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo AddNegateAbilities(this CardModificationInfo mod, params Ability[] negateAbilities) { mod.negateAbilities ??= new(); @@ -27,59 +48,132 @@ public static CardModificationInfo AddNegateAbilities(this CardModificationInfo #endregion #region Setters + /// + /// Sets the name replacement field for the given CardModificationInfo. + /// + /// The CardModification to access. + /// The name replacement. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetNameReplacement(this CardModificationInfo mod, string name = null) { mod.nameReplacement = name; return mod; } + /// + /// Sets the singleton ID field for the given CardModificationInfo. + /// + /// The CardModification to access. + /// The singleton ID. If null, does not set it. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetSingletonId(this CardModificationInfo mod, string id = null) { if (id != null) mod.singletonId = id; return mod; } + /// + /// Sets the attack and health adjustment fields for the given CardModificationInfo. + /// + /// The CardModification to access. + /// How much attack this mod should give. Can be negative. + /// How much health this mod should give. Can be negative. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetAttackAndHealth(this CardModificationInfo mod, int attack = 0, int health = 0) { mod.attackAdjustment = attack; mod.healthAdjustment = health; return mod; } + /// + /// Sets the cost adjustment fields for the given CardModificationInfo. + /// + /// The CardModification to access. + /// The amount the mod should modify a card's blood cost. Can be negative. + /// The amount the mod should modify a card's bones cost. Can be negative. + /// The amount the mod should modify a card's energy cost. Can be negative. + /// The amount the mod should modify a card's gems cost. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetCosts(this CardModificationInfo mod, int blood = 0, int bones = 0, int energy = 0, List gems = null) { return mod.SetBloodCost(blood).SetBonesCost(bones).SetEnergyCost(energy).SetGemsCost(gems); } + /// + /// Sets the blood cost adjustment field for the given CardModificationInfo. + /// + /// The CardModification to access. + /// The amount the mod should modify a card's blood cost. Can be negative. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetBloodCost(this CardModificationInfo mod, int cost = 0) { mod.bloodCostAdjustment = cost; return mod; } + /// + /// Sets the bones cost adjustment field for the given CardModificationInfo. + /// + /// The CardModification to access. + /// The amount the mod should modify a card's bones cost. Can be negative. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetBonesCost(this CardModificationInfo mod, int cost = 0) { mod.bonesCostAdjustment = cost; return mod; } + /// + /// Sets the energy cost adjustment field for the given CardModificationInfo. + /// + /// The CardModification to access. + /// The amount the mod should modify a card's energy cost. Can be negative. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetEnergyCost(this CardModificationInfo mod, int cost = 0) { mod.energyCostAdjustment = cost; return mod; } + /// + /// Sets the addGemsCost field for the given CardModificationInfo. + /// + /// The CardModification to access. + /// List of gems cost this mod should add to a card. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetGemsCost(this CardModificationInfo mod, List cost = null) { if (cost != null) mod.addGemCost = cost; return mod; } + /// + /// Sets the addGemsCost field for the given CardModificationInfo. + /// + /// The CardModification to access. + /// Collection of gems cost this mod should add to a card. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetGemsCost(this CardModificationInfo mod, params GemType[] cost) { if (cost.Length > 0) mod.addGemCost = cost.ToList(); return mod; } + /// + /// Adds the given abilities to the given CardModificationInfo. + /// + /// The CardModificationInfo to access. + /// + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo AddAbilities(this CardModificationInfo mod, params Ability[] abilities) { mod.abilities.AddRange(abilities); return mod; } + /// + /// Sets the given CardModificationInfo's deathCardInfo field with a new death card portrait. + /// + /// The CardModificationInfo to access. + /// What head the portrait should use. + /// What mouth the portrait should use. + /// What eyes the portrait should use. + /// If the portrait should be missing an eye. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetDeathCardPortrait(this CardModificationInfo mod, CompositeFigurine.FigurineType headType = CompositeFigurine.FigurineType.SettlerMan, int mouthIndex = 0, int eyesIndex = 0, bool lostEye = false) @@ -91,9 +185,12 @@ public static CardModificationInfo SetDeathCardPortrait(this CardModificationInf #endregion /// - /// Used by the API to remove temporary decal mods, since it's not done automatically. + /// Used by the API to set and remove temporary decal mods, since it's not done automatically. /// public static void SetTemporaryDecal(this CardModificationInfo mod) => mod.SetExtendedProperty("API:TemporaryDecal", true); + /// + /// Determines if the given CardModificationInfo is an API temporary decal. + /// public static bool IsTemporaryDecal(this CardModificationInfo mod) => mod.GetExtendedPropertyAsBool("API:TemporaryDecal") ?? false; #region Singleton ID @@ -111,6 +208,11 @@ public static CardModificationInfo ClearCustomPropertiesId(this CardModification return mod; } + /// + /// Removes the custom costs ID field from a CardModificationInfo's singletonId. + /// + /// The CardModificationInfo object whose custom costs ID we want to clear. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo ClearCustomCostsId(this CardModificationInfo mod) { string costs = GetCustomCostsIdString(mod); @@ -121,10 +223,39 @@ public static CardModificationInfo ClearCustomCostsId(this CardModificationInfo } #region Properties + /// + /// Determines if the given CardModificationInfo has a singleton ID containing an API custom (extended) property. + /// + /// The CardModificationInfo to access. + /// What custom property to look for. + /// True if the given property is present, false if it isn't present or there is no custom property section. public static bool HasCustomPropertyId(this CardModificationInfo mod, string propertyName) => HasCustomPropertiesId(mod.singletonId) && mod.singletonId.Contains(propertyName); + /// + /// Determines if the given string is a custom (extended) properties string ID. + /// + /// The string to access. + /// What custom property to look for. + /// True if the given property is present, false if it isn't present or there is no custom property section. public static bool HasCustomPropertyId(this string singletonId, string propertyName) => HasCustomPropertiesId(singletonId) && singletonId.Contains(propertyName); + /// + /// Determines if the given CardModificationInfo has any custom (extended) properties in its singleton ID. + /// + /// The CardModificationInfo to access. + /// True if there are any custom properties, false otherwise. public static bool HasCustomPropertiesId(this CardModificationInfo mod) => !mod.singletonId.IsNullOrWhitespace() && mod.singletonId.Contains(PROPERTIES); + /// + /// Determines if the given string has any custom (extended) properties in it. + /// + /// The string to access. + /// True if there are any custom properties, false otherwise. public static bool HasCustomPropertiesId(this string singletonId) => !singletonId.IsNullOrWhitespace() && singletonId.Contains(PROPERTIES); + /// + /// Creates and/or modifies the custom properties section inside the given CardModificationInfo's singleton ID. + /// + /// The CardModificationInfo to access. + /// The name of the property to add. + /// What value to set for the property. Will be converted to a string. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo SetPropertiesId(this CardModificationInfo mod, string propertyName, object value) { string valuePair = $"{propertyName},{value}"; @@ -159,11 +290,29 @@ public static CardModificationInfo SetPropertiesId(this CardModificationInfo mod return mod; } + /// + /// Determines if the given CardModificationInfo has a custom property with the given name. Checks extended properties before checking the singleton ID. + /// + /// The CardModificationInfo + /// The custom property to search for. + /// True if the CardModificationInfo has an extended property or custom property ID with the given name. False otherwise. public static bool HasCustomProperty(this CardModificationInfo mod, string propertyName) => mod.GetCustomProperty(propertyName) != null; + /// + /// Gets the custom property value from the given CardModificationInfo using the given property name. Checks extended properties before checking the singleton ID. + /// + /// The CardModificationInfo to access. + /// The custom property's name. + /// The value of the custom property, or null. public static string GetCustomProperty(this CardModificationInfo mod, string propertyName) { return mod.GetExtendedProperty(propertyName) ?? mod.GetCustomPropertyId(propertyName); } + /// + /// Retrieves the value of the given custom property ID in the given CardModificationInfo. + /// + /// The CardModificationInfo to access. + /// The custom property whose value we want. + /// The value of the custom property, or null if there is none. public static string GetCustomPropertyId(this CardModificationInfo mod, string propertyName) { if (!mod.HasCustomPropertyId(propertyName)) @@ -185,11 +334,48 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p #endregion #region CustomCosts + /// + /// Determines if the given CardModificationInfo adds the given custom cost. + /// + /// The CardModificationInfo to access. + /// The name of the custom cost to search for. + /// True if the CardModification adds the given card cost. + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostId(this CardModificationInfo mod, string costName) => HasCustomCostsId(mod.singletonId) && mod.singletonId.Contains(costName); + + /// + /// Determines if the given singleton ID string has the given custom cost in its custom costs substring. + /// + /// The CardModificationInfo to access. + /// The name of the custom cost to search for. + /// True if the string has the given card cost in its custom costs substring. + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostId(this string singletonId, string costName) => HasCustomCostsId(singletonId) && singletonId.Contains(costName); + + /// + /// Determines if the given CardModificationInfo adds any custom costs. + /// + /// The CardModificationInfo to access. + /// True if the CardModification adds any card costs. + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostsId(this CardModificationInfo mod) => !mod.singletonId.IsNullOrWhitespace() && mod.singletonId.Contains(CUSTOM_COSTS); + + /// + /// Determines if the given singleton ID string has the custom costs substring. + /// + /// The CardModificationInfo to access. + /// True if the string has the custom costs substring. + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostsId(this string singletonId) => !singletonId.IsNullOrWhitespace() && singletonId.Contains(CUSTOM_COSTS); + /// + /// Sets the custom cost ID and play amount to the given CardModificationInfo's singleton ID. + /// + /// The CardModificationInfo to access. + /// + /// + /// + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static CardModificationInfo SetCustomCostId(this CardModificationInfo mod, string costName, object value) { string valuePair = $"{costName},{value}"; @@ -222,11 +408,33 @@ public static CardModificationInfo SetCustomCostId(this CardModificationInfo mod return mod; } + /// + /// Whetehr or not the given CardModificationInfo has the given custom cost. + /// + /// The CardModificationInfo to access. + /// The name of the custom cost to find. + /// True if the CardModificationInfo uses the given custom cost. False otherwise; + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCost(this CardModificationInfo mod, string costName) => (mod.GetExtendedProperty(costName) ?? mod.GetCustomCostId(costName)) != null; + /// + /// Retrieves the play amount of the given custom cost on the given CardModificationInfo. + /// Checks extended properties before checking custom cost IDs. + /// + /// The CardModificationinfo to access. + /// The name of the custom cost to find. + /// The custom cost's play amount as an int. + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static int GetCustomCost(this CardModificationInfo mod, string costName) { return mod.GetExtendedPropertyAsInt(costName) ?? mod.GetCustomCostIdValue(costName); } + /// + /// Retrieves the amount of the given custom cost the given CardModificationInfo costs as a string. + /// + /// The CardModificationInfo to access. + /// The name of the custom cost to find. + /// The string representation of the custom cost's play amount, or null if the custom cost ID is not present. + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static string GetCustomCostId(this CardModificationInfo mod, string costName) { if (!mod.HasCustomCostId(costName)) @@ -245,6 +453,13 @@ public static string GetCustomCostId(this CardModificationInfo mod, string costN return pairString.Substring(0, valueIdx).Replace(costName + ",", ""); } + /// + /// Retrieves the cost amount of the given custom cost on the given CardModificationInfo. + /// + /// The CardModificationInfo to access. + /// Name of the custom cost to check for. + /// How much of the custom cost this CardModificationInfo needs, or 0 if the cost is not present. + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static int GetCustomCostIdValue(this CardModificationInfo mod, string costName) { string valueStr = mod.GetCustomCostId(costName); @@ -253,6 +468,12 @@ public static int GetCustomCostIdValue(this CardModificationInfo mod, string cos return int.TryParse(valueStr, out int result) ? result : 0; } + /// + /// Retrieves a list of all custom costs that the given CardModificationInfo adds. + /// + /// The CardModificationInfo to access. + /// A List of all FullCardCosts the given CardModificationInfo adds to the attached card. + // [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static List GetCustomCostsFromMod(this CardModificationInfo mod) { List costs = new(); @@ -273,8 +494,23 @@ public static int GetCustomCostIdValue(this CardModificationInfo mod, string cos #endregion #region ID Getters + /// + /// Creates a copy of the given CardModificationInfo's singleton ID without any of the API's custom property or cost substrings. + /// + /// The CardModificationInfo to access. + /// A new string that is a copy of the CardModificationInfo's singleton ID but without any API-added substrings. public static string CleanId(this CardModificationInfo mod) => mod.IdWithoutCosts().IdWithoutProperties(); + /// + /// Creates a new string that is a copy of the given CardModificationInfo's singleton ID string without the custom properties ID substring. + /// + /// The CardModificationInfo to access. + /// A clean copy of the CardModificationInfo's singleton ID without the custom properties ID substring. public static string IdWithoutProperties(this CardModificationInfo mod) => mod.singletonId.IdWithoutProperties(); + /// + /// Creates a new string that is a copy of the given string without the custom properties ID substring. + /// + /// The string to access. + /// A clean copy of the singleton ID without the custom properties ID substring. public static string IdWithoutProperties(this string singletonId) { if (!singletonId.HasCustomPropertiesId()) @@ -283,7 +519,17 @@ public static string IdWithoutProperties(this string singletonId) string properties = GetCustomPropertiesIdString(singletonId); return singletonId.Replace(properties, ""); } + /// + /// Creates a new string that is a copy of the given CardModificationInfo's singleton ID string without the custom costs ID substring. + /// + /// The CardModificationInfo to access. + /// A clean copy of the CardModificationInfo's singleton ID without the custom costs substring. public static string IdWithoutCosts(this CardModificationInfo mod) => mod.singletonId.IdWithoutCosts(); + /// + /// Creates a new string that is a copy of the given string without the custom costs substring. + /// + /// The string to access. + /// A clean copy of the singleton ID without the custom costs substring. public static string IdWithoutCosts(this string singletonId) { if (!singletonId.HasCustomCostsId()) @@ -366,6 +612,11 @@ public static string GetExtendedProperty(this CardModificationInfo mod, string p #endregion #region RemoveGems + /// + /// Removes all gem cost negations on the CardModificationInfo. + /// Only considers extended properties. + /// + /// The CardModificationInfo to access. public static void ClearAllRemovedGemsCosts(this CardModificationInfo mod) { if (mod.HasRemovedGreenGemCost()) @@ -377,9 +628,14 @@ public static void ClearAllRemovedGemsCosts(this CardModificationInfo mod) if (mod.HasRemoveBlueGemCost()) mod.RemoveBlueGemCost(false); } + /// + /// Determines which gem costs have been removed/negated by the given CardModificationInfo using extended properties. + /// + /// The CardModificationInfo to access. + /// A List of all removed gem cost colours. public static List RemovedGemsCosts(this CardModificationInfo mod) { - List gems = new(); + List gems = new(3); if (mod.HasRemovedGreenGemCost()) gems.Add(GemType.Green); @@ -391,6 +647,12 @@ public static List RemovedGemsCosts(this CardModificationInfo mod) return gems; } + /// + /// Clears extended properties on the given CardModificationInfo that remove single gem costs with the given types. + /// + /// The CardModificationInfo to access. + /// A collection of all gem colours that should be re-added/stop being negated. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo RemoveGemsCost(this CardModificationInfo mod, params GemType[] gemTypes) { if (gemTypes.Contains(GemType.Green)) @@ -404,6 +666,12 @@ public static CardModificationInfo RemoveGemsCost(this CardModificationInfo mod, return mod; } + /// + /// Clears all extended properties on the given CardModificationInfo that remove single gem costs. + /// + /// The CardModificationInfo to access. + /// A collection of all gem colours that should be re-added/stop being negated. + /// The same CardModificationInfo so a chain can continue. public static CardModificationInfo ClearRemovedGemsCost(this CardModificationInfo mod, params GemType[] gemTypes) { if (gemTypes.Contains(GemType.Green)) @@ -417,14 +685,65 @@ public static CardModificationInfo ClearRemovedGemsCost(this CardModificationInf return mod; } + /// + /// Uses extended properties to make the given CardModificationInfo negate a single green gem cost. + /// + /// The CardModificationInfo to access. + /// Whether the given CardModificationInfo should remove a single green gem from the play cost. + /// The same CardModificationInfo so a chain can continue. + /// If you want to negate multiple gems of the same colour, you'll need to create multiple CardModificationInfos. public static CardModificationInfo RemoveGreenGemCost(this CardModificationInfo mod, bool remove) => mod.SetExtendedProperty("RemoveGreenGem", remove, true); + /// + /// Uses extended properties to make the given CardModificationInfo negate a single orange gem cost. + /// + /// The CardModificationInfo to access. + /// Whether the given CardModificationInfo should remove a single orange gem from the play cost. + /// The same CardModificationInfo so a chain can continue. + /// If you want to negate multiple gems of the same colour, you'll need to create multiple CardModificationInfos. public static CardModificationInfo RemoveOrangeGemCost(this CardModificationInfo mod, bool remove) => mod.SetExtendedProperty("RemoveOrangeGem", remove, true); + /// + /// Uses extended properties to make the given CardModificationInfo negate a single blue gem cost. + /// + /// The CardModificationInfo to access. + /// Whether the given CardModificationInfo should remove a single blue gem from the play cost. + /// The same CardModificationInfo so a chain can continue. + /// If you want to negate multiple gems of the same colour, you'll need to create multiple CardModificationInfos. public static CardModificationInfo RemoveBlueGemCost(this CardModificationInfo mod, bool remove) => mod.SetExtendedProperty("RemoveBlueGem", remove, true); + /// + /// Determines if the given CardModificationInfo removes a green gems cost. + /// Separate from the vanilla nullifyGemsCost, which negates all gem costs. + /// + /// The CardModificationInfo to access. + /// True if the CardModificationInfo negates a green gem. public static bool HasRemovedGreenGemCost(this CardModificationInfo mod) => mod.GetExtendedPropertyAsBool("RemoveGreenGem") ?? false; + /// + /// Determines if the given CardModificationInfo removes a orange gems cost. + /// Separate from the vanilla nullifyGemsCost, which negates all gem costs. + /// + /// The CardModificationInfo to access. + /// True if the CardModificationInfo negates a orange gem. public static bool HasRemovedOrangeGemCost(this CardModificationInfo mod) => mod.GetExtendedPropertyAsBool("RemoveOrangeGem") ?? false; + /// + /// Determines if the given CardModificationInfo removes a blue gems cost. + /// Separate from the vanilla nullifyGemsCost, which negates all gem costs. + /// + /// The CardModificationInfo to access. + /// True if the CardModificationInfo negates a blue gem. public static bool HasRemoveBlueGemCost(this CardModificationInfo mod) => mod.GetExtendedPropertyAsBool("RemoveBlueGem") ?? false; - + /// + /// Determines if the given CardModificationInfo removes any gem costs using the API's extended properties. + /// Does not check nullifyGemsCost. + /// + /// The CardModificationInfo to access. + /// True if the CardModificationInfo negates any single gem. public static bool HasRemovedAnyGemCost(this CardModificationInfo mod) => mod.HasRemovedGreenGemCost() || mod.HasRemovedOrangeGemCost() || mod.HasRemoveBlueGemCost(); + /// + /// Determines if the given CardModificationInfo removes a gems cost of the given colour. + /// Separate from the vanilla nullifyGemsCost, which negates all gem costs. + /// + /// The CardModificationInfo to access. + /// The colour gem to search for. + /// True if the CardModificationInfo negates a gem with the given colour. public static bool HasRemovedGemCost(this CardModificationInfo mod, GemType gemType) { return gemType switch From 2a9b9ad39ea511f932c96fd784aaab430c1ce511 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 23:52:52 -0800 Subject: [PATCH 12/42] Add missing XML, remarks on the custom costs ID system that recommend not using it except in very specific cases --- .../Card/CardModificationInfoExtensions.cs | 79 ++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/InscryptionAPI/Card/CardModificationInfoExtensions.cs b/InscryptionAPI/Card/CardModificationInfoExtensions.cs index e06a3b80..bff05581 100644 --- a/InscryptionAPI/Card/CardModificationInfoExtensions.cs +++ b/InscryptionAPI/Card/CardModificationInfoExtensions.cs @@ -213,6 +213,13 @@ public static CardModificationInfo ClearCustomPropertiesId(this CardModification /// /// The CardModificationInfo object whose custom costs ID we want to clear. /// The same CardModificationInfo so a chain can continue. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
public static CardModificationInfo ClearCustomCostsId(this CardModificationInfo mod) { string costs = GetCustomCostsIdString(mod); @@ -340,6 +347,13 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p /// The CardModificationInfo to access. /// The name of the custom cost to search for. /// True if the CardModification adds the given card cost. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostId(this CardModificationInfo mod, string costName) => HasCustomCostsId(mod.singletonId) && mod.singletonId.Contains(costName); @@ -349,6 +363,13 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p /// The CardModificationInfo to access. /// The name of the custom cost to search for. /// True if the string has the given card cost in its custom costs substring. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostId(this string singletonId, string costName) => HasCustomCostsId(singletonId) && singletonId.Contains(costName); @@ -357,6 +378,13 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p /// /// The CardModificationInfo to access. /// True if the CardModification adds any card costs. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostsId(this CardModificationInfo mod) => !mod.singletonId.IsNullOrWhitespace() && mod.singletonId.Contains(CUSTOM_COSTS); @@ -365,6 +393,13 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p /// /// The CardModificationInfo to access. /// True if the string has the custom costs substring. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostsId(this string singletonId) => !singletonId.IsNullOrWhitespace() && singletonId.Contains(CUSTOM_COSTS); @@ -374,7 +409,14 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p /// The CardModificationInfo to access. /// /// - /// + /// The same CardModificationInfo so a chain can continue. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static CardModificationInfo SetCustomCostId(this CardModificationInfo mod, string costName, object value) { @@ -414,6 +456,13 @@ public static CardModificationInfo SetCustomCostId(this CardModificationInfo mod /// The CardModificationInfo to access. /// The name of the custom cost to find. /// True if the CardModificationInfo uses the given custom cost. False otherwise; + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCost(this CardModificationInfo mod, string costName) => (mod.GetExtendedProperty(costName) ?? mod.GetCustomCostId(costName)) != null; /// @@ -423,6 +472,13 @@ public static CardModificationInfo SetCustomCostId(this CardModificationInfo mod /// The CardModificationinfo to access. /// The name of the custom cost to find. /// The custom cost's play amount as an int. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static int GetCustomCost(this CardModificationInfo mod, string costName) { @@ -434,6 +490,13 @@ public static int GetCustomCost(this CardModificationInfo mod, string costName) /// The CardModificationInfo to access. /// The name of the custom cost to find. /// The string representation of the custom cost's play amount, or null if the custom cost ID is not present. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static string GetCustomCostId(this CardModificationInfo mod, string costName) { @@ -459,6 +522,13 @@ public static string GetCustomCostId(this CardModificationInfo mod, string costN /// The CardModificationInfo to access. /// Name of the custom cost to check for. /// How much of the custom cost this CardModificationInfo needs, or 0 if the cost is not present. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static int GetCustomCostIdValue(this CardModificationInfo mod, string costName) { @@ -473,6 +543,13 @@ public static int GetCustomCostIdValue(this CardModificationInfo mod, string cos ///
/// The CardModificationInfo to access. /// A List of all FullCardCosts the given CardModificationInfo adds to the attached card. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static List GetCustomCostsFromMod(this CardModificationInfo mod) { From 4f927aa40e9c162df4a3a95f6e9d9c4f024e15ac Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Thu, 12 Nov 2026 23:53:07 -0800 Subject: [PATCH 13/42] Add XML to CardModificationInfoManager --- .../Card/CardModificationInfoManager.cs | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/InscryptionAPI/Card/CardModificationInfoManager.cs b/InscryptionAPI/Card/CardModificationInfoManager.cs index abcf0641..1a93c812 100644 --- a/InscryptionAPI/Card/CardModificationInfoManager.cs +++ b/InscryptionAPI/Card/CardModificationInfoManager.cs @@ -99,6 +99,11 @@ public static void SyncCardMods() } } } + /// + /// Retrieves all custom properties stored in the given singleton ID string. + /// + /// The singleton ID string to retrieve custom properties from. + /// A List of all custom properties stored by the singleton ID. public static List GetCustomPropertiesFromId(string singletonId) { List propertiesList = new(); @@ -114,6 +119,15 @@ public static List GetCustomPropertiesFromId(string singletonId) } return propertiesList; } + /// + /// Retrieves all custom costs stored in the given singleton ID string. + /// + /// The singleton ID string to retrieve custom costs from. + /// A List of all custom costs stored by the singleton ID. + /// + /// With the improved system of adding custom costs using the [CardCostManager](InscryptionAPI.CardCosts.CardCostManager), + /// it's recommended to avoid using the custom costs ID system unless you want to do something akin to the vanilla CardModInfo cost adjustments. + /// public static List GetCustomCostsFromId(string singletonId) { List costList = new(); @@ -131,7 +145,17 @@ public static List GetCustomCostsFromId(string singletonId) return costList; } + /// + /// Retrieves the custom properties substring from the given CardModificationInfo's singleton ID. + /// + /// The CardModificationInfo to access. + /// The custom properties substring or null if one doesn't exist. public static string GetCustomPropertiesIdString(CardModificationInfo mod) => mod.HasCustomPropertiesId() ? GetCustomPropertiesIdString(mod.singletonId) : null; + /// + /// Retrieves the custom properties substring from the given singleton ID string. + /// + /// The singleton ID string to access. + /// The custom properties substring or null if one doesn't exist. public static string GetCustomPropertiesIdString(string singletonId) { if (!singletonId.HasCustomPropertiesId()) @@ -144,7 +168,31 @@ public static string GetCustomPropertiesIdString(string singletonId) return propertiesString.Substring(0, endOf + 1); } + /// + /// Retrieves the custom costs substring from the given CardModificationInfo's singleton ID. + /// + /// The CardModificationInfo to access. + /// The custom costs substring or null if one doesn't exist. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
public static string GetCustomCostsIdString(CardModificationInfo mod) => mod.HasCustomCostsId() ? GetCustomCostsIdString(mod.singletonId) : null; + /// + /// Retrieves the custom costs substring from the given singleton ID string. + /// + /// The singleton ID string to access. + /// The custom costs substring or null if one doesn't exist. + /// + /// + /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + ///
+ ///
public static string GetCustomCostsIdString(string singletonId) { if (!singletonId.HasCustomCostsId()) From 870dd8fe948eafa3097646ca427d061157b9bd61 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:17:06 -0800 Subject: [PATCH 14/42] Fix dynamic gem costs not removing from the initial starting cost, reverse key-value pair of currentSacrificedCardInfos, add XML --- .../Card/ExtendedActivatedAbilityBehaviour.cs | 125 +++++++++++++++++- 1 file changed, 118 insertions(+), 7 deletions(-) diff --git a/InscryptionAPI/Card/ExtendedActivatedAbilityBehaviour.cs b/InscryptionAPI/Card/ExtendedActivatedAbilityBehaviour.cs index bee1226c..2fd2bfcf 100644 --- a/InscryptionAPI/Card/ExtendedActivatedAbilityBehaviour.cs +++ b/InscryptionAPI/Card/ExtendedActivatedAbilityBehaviour.cs @@ -7,29 +7,96 @@ using UnityEngine; namespace InscryptionAPI.Card; +/// +/// A version of ActivatedAbilityBehaviour that allows for the creation of activated abilities that cost Blood, Gems, or Health. Also supports dynamic activation costs. +/// public abstract class ExtendedActivatedAbilityBehaviour : AbilityBehaviour { + /// + /// Stores the total Blood activation cost modifier. + /// public int bloodCostMod; + /// + /// Stores the total Bones activation cost modifier. + /// public int bonesCostMod; + /// + /// Stores the total Energy activation cost modifier. + /// public int energyCostMod; + /// + /// Stores the total added Gems activation requirement modifier. + /// public List gemsCostMod = new(); + /// + /// Stores the total removed Gems activation requirement modifier. + /// + public List gemsCostRemovedMod = new(); + /// + /// Stores the total Blood activation cost modifier. + /// public int healthCostMod; - public virtual int StartingBloodCost { get; } - public virtual int StartingBonesCost { get; } - public virtual int StartingEnergyCost { get; } - public virtual List StartingGemsCost { get; } + /// + /// Initial amount of Blood needed to activate this ability. + /// + public virtual int StartingBloodCost { get; } = 0; + /// + /// Initial amount of Bones needed to activate this ability. + /// + public virtual int StartingBonesCost { get; } = 0; + /// + /// Initial amount of Energy needed to activate this ability. + /// + public virtual int StartingEnergyCost { get; } = 0; + /// + /// Initial types of Gems needed to activate this ability. + /// + public virtual List StartingGemsCost { get; } = null; + /// + /// Initial amount of Health needed to activate this ability. + /// public virtual int StartingHealthCost { get; } + /// + /// Amount the Blood activation cost is modified whenever this ability is activated. + /// public virtual int OnActivateBloodCostMod { get; set; } + /// + /// Amount the Bones activation cost is modified whenever this ability is activated. + /// public virtual int OnActivateBonesCostMod { get; set; } + /// + /// Amount the Energy activation cost is modified whenever this ability is activated. + /// public virtual int OnActivateEnergyCostMod { get; set; } + /// + /// What Gems are added to the activation requirement whenever this ability is activated. + /// public virtual List OnActivateGemsCostMod { get; set; } + /// + /// What Gems are removed from the activation requirement whenever this ability is activated. + /// public virtual bool OnActivateGemsCostModRemovesGems { get; set; } + /// + /// Amount the Health activation cost is modified whenever this ability is activated. + /// public virtual int OnActivateHealthCostMod { get; set; } + /// + /// How much Blood this ability currently costs to activate. + /// public int BloodCost => Mathf.Max(0, StartingBloodCost + bloodCostMod); + /// + /// How much Bones this ability currently costs to activate. + /// public int BonesCost => Mathf.Max(0, StartingBonesCost + bonesCostMod); + /// + /// How much Energy this ability currently costs to activate. + /// public int EnergyCost => Mathf.Max(0, StartingEnergyCost + energyCostMod); + /// + /// What Gems this ability currently requires to activate. + /// public List GemsCost { get { List retval = new(); @@ -37,22 +104,46 @@ public List GemsCost { retval.AddRange(StartingGemsCost); } retval.AddRange(gemsCostMod); + foreach (GemType gem in gemsCostRemovedMod) { + retval.Remove(gem); + } return retval; } } + /// + /// How much Health this ability currently costs to activate. + /// public int HealthCost => Mathf.Max(0, StartingHealthCost + healthCostMod); - public Dictionary currentSacrificedCardInfos = new(); + /// + /// Dictionary of CardSlots that have been selected for sacrifices and the associated CardInfo. + /// + public Dictionary currentSacrificedCardInfos = new(); + /// + /// Determines if the PostResolveOnBoard trigger should activate. + /// + /// True if PostResolveOnBoard should activate. public virtual bool RespondsToPostResolveOnBoard() { return false; } + /// + /// Trigger that's called after card's with this ability resolve on the board. + /// Used since ResolveOnBoard is sealed to prevent the ability breaking. + /// public virtual IEnumerator OnPostResolveOnBoard() { yield break; } + /// + /// If the ResolveOnBoard trigger should be called. + /// + /// True if it should be activated. public sealed override bool RespondsToResolveOnBoard() => RespondsToPostResolveOnBoard() || LearnMechanic(); + /// + /// Runs the logic that teaches the player how activated abilities work in Act 2, plus any PostResolveOnBoard logic. + /// public sealed override IEnumerator OnResolveOnBoard() { if (LearnMechanic()) // Act 2 tutorial dialogue @@ -74,8 +165,16 @@ public sealed override IEnumerator OnResolveOnBoard() if (RespondsToPostResolveOnBoard()) yield return OnPostResolveOnBoard(); } - + /// + /// Whetehr this ability should be triggered. + /// + /// The ability being checked for activation. + /// True if this ability is being checked for activation. public sealed override bool RespondsToActivatedAbility(Ability ability) => this.Ability == ability; + /// + /// The logic sequence for when this ability is activated. + /// Contains logic for paying activation costs. + /// public sealed override IEnumerator OnActivatedAbility() { if (CanAfford() && CanActivate()) @@ -160,11 +259,23 @@ public sealed override IEnumerator OnActivatedAbility() yield return new WaitForSeconds(0.25f); } } + /// + /// Sequence called after the ability finishes activation. + /// + /// public virtual IEnumerator PostActivate() { yield break; } + /// + /// Whether or not this ability can be activated. + /// + /// true if this ability can be activated. public virtual bool CanActivate() => true; + /// + /// Player-implemented sequence for what this ability will actually do when activated. + /// + /// public abstract IEnumerator Activate(); private IEnumerator ChooseSacrifices() @@ -236,7 +347,7 @@ private IEnumerator ChooseSacrifices() if (currentSacrifice2.Card != null && !currentSacrifice2.Card.Dead) { manager.SacrificesMadeThisTurn++; - currentSacrificedCardInfos.Add(currentSacrifice2.Card.Info, currentSacrifice2); + currentSacrificedCardInfos.Add(currentSacrifice2, currentSacrifice2.Card.Info); yield return currentSacrifice2.Card.Sacrifice(); Singleton.Instance.SwitchToView(manager.BoardView); } From 8107a0850f783272fd0bad1b16342f2aa88cdf29 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:23:59 -0800 Subject: [PATCH 15/42] Add XML for classes in DamageShieldBehaviour file --- InscryptionAPI/Card/DamageShieldBehaviour.cs | 266 ++++++++++++++----- 1 file changed, 193 insertions(+), 73 deletions(-) diff --git a/InscryptionAPI/Card/DamageShieldBehaviour.cs b/InscryptionAPI/Card/DamageShieldBehaviour.cs index 458d7c5c..31b20de4 100644 --- a/InscryptionAPI/Card/DamageShieldBehaviour.cs +++ b/InscryptionAPI/Card/DamageShieldBehaviour.cs @@ -11,27 +11,53 @@ namespace InscryptionAPI.Card; /// A custom class implementing shield-giving behaviour. /// With the most recent API versions, shield-giving sigils like DeathShield/Nano Armour/ Armoured can now stack and instead use a counter rather than a simple boolean. /// -public abstract class DamageShieldBehaviour : AbilityBehaviour -{ +public abstract class DamageShieldBehaviour : AbilityBehaviour { + /// + /// Field for modifying the number of shields this ability provides. + /// public int numShields; // modifiable version of NumShields + /// + /// Getter that returns the actual number of remaining shields this ability provides (no negative shields). + /// public int NumShields => Mathf.Max(0, numShields); - public abstract int StartingNumShields { get; } // how many shields this sigil will provide initially + /// + /// How many shields this sigil will provide when first added to a card. + /// + public abstract int StartingNumShields { get; } + /// + /// If this ability is providing any shields. + /// + /// True if this ability has at least one remaining shield. public bool HasShields() => NumShields > 0; + /// + /// For internal use: determines when the ability has called Awake and had its starting shields initialised. + /// public bool initialised = false; + /// + /// The base Awake method but made overrideable to avoid issues with setting the initial number of shields. + /// public virtual void Awake() { - if (base.Card != null) - numShields = StartingNumShields; + if (base.Card != null) { + ResetShields(true); + } initialised = true; } + /// + /// The base Start method but made overrideable. + /// public virtual void Start() { } - + /// + /// Method for adding more shield count to this ability. Resets the loseShields Status boolean if the net shields are > 0. + /// + /// How many more shields this ability should give. + /// Whether or not to update the card's render. public virtual void AddShields(int amount, bool updateDisplay = true) { numShields += amount; @@ -43,6 +69,11 @@ public virtual void AddShields(int amount, bool updateDisplay = true) base.Card.OnStatsChanged(); } } + /// + /// Method for removing shield count from this ability. + /// + /// How many shields to remove from this ability. + /// Whether or not to update the card's render. public virtual void RemoveShields(int amount, bool updateDisplay = true) { numShields -= amount; @@ -62,6 +93,10 @@ public virtual void RemoveShields(int amount, bool updateDisplay = true) base.Card.OnStatsChanged(); } } + /// + /// Sets the current number of shields back to its starting value. + /// + /// public virtual void ResetShields(bool updateDisplay) { int currentShields = NumShields; @@ -83,29 +118,92 @@ public virtual void ResetShields(bool updateDisplay) /// /// A custom class combining [DamageShieldBehaviour](InscryptionAPI.Card.DamageShieldBehaviour) and [ExtendedActivatedBehaviour](InscryptionAPI.Card.ExtendedActivatedBehaviour). /// -public abstract class ActivatedDamageShieldBehaviour : DamageShieldBehaviour -{ +public abstract class ActivatedDamageShieldBehaviour : DamageShieldBehaviour { + /// + /// Stores the total Blood activation cost modifier. + /// public int bloodCostMod; + /// + /// Stores the total Bones activation cost modifier. + /// public int bonesCostMod; + /// + /// Stores the total Energy activation cost modifier. + /// public int energyCostMod; - public List gemsCostMod; + /// + /// Stores the total added Gems activation requirement modifier. + /// + public List gemsCostMod = new(); + /// + /// Stores the total removed Gems activation requirement modifier. + /// + public List gemsCostRemovedMod = new(); + /// + /// Stores the total Blood activation cost modifier. + /// public int healthCostMod; - public virtual int StartingBloodCost { get; } - public virtual int StartingBonesCost { get; } - public virtual int StartingEnergyCost { get; } - public virtual List StartingGemsCost { get; } + /// + /// Initial amount of Blood needed to activate this ability. + /// + public virtual int StartingBloodCost { get; } = 0; + /// + /// Initial amount of Bones needed to activate this ability. + /// + public virtual int StartingBonesCost { get; } = 0; + /// + /// Initial amount of Energy needed to activate this ability. + /// + public virtual int StartingEnergyCost { get; } = 0; + /// + /// Initial types of Gems needed to activate this ability. + /// + public virtual List StartingGemsCost { get; } = null; + /// + /// Initial amount of Health needed to activate this ability. + /// public virtual int StartingHealthCost { get; } + /// + /// Amount the Blood activation cost is modified whenever this ability is activated. + /// public virtual int OnActivateBloodCostMod { get; set; } + /// + /// Amount the Bones activation cost is modified whenever this ability is activated. + /// public virtual int OnActivateBonesCostMod { get; set; } + /// + /// Amount the Energy activation cost is modified whenever this ability is activated. + /// public virtual int OnActivateEnergyCostMod { get; set; } + /// + /// What Gems are added to the activation requirement whenever this ability is activated. + /// public virtual List OnActivateGemsCostMod { get; set; } + /// + /// What Gems are removed from the activation requirement whenever this ability is activated. + /// public virtual bool OnActivateGemsCostModRemovesGems { get; set; } + /// + /// Amount the Health activation cost is modified whenever this ability is activated. + /// public virtual int OnActivateHealthCostMod { get; set; } + /// + /// How much Blood this ability currently costs to activate. + /// public int BloodCost => Mathf.Max(0, StartingBloodCost + bloodCostMod); + /// + /// How much Bones this ability currently costs to activate. + /// public int BonesCost => Mathf.Max(0, StartingBonesCost + bonesCostMod); + /// + /// How much Energy this ability currently costs to activate. + /// public int EnergyCost => Mathf.Max(0, StartingEnergyCost + energyCostMod); + /// + /// What Gems this ability currently requires to activate. + /// public List GemsCost { get { List retval = new(); @@ -113,24 +211,45 @@ public List GemsCost { retval.AddRange(StartingGemsCost); } retval.AddRange(gemsCostMod); + foreach (GemType gem in gemsCostRemovedMod) { + retval.Remove(gem); + } return retval; } } + /// + /// How much Health this ability currently costs to activate. + /// public int HealthCost => Mathf.Max(0, StartingHealthCost + healthCostMod); - public Dictionary currentSacrificedCardInfos = new(); + /// + /// Dictionary of CardSlots that have been selected for sacrifices and the associated CardInfo. + /// + public Dictionary currentSacrificedCardInfos = new(); - public virtual bool RespondsToPostResolveOnBoard() - { + /// + /// Determines if the PostResolveOnBoard trigger should activate. + /// + /// True if PostResolveOnBoard should activate. + public virtual bool RespondsToPostResolveOnBoard() { return false; } - public virtual IEnumerator OnPostResolveOnBoard() - { + /// + /// Trigger that's called after card's with this ability resolve on the board. + /// Used since ResolveOnBoard is sealed to prevent the ability breaking. + /// + public virtual IEnumerator OnPostResolveOnBoard() { yield break; } + /// + /// If the ResolveOnBoard trigger should be called. + /// + /// True if it should be activated. public sealed override bool RespondsToResolveOnBoard() => RespondsToPostResolveOnBoard() || LearnMechanic(); - public sealed override IEnumerator OnResolveOnBoard() - { + /// + /// Runs the logic that teaches the player how activated abilities work in Act 2, plus any PostResolveOnBoard logic. + /// + public sealed override IEnumerator OnResolveOnBoard() { if (LearnMechanic()) // Act 2 tutorial dialogue { yield return new WaitForSeconds(0.15f); @@ -150,42 +269,44 @@ public sealed override IEnumerator OnResolveOnBoard() if (RespondsToPostResolveOnBoard()) yield return OnPostResolveOnBoard(); } - + /// + /// Whetehr this ability should be triggered. + /// + /// The ability being checked for activation. + /// True if this ability is being checked for activation. public sealed override bool RespondsToActivatedAbility(Ability ability) => this.Ability == ability; - public sealed override IEnumerator OnActivatedAbility() - { - if (CanAfford() && CanActivate()) - { - if (BloodCost > 0) - { + /// + /// The logic sequence for when this ability is activated. + /// Contains logic for paying activation costs. + /// + public sealed override IEnumerator OnActivatedAbility() { + if (CanAfford() && CanActivate()) { + if (BloodCost > 0) { yield return ChooseSacrifices(); if (Singleton.Instance.CancelledSacrifice) yield break; } - if (HealthCost > 0) - { + if (HealthCost > 0) { base.Card.Anim.LightNegationEffect(); base.Card.Status.damageTaken += HealthCost; } - if (EnergyCost > 0) - { + if (EnergyCost > 0) { yield return Singleton.Instance.SpendEnergy(EnergyCost); - if (Singleton.Instance != null) - { + if (Singleton.Instance != null) { CardSlot cardSlot = Singleton.Instance.GetSlots(getPlayerSlots: true).Find((CardSlot x) => x.Card != null && x.Card.HasAbility(Ability.ConduitEnergy)); - if (cardSlot != null) - { + if (cardSlot != null) { ConduitEnergy component = cardSlot.Card.GetComponent(); if (component != null && component.CompletesCircuit()) yield return Singleton.Instance.AddEnergy(EnergyCost); } } } - if (BonesCost > 0) + if (BonesCost > 0) { yield return Singleton.Instance.SpendBones(BonesCost); + } yield return new WaitForSeconds(0.1f); yield return base.PreSuccessfulTriggerSequence(); @@ -194,15 +315,13 @@ public sealed override IEnumerator OnActivatedAbility() if (HealthCost > 0) // card still exists and has 0 Health { - if (base.Card && base.Card.Health <= 0 && !base.Card.Dead) - { + if (base.Card && base.Card.Health <= 0 && !base.Card.Dead) { yield return base.Card.Die(true); yield return PostActivate(); currentSacrificedCardInfos.Clear(); yield break; } } - int energyMod = OnActivateEnergyCostMod; int bonesMod = OnActivateBonesCostMod; List gemsMod = OnActivateGemsCostMod; @@ -229,22 +348,31 @@ public sealed override IEnumerator OnActivatedAbility() yield return PostActivate(); currentSacrificedCardInfos.Clear(); } - else - { + else { base.Card.Anim.LightNegationEffect(); AudioController.Instance.PlaySound2D("toneless_negate", MixerGroup.GBCSFX, 0.2f); yield return new WaitForSeconds(0.25f); } } - public virtual IEnumerator PostActivate() - { + /// + /// Sequence called after the ability finishes activation. + /// + /// + public virtual IEnumerator PostActivate() { yield break; } + /// + /// Whether or not this ability can be activated. + /// + /// true if this ability can be activated. public virtual bool CanActivate() => true; + /// + /// Player-implemented sequence for what this ability will actually do when activated. + /// + /// public abstract IEnumerator Activate(); - private IEnumerator ChooseSacrifices() - { + private IEnumerator ChooseSacrifices() { BoardManager manager = Singleton.Instance; List validSlots = manager.GetCardSlots( !base.Card.OpponentCard, x => x.Card != null & x.Card != base.Card); @@ -258,10 +386,8 @@ private IEnumerator ChooseSacrifices() manager.CancelledSacrifice = false; manager.LastSacrificesInfo.Clear(); manager.SetQueueSlotsEnabled(false); - foreach (CardSlot allSlot in manager.AllSlots.Where(x => x.Card != base.Card)) - { - if (!allSlot.IsPlayerSlot || allSlot.Card == null) - { + foreach (CardSlot allSlot in manager.AllSlots.Where(x => x.Card != base.Card)) { + if (!allSlot.IsPlayerSlot || allSlot.Card == null) { allSlot.SetEnabled(enabled: false); allSlot.ShowState(HighlightedInteractable.State.NonInteractable); } @@ -269,14 +395,12 @@ private IEnumerator ChooseSacrifices() allSlot.Card.Anim.SetShaking(true); } yield return manager.SetSacrificeMarkersShown(BloodCost); - while (manager.GetValueOfSacrifices(manager.currentSacrifices) < BloodCost && !manager.cancelledPlacementWithInput) - { + while (manager.GetValueOfSacrifices(manager.currentSacrifices) < BloodCost && !manager.cancelledPlacementWithInput) { manager.SetSacrificeMarkersValue(manager.currentSacrifices.Count); yield return new WaitForEndOfFrame(); } - foreach (CardSlot allSlot2 in manager.AllSlots) - { + foreach (CardSlot allSlot2 in manager.AllSlots) { allSlot2.SetEnabled(false); if (allSlot2.IsPlayerSlot && allSlot2.Card != null) allSlot2.Card.Anim.SetShaking(shaking: false); @@ -285,14 +409,11 @@ private IEnumerator ChooseSacrifices() foreach (CardSlot currentSacrifice in manager.currentSacrifices) manager.LastSacrificesInfo.Add(currentSacrifice.Card.Info); - if (manager.cancelledPlacementWithInput) - { + if (manager.cancelledPlacementWithInput) { manager.HideSacrificeMarkers(); - foreach (CardSlot slot in manager.GetSlots(getPlayerSlots: true)) - { - if (slot.Card != null) - { + foreach (CardSlot slot in manager.GetSlots(getPlayerSlots: true)) { + if (slot.Card != null) { slot.Card.Anim.SetSacrificeHoverMarkerShown(false); if (manager.currentSacrifices.Contains(slot)) slot.Card.Anim.SetMarkedForSacrifice(false); @@ -302,25 +423,21 @@ private IEnumerator ChooseSacrifices() Singleton.Instance.ClearForcedCursorType(); manager.CancelledSacrifice = true; } - else - { + else { manager.SetSacrificeMarkersValue(manager.GetValueOfSacrifices(manager.currentSacrifices)); yield return new WaitForSeconds(0.2f); manager.HideSacrificeMarkers(); - foreach (CardSlot currentSacrifice2 in manager.currentSacrifices) - { - if (currentSacrifice2.Card != null && !currentSacrifice2.Card.Dead) - { + foreach (CardSlot currentSacrifice2 in manager.currentSacrifices) { + if (currentSacrifice2.Card != null && !currentSacrifice2.Card.Dead) { manager.SacrificesMadeThisTurn++; - currentSacrificedCardInfos.Add(currentSacrifice2.Card.Info, currentSacrifice2); + currentSacrificedCardInfos.Add(currentSacrifice2, currentSacrifice2.Card.Info); yield return currentSacrifice2.Card.Sacrifice(); Singleton.Instance.SwitchToView(manager.BoardView); } } } manager.SetQueueSlotsEnabled(slotsEnabled: true); - foreach (CardSlot allSlot3 in manager.AllSlots) - { + foreach (CardSlot allSlot3 in manager.AllSlots) { allSlot3.SetEnabled(enabled: true); allSlot3.ShowState(HighlightedInteractable.State.Interactable); } @@ -343,10 +460,8 @@ private bool CanAfford() { } return false; } - private bool LearnMechanic() => SaveManager.SaveFile.IsPart2 && !ProgressionData.LearnedMechanic(MechanicsConcept.GBCActivatedAbilities); - private int SacrificeValue() - { + private int SacrificeValue() { return Singleton.Instance.GetValueOfSacrifices( Singleton.Instance.GetCardSlots(!base.Card.OpponentCard, x => x.Card != null && x.Card != base.Card)); } @@ -355,8 +470,13 @@ private int SacrificeValue() /// /// A custom AbilityBehaviour that's attached to the DeathShield ability so it functions with the API's shield logic changes. /// -public class APIDeathShield : DamageShieldBehaviour -{ +public class APIDeathShield : DamageShieldBehaviour { + /// + /// This subclass's provided ability. + /// public override Ability Ability => Ability.DeathShield; + /// + /// Starting shields is equal to the number of stacks of Nano Armour/Armoured + /// public override int StartingNumShields => base.Card.GetAbilityStacks(Ability); // look ma, I stack! } \ No newline at end of file From f6d6c2b7046fe0a6c5c206d05b9225fcb59cd860 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:25:01 -0800 Subject: [PATCH 16/42] Add missing XML in ShieldManager --- InscryptionAPI/Card/ShieldManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/InscryptionAPI/Card/ShieldManager.cs b/InscryptionAPI/Card/ShieldManager.cs index 8720d92f..76d39b49 100644 --- a/InscryptionAPI/Card/ShieldManager.cs +++ b/InscryptionAPI/Card/ShieldManager.cs @@ -18,9 +18,12 @@ namespace InscryptionAPI.Card; public static class ShieldManager { /// - /// A list of FullAbilities whose AbilityBehaviour overrides DamageShieldBehaviour. + /// A list of FullAbilities whose AbilityBehaviour inherits from DamageShieldBehaviour. /// public static List AllShieldAbilities { get; internal set; } = new(AllAbilities); + /// + /// The current processed list of all AbilityInfos in the game that inherit from DamageShieldBehaviour. + /// public static List AllShieldInfos { get; internal set; } = AllShieldAbilities.Select(x => x.Info).ToList(); /// From 2ca5907b852f28a20f579cd95e6264d6543434d3 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:29:47 -0800 Subject: [PATCH 17/42] Add XML to DeathCardManager --- InscryptionAPI/Card/DeathCardManager.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/InscryptionAPI/Card/DeathCardManager.cs b/InscryptionAPI/Card/DeathCardManager.cs index 7b75cb89..169f77c6 100644 --- a/InscryptionAPI/Card/DeathCardManager.cs +++ b/InscryptionAPI/Card/DeathCardManager.cs @@ -4,14 +4,28 @@ namespace InscryptionAPI.Card; +/// +/// Class for handling custom death cards. +/// [HarmonyPatch] public static class DeathCardManager { + /// + /// The prefix used by the API to demark custom death cards added through the DeathCardManager. + /// public const string CardPrefix = "apiDeathCard"; + /// + /// A list of all API-added death cards + /// public static List APIDeathCards => CardManager.AllCardsCopy.FindAll(x => x.ModPrefixIs(CardPrefix)); private static readonly List NewDefaultDeathCards = new(); private static readonly List NewAscensionDeathMods = new(); + /// + /// Adds a death card to the list of default death cards available at the start of each run. + /// + /// The CardModificationInfo containing the death card data. + /// If true, will add deathCardMod to the list of ascension death cards rather than the default (Part 1) pool. public static void AddDefaultDeathCard(CardModificationInfo deathCardMod, bool addToAscension = false) { if (addToAscension) @@ -27,6 +41,12 @@ private static bool MatchingDeathCardInfo(DeathCardInfo info, DeathCardInfo comp info.lostEye == compareAgainst.lostEye && info.mouthIndex == compareAgainst.mouthIndex; } + /// + /// Gets the name of an API-added death card from the given CardModificationInfo. Can also create a new death card using the given CardModificationInfo. + /// + /// The CardModificationInfo to access. + /// Whether or not to create a new death card with the given name. Appends a number for duplicate card names. + /// The internal name of the death card associated with the given CardModificationInfo. public static string GetAPIDeathCardName(CardModificationInfo mod, bool createNewCard = false) { string cleanId = mod.CleanId(); // use the clean singleton id to reduce chance of duplicate name From 6e56340aa9f8151d8353237acce3f3968650bcb1 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:38:56 -0800 Subject: [PATCH 18/42] Add XML to ExtendedAbilityBehaviour --- .../Card/ExtendedAbilityBehaviour.cs | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/InscryptionAPI/Card/ExtendedAbilityBehaviour.cs b/InscryptionAPI/Card/ExtendedAbilityBehaviour.cs index c597b004..89273f68 100644 --- a/InscryptionAPI/Card/ExtendedAbilityBehaviour.cs +++ b/InscryptionAPI/Card/ExtendedAbilityBehaviour.cs @@ -5,18 +5,49 @@ namespace InscryptionAPI.Card; +/// +/// Extended subclass of AbilityBehaviour that implements several custom API triggers. +/// [HarmonyPatch] public abstract class ExtendedAbilityBehaviour : AbilityBehaviour, IGetOpposingSlots, IActivateWhenFacedown, IPassiveAttackBuff, IPassiveHealthBuff { // This section handles attack slot management + /// + /// Whether or not this ability should activate certain triggers while facedown. + /// public virtual bool TriggerWhenFacedown => false; + /// + /// Whether or not the given trigger should be called on this ability when its card is face down. + /// + /// The trigger being checked. + /// Array of objects relating to the trigger being checked. + /// True if the given trigger should be activated while this ability's card is face down. public virtual bool ShouldTriggerWhenFaceDown(Trigger trigger, object[] otherArgs) => TriggerWhenFacedown; + /// + /// Whether or not the given trigger should be called on this ability when its card is face down. + /// + /// The Type of the custom API trigger being checked. + /// True if the given trigger should be activated while this ability's card is face down. public virtual bool ShouldTriggerCustomWhenFaceDown(Type customTrigger) => TriggerWhenFacedown; - public virtual bool RespondsToGetOpposingSlots() => false; + /// + /// Whether or not this ability should modify what CardSlots cards with this ability will target when attacking. + /// + /// True if this ability should modify the list of cards being added. + public virtual bool RespondsToGetOpposingSlots() => false; + /// + /// Gets an additional list of CardSlots that cards with this ability should target when attacking. + /// + /// List of CardSlots that were originally being targeted before custom abilities were applied. + /// Other CardSlots added by other abilities to the list of targeted slots. + /// List of CardSlots that should be added to the list of targeted slots. public virtual List GetOpposingSlots(List originalSlots, List otherAddedSlots) => new(); + /// + /// Whether or not the default attack slot should be removed (eg., Bifurcated Strike). + /// + /// True if cards with this ability should not strike the opposing slot by default. public virtual bool RemoveDefaultAttackSlot() => false; // This section handles passive attack/health buffs @@ -46,18 +77,35 @@ private static List GetHealthBuffs(PlayableCard card) return retval; } + /// + /// If this ability provides a passive attack buff. + /// [Obsolete("Use IPassiveAttackBuff instead")] public virtual bool ProvidesPassiveAttackBuff => false; + /// + /// If this ability provides a passive health buff. + /// [Obsolete("Use IPassiveHealthBuff instead")] public virtual bool ProvidesPassiveHealthBuff => false; + /// + /// Array representing the attack buff given by this ability. + /// [Obsolete("Use IPassiveAttackBuff instead")] public virtual int[] GetPassiveAttackBuffs() => null; + /// + /// Array representing the health buff given by this ability. + /// [Obsolete("Use IPassiveHealthBuff instead")] public virtual int[] GetPassiveHealthBuffs() => null; + /// + /// Determines the passive attack buff given by this ability if one is given. + /// + /// The PlayableCard current being checked. + /// The attack buff to give to the target card. public virtual int GetPassiveAttackBuff(PlayableCard target) { if (ProvidesPassiveAttackBuff) @@ -74,6 +122,11 @@ public virtual int GetPassiveAttackBuff(PlayableCard target) return 0; } + /// + /// Determines the passive health buff given by this ability if one is given. + /// + /// The PlayableCard current being checked. + /// The health buff to give to the target card. public virtual int GetPassiveHealthBuff(PlayableCard target) { if (ProvidesPassiveHealthBuff) From 824760b8594f0b442a4d2437d4a6e2a18668f1f0 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:40:05 -0800 Subject: [PATCH 19/42] Add XML to IActivateWhenFacedown --- InscryptionAPI/Card/IActivateWhenFacedown.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/InscryptionAPI/Card/IActivateWhenFacedown.cs b/InscryptionAPI/Card/IActivateWhenFacedown.cs index f4c9cc3d..09341c18 100644 --- a/InscryptionAPI/Card/IActivateWhenFacedown.cs +++ b/InscryptionAPI/Card/IActivateWhenFacedown.cs @@ -2,8 +2,22 @@ namespace InscryptionAPI.Card; +/// +/// Custom trigger for determining if an ability trigger should activate when a card is face down. +/// public interface IActivateWhenFacedown { + /// + /// Whether or not the given trigger should be called on this ability when its card is face down. + /// + /// The trigger being checked. + /// Array of objects relating to the trigger being checked. + /// True if the given trigger should be activated while this ability's card is face down. public bool ShouldTriggerWhenFaceDown(Trigger trigger, object[] otherArgs); + /// + /// Whether or not the given trigger should be called on this ability when its card is face down. + /// + /// The Type of the custom API trigger being checked. + /// True if the given trigger should be activated while this ability's card is face down. public bool ShouldTriggerCustomWhenFaceDown(Type customTrigger); } \ No newline at end of file From 25ae80207badbdd453548c1f2b1f9d4baade3687 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:44:30 -0800 Subject: [PATCH 20/42] Add XML to OpponentGemsManager --- InscryptionAPI/Card/OpponentGemsManager.cs | 39 ++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/InscryptionAPI/Card/OpponentGemsManager.cs b/InscryptionAPI/Card/OpponentGemsManager.cs index 1f03747e..69e971e7 100644 --- a/InscryptionAPI/Card/OpponentGemsManager.cs +++ b/InscryptionAPI/Card/OpponentGemsManager.cs @@ -1,25 +1,60 @@ using DiskCardGame; namespace InscryptionAPI.Card; -public class OpponentGemsManager : Singleton -{ +/// +/// Class for handling gems currently possessed by the opponent. +/// Allows for abilities and other behaviours that rely on owned gems to correctly work on both sides of the board. +/// +public class OpponentGemsManager : Singleton { + /// + /// List of gems currently owned by the opponent. + /// public List opponentGems = new(); + /// + /// How many of a certain gem type the opponent possesses. + /// + /// The gem type to search for. + /// How many of the given gem type are owned by the opponent public int GemsOfType(GemType gem) => opponentGems.Count(x => x == gem); + /// + /// Determines if the opponent owns a given gem. + /// + /// The gem type to look for. + /// True if the opponent owns at least one gem of the given type. False otherwise. public bool HasGem(GemType gem) => opponentGems.Contains(gem); + /// + /// Adds a gem of the given type to the List of opponent-owned gems. + /// + /// Type of gem to add to the opponent's possession. public void AddGem(GemType gem) => opponentGems.Add(gem); + /// + /// Removes a gem of the given type from the List of opponent-owned gems. + /// + /// Type of gem to remove from the opponent's possession. public void LoseGem(GemType gem) => opponentGems.Remove(gem); + /// + /// Adds gems of the given types to the List of opponent-owned gems. + /// + /// Types of gems to add to the opponent's possession. public void AddGems(params GemType[] gems) { foreach (GemType gem in gems) opponentGems.Add(gem); } + /// + /// Removes gems of the given types from the List of opponent-owned gems. + /// + /// Types of gems to remove from the opponent's possession. public void LoseGems(params GemType[] gems) { foreach (GemType gem in gems) opponentGems.Remove(gem); } + /// + /// Forcefully updates the list of opponent-owned gems based on gems owned on the opponent's side of the board. + /// public void ForceGemsUpdate() { opponentGems.Clear(); From f09c51e11f7107e5a7d7a5768346c19f665ff3d9 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:01:32 -0800 Subject: [PATCH 21/42] Fix minor error in XML --- InscryptionAPI/Card/AbilityManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index 658219cb..1a57bbb2 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -354,7 +354,7 @@ public static AbilityInfo New(string guid, string rulebookName, string rulebookD public static void Remove(Ability id) => NewAbilities.Remove(NewAbilities.FirstOrDefault(x => x.Id == id)); /// - /// Removes an ability from the game based on ability ID. Can only remove mod-added abilities, not vanilla abilities. + /// Removes an ability from the game based on its FullAbility. Can only remove mod-added abilities, not vanilla abilities. /// /// The instance of the ability to remove. public static void Remove(FullAbility ability) => NewAbilities.Remove(ability); From ac22a3334f1cea093fa41e7027e5850f7e52cf34 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:02:40 -0800 Subject: [PATCH 22/42] Add XML for SpecialStatIconManager --- InscryptionAPI/Card/SpecialStatIconManager.cs | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/InscryptionAPI/Card/SpecialStatIconManager.cs b/InscryptionAPI/Card/SpecialStatIconManager.cs index 7804a124..67353e69 100644 --- a/InscryptionAPI/Card/SpecialStatIconManager.cs +++ b/InscryptionAPI/Card/SpecialStatIconManager.cs @@ -8,6 +8,9 @@ namespace InscryptionAPI.Card; +/// +/// Manager class for handling stat icons. +/// [HarmonyPatch] public static class StatIconManager { @@ -22,11 +25,26 @@ public static class StatIconManager { SpecialStatIcon.SacrificesThisTurn, SpecialTriggeredAbility.SacrificesThisTurn } }; + /// + /// A utility class that holds all of the required information about a stat icon in order to be able to use it in-game. + /// public class FullStatIcon { + /// + /// Enum ID for this stat icon. + /// public readonly SpecialStatIcon Id; + /// + /// Special ability enum ID for this stat icon. + /// public readonly SpecialTriggeredAbility AbilityId; + /// + /// The description object for this stat icon. + /// public readonly StatIconInfo Info; + /// + /// A subclass of VariableStatBehaviour that implements the logic for this stat icon. + /// public readonly Type VariableStatBehavior; /// @@ -38,6 +56,13 @@ public class FullStatIcon /// public Dictionary RulebookDescriptionRedirects = new(); + /// + /// Creates a new instance of FullStatIcon and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// + /// The unique ID for this stat icon. + /// The unique ID for this stat icon's associated special ability. + /// The description object for this ability. + /// A subclass of VariableStatBehaviour that implements the logic for the ability. public FullStatIcon(SpecialStatIcon id, SpecialTriggeredAbility abilityId, StatIconInfo info, Type variableStatBehavior) { Id = id; @@ -49,10 +74,19 @@ public FullStatIcon(SpecialStatIcon id, SpecialTriggeredAbility abilityId, StatI } } + /// + /// All of the vanilla game's stat icons. + /// public readonly static ReadOnlyCollection BaseGameStatIcons = new(GenBaseGameStatIconList()); private readonly static ObservableCollection NewStatIcons = new(); + /// + /// The current processed list of all stat icons in the game, including vanilla and mod-added abilities. + /// public static List AllStatIcons { get; private set; } = BaseGameStatIcons.ToList(); + /// + /// The current processed list of all StatIconInfos in the game, including vanilla and mod-added abilities. + /// public static List AllStatIconInfos { get; private set; } = BaseGameStatIcons.Select(x => x.Info).ToList(); static StatIconManager() @@ -95,6 +129,13 @@ private static List GenBaseGameStatIconList() return baseGame; } + /// + /// Creates a new stat icon and registers it to be able to be added to cards + /// + /// The guid of the mod adding the ability. + /// An instance of StatIconInfo describing the ability. + /// A subclass of VariableStatBehaviour that implements the logic for the stat icon. + /// An instance of FullStatIcon containing all necessary data for the stat icon to work.. public static FullStatIcon Add(string guid, StatIconInfo info, Type behavior) { // Register the special ability at the same time @@ -107,6 +148,14 @@ public static FullStatIcon Add(string guid, StatIconInfo info, Type behavior) return full; } + /// /// + /// Creates a new stat icon and registers it to be able to be added to cards + /// + /// The guid of the mod adding the ability. + /// The name of the stat icon when it appears in the Rulebook. + /// The description of the stat icon when it appears in the Rulebook. + /// A subclass of VariableStatBehaviour that implements the logic for the stat icon. + /// An instance of StatIconInfo describing the new ability. public static StatIconInfo New(string guid, string rulebookName, string rulebookDescription, Type behavior) { StatIconInfo info = ScriptableObject.CreateInstance(); @@ -116,7 +165,15 @@ public static StatIconInfo New(string guid, string rulebookName, string rulebook return Add(guid, info, behavior).Info; } + /// + /// Removes a stat icon from the game based on stat icon ID. Can only remove mod-added stat icons, not vanilla stat icons. + /// + /// The unique ID of the stat icon to remove. public static void Remove(SpecialStatIcon id) => NewStatIcons.Remove(NewStatIcons.FirstOrDefault(x => x.Id == id)); + /// + /// Removes an stat icon from the game based on its FullStatIcon. Can only remove mod-added stat icons, not vanilla stat icons. + /// + /// The instance of the ability to remove. public static void Remove(FullStatIcon ability) => NewStatIcons.Remove(ability); [HarmonyPrefix] From 35d27dc59367f9e71e5bd19222b7539bad7a001d Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:07:23 -0800 Subject: [PATCH 23/42] Fix incorrect XML documentation --- InscryptionAPI/Card/AbilityManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index 1a57bbb2..f8216ad1 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -291,7 +291,7 @@ private static List GenBaseGameAbilityList() /// An instance of AbilityInfo describing the ability. /// A subclass of AbilityBehaviour that implements the logic for the ability. /// The ability icon as a 49x49 texture. - /// An instance of AbilityInfo describing the new ability. + /// An instance of FullAbility containing all this ability's data.. /// The actual unique identifier for the new ability will be found in the 'ability' field of /// the returned AbilityInfo object. There is no way for the modder to create a specific ability ID; it will /// always be assigned by the API. From e76ec26b8e462d9869f863fc44cca3b8e72aa062 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:09:18 -0800 Subject: [PATCH 24/42] Add XML to SpecialTriggeredAbilityManager --- .../Card/SpecialTriggeredAbilityManager.cs | 54 ++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs b/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs index ae43c329..5d67091c 100644 --- a/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs +++ b/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs @@ -5,20 +5,50 @@ namespace InscryptionAPI.Card; -public static class SpecialTriggeredAbilityManager -{ +/// +/// Class for managing SpecialtriggeredAbilities created through the API. +/// +public static class SpecialTriggeredAbilityManager { + /// + /// A utility class that holds all of the required information about a special ability in order to be able to use it in-game. + /// public class FullSpecialTriggeredAbility { + /// + /// The unique ID for this special ability + /// public readonly SpecialTriggeredAbility Id; + /// + /// The guid of the mod that added this special ability + /// public readonly string ModGUID; + /// + /// The name of this special ability. Used internally. + /// public readonly string AbilityName; + /// + /// A subclass of SpecialCardBehaviour that implements the logic for this special ability + /// public readonly Type AbilityBehaviour; + /// + /// Creates a new instance of FullSpecialTriggeredAbility and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// + /// The unique ID for this special ability. + /// A subclass of SpecialCardBehaviour that implements the logic for the ability. + [Obsolete("Use the constructor that takes a guid parameter instead")] public FullSpecialTriggeredAbility(SpecialTriggeredAbility id, Type abilityBehaviour) : this(null, abilityBehaviour.ToString(), id, abilityBehaviour) { } + /// + /// Creates a new instance of FullSpecialTriggeredAbility and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// + /// The GUID of the mod that added this. + /// The name of this special ability. + /// The unique ID for this special ability. + /// A subclass of SpecialCardBehaviour that implements the logic for the ability. public FullSpecialTriggeredAbility(string guid, string name, SpecialTriggeredAbility id, Type abilityBehaviour) { Id = id; @@ -30,9 +60,15 @@ public FullSpecialTriggeredAbility(string guid, string name, SpecialTriggeredAbi } } + /// + /// All of the vanilla game's special abilities. + /// public readonly static ReadOnlyCollection BaseGameSpecialTriggers = new(GenBaseGameSpecialTriggersList()); private readonly static ObservableCollection NewSpecialTriggers = new(); + /// + /// The current processed list of all special abilities in the game, including vanilla and mod-added abilities. + /// public static List AllSpecialTriggers { get; private set; } = BaseGameSpecialTriggers.ToList(); static SpecialTriggeredAbilityManager() @@ -55,6 +91,12 @@ private static List GenBaseGameSpecialTriggersList( return baseGame; } + /// + /// Creates a new special ability and registers it to be able to be added to cards. + /// + /// The guid of the mod adding the special ability. + /// The name of the special ability. + /// A subclass of SpecialCardBehaviour that implements the logic for the ability. public static FullSpecialTriggeredAbility Add(string guid, string abilityName, Type behavior) { FullSpecialTriggeredAbility full = new(guid, abilityName, GuidManager.GetEnumValue(guid, abilityName), behavior); @@ -62,6 +104,14 @@ public static FullSpecialTriggeredAbility Add(string guid, string abilityName, T return full; } + /// + /// Removes a special ability from the game based on its ID. Can only remove mod-added special abilities, not vanilla ones. + /// + /// The unique ID of the special ability to remove. public static void Remove(SpecialTriggeredAbility id) => NewSpecialTriggers.Remove(NewSpecialTriggers.FirstOrDefault(x => x.Id == id)); + /// + /// Removes a special ability from the game based on its FullSpecialTriggeredAbility. Can only remove mod-added special abilities, not vanilla ones. + /// + /// The instance of the ability to remove. public static void Remove(FullSpecialTriggeredAbility ability) => NewSpecialTriggers.Remove(ability); } From b8701bcc53edc0e8deb7d51848d41114a41b71f0 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:13:05 -0800 Subject: [PATCH 25/42] Add XML to TribeManager --- InscryptionAPI/Card/TribeManager.cs | 39 +++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/InscryptionAPI/Card/TribeManager.cs b/InscryptionAPI/Card/TribeManager.cs index a654326e..95eedb70 100644 --- a/InscryptionAPI/Card/TribeManager.cs +++ b/InscryptionAPI/Card/TribeManager.cs @@ -17,26 +17,44 @@ namespace InscryptionAPI.Card; public static class TribeManager { /// - /// The internal object used to store all relevant info about a Tribe. - /// guid - The mod GUID that added the Tribe. - /// name - The internal name of the Tribe. - /// tribe - The enum value corresponding to this Tribe. - /// icon - The sprite displayed on cards with this Tribe. - /// tribeChoice - Whether or not this Tribe can appear at card tribe choice nodes. - /// cardBack - The texture displayed at card tribe choice nodes. If null, the API will create one using the icon Sprite. + /// A utility class that holds all of the required information about a tribe in order to be able to use it in-game. /// public class TribeInfo { + /// + /// The guid of the mod that added this ability + /// public string guid; + /// + /// The name of this tribe + /// public string name; + /// + /// The unique ID for this tribe + /// public Tribe tribe; + /// + /// The Sprite displayed on cards of this tribe + /// public Sprite icon; + /// + /// Whether or not this tribe can appear in tribe card choice nodes. + /// public bool tribeChoice; + /// + /// The cardback texture displayed when this tribe appears in tribe card choice nodes. If null, the API will create one using the icon. + /// public Texture2D cardback; } private static readonly List tribes = new(); private static readonly List tribeTypes = new(); + /// + /// All modded TribeInfos added through the API. + /// public static readonly ReadOnlyCollection NewTribes = new(tribes); + /// + /// All modded tribe IDs added through the API. + /// public static readonly ReadOnlyCollection NewTribesTypes = new(tribeTypes); private static readonly Texture2D TribeIconMissing = TextureHelper.GetImageAsTexture("tribeicon_none.png", Assembly.GetExecutingAssembly()); @@ -75,13 +93,18 @@ public static Tribe Add(string guid, string name, Texture2D tribeIcon = null, bo /// The name of the tribe. /// Path to the tribal icon that will appear as a watermark on all cards belonging to this tribe. /// Indicates if the card should appear in tribal choice nodes. - /// Path to the card back texture to display if the card should appear in tribal choice nodes. + /// Path to the card back texture to display if the card should appear in tribal choice nodes. /// The unique identifier for the new tribe. public static Tribe Add(string guid, string name, string pathToTribeIcon = null, bool appearInTribeChoices = false, string pathToChoiceCardBackTexture = null) { // Reason for 'is not null' is because if we pass 'null' to GetImageAsTexture, It will throw an exception. return Add(guid, name, pathToTribeIcon is not null ? TextureHelper.GetImageAsTexture(pathToTribeIcon) : null, appearInTribeChoices, pathToChoiceCardBackTexture is not null ? TextureHelper.GetImageAsTexture(pathToChoiceCardBackTexture) : null); } + /// + /// Determines if the given Tribe was added by a mod. + /// + /// The Tribe to check. + /// True if tribe is not from the base game. public static bool IsCustomTribe(Tribe tribe) => tribeTypes.Contains(tribe); /// From 4b597ebf66111bbef2dd44e94b4b29ae80088319 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:14:15 -0800 Subject: [PATCH 26/42] Move to patches subfolder --- InscryptionAPI/Card/{ => Patches}/DeathCardTranspilers.cs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename InscryptionAPI/Card/{ => Patches}/DeathCardTranspilers.cs (100%) diff --git a/InscryptionAPI/Card/DeathCardTranspilers.cs b/InscryptionAPI/Card/Patches/DeathCardTranspilers.cs similarity index 100% rename from InscryptionAPI/Card/DeathCardTranspilers.cs rename to InscryptionAPI/Card/Patches/DeathCardTranspilers.cs From b1484af11abde01b49f650615843ec0f234c8348 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:15:07 -0800 Subject: [PATCH 27/42] Add GainMultipleGems ability subclass so we can unify all those "give two gems" sigils floating about --- InscryptionAPI/Card/GainMultipleGems.cs | 60 +++++++++++++++++++ InscryptionAPI/Card/OpponentGemsManager.cs | 11 +++- .../Card/{ => Patches}/OpponentGemsPatches.cs | 16 ++++- 3 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 InscryptionAPI/Card/GainMultipleGems.cs rename InscryptionAPI/Card/{ => Patches}/OpponentGemsPatches.cs (89%) diff --git a/InscryptionAPI/Card/GainMultipleGems.cs b/InscryptionAPI/Card/GainMultipleGems.cs new file mode 100644 index 00000000..16260b1c --- /dev/null +++ b/InscryptionAPI/Card/GainMultipleGems.cs @@ -0,0 +1,60 @@ +using DiskCardGame; +using System.Collections; + +namespace InscryptionAPI.Card; + +/// +/// Class that allows for easily creating abilities that provide multiple gem types to their owner. +/// +public abstract class GainMultipleGems : AbilityBehaviour { + /// + /// Gem types that this ability should provide. + /// + public abstract GemType[] Gems { get; } + + /// + /// Adds provided gems when a card with this ability is played on the board. + /// + public override bool RespondsToResolveOnBoard() { + return true; + } + + /// + /// Add provided gems when a card with this ability is played on the board. + /// + public override IEnumerator OnResolveOnBoard() { + if (!base.Card.OpponentCard) { + foreach (GemType gem in Gems) { + yield return ResourcesManager.Instance.AddGem(gem); + } + } + else { + foreach (GemType gem in Gems) { + OpponentGemsManager.Instance.AddGem(gem); + } + } + } + + /// + /// Removes provided gems when a card with this ability dies. + /// + public override bool RespondsToDie(bool wasSacrifice, PlayableCard killer) { + return true; + } + + /// + /// Remove provided gems when a card with this ability dies. + /// + public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer) { + if (!base.Card.OpponentCard) { + foreach (GemType gem in Gems) { + yield return ResourcesManager.Instance.LoseGem(gem); + } + } + else { + foreach (GemType gem in Gems) { + OpponentGemsManager.Instance.LoseGem(gem); + } + } + } +} diff --git a/InscryptionAPI/Card/OpponentGemsManager.cs b/InscryptionAPI/Card/OpponentGemsManager.cs index 69e971e7..4321e9a3 100644 --- a/InscryptionAPI/Card/OpponentGemsManager.cs +++ b/InscryptionAPI/Card/OpponentGemsManager.cs @@ -66,10 +66,15 @@ public void ForceGemsUpdate() foreach (GainGem gainGem in components) opponentGems.Add(gainGem.Gem); - GainGemTriple[] components2 = slot.Card.GetComponents(); - for (int i = 0; i < components2.Length; i++) + GainMultipleGems[] components2 = slot.Card.GetComponents(); + foreach (GainMultipleGems gainGems in components2) { + opponentGems.AddRange(gainGems.Gems); + } + + GainGemTriple[] components3 = slot.Card.GetComponents(); + for (int i = 0; i < components3.Length; i++) { - _ = components2[i]; + _ = components3[i]; opponentGems.Add(GemType.Green); opponentGems.Add(GemType.Orange); opponentGems.Add(GemType.Blue); diff --git a/InscryptionAPI/Card/OpponentGemsPatches.cs b/InscryptionAPI/Card/Patches/OpponentGemsPatches.cs similarity index 89% rename from InscryptionAPI/Card/OpponentGemsPatches.cs rename to InscryptionAPI/Card/Patches/OpponentGemsPatches.cs index a65a3117..d1de1383 100644 --- a/InscryptionAPI/Card/OpponentGemsPatches.cs +++ b/InscryptionAPI/Card/Patches/OpponentGemsPatches.cs @@ -24,7 +24,21 @@ private static void SetUpOpponentGems(ResourcesManager __instance) private static void CleanUpOpponentGems() => Singleton.Instance?.opponentGems.Clear(); [HarmonyPostfix, HarmonyPatch(typeof(ResourcesManager), nameof(ResourcesManager.ForceGemsUpdate))] - private static void ForceOpponentGemsUpdate() => Singleton.Instance?.ForceGemsUpdate(); + private static void ForceOpponentGemsUpdate(ResourcesManager __instance) { + foreach (CardSlot slot in Singleton.Instance.GetSlots(getPlayerSlots: true)) { + if (slot.Card != null && !slot.Card.Dead) { + GainMultipleGems[] components2 = slot.Card.GetComponents(); + foreach (GainMultipleGems gainGems in components2) { + __instance.gems.AddRange(gainGems.Gems); + } + } + } + for (int j = 0; j < 3; j++) { + __instance.SetGemOnImmediate((GemType)j, __instance.gems.Contains((GemType)j)); + } + + Singleton.Instance?.ForceGemsUpdate(); + } [HarmonyPostfix] [HarmonyPatch(typeof(FishHookGrab), nameof(FishHookGrab.PullHook))] From f635e9d3f7f11c5fae67fae80da27ff0d5c2c607 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 11:36:21 -0800 Subject: [PATCH 28/42] Add cref links to XML Add some missing XML and fix incorrect XML in AbilityExtensions --- InscryptionAPI/Card/AbilityExtensions.cs | 195 ++++++++------- InscryptionAPI/Card/AbilityManager.cs | 5 +- .../Card/CardAppearanceBehaviourManager.cs | 2 +- InscryptionAPI/Card/CardExtensions.cs | 72 +++--- InscryptionAPI/Card/CardExtensionsHelpers.cs | 86 +++---- .../Card/CardExtensionsPortraits.cs | 236 +++++++++--------- .../Card/CardExtensionsProperties.cs | 78 +++--- InscryptionAPI/Card/CardExtensionsSetters.cs | 154 ++++++------ InscryptionAPI/Card/CardManager.cs | 46 ++-- InscryptionAPI/Card/CostProperties.cs | 12 +- InscryptionAPI/Card/SpecialStatIconManager.cs | 2 +- .../Card/SpecialTriggeredAbilityManager.cs | 4 +- InscryptionAPI/Costs/CardCostManager.cs | 24 +- .../Helpers/Extensions/CardSlotExtensions.cs | 4 +- InscryptionAPI/Pelts/PeltManager.cs | 2 +- 15 files changed, 471 insertions(+), 451 deletions(-) diff --git a/InscryptionAPI/Card/AbilityExtensions.cs b/InscryptionAPI/Card/AbilityExtensions.cs index 42acc4ba..ceae0413 100644 --- a/InscryptionAPI/Card/AbilityExtensions.cs +++ b/InscryptionAPI/Card/AbilityExtensions.cs @@ -29,8 +29,8 @@ public static class AbilityExtensions /// /// For internal use only. /// - /// This is instance-based: it will use the CWT in AbilityManager to get the *instance* of FullAbility - /// that corresponds to this *instance* of AbilityInfo. If either of these are clones that may get GCd, then + /// This is instance-based: it will use the CWT in to get the *instance* of + /// that corresponds to this *instance* of . If either of these are clones that may get GCd, then /// it would potentially be a mistake to use this helper. It should only be used internally when the implications /// are understood. internal static FullAbility GetFullAbility(this AbilityInfo info) @@ -42,6 +42,11 @@ internal static FullAbility GetFullAbility(this AbilityInfo info) return retval; } + /// + /// Retrieves the original, unmodified rulebook description of the given . + /// + /// The to access. + /// The original description for this ability. public static string GetBaseRulebookDescription(this AbilityInfo info) { FullAbility fullAbility = AllAbilities.Find(x => x.Info == info); @@ -54,13 +59,13 @@ public static string GetBaseRulebookDescription(this AbilityInfo info) /// /// Sets the icon texture for the ability. /// - /// The ability info to set the texture for. + /// The to set the texture for. /// A 49x49 texture containing the icon. - /// The same ability info so a chain can continue. - /// Thrown if the ability info has not yet been added to the AbilityManager + /// The same so a chain can continue. + /// Thrown if the has not yet been added to the AbilityManager /// You cannot do this unless the ability has been registered with the API. Unless the API knows about this /// ability, it will not have the required information to be able to process the texture, so an exception will be thrown - /// if you try to do this to an instance of AbilityInfo that did not get processed through the API. + /// if you try to do this to an instance of that did not get processed through the API. public static AbilityInfo SetIcon(this AbilityInfo info, Texture2D icon) { FullAbility ability = info.GetFullAbility(); @@ -74,7 +79,7 @@ public static AbilityInfo SetIcon(this AbilityInfo info, Texture2D icon) /// /// Sets the icon texture for the ability. /// - /// The ability info to set the texture for. + /// The to set the texture for. /// A 49x49 texture containing the icon. public static void SetIcon(this FullAbility info, Texture2D icon) { info.Texture = icon; @@ -83,13 +88,13 @@ public static void SetIcon(this FullAbility info, Texture2D icon) { /// /// Sets the flipped texture for the ability (used when the ability belongs to the opponent). /// - /// The ability info to set the texture for. + /// The to set the texture for. /// A 49x49 texture containing the icon. - /// The same ability info so a chain can continue. - /// Thrown if the ability info has not yet been added to the AbilityManager + /// The same so a chain can continue. + /// Thrown if the has not yet been added to the AbilityManager /// You cannot do this unless the ability has been registered with the API. Unless the API knows about this /// ability, it will not have the required information to be able to process the texture, so an exception will be thrown - /// if you try to do this to an instance of AbilityInfo that did not get processed through the API. + /// if you try to do this to an instance of that did not get processed through the API. public static AbilityInfo SetCustomFlippedTexture(this AbilityInfo info, Texture2D icon) { FullAbility ability = info.GetFullAbility(); @@ -103,7 +108,7 @@ public static AbilityInfo SetCustomFlippedTexture(this AbilityInfo info, Texture /// /// Sets the flipped texture for the ability (used when the ability belongs to the opponent). /// - /// The ability info to set the texture for. + /// The to set the texture for. /// A 49x49 texture containing the icon. public static void SetCustomFlippedTexture(this FullAbility info, Texture2D icon) { @@ -114,10 +119,10 @@ public static void SetCustomFlippedTexture(this FullAbility info, Texture2D icon /// /// Sets the icon that will be displayed for this ability icon in Act 2. /// - /// The instance of AbilityInfo. + /// The instance of . /// A 17x17 or 22x10 texture containing the icon; for regular and activated sigil icons respectively. /// The filter mode for the icon texture. Leave this at its default value unless you have a specific reason to change it. - /// The same ability so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetPixelAbilityIcon(this AbilityInfo info, Texture2D icon, FilterMode? filterMode = null) { TextureHelper.SpriteType spriteType = icon.width == 22 ? TextureHelper.SpriteType.PixelActivatedAbilityIcon : TextureHelper.SpriteType.PixelAbilityIcon; @@ -129,9 +134,9 @@ public static AbilityInfo SetPixelAbilityIcon(this AbilityInfo info, Texture2D i /// /// Adds one or more metacategories to the ability. Duplicate categories will not be added. /// - /// The instance of AbilityInfo. + /// The instance of . /// The metacategories to add. - /// The same ability so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo AddMetaCategories(this AbilityInfo info, params AbilityMetaCategory[] categories) { info.metaCategories ??= new(); @@ -142,27 +147,27 @@ public static AbilityInfo AddMetaCategories(this AbilityInfo info, params Abilit } /// - /// Helper method: automatically adds the Part1Modular and Part1Rulebook metacategories to the ability. + /// Helper method: automatically adds the Part1Modular and Part1Rulebook metacategories to the ability. /// - /// The instance of AbilityInfo. - /// The same ability so a chain can continue. + /// The instance of . + /// The same so a chain can continue. public static AbilityInfo SetDefaultPart1Ability(this AbilityInfo info) { return info.AddMetaCategories(AbilityMetaCategory.Part1Modular, AbilityMetaCategory.Part1Rulebook); } /// - /// Helper method: automatically adds the custom metacategory Part2Modular to the ability. + /// Helper method: automatically adds the custom metacategory Part2Modular to the ability. /// - /// The instance of AbilityInfo. - /// The same ability so a chain can continue. + /// The instance of . + /// The same so a chain can continue. public static AbilityInfo SetDefaultPart2Ability(this AbilityInfo info) => info.AddMetaCategories(Part2Modular); /// - /// Helper method: automatically adds the Part3Modular, Part3BuildACard, and Part3Rulebook metacategories to the ability. + /// Helper method: automatically adds the Part3Modular, Part3BuildACard, and Part3Rulebook metacategories to the ability. /// - /// The instance of AbilityInfo. - /// The same ability so a chain can continue. + /// The instance of . + /// The same so a chain can continue. public static AbilityInfo SetDefaultPart3Ability(this AbilityInfo info) { return info.AddMetaCategories(AbilityMetaCategory.Part3Modular, AbilityMetaCategory.Part3Rulebook, AbilityMetaCategory.Part3BuildACard); @@ -171,9 +176,9 @@ public static AbilityInfo SetDefaultPart3Ability(this AbilityInfo info) /// /// Sets the text displayed when this ability is marked as learned. /// - /// The instance of AbilityInfo. + /// The instance of . /// The text to display, represented by strings. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetAbilityLearnedDialogue(this AbilityInfo abilityInfo, params string[] lines) { if (lines.Length > 0) @@ -190,9 +195,9 @@ public static AbilityInfo SetAbilityLearnedDialogue(this AbilityInfo abilityInfo /// /// Sets the text displayed when this ability is marked as learned. /// - /// The instance of AbilityInfo. - /// The text to display, represented by DialogueEvent.Line's. - /// The same AbilityInfo so a chain can continue. + /// The instance of . + /// The text to display, represented by DialogueEvent.Line's. + /// The same so a chain can continue. public static AbilityInfo SetAbilityLearnedDialogue(this AbilityInfo abilityInfo, params DialogueEvent.Line[] lines) { if (lines.Length > 0) @@ -202,22 +207,22 @@ public static AbilityInfo SetAbilityLearnedDialogue(this AbilityInfo abilityInfo } /// - /// Sets the text displayed whenever OnAbilityTriggered is called by this ability in Act 2. + /// Sets the text displayed whenever OnAbilityTriggered is called by this ability in Act 2. /// - /// The instance of AbilityInfo. - /// The text to display when OnAbilityTriggered is called. - /// The same AbilityInfo so a chain can continue. + /// The instance of . + /// The text to display when OnAbilityTriggered is called. + /// The same so a chain can continue. public static AbilityInfo SetGBCTriggerText(this AbilityInfo abilityInfo, string triggerText) { abilityInfo.triggerText = triggerText; return abilityInfo; } /// - /// Sets the text displayed whenever OnAbilityTriggered is called by this ability in Act 2. + /// Sets the text displayed whenever OnAbilityTriggered is called by this ability in Act 2. /// - /// The instance of FullAbility. - /// The text to display when OnAbilityTriggered is called. - /// The same FullAbility so a chain can continue. + /// The instance of . + /// The text to display when OnAbilityTriggered is called. + /// The same so a chain can continue. public static FullAbility SetGBCTriggerText(this FullAbility fullAbility, string triggerText) { fullAbility.Info.triggerText = triggerText; return fullAbility; @@ -227,9 +232,9 @@ public static FullAbility SetGBCTriggerText(this FullAbility fullAbility, string /// Sets the power level of the ability, used in some game logic like determining the opponent totem's ability. /// Vanilla power levels range from -3 to 5, and values above or below are ignored in most cases. /// - /// The instance of AbilityInfo. + /// The instance of . /// The ability's power level. Should be equal to or between -3 and 5. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetPowerlevel(this AbilityInfo abilityInfo, int powerLevel) { abilityInfo.powerLevel = powerLevel; @@ -239,9 +244,9 @@ public static AbilityInfo SetPowerlevel(this AbilityInfo abilityInfo, int powerL /// Sets the power level of the ability, used in some game logic like determining the opponent totem's ability. /// Vanilla power levels range from -3 to 5, and values above or below are ignored in most cases. /// - /// The instance of FullAbility. + /// The instance of . /// The ability's power level. Should be equal to or between -3 and 5. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetPowerlevel(this FullAbility fullAbility, int powerLevel) { fullAbility.Info.powerLevel = powerLevel; return fullAbility; @@ -270,9 +275,9 @@ public static FullAbility SetRulebookName(this FullAbility fullAbility, string n /// /// Sets whether or not the ability is an activated ability. /// - /// The instance of AbilityInfo. + /// The instance of . /// If the ability is activated. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetActivated(this AbilityInfo abilityInfo, bool activated = true) { abilityInfo.activated = activated; @@ -281,9 +286,9 @@ public static AbilityInfo SetActivated(this AbilityInfo abilityInfo, bool activa /// /// Sets whether or not the ability is an activated ability. /// - /// The instance of FullAbility. + /// The instance of . /// If the ability is activated. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetActivated(this FullAbility fullAbility, bool activated = true) { fullAbility.Info.activated = activated; return fullAbility; @@ -292,9 +297,9 @@ public static FullAbility SetActivated(this FullAbility fullAbility, bool activa /// /// Sets whether or not the ability is passive (will not trigger). /// - /// The instance of AbilityInfo. + /// The instance of . /// If the ability is passive. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetPassive(this AbilityInfo abilityInfo, bool passive = true) { abilityInfo.passive = passive; @@ -303,9 +308,9 @@ public static AbilityInfo SetPassive(this AbilityInfo abilityInfo, bool passive /// /// Sets whether or not the ability is passive (will not trigger). /// - /// The instance of FullAbility. + /// The instance of . /// If the ability is passive. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetPassive(this FullAbility fullAbility, bool passive = true) { fullAbility.Info.passive = passive; return fullAbility; @@ -314,9 +319,9 @@ public static FullAbility SetPassive(this FullAbility fullAbility, bool passive /// /// Sets whether or not the ability can be used by the opponent. /// - /// The instance of AbilityInfo. + /// The instance of . /// If the ability is usable by the opponent. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetOpponentUsable(this AbilityInfo abilityInfo, bool opponentUsable = true) { abilityInfo.opponentUsable = opponentUsable; @@ -325,9 +330,9 @@ public static AbilityInfo SetOpponentUsable(this AbilityInfo abilityInfo, bool o /// /// Sets whether or not the ability can be used by the opponent. /// - /// The instance of FullAbility. + /// The instance of . /// If the ability is usable by the opponent. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetOpponentUsable(this FullAbility fullAbility, bool opponentUsable = true) { fullAbility.Info.opponentUsable = opponentUsable; return fullAbility; @@ -336,9 +341,9 @@ public static FullAbility SetOpponentUsable(this FullAbility fullAbility, bool o /// /// Sets whether or not the ability is a conduit. /// - /// The instance of AbilityInfo. + /// The instance of . /// If the ability is a conduit. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetConduit(this AbilityInfo abilityInfo, bool conduit = true) { abilityInfo.conduit = conduit; @@ -347,9 +352,9 @@ public static AbilityInfo SetConduit(this AbilityInfo abilityInfo, bool conduit /// /// Sets whether or not the ability is a conduit. /// - /// The instance of FullAbility. + /// The instance of . /// If the ability is a conduit. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetConduit(this FullAbility fullAbility, bool conduit = true) { fullAbility.Info.conduit = conduit; return fullAbility; @@ -358,9 +363,9 @@ public static FullAbility SetConduit(this FullAbility fullAbility, bool conduit /// /// Sets whether or not the ability is a conduit cell. /// - /// The instance of AbilityInfo. + /// The instance of . /// If the ability is a conduit cell. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetConduitCell(this AbilityInfo abilityInfo, bool conduitCell = true) { abilityInfo.conduitCell = conduitCell; @@ -369,9 +374,9 @@ public static AbilityInfo SetConduitCell(this AbilityInfo abilityInfo, bool cond /// /// Sets whether or not the ability is a conduit cell. /// - /// The instance of FullAbility. + /// The instance of . /// If the ability is a conduit cell. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetConduitCell(this FullAbility fullAbility, bool conduitCell = true) { fullAbility.Info.conduitCell = conduitCell; return fullAbility; @@ -381,9 +386,10 @@ public static FullAbility SetConduitCell(this FullAbility fullAbility, bool cond /// Sets whether or not the ability can stack on a card, triggering once for each stack. /// Optional parameter for setting the ability to only trigger once per stack when a card evolves (only affects abilities that can stack). /// - /// The instance of AbilityInfo. + /// The instance of . /// Whether or not to prevent double triggering. - /// The same AbilityInfo so a chain can continue. + /// If this ability should stack or not. + /// The same so a chain can continue. public static AbilityInfo SetCanStack(this AbilityInfo abilityInfo, bool canStack = true, bool triggersOncePerStack = false) { abilityInfo.canStack = canStack; @@ -394,9 +400,10 @@ public static AbilityInfo SetCanStack(this AbilityInfo abilityInfo, bool canStac /// Sets whether or not the ability can stack on a card, triggering once for each stack. /// Optional parameter for setting the ability to only trigger once per stack when a card evolves (only affects abilities that can stack). /// - /// The instance of FullAbility. + /// The instance of . /// Whether or not to prevent double triggering. - /// The same FullAbility so a chain can continue. + /// If this ability should stack or not. + /// The same so a chain can continue. public static FullAbility SetCanStack(this FullAbility fullAbility, bool canStack = true, bool triggersOncePerStack = false) { fullAbility.Info.SetCanStack(canStack, triggersOncePerStack); return fullAbility; @@ -405,9 +412,9 @@ public static FullAbility SetCanStack(this FullAbility fullAbility, bool canStac /// /// Sets whether or not the ability's icon should be flipped upside-down when it's on an opponent card. /// - /// The instance of AbilityInfo. + /// The instance of . /// If the icon should be flipped. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetFlipYIfOpponent(this AbilityInfo abilityInfo, bool flipY = true) { abilityInfo.flipYIfOpponent = flipY; @@ -416,9 +423,9 @@ public static AbilityInfo SetFlipYIfOpponent(this AbilityInfo abilityInfo, bool /// /// Sets whether or not the ability's icon should be flipped upside-down when it's on an opponent card. /// - /// The instance of AbilityInfo. + /// The instance of . /// If the icon should be flipped. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetFlipYIfOpponent(this FullAbility fullAbility, bool flipY = true) { fullAbility.Info.SetFlipYIfOpponent(flipY); return fullAbility; @@ -428,10 +435,10 @@ public static FullAbility SetFlipYIfOpponent(this FullAbility fullAbility, bool /// Sets whether or not the ability's icon's colour should be overridden, and what the override colour should be. /// The colour override only applies to the default ability icons; totem and merge icons are unaffected. /// - /// The instance of AbilityInfo. + /// The instance of . /// If the ability icon's colour should be overridden. /// The colour that will override the icon. Only applies if hasOverride is true. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetHasColorOverride(this AbilityInfo abilityInfo, bool hasOverride, Color colorOverride = default) { abilityInfo.hasColorOverride = hasOverride; @@ -445,10 +452,10 @@ public static AbilityInfo SetHasColorOverride(this AbilityInfo abilityInfo, bool /// Sets whether or not the ability's icon's colour should be overridden, and what the override colour should be. /// The colour override only applies to the default ability icons; totem and merge icons are unaffected. /// - /// The instance of FullAbility. + /// The instance of . /// If the ability icon's colour should be overridden. /// The colour that will override the icon. Only applies if hasOverride is true. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetHasColorOverride(this FullAbility fullAbility, bool hasOverride, Color colorOverride = default) { fullAbility.Info.SetHasColorOverride(hasOverride, colorOverride); return fullAbility; @@ -458,9 +465,9 @@ public static FullAbility SetHasColorOverride(this FullAbility fullAbility, bool /// Sets whether or not the ability's name should precede its description in Act 2. /// If false, only the ability's description will be shown. /// - /// The instance of AbilityInfo. + /// The instance of . /// If the ability's name should precede its Act 2 description. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetKeywordAbility(this AbilityInfo abilityInfo, bool keyword = true) { abilityInfo.keywordAbility = keyword; @@ -471,9 +478,9 @@ public static AbilityInfo SetKeywordAbility(this AbilityInfo abilityInfo, bool k /// Sets whether or not the ability's name should precede its description in Act 2. /// If false, only the ability's description will be shown. /// - /// The instance of FullAbility. + /// The instance of . /// If the ability's name should precede its Act 2 description. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetKeywordAbility(this FullAbility fullAbility, bool keyword = true) { fullAbility.Info.keywordAbility = keyword; return fullAbility; @@ -483,8 +490,8 @@ public static FullAbility SetKeywordAbility(this FullAbility fullAbility, bool k /// Resets the AbilityInfo's rulebook description to its vanilla version. /// Useful for anyone messing with altering descriptions. /// - /// The instance of AbilityInfo. - /// The same AbilityInfo so a chain can continue. + /// The instance of . + /// The same so a chain can continue. public static AbilityInfo ResetDescription(this AbilityInfo abilityInfo) { abilityInfo.rulebookDescription = AllAbilities.AbilityByID(abilityInfo.ability).BaseRulebookDescription; @@ -508,6 +515,12 @@ public static FullAbility SetMagnificusRulebook(this FullAbility full) { return full; } + /// + /// Checks if the given has all given metacategories. + /// + /// The to access. + /// The metacategories to check for. + /// True if this ability has all the given metacategory. public static bool HasMetaCategories(this AbilityInfo info, params AbilityMetaCategory[] categories) { foreach (AbilityMetaCategory app in categories) @@ -517,6 +530,12 @@ public static bool HasMetaCategories(this AbilityInfo info, params AbilityMetaCa return true; } + /// + /// Checks if the given has the given metacategory. + /// + /// The to access. + /// The metacategory to check for. + /// True if this ability has the given metacategory. public static bool HasMetaCategory(this AbilityInfo info, AbilityMetaCategory category) { return info.metaCategories.Contains(category); @@ -631,9 +650,9 @@ public static StatIconInfo SetDefaultPart3Ability(this StatIconInfo info) { /// Sets the ability to only ever trigger once per stack. This prevents abilities from triggering twice per stack after a card evolves. /// This only affects cards that evolve into a card that possesses the same stackable ability (eg, default evolutions). /// - /// The instance of AbilityInfo. + /// The instance of . /// Whether or not to prevent double triggering. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetTriggersOncePerStack(this AbilityInfo abilityInfo, bool triggersOncePerStack = true) { abilityInfo.SetExtendedProperty("TriggersOncePerStack", triggersOncePerStack); @@ -653,7 +672,7 @@ public static bool GetTriggersOncePerStack(this Ability ability) /// /// Gets the value of TriggersOncePerStack. Returns false if TriggersOncePerStack has not been set. /// - /// The instance of AbilityInfo. + /// The instance of . /// Whether double triggering is disabled. public static bool GetTriggersOncePerStack(this AbilityInfo abilityInfo) { @@ -666,9 +685,9 @@ public static bool GetTriggersOncePerStack(this AbilityInfo abilityInfo) /// Sets an ability to only have one stack of it be hidden whenever the ability is added to a card status's hiddenAbilities field. /// Adding the same ability to hiddenAbilities will hide more stacks. Only affects cards that can stack. /// - /// The instance of AbilityInfo. + /// The instance of . /// Whether all stacks of this ability will be hidden when added to hiddenAbilities. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetHideSingleStacks(this AbilityInfo abilityInfo, bool hideSingleStacks = true) { abilityInfo.SetExtendedProperty("HideSingleStacks", hideSingleStacks); @@ -687,7 +706,7 @@ public static bool GetHideSingleStacks(this Ability ability) /// /// Gets the value of HideSingleStacks. Returns false if HideSingleStacks has not been set. /// - /// The instance of AbilityInfo. + /// The instance of . /// Whether single stacks of this ability will be hidden when added to hiddenAbilities. public static bool GetHideSingleStacks(this AbilityInfo abilityInfo) { @@ -703,7 +722,7 @@ public static bool GetHideSingleStacks(this AbilityInfo abilityInfo) /// Ability to access. /// The name of the property to set. /// The value of the property. - /// The same AbilityInfo so a chain can continue. + /// The same so a chain can continue. public static AbilityInfo SetExtendedProperty(this AbilityInfo info, string propertyName, object value) { info.GetAbilityExtensionTable()[propertyName] = value?.ToString(); @@ -715,7 +734,7 @@ public static AbilityInfo SetExtendedProperty(this AbilityInfo info, string prop /// FullAbility object to access. /// The name of the property to set. /// The value of the property. - /// The same FullAbility so a chain can continue. + /// The same so a chain can continue. public static FullAbility SetExtendedProperty(this FullAbility fullAbility, string propertyName, object value) { fullAbility.Info.GetAbilityExtensionTable()[propertyName] = value?.ToString(); diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index f8216ad1..1cc277d3 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -81,8 +81,9 @@ public class FullAbility internal static ConditionalWeakTable ReverseMapper = new(); + // [TypeManager](InscryptionAPI.Guid.TypeManager) /// - /// Creates a new instance of FullAbility and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Creates a new instance of FullAbility and registers its behaviour type with the . /// /// The unique ID for this ability. /// The description object for this ability. @@ -94,7 +95,7 @@ public FullAbility(Ability id, AbilityInfo info, Type behaviour, Texture texture } /// - /// Creates a new instance of FullAbility and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Creates a new instance of FullAbility and registers its behaviour type with the . /// /// The GUID of the mod that added this. /// The unique ID for this ability. diff --git a/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs b/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs index 8212e1b9..506a58e9 100644 --- a/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs +++ b/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs @@ -24,7 +24,7 @@ public class FullCardAppearanceBehaviour /// public readonly Type AppearanceBehaviour; /// - /// Creates a new instance of FullCardAppearanceBehaviour and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Creates a new instance of FullCardAppearanceBehaviour and registers its behaviour type with the . /// /// Appearance enum id. /// Type of the custom CardAppearanceBehaviour class. diff --git a/InscryptionAPI/Card/CardExtensions.cs b/InscryptionAPI/Card/CardExtensions.cs index 52355ee3..917ccb6b 100644 --- a/InscryptionAPI/Card/CardExtensions.cs +++ b/InscryptionAPI/Card/CardExtensions.cs @@ -27,9 +27,9 @@ private static Sprite GetPortrait(Texture2D portrait, TextureHelper.SpriteType s /// /// Adds any number of abilities to the card. Abilities can be added multiple times. /// - /// CardInfo to access. + /// CardInfo to access. /// The abilities to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo AddAbilities(this CardInfo info, params Ability[] abilities) { info.abilities ??= new(); @@ -40,9 +40,9 @@ public static CardInfo AddAbilities(this CardInfo info, params Ability[] abiliti /// /// Adds any number of appearance behaviors to the card. Duplicate appearance behaviors are ignored. /// - /// CardInfo to access. + /// CardInfo to access. /// The appearances to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo AddAppearances(this CardInfo info, params CardAppearanceBehaviour.Appearance[] appearances) { info.appearanceBehaviour ??= new(); @@ -55,9 +55,9 @@ public static CardInfo AddAppearances(this CardInfo info, params CardAppearanceB /// /// Adds any number of decals to the card. Duplicate decals are ignored. /// - /// CardInfo to access. + /// CardInfo to access. /// The decals to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo AddDecal(this CardInfo info, params Texture[] decals) { info.decals ??= new(); @@ -71,9 +71,9 @@ public static CardInfo AddDecal(this CardInfo info, params Texture[] decals) /// /// Adds any number of decals to the card. Duplicate decals are ignored. /// - /// CardInfo to access. + /// CardInfo to access. /// The paths to the .png files containing the decals (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo AddDecal(this CardInfo info, params string[] decals) { return decals == null @@ -85,9 +85,9 @@ public static CardInfo AddDecal(this CardInfo info, params string[] decals) /// /// Adds any number of metacategories to the card. Duplicate metacategories are ignored. /// - /// CardInfo to access. + /// CardInfo to access. /// The categories to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo AddMetaCategories(this CardInfo info, params CardMetaCategory[] categories) { info.metaCategories ??= new(); @@ -100,9 +100,9 @@ public static CardInfo AddMetaCategories(this CardInfo info, params CardMetaCate /// /// Adds any number of special abilities to the card. Duplicate special abilities are ignored. /// - /// CardInfo to access. + /// CardInfo to access. /// The abilities to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo AddSpecialAbilities(this CardInfo info, params SpecialTriggeredAbility[] abilities) { info.specialAbilities ??= new(); @@ -115,9 +115,9 @@ public static CardInfo AddSpecialAbilities(this CardInfo info, params SpecialTri /// /// Adds any number of traits to the card. Duplicate traits are ignored. /// - /// CardInfo to access. + /// CardInfo to access. /// The traits to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo AddTraits(this CardInfo info, params Trait[] traits) { info.traits ??= new(); @@ -130,9 +130,9 @@ public static CardInfo AddTraits(this CardInfo info, params Trait[] traits) /// /// Adds any number of tribes to the card. Duplicate tribes are ignored. /// - /// CardInfo to access. + /// CardInfo to access. /// The tribes to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo AddTribes(this CardInfo info, params Tribe[] tribes) { info.tribes ??= new(); @@ -184,9 +184,9 @@ public static CardInfo RemoveAbilitiesSingle(this CardInfo info, params Ability[ /// /// Removes any number of special abilities from the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The special abilities to remove. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo RemoveSpecialAbilities(this CardInfo info, params SpecialTriggeredAbility[] abilities) { if (info.specialAbilities?.Count > 0) @@ -202,9 +202,9 @@ public static CardInfo RemoveSpecialAbilities(this CardInfo info, params Special /// /// Removes any number of special abilities from the card. Will remove one instance of each passed ability; multiple instances can be passed. /// - /// CardInfo to access. + /// CardInfo to access. /// The special abilities to remove. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo RemoveSpecialAbilitiesSingle(this CardInfo info, params SpecialTriggeredAbility[] abilities) { if (info.specialAbilities?.Count > 0) @@ -220,9 +220,9 @@ public static CardInfo RemoveSpecialAbilitiesSingle(this CardInfo info, params S /// /// Removes any number of appearance behaviors from the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The appearances to remove. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo RemoveAppearances(this CardInfo info, params CardAppearanceBehaviour.Appearance[] appearances) { if (info.appearanceBehaviour?.Count > 0) @@ -238,9 +238,9 @@ public static CardInfo RemoveAppearances(this CardInfo info, params CardAppearan /// /// Removes any number of appearance behaviors from the card. Will remove one instance of each passed appearance; multiple instances can be passed. /// - /// CardInfo to access. + /// CardInfo to access. /// The appearances to remove. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo RemoveAppearancesSingle(this CardInfo info, params CardAppearanceBehaviour.Appearance[] appearances) { if (info.appearanceBehaviour?.Count > 0) @@ -256,9 +256,9 @@ public static CardInfo RemoveAppearancesSingle(this CardInfo info, params CardAp /// /// Removes any number of decals from the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The decals to remove. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo RemoveDecals(this CardInfo info, params Texture[] decals) { if (info.decals?.Count > 0) @@ -274,9 +274,9 @@ public static CardInfo RemoveDecals(this CardInfo info, params Texture[] decals) /// /// Removes any number of decals behaviors from the card. Will remove one instance of each passed decals; multiple instances can be passed. /// - /// CardInfo to access. + /// CardInfo to access. /// The decals to remove. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo RemoveDecalsSingle(this CardInfo info, params Texture[] decals) { if (info.decals?.Count > 0) @@ -292,9 +292,9 @@ public static CardInfo RemoveDecalsSingle(this CardInfo info, params Texture[] d /// /// Removes any number of metacategories from the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The categories to remove. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo RemoveMetaCategories(this CardInfo info, params CardMetaCategory[] categories) { if (info.metaCategories?.Count > 0) @@ -310,9 +310,9 @@ public static CardInfo RemoveMetaCategories(this CardInfo info, params CardMetaC /// /// Removes any number of metacategories behaviors from the card. Will remove one instance of each passed appearance; multiple instances can be passed. /// - /// CardInfo to access. + /// CardInfo to access. /// The categories to remove. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo RemoveMetaCategoriesSingle(this CardInfo info, params CardMetaCategory[] categories) { if (info.metaCategories?.Count > 0) @@ -392,7 +392,7 @@ public static CardInfo RemoveCardMetaCategories(this CardInfo info, params CardM /// /// Gets the GUID of the mod that created this card. /// - /// CardInfo to access. + /// CardInfo to access. /// The GUID of the mod that created this card or null if it wasn't found/is from the base game. public static string GetModTag(this CardInfo info) => info.GetExtendedProperty("CallStackModGUID"); @@ -402,16 +402,16 @@ public static CardInfo RemoveCardMetaCategories(this CardInfo info, params CardM /// /// Gets the card name prefix for this card. /// - /// CardInfo to access. + /// CardInfo to access. /// The mod prefix for this card, or null if it wasn't found/is from the base game. public static string GetModPrefix(this CardInfo info) => info.GetExtendedProperty("ModPrefix"); /// /// Checks whether the card's mod prefix is equal to the given string. /// - /// CardInfo to access. + /// CardInfo to access. /// The prefix to check for. - /// True if the CardInfo's mod prefix equals prefixToMatch. + /// True if the CardInfo's mod prefix equals prefixToMatch. public static bool ModPrefixIs(this CardInfo info, string prefixToMatch) => info.GetExtendedProperty("ModPrefix") == prefixToMatch; #endregion diff --git a/InscryptionAPI/Card/CardExtensionsHelpers.cs b/InscryptionAPI/Card/CardExtensionsHelpers.cs index 537e785e..088360d3 100644 --- a/InscryptionAPI/Card/CardExtensionsHelpers.cs +++ b/InscryptionAPI/Card/CardExtensionsHelpers.cs @@ -16,9 +16,9 @@ public static partial class CardExtensions public static bool LacksAbility(this CardModificationInfo mod, Ability ability) => !mod.HasAbility(ability); /// - /// Checks if the CardInfo does not have a specific Ability. + /// Checks if the CardInfo does not have a specific Ability. /// - /// CardInfo to access. + /// CardInfo to access. /// The ability to check for. /// Returns true if the ability does not exist. public static bool LacksAbility(this CardInfo cardInfo, Ability ability) @@ -27,9 +27,9 @@ public static bool LacksAbility(this CardInfo cardInfo, Ability ability) } /// - /// Checks if the CardInfo has all of the given Abilities. + /// Checks if the CardInfo has all of the given Abilities. /// - /// CardInfo to access. + /// CardInfo to access. /// The Abilities to check for. /// Returns true if cardInfo has all of the given Abilities. public static bool HasAllAbilities(this CardInfo cardInfo, params Ability[] abilities) @@ -43,9 +43,9 @@ public static bool HasAllAbilities(this CardInfo cardInfo, params Ability[] abil } /// - /// Checks if the CardInfo has none of the specified Abilities. + /// Checks if the CardInfo has none of the specified Abilities. /// - /// CardInfo to access. + /// CardInfo to access. /// The Abilities to check for. /// Returns true if cardInfo has none of the given Abilities. public static bool LacksAllAbilities(this CardInfo cardInfo, params Ability[] abilities) @@ -59,9 +59,9 @@ public static bool LacksAllAbilities(this CardInfo cardInfo, params Ability[] ab } /// - /// Checks if the CardInfo has any of the specified Abilities. + /// Checks if the CardInfo has any of the specified Abilities. /// - /// CardInfo to access. + /// CardInfo to access. /// The Abilities to check for. /// Returns true if cardInfo has at least one of the given Abilities. public static bool HasAnyOfAbilities(this CardInfo cardInfo, params Ability[] abilities) @@ -77,11 +77,11 @@ public static bool HasAnyOfAbilities(this CardInfo cardInfo, params Ability[] ab #region SpecialAbility /// - /// Checks if the CardInfo has a specific SpecialTriggeredAbility. + /// Checks if the CardInfo has a specific SpecialTriggeredAbility. /// /// A condensed version of `cardInfo.SpecialAbilities.Contains(ability)`. /// - /// CardInfo to access. + /// CardInfo to access. /// The specialTriggeredAbility to check for. /// Returns true if the specialTriggeredAbility does exist. public static bool HasSpecialAbility(this CardInfo cardInfo, SpecialTriggeredAbility ability) @@ -90,9 +90,9 @@ public static bool HasSpecialAbility(this CardInfo cardInfo, SpecialTriggeredAbi } /// - /// Checks if the CardInfo does not have a specific SpecialTriggeredAbility. + /// Checks if the CardInfo does not have a specific SpecialTriggeredAbility. /// - /// CardInfo to access. + /// CardInfo to access. /// The specialTriggeredAbility to check for. /// Returns true if the specialTriggeredAbility does not exist. public static bool LacksSpecialAbility(this CardInfo cardInfo, SpecialTriggeredAbility ability) @@ -101,9 +101,9 @@ public static bool LacksSpecialAbility(this CardInfo cardInfo, SpecialTriggeredA } /// - /// Checks if the CardInfo has all of the specified SpecialTriggeredAbilities. + /// Checks if the CardInfo has all of the specified SpecialTriggeredAbilities. /// - /// CardInfo to access. + /// CardInfo to access. /// The SpecialTriggeredAbilities to check for. /// Returns true if cardInfo has all of the specified SpecialTriggeredAbilities. public static bool HasAllSpecialAbilities(this CardInfo cardInfo, params SpecialTriggeredAbility[] specialAbilities) @@ -117,9 +117,9 @@ public static bool HasAllSpecialAbilities(this CardInfo cardInfo, params Special } /// - /// Checks if the CardInfo has none of the specified SpecialTriggeredAbilities. + /// Checks if the CardInfo has none of the specified SpecialTriggeredAbilities. /// - /// CardInfo to access. + /// CardInfo to access. /// The SpecialTriggeredAbilitiess to check for. /// Returns true if cardInfo has none of the specified SpecialTriggeredAbilities. public static bool LacksAllSpecialAbilities(this CardInfo cardInfo, params SpecialTriggeredAbility[] specialAbilities) @@ -133,9 +133,9 @@ public static bool LacksAllSpecialAbilities(this CardInfo cardInfo, params Speci } /// - /// Checks if the CardInfo has any of the specified SpecialTriggeredAbilities. + /// Checks if the CardInfo has any of the specified SpecialTriggeredAbilities. /// - /// CardInfo to access. + /// CardInfo to access. /// The SpecialTriggeredAbilities to check for. /// Returns true if cardInfo has at least one of the specified SpecialTriggeredAbilities. public static bool HasAnyOfSpecialAbilities(this CardInfo cardInfo, params SpecialTriggeredAbility[] specialAbilities) @@ -151,25 +151,25 @@ public static bool HasAnyOfSpecialAbilities(this CardInfo cardInfo, params Speci #region Trait /// - /// Checks if the CardInfo does not belong to a specific Tribe. + /// Checks if the CardInfo does not belong to a specific Tribe. /// - /// CardInfo to access. + /// CardInfo to access. /// The tribe to check for. /// Returns true if the card is not of the specified tribe. public static bool IsNotOfTribe(this CardInfo cardInfo, Tribe tribe) => !cardInfo.IsOfTribe(tribe); /// - /// Checks if the CardInfo does not have a specific Trait. + /// Checks if the CardInfo does not have a specific Trait. /// - /// CardInfo to access. + /// CardInfo to access. /// The Trait to check for. /// Returns true if the card is does not have the specified Trait. public static bool LacksTrait(this CardInfo cardInfo, Trait trait) => !cardInfo.HasTrait(trait); /// - /// Checks if the CardInfo has all of the specified Traits. + /// Checks if the CardInfo has all of the specified Traits. /// - /// CardInfo to access. + /// CardInfo to access. /// The Traits to check for. /// Returns true if cardInfo has all of the specified Traits. public static bool HasAllTraits(this CardInfo cardInfo, params Trait[] traits) @@ -183,9 +183,9 @@ public static bool HasAllTraits(this CardInfo cardInfo, params Trait[] traits) } /// - /// Checks if the CardInfo has none of the specified Traits. + /// Checks if the CardInfo has none of the specified Traits. /// - /// CardInfo to access. + /// CardInfo to access. /// The Traits to check for. /// Returns true if cardInfo has none of the specified Traits. public static bool LacksAllTraits(this CardInfo cardInfo, params Trait[] traits) @@ -199,9 +199,9 @@ public static bool LacksAllTraits(this CardInfo cardInfo, params Trait[] traits) } /// - /// Checks if the CardInfo has any of the specified Traits. + /// Checks if the CardInfo has any of the specified Traits. /// - /// CardInfo to access. + /// CardInfo to access. /// The Traits to check for. /// Returns true if cardInfo has at least one of the specified Traits. public static bool HasAnyOfTraits(this CardInfo cardInfo, params Trait[] traits) @@ -228,25 +228,25 @@ public static bool HasAnyOfTraits(this CardInfo cardInfo, params Trait[] traits) #region CardMetaCategory /// - /// Checks if the CardInfo has a specific CardMetaCategory. + /// Checks if the CardInfo has a specific CardMetaCategory. /// - /// CardInfo to access. + /// CardInfo to access. /// The CardMetaCategory to check for. /// Returns true if the card is does not have the specified CardMetaCategory. public static bool HasCardMetaCategory(this CardInfo cardInfo, CardMetaCategory metaCategory) => cardInfo.metaCategories.Contains(metaCategory); /// - /// Checks if the CardInfo does not have a specific CardMetaCategory. + /// Checks if the CardInfo does not have a specific CardMetaCategory. /// - /// CardInfo to access. + /// CardInfo to access. /// The CardMetaCategory to check for. /// Returns true if the card is does not have the specified CardMetaCategory. public static bool LacksCardMetaCategory(this CardInfo cardInfo, CardMetaCategory metaCategory) => !cardInfo.HasCardMetaCategory(metaCategory); /// - /// Checks if the CardInfo has any of the specified CardMetaCategories. + /// Checks if the CardInfo has any of the specified CardMetaCategories. /// - /// CardInfo to access. + /// CardInfo to access. /// The CardMetaCategories to check for. /// Returns true if the card has at least one of the specified CardMetaCategories. public static bool HasAnyOfCardMetaCategories(this CardInfo cardInfo, params CardMetaCategory[] metaCategories) @@ -260,9 +260,9 @@ public static bool HasAnyOfCardMetaCategories(this CardInfo cardInfo, params Car } /// - /// Checks if the CardInfo has none of the specified CardMetaCategories. + /// Checks if the CardInfo has none of the specified CardMetaCategories. /// - /// CardInfo to access. + /// CardInfo to access. /// The CardMetaCategories to check for. /// Returns true if the card has none of the specified CardMetaCategories. public static bool LacksAllCardMetaCategories(this CardInfo cardInfo, params CardMetaCategory[] metaCategories) @@ -315,7 +315,7 @@ public static int GetAbilityStacks(this PlayableCard card, Ability ability) /// /// Gets the number of Ability stacks a card has. /// - /// The CardInfo to access. + /// The CardInfo to access. /// The Ability to check for. /// The number of Ability stacks the card has. public static int GetAbilityStacks(this CardInfo info, Ability ability) @@ -700,7 +700,7 @@ public static void RemoveTemporaryMods(this PlayableCard card, params CardModifi /// A version of TransformIntoCard tailored to visually work on cards in the hand. /// /// The PlayableCard to access. - /// The CardInfo to change the card into. + /// The CardInfo to change the card into. /// An Action to invoke before the evolvedInfo is set. /// An Action to invoke after the evolvedInfo is set. public static IEnumerator TransformIntoCardInHand(this PlayableCard card, CardInfo evolvedInfo, Action onTransformedCallback = null, Action preTransformCallback = null) @@ -908,9 +908,9 @@ public static bool HasShieldAbility(this PlayableCard card) return card.AllAbilities().Exists(x => x.IsShieldAbility()); } /// - /// Returns whether or not the CardInfo has an Ability that overrides DamageShieldBehaviour. + /// Returns whether or not the CardInfo has an Ability that overrides DamageShieldBehaviour. /// - /// The CardInfo object to check. + /// The CardInfo object to check. public static bool HasShieldAbility(this CardInfo cardInfo) { return cardInfo.Abilities.Exists(x => x.IsShieldAbility()); @@ -919,9 +919,9 @@ public static bool HasShieldAbility(this CardInfo cardInfo) #endregion /// - /// Spawns the CardInfo object to the player's hand. + /// Spawns the CardInfo object to the player's hand. /// - /// CardInfo to access. + /// CardInfo to access. /// The mods that will be added to the PlayableCard object. /// The position of where the card will appear from. Default is a Vector3 of (0, 6, 1.5). /// The amount of time to wait before being added to the hand. @@ -941,7 +941,7 @@ public static IEnumerator SpawnInHand(this CardInfo cardInfo, List - /// Creates a basic EncounterBlueprintData.CardBlueprint based off the CardInfo object. + /// Creates a basic EncounterBlueprintData.CardBlueprint based off the CardInfo object. /// /// CardInfo to create the blueprint with. /// The CardBlueprint object that can be used when creating EncounterData. diff --git a/InscryptionAPI/Card/CardExtensionsPortraits.cs b/InscryptionAPI/Card/CardExtensionsPortraits.cs index 0c238638..75f111b3 100644 --- a/InscryptionAPI/Card/CardExtensionsPortraits.cs +++ b/InscryptionAPI/Card/CardExtensionsPortraits.cs @@ -10,9 +10,9 @@ public static partial class CardExtensions /// /// Sets the default card portrait for the card /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPortrait(this CardInfo info, string pathToArt) { try @@ -28,10 +28,10 @@ public static CardInfo SetPortrait(this CardInfo info, string pathToArt) /// /// Sets the default card portrait for the card /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -40,7 +40,7 @@ public static CardInfo SetPortrait(this CardInfo info, Texture2D portrait, Filte /// /// Sets the cards portrait and emission at the same time. /// - /// The CardInfon to access. + /// The CardInfon to access. /// The texture containing the card portrait. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. @@ -55,9 +55,9 @@ public static CardInfo SetPortrait(this CardInfo info, Texture2D portrait, Textu /// /// Sets the default card portrait for the card /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPortrait(this CardInfo info, Sprite sprite) { info.portraitTex = sprite; @@ -71,10 +71,10 @@ public static CardInfo SetPortrait(this CardInfo info, Sprite sprite) /// /// Sets the cards portrait and emission at the same time. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). /// The path to the .png file containing the emission artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPortraitAndEmission(this CardInfo info, string pathToArt, string pathToEmission) { info.SetPortrait(pathToArt); @@ -85,11 +85,11 @@ public static CardInfo SetPortraitAndEmission(this CardInfo info, string pathToA /// /// Sets the cards portrait and emission at the same time. /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPortraitAndEmission(this CardInfo info, Texture2D portrait, Texture2D emission, FilterMode? filterMode = null) { info.SetPortrait(portrait, filterMode); @@ -100,10 +100,10 @@ public static CardInfo SetPortraitAndEmission(this CardInfo info, Texture2D port /// /// Sets the cards portrait and emission at the same time. /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the card portrait. /// The sprite containing the emission. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPortraitAndEmission(this CardInfo info, Sprite portrait, Sprite emission) { info.SetPortrait(portrait); @@ -117,9 +117,9 @@ public static CardInfo SetPortraitAndEmission(this CardInfo info, Sprite portrai /// /// Sets the card's alternate portrait. This portrait is only used when asked for by an ability or an appearance behavior. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetAltPortrait(this CardInfo info, string pathToArt) { return info.SetAltPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -128,10 +128,10 @@ public static CardInfo SetAltPortrait(this CardInfo info, string pathToArt) /// /// Sets the card's alternate portrait. This portrait is only used when asked for by an ability or an appearance behavior. /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetAltPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetAltPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -140,9 +140,9 @@ public static CardInfo SetAltPortrait(this CardInfo info, Texture2D portrait, Fi /// /// Sets the card's alternate portrait. This portrait is only used when asked for by an ability or an appearance behavior. /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetAltPortrait(this CardInfo info, Sprite portrait) { info.alternatePortrait = portrait; @@ -160,9 +160,9 @@ public static CardInfo SetAltPortrait(this CardInfo info, Sprite portrait) /// /// Sets the emissive portrait for the card. This can only be done after the default portrait has been set (SetPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissivePortrait(this CardInfo info, string pathToArt) { try @@ -178,10 +178,10 @@ public static CardInfo SetEmissivePortrait(this CardInfo info, string pathToArt) /// /// Sets the emissive portrait for the card. This can only be done after the default portrait has been set (SetPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissivePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissivePortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -190,9 +190,9 @@ public static CardInfo SetEmissivePortrait(this CardInfo info, Texture2D portrai /// /// Sets the emissive portrait for the card. This can only be done after the default portrait has been set (SetPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the emission. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissivePortrait(this CardInfo info, Sprite sprite) { if (info.portraitTex == null) @@ -206,16 +206,16 @@ public static CardInfo SetEmissivePortrait(this CardInfo info, Sprite sprite) /// /// Retrieves the given CardInfo's emissive portrait. /// - /// The CardInfo to access. + /// The CardInfo to access. /// Null if there is no emissive portrait. public static Sprite GetEmissivePortrait(this CardInfo info) => info.portraitTex.GetEmissionSprite(); /// /// Sets the emissive alternate portrait for the card. This can only be done after the alternate portrait has been set (SetAltPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveAltPortrait(this CardInfo info, string pathToArt) { return info.SetEmissiveAltPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -224,10 +224,10 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, string pathToA /// /// Sets the emissive alternate portrait for the card. This can only be done after the alternate portrait has been set (SetAltPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveAltPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -236,9 +236,9 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Texture2D port /// /// Sets the emissive alternate portrait for the card. This can only be done after the alternate portrait has been set (SetAltPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the emission. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Sprite portrait) { if (info.alternatePortrait == null) @@ -252,7 +252,7 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Sprite portrai /// /// Retrives the given CardInfo's emissive alternate portrait. /// - /// The CardInfo to access. + /// The CardInfo to access. /// Null if there is no emissive alternate portrait. public static Sprite GetEmissiveAltPortrait(this CardInfo info) => info.alternatePortrait.GetEmissionSprite(); @@ -262,9 +262,9 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Sprite portrai /// /// Sets the card's pixel portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelPortrait(this CardInfo info, string pathToArt) { return info.SetPixelPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -273,10 +273,10 @@ public static CardInfo SetPixelPortrait(this CardInfo info, string pathToArt) /// /// Sets the card's pixel portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -285,9 +285,9 @@ public static CardInfo SetPixelPortrait(this CardInfo info, Texture2D portrait, /// /// Sets the card's pixel portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelPortrait(this CardInfo info, Sprite portrait) { info.pixelPortrait = portrait; @@ -301,7 +301,7 @@ public static CardInfo SetPixelPortrait(this CardInfo info, Sprite portrait) /// /// Retrieves the given CardInfo's pixel portrait. /// - /// The CardInfo to access. + /// The CardInfo to access. /// Null if there is no pixel portrait. public static Sprite GetPixelPortrait(this CardInfo info) { @@ -314,9 +314,9 @@ public static Sprite GetPixelPortrait(this CardInfo info) /// /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetLostTailPortrait(this CardInfo info, string pathToArt) { if (info.tailParams == null) @@ -330,10 +330,10 @@ public static CardInfo SetLostTailPortrait(this CardInfo info, string pathToArt) /// /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetLostTailPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { if (info.tailParams == null) @@ -347,9 +347,9 @@ public static CardInfo SetLostTailPortrait(this CardInfo info, Texture2D portrai /// /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetLostTailPortrait(this CardInfo info, Sprite portrait) { if (info.tailParams == null) @@ -363,9 +363,9 @@ public static CardInfo SetLostTailPortrait(this CardInfo info, Sprite portrait) /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, string pathToArt) { if (info.tailParams == null) @@ -379,10 +379,10 @@ public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, string pa /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { if (info.tailParams == null) @@ -396,9 +396,9 @@ public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, Texture2D /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, Sprite portrait) { if (info.tailParams == null) @@ -499,7 +499,7 @@ public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Sprit /// /// Retrieves the given CardInfo's emissive tail lost portrait. /// - /// The CardInfo to access. + /// The CardInfo to access. /// Null if there is no emissive tail lost portrait. public static Sprite GetEmissiveTailLostPortrait(this TailParams info) => info.tailLostPortrait?.GetEmissionSprite(); @@ -509,9 +509,9 @@ public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Sprit /// /// Sets the card's pixel alternate portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelAlternatePortrait(this CardInfo info, string pathToArt) { return info.SetPixelAlternatePortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -519,10 +519,10 @@ public static CardInfo SetPixelAlternatePortrait(this CardInfo info, string path /// /// Sets the card's pixel alternate portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelAlternatePortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -530,9 +530,9 @@ public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Texture2D p /// /// Sets the card's pixel alternate portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// CardInfo to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -545,7 +545,7 @@ public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Sprite port /// /// Retrieves the given CardInfo's alternate Act 2 portrait. /// - /// The CardInfo to access. + /// The CardInfo to access. /// Null if there is no alternate pixel portrait. public static Sprite GetPixelAlternatePortrait(this CardInfo info) => info.PixelAlternatePortrait(); #endregion @@ -554,9 +554,9 @@ public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Sprite port /// /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetSteelTrapPortrait(this CardInfo info, string pathToArt) { return info.SetSteelTrapPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -565,10 +565,10 @@ public static CardInfo SetSteelTrapPortrait(this CardInfo info, string pathToArt /// /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetSteelTrapPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetSteelTrapPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); @@ -577,9 +577,9 @@ public static CardInfo SetSteelTrapPortrait(this CardInfo info, Texture2D portra /// /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The Sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -592,9 +592,9 @@ public static CardInfo SetSteelTrapPortrait(this CardInfo info, Sprite portrait) /// /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, string pathToArt) { return info.SetPixelSteelTrapPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -602,10 +602,10 @@ public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, string path /// /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelSteelTrapPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -614,9 +614,9 @@ public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Texture2D p /// /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The Sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -629,9 +629,9 @@ public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Sprite port /// /// Sets the emissive steel trap portrait for the card. This can only be done after the default steel trap portrait has been set (SetSteelTrapPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, string pathToArt) { return info.SetEmissiveSteelTrapPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -640,10 +640,10 @@ public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, string p /// /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveSteelTrapPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -652,9 +652,9 @@ public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Texture2 /// /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The Sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (info.SteelTrapPortrait() == null) @@ -676,9 +676,9 @@ public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Sprite p /// /// Sets the card's alternate broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetBrokenShieldPortrait(this CardInfo info, string pathToArt) { return info.SetBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -687,10 +687,10 @@ public static CardInfo SetBrokenShieldPortrait(this CardInfo info, string pathTo /// /// Sets the card's broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. /// - /// CardInfo to access. + /// CardInfo to access. /// The sacrificable portrait's Texture. /// Filter mode to apply to the texture in-game. Defaults to Point. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetBrokenShieldPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); @@ -699,9 +699,9 @@ public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Texture2D por /// /// Sets the card's broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. /// - /// CardInfo to access. + /// CardInfo to access. /// The sacrificable portrait's Portrait. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -714,9 +714,9 @@ public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Sprite portra /// /// Sets the card's alternate pixel broken shield portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, string pathToArt) { return info.SetPixelBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -725,10 +725,10 @@ public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, string p /// /// Sets the card's broken shield portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The sacrificable portrait's Texture. /// Filter mode to apply to the texture in-game. Defaults to Point. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelBrokenShieldPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -737,9 +737,9 @@ public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Texture2 /// /// Sets the card's broken shield portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The sacrificable portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -752,9 +752,9 @@ public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Sprite p /// /// Sets the emissive broken shield portrait for the card. This can only be done after the default broken shield portrait has been set (SetBrokenShieldPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, string pathToArt) { return info.SetEmissiveBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -763,10 +763,10 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, strin /// /// Sets the emissive broken shield portrait for the card. This can only be done after the default broken shield portrait has been set (SetBrokenShieldPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The sacrificable portrait's Texture. /// Filter mode to apply to the texture in-game. Defaults to Point. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveBrokenShieldPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -775,9 +775,9 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Textu /// /// Sets the emissive broken shield portrait for the card. This can only be done after the default broken shield portrait has been set (SetBrokenShieldPortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The sacrificable portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (info.BrokenShieldPortrait() == null) @@ -790,7 +790,7 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Sprit /// /// Retrieves the given CardInfo's emissive broken shield portrait. /// - /// The CardInfo to access. + /// The CardInfo to access. /// Null if there is no emissive broken shield portrait. public static Sprite GetEmissiveBrokenShieldPortrait(this CardInfo info) => info.BrokenShieldPortrait()?.GetEmissionSprite(); #endregion @@ -799,9 +799,9 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Sprit /// /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this CardInfo is on the board when the player is selecting sacrifices. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetSacrificablePortrait(this CardInfo info, string pathToArt) { return info.SetSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -809,10 +809,10 @@ public static CardInfo SetSacrificablePortrait(this CardInfo info, string pathTo /// /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this CardInfo is on the board when the player is selecting sacrifices. /// - /// CardInfo to access. + /// CardInfo to access. /// The sacrificable portrait's Texture. /// Filter mode to apply to the texture in-game. Defaults to Point. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetSacrificablePortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); @@ -820,9 +820,9 @@ public static CardInfo SetSacrificablePortrait(this CardInfo info, Texture2D por /// /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this CardInfo is on the board when the player is selecting sacrifices. /// - /// CardInfo to access. + /// CardInfo to access. /// The sacrificable portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetSacrificablePortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -835,9 +835,9 @@ public static CardInfo SetSacrificablePortrait(this CardInfo info, Sprite portra /// /// Sets the card's pixel sacrificable portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, string pathToArt) { return info.SetPixelSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -846,10 +846,10 @@ public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, string p /// /// Sets the card's pixel sacrificable portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The card portrait's Texture. /// The filter mode applied to the portrait in-game (defaults to Point). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelSacrificablePortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -858,9 +858,9 @@ public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Texture2 /// /// Sets the card's pixel sacrificable portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// CardInfo to access. /// The card portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -873,9 +873,9 @@ public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Sprite p /// /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, string pathToArt) { return info.SetEmissiveSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -884,10 +884,10 @@ public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, strin /// /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The card portrait's Texture. /// The filter mode applied to the portrait in-game (defaults to Point). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveSacrificablePortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -896,9 +896,9 @@ public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Textu /// /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). /// - /// CardInfo to access. + /// CardInfo to access. /// The card portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Sprite portrait) { if (info.SacrificablePortrait() == null) @@ -911,16 +911,16 @@ public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Sprit /// Retrieves the given CardInfo's sacrificable portrait's emission. /// /// - /// The CardInfo's emissive sacrificable portrait, or null if one doesn't exist. + /// The CardInfo's emissive sacrificable portrait, or null if one doesn't exist. public static Sprite GetEmissiveSacrificablePortrait(this CardInfo info) => info.SacrificablePortrait().GetEmissionSprite(); #endregion /// /// Sets the animated portrait for the given CardInfo. /// - /// CardInfo to access. + /// CardInfo to access. /// The to check for. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetAnimatedPortrait(this CardInfo info, GameObject portrait) { info.animatedPortrait = portrait; diff --git a/InscryptionAPI/Card/CardExtensionsProperties.cs b/InscryptionAPI/Card/CardExtensionsProperties.cs index e4b14332..b20ebc88 100644 --- a/InscryptionAPI/Card/CardExtensionsProperties.cs +++ b/InscryptionAPI/Card/CardExtensionsProperties.cs @@ -9,10 +9,10 @@ public static partial class CardExtensions { /// /// Adds a custom property value to the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The name of the property to set. /// The value of the property. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetExtendedProperty(this CardInfo info, string propertyName, object value) { info.GetCardExtensionTable()[propertyName] = value?.ToString(); @@ -22,7 +22,7 @@ public static CardInfo SetExtendedProperty(this CardInfo info, string propertyNa /// /// Gets a custom property value from the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The name of the property to get the value of. /// The custom property value as a string. If it doesn't exist, returns null. public static string GetExtendedProperty(this CardInfo info, string propertyName) @@ -34,7 +34,7 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// /// Gets a custom property as a nullable int. /// - /// CardInfo to access. + /// CardInfo to access. /// Property name to get value of. /// Returns the value of the property as an int or null if it didn't exist or couldn't be parsed as int. public static int? GetExtendedPropertyAsInt(this CardInfo info, string propertyName) @@ -46,7 +46,7 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// /// Gets a custom property as a nullable float. /// - /// CardInfo to access. + /// CardInfo to access. /// Property name to get value of. /// Returns the value of the property as a float or null if it didn't exist or couldn't be parsed as float. public static float? GetExtendedPropertyAsFloat(this CardInfo info, string propertyName) @@ -58,7 +58,7 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// /// Gets a custom property as a nullable boolean. /// - /// CardInfo to access. + /// CardInfo to access. /// Property name to get value of. /// Returns the value of the property as a boolean or null if it didn't exist or couldn't be parsed as boolean. public static bool? GetExtendedPropertyAsBool(this CardInfo info, string propertyName) @@ -77,16 +77,16 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// /// Checks if this card info will be killed by the effect of Tidal Lock. /// - /// CardInfo to access. + /// CardInfo to access. /// True if the card info is affected by Tidal Lock. public static bool IsAffectedByTidalLock(this CardInfo info) => info.GetExtendedPropertyAsBool("AffectedByTidalLock") ?? false; /// /// Sets whether the card should be killed by Tidal Lock's effect. /// - /// CardInfo to access. + /// CardInfo to access. /// Whether or not this card should be affected by Tidal Lock. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetAffectedByTidalLock(this CardInfo info, bool affectedByTidalLock = true) { info.SetExtendedProperty("AffectedByTidalLock", affectedByTidalLock); @@ -104,16 +104,16 @@ public static CardInfo SetAffectedByTidalLock(this CardInfo info, bool affectedB /// /// Gets the string value of the extended property TransformerCardId. Can be null. /// - /// CardInfo to access. + /// CardInfo to access. /// The string value of the extended property TransformerCardId. public static string GetTransformerCardId(this CardInfo info) => info.GetExtendedProperty("TransformerCardId"); /// /// Sets whether the card should be killed by Tidal Lock's effect. /// - /// CardInfo to access. + /// CardInfo to access. /// The internal name of the card this card should transform into. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTransformerCardId(this CardInfo info, string transformerCardId) { info.SetExtendedProperty("TransformerCardId", transformerCardId); @@ -126,36 +126,36 @@ public static CardInfo SetTransformerCardId(this CardInfo info, string transform /// /// Determines if the given CardInfo has the given custom card cost. /// - /// The CardInfo to access. + /// The CardInfo to access. /// The custom card cost to check for. - /// True if the CardInfo needs the given custom cost to be played. + /// True if the CardInfo needs the given custom cost to be played. public static bool HasCustomCost(this CardInfo info, FullCardCost customCost) => info.GetCustomCost(customCost) != 0; /// - /// Sets a card's custom cost property using the provided FullCardCost object as a reference. + /// Sets a card's custom cost property using the provided FullCardCost object as a reference. /// - /// The CardInfo to modify. + /// The CardInfo to modify. /// The FullCardCost representing the cost we want to set. - /// How much of the custom cost the CardInfo should need to be played. - /// The same CardInfo so a chain can continue. + /// How much of the custom cost the CardInfo should need to be played. + /// The same CardInfo so a chain can continue. public static CardInfo SetCustomCost(this CardInfo info, FullCardCost customCost, int amount) => info.SetCustomCost(customCost.CostName, amount); /// - /// A variant of SetExtendedProperty intended to be used to set properties representing custom costs. Primarily provided for clarity of purpose. + /// A variant of intended to be used to set properties representing custom costs. Primarily provided for clarity of purpose. /// - /// The CardInfo to modify. + /// The CardInfo to modify. /// The name of the cost we want to set. - /// How much of the custom cost the CardInfo should need to be played. - /// The same CardInfo so a chain can continue. + /// How much of the custom cost the CardInfo should need to be played. + /// The same CardInfo so a chain can continue. public static CardInfo SetCustomCost(this CardInfo info, string costName, int amount) => info.SetExtendedProperty(costName, amount); /// - /// A variant of SetExtendedProperty intended to be used to set properties representing custom costs. Primarily provided for clarity of purpose. + /// A variant of intended to be used to set properties representing custom costs. Primarily provided for clarity of purpose. /// - /// The CardInfo to modify. + /// The CardInfo to modify. /// The class of the cost we want to set. - /// How much of the custom cost the CardInfo should need to be played. - /// The same CardInfo so a chain can continue. + /// How much of the custom cost the CardInfo should need to be played. + /// The same CardInfo so a chain can continue. public static CardInfo SetCustomCost(this CardInfo info, int amount) where T : CustomCardCost { FullCardCost cost = CardCostManager.AllCustomCosts.Find(x => x.CostBehaviour == typeof(T)); @@ -163,7 +163,7 @@ public static CardInfo SetCustomCost(this CardInfo info, int amount) where T } /// - /// Variant of GetCustomCost that automatically retrieves the given cost's canBeNegative value when retrieving the cost amount. + /// Variant of that automatically retrieves the given cost's canBeNegative value when retrieving the cost amount. /// /// The PlayableCard to access. /// The name of the custom card cost. @@ -171,17 +171,17 @@ public static CardInfo SetCustomCost(this CardInfo info, int amount) where T public static int GetCustomCostAmount(this PlayableCard card, string costName) => card.Info.GetCustomCostAmount(costName); /// - /// Variant of GetCustomCost that automatically retrieves the given cost's canBeNegative value when retrieving the cost amount. + /// Variant of that automatically retrieves the given cost's canBeNegative value when retrieving the cost amount. /// - /// The CardInfo to access. + /// The CardInfo to access. /// The name of the custom card cost. /// How much of the given cost is needed for the given card to be played. public static int GetCustomCostAmount(this CardInfo cardInfo, string costName) => cardInfo.GetCustomCost(costName, AllCustomCosts.Find(x => x.CostName == costName).CanBeNegative); /// - /// Retrieves the given PlayableCard's custom card cost amount. + /// Retrieves the given PlayableCard's custom card cost amount. /// - /// The PlayableCard to access. + /// The PlayableCard to access. /// The name of the custom card cost. /// Whether the card cost amount can be negative. If false, returns 0 for negative cost values. /// How much of the given cost is needed for the given card to be played. @@ -190,7 +190,7 @@ public static CardInfo SetCustomCost(this CardInfo info, int amount) where T /// /// Retrieves the given CardInfo's custom card cost amount. /// - /// The CardInfo to access. + /// The CardInfo to access. /// The name of the custom card cost. /// Whether the card cost amount can be negative. If false, returns 0 for negative cost values. /// How much of the given cost is needed for the given card to be played. @@ -224,7 +224,7 @@ public static int GetCustomCost(this PlayableCard card, bool canBeNegative = /// Retrieves the custom card cost amount of the given class Type from the given CardInfo. /// /// The class of the card cost to check. - /// The CardInfo to access. + /// The CardInfo to access. /// If the returned value can be negative. If false, returns 0 instead. /// The card cost amount this card costs. public static int GetCustomCost(this CardInfo cardInfo, bool canBeNegative = false) where T : CustomCardCost @@ -249,7 +249,7 @@ public static int GetCustomCostAmount(this PlayableCard card) where T : Custo /// Retrieves the custom card cost amount of the given class Type from the given CardInfo. /// /// The class of the card cost to check. - /// The CardInfo to access. + /// The CardInfo to access. /// The card cost amount this card costs. public static int GetCustomCostAmount(this CardInfo cardInfo) where T : CustomCardCost { @@ -272,7 +272,7 @@ public static int GetCustomCost(this PlayableCard card, FullCardCost fullCardCos /// Retrieves the given custom card cost amount from the given CardInfo. /// Only returns negative values if the custom cost allows it. /// - /// The CardInfo to access. + /// The CardInfo to access. /// The custom card cost to check for. /// The card cost amount this card costs. public static int GetCustomCost(this CardInfo cardInfo, FullCardCost fullCardCost) @@ -310,8 +310,8 @@ public static List GetCustomCardCosts(this DiskCardGame.Card car /// /// Retrieves all custom card costs from the given CardInfo. /// - /// The CardInfo to access. - /// A List of CustomCardCost objects for each custom cost the CardInfo needs to be played. + /// The CardInfo to access. + /// A List of CustomCardCost objects for each custom cost the CardInfo needs to be played. public static List GetCustomCosts(this CardInfo info) { List costs = new(); @@ -345,13 +345,13 @@ public static List GetCustomCosts(this CardInfo info) /// /// Set the Pelt that should be given when this card is slain by a trap. /// - /// The CardInfo this is being applied to. + /// The CardInfo this is being applied to. /// The Card to be given to the Player on Death by Trap public static void SetSteelTrapPelt(this CardInfo cardInfo, string peltName) => cardInfo.SetExtendedProperty("SteelTrapPelt", peltName); /// /// Get the Pelt that should be given when this card is slain by a trap. /// - /// The CardInfo this is being applied to. + /// The CardInfo this is being applied to. /// A string representing the Pelt that should be returned. public static string GetSteelTrapPelt(this CardInfo cardInfo) => cardInfo.GetExtendedProperty("SteelTrapPelt"); diff --git a/InscryptionAPI/Card/CardExtensionsSetters.cs b/InscryptionAPI/Card/CardExtensionsSetters.cs index 104ee229..d43b4315 100644 --- a/InscryptionAPI/Card/CardExtensionsSetters.cs +++ b/InscryptionAPI/Card/CardExtensionsSetters.cs @@ -11,12 +11,12 @@ public static partial class CardExtensions /// /// Sets a number of basic properties of the card /// - /// CardInfo to access. + /// CardInfo to access. /// Displayed name of the card. /// Attack of the card. /// Health of the card. /// The description that plays when the card is seen for the first time. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetBasic(this CardInfo info, string displayedName, int attack, int health, string description = default) { info.displayedName = displayedName; @@ -29,10 +29,10 @@ public static CardInfo SetBasic(this CardInfo info, string displayedName, int at /// /// Sets the base attack and health of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The base attack for the card. /// The base health for the card. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetBaseAttackAndHealth(this CardInfo info, int? baseAttack = 0, int? baseHealth = 0) { if (baseAttack.HasValue) @@ -48,9 +48,9 @@ public static CardInfo SetBaseAttackAndHealth(this CardInfo info, int? baseAttac /// Sets the CardTemple for the card. Used to determine what cards are obtainable in each Act. /// Act 1 uses Nature cards, Act 2 uses all Temples for each region, Act 3 uses Tech cards. /// - /// CardInfo to access. + /// CardInfo to access. /// The CardTemple to use. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetCardTemple(this CardInfo info, CardTemple temple) { info.temple = temple; @@ -63,9 +63,9 @@ public static CardInfo SetCardTemple(this CardInfo info, CardTemple temple) /// Intermediate: unlocked after the second tutorial /// Advanced: unlocked after the third tutorial if all its abilities have been learned /// - /// CardInfo to access. + /// CardInfo to access. /// The CardComplexity to use. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetCardComplexity(this CardInfo info, CardComplexity complexity) { info.cardComplexity = complexity; @@ -75,9 +75,9 @@ public static CardInfo SetCardComplexity(this CardInfo info, CardComplexity comp /// /// Sets the displayed name of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The displayed name for the card. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetDisplayedName(this CardInfo info, string displayedName) { info.displayedName = displayedName.IsNullOrWhitespace() ? "" : displayedName; @@ -87,10 +87,10 @@ public static CardInfo SetDisplayedName(this CardInfo info, string displayedName /// /// Sets the name of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The name for the card. /// The string that will be prefixed to the card name if it doesn't already exist. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetName(this CardInfo info, string name, string modPrefix = default) { info.name = !string.IsNullOrEmpty(modPrefix) && !name.StartsWith(modPrefix) ? $"{modPrefix}_{name}" : name; @@ -100,11 +100,11 @@ public static CardInfo SetName(this CardInfo info, string name, string modPrefix /// /// Sets the card name and displayed name of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The name for the card. /// The displayed name for the card. /// The string that will be prefixed to the card name if it doesn't already exist. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetNames(this CardInfo info, string name, string displayedName, string modPrefix = default) { info.SetDisplayedName(displayedName); @@ -112,11 +112,11 @@ public static CardInfo SetNames(this CardInfo info, string name, string displaye } /// - /// Sets the CardInfo's special abilities field to any number of special abilities to the card. + /// Sets the CardInfo's special abilities field to any number of special abilities to the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The abilities to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetSpecialAbilities(this CardInfo info, params SpecialTriggeredAbility[] abilities) { info.specialAbilities = abilities?.ToList(); @@ -126,9 +126,9 @@ public static CardInfo SetSpecialAbilities(this CardInfo info, params SpecialTri /// /// Sets the stat icon to the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The stat icon to set. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetStatIcon(this CardInfo info, SpecialStatIcon statIcon) { info.specialStatIcon = statIcon; @@ -139,9 +139,9 @@ public static CardInfo SetStatIcon(this CardInfo info, SpecialStatIcon statIcon) /// /// Sets any number of traits to the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The traits to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTraits(this CardInfo info, params Trait[] traits) { info.traits = traits?.ToList(); @@ -152,9 +152,9 @@ public static CardInfo SetTraits(this CardInfo info, params Trait[] traits) /// /// Set any number of tribes to the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The tribes to add. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTribes(this CardInfo info, params Tribe[] tribes) { info.tribes = tribes?.ToList(); @@ -164,9 +164,9 @@ public static CardInfo SetTribes(this CardInfo info, params Tribe[] tribes) /// /// Sets whether the card should be Gemified or not. Can and will un-Gemify cards. /// - /// CardInfo to access. + /// CardInfo to access. /// Whether the card should be gemified. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetGemify(this CardInfo info, bool gemify = true) { if (gemify && !info.Mods.Exists(x => x.gemify)) @@ -183,8 +183,8 @@ public static CardInfo SetGemify(this CardInfo info, bool gemify = true) /// /// Sets the card to behave as a "normal" card in Part 1. The CardTemple is Nature and it will appear in choice nodes and trader nodes. /// - /// CardInfo to access. - /// The same CardInfo so a chain can continue. + /// CardInfo to access. + /// The same CardInfo so a chain can continue. public static CardInfo SetDefaultPart1Card(this CardInfo info) { if (!info.metaCategories.Contains(CardMetaCategory.Rare)) @@ -199,8 +199,8 @@ public static CardInfo SetDefaultPart1Card(this CardInfo info) /// /// Sets the card to behave as a "normal" card in Part 3. The CardTemple is Tech and it will appear in choice nodes and as a potential random card from GiftBot. /// - /// CardInfo to access. - /// The same CardInfo so a chain can continue. + /// CardInfo to access. + /// The same CardInfo so a chain can continue. public static CardInfo SetDefaultPart3Card(this CardInfo info) { if (!info.metaCategories.Contains(CardMetaCategory.Rare)) @@ -215,9 +215,9 @@ public static CardInfo SetDefaultPart3Card(this CardInfo info) /// /// Makes the card fully playable in GBC mode and able to appear in card packs. /// - /// CardInfo to access. + /// CardInfo to access. /// The temple that the card will exist under. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetGBCPlayable(this CardInfo info, CardTemple temple) { info.AddMetaCategories(CardMetaCategory.GBCPack, CardMetaCategory.GBCPlayable); @@ -229,8 +229,8 @@ public static CardInfo SetGBCPlayable(this CardInfo info, CardTemple temple) /// /// Sets the card so it shows up for rare card choices and applies the rare background. /// - /// CardInfo to access. - /// The same CardInfo so a chain can continue. + /// CardInfo to access. + /// The same CardInfo so a chain can continue. public static CardInfo SetRare(this CardInfo info) { info.AddMetaCategories(CardMetaCategory.Rare); @@ -260,9 +260,9 @@ public static CardInfo SetTerrain(this CardInfo info) /// /// Adds the Terrain trait and background to this card, with the option to not use TerrainLayout. /// - /// CardInfo to access. - /// Whether or not the CardInfo should be given the TerrainLayout appearance behaviour. - /// The same CardInfo so a chain can continue. + /// CardInfo to access. + /// Whether or not the CardInfo should be given the TerrainLayout appearance behaviour. + /// The same CardInfo so a chain can continue. public static CardInfo SetTerrain(this CardInfo info, bool useTerrainLayout) { info.AddTraits(Trait.Terrain); @@ -275,9 +275,9 @@ public static CardInfo SetTerrain(this CardInfo info, bool useTerrainLayout) /// /// Adds the Pelt trait and background to this card, and optionally adds the SpawnLice special ability. /// - /// CardInfo to access. + /// CardInfo to access. /// Whether or not the given CardInfo should also spawn lice. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetPelt(this CardInfo info, bool spawnLice = true) { info.AddTraits(Trait.Pelt); @@ -293,11 +293,11 @@ public static CardInfo SetPelt(this CardInfo info, bool spawnLice = true) /// /// Sets the evolve parameters of the card. These parameters are used to make the Evolve ability function correctly. /// - /// CardInfo to access. + /// CardInfo to access. /// The card that will be generated after the set number of turns. /// The number of turns before the card evolves. /// A set of card mods to be applied to the evolved card. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEvolve(this CardInfo info, CardInfo evolveCard, int numberOfTurns, IEnumerable mods = null) { info.evolveParams = new() @@ -319,11 +319,11 @@ public static CardInfo SetEvolve(this CardInfo info, CardInfo evolveCard, int nu /// Sets the evolve parameters of the card. These parameters are used to make the Evolve ability function correctly. /// This function uses delayed loading to attach the evolution to the card, so if the evolve card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// CardInfo to access. /// The name of card that will be generated after the set number of turns. /// The number of turns before the card evolves. /// A set of card mods to be applied to the evolved card. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEvolve(this CardInfo info, string evolveInto, int numberOfTurns, IEnumerable mods = null) { CardInfo evolution = CardManager.AllCardsCopy.CardByName(evolveInto); @@ -354,9 +354,9 @@ public static CardInfo SetEvolve(this CardInfo info, string evolveInto, int numb /// /// Sets the default evolution name for the card. This is the name used when the card doesn't evolve into another card. /// - /// CardInfo to access. + /// CardInfo to access. /// The default evolution name to use. Pass in 'null' to use the vanilla default. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetDefaultEvolutionName(this CardInfo info, string defaultName) { info.defaultEvolutionName = defaultName; @@ -366,10 +366,10 @@ public static CardInfo SetDefaultEvolutionName(this CardInfo info, string defaul /// /// Sets the ice cube parameters of the card. These parameters are used to make the IceCube ability function correctly. /// - /// CardInfo to access. + /// CardInfo to access. /// The card that will be generated when this card dies. /// A set of card mods to be applied to the ice cube contents. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetIceCube(this CardInfo info, CardInfo iceCube, IEnumerable mods = null) { info.iceCubeParams = new() @@ -390,10 +390,10 @@ public static CardInfo SetIceCube(this CardInfo info, CardInfo iceCube, IEnumera /// Sets the ice cube parameters of the card. These parameters are used to make the IceCube ability function correctly. /// This function uses delayed loading to attach the ice cube to the card, so if the ice cube card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// CardInfo to access. /// The name of the card that will be generated when this card dies. /// A set of card mods to be applied to the ice cube contents. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetIceCube(this CardInfo info, string iceCubeName, IEnumerable mods = null) { CardInfo creatureWithin = CardManager.AllCardsCopy.CardByName(iceCubeName); @@ -426,11 +426,11 @@ public static CardInfo SetIceCube(this CardInfo info, string iceCubeName, IEnume /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. /// This function uses delayed loading to attach the tail to the card, so if the tail card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// CardInfo to access. /// The name of the card that will be generated as the "tail" when the first hit is dodged. /// The path to the .png file containing the lost tail artwork (relative to the Plugins directory). /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTail(this CardInfo info, string tailName, string pathToLostTailArt = null, IEnumerable mods = null) { Texture2D lostTailPortrait = pathToLostTailArt == null ? null : TextureHelper.GetImageAsTexture(pathToLostTailArt); @@ -441,10 +441,10 @@ public static CardInfo SetTail(this CardInfo info, string tailName, string pathT /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. /// This function uses delayed loading to attach the tail to the card, so if the tail card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// CardInfo to access. /// The name of the card that will be generated as the "tail" when the first hit is dodged. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTail(this CardInfo info, string tailName, IEnumerable mods = null) { return info.SetTail(tailName, tailLostPortrait: null, mods: mods); @@ -453,10 +453,10 @@ public static CardInfo SetTail(this CardInfo info, string tailName, IEnumerable< /// /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. /// - /// CardInfo to access. + /// CardInfo to access. /// The card that will be generated as the "tail" when the first hit is dodged. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTail(this CardInfo info, CardInfo tail, IEnumerable mods = null) { return info.SetTail(tail, null, mods); @@ -465,12 +465,12 @@ public static CardInfo SetTail(this CardInfo info, CardInfo tail, IEnumerable /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. /// - /// CardInfo to access. + /// CardInfo to access. /// The card that will be generated as the "tail" when the first hit is dodged. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTail(this CardInfo info, CardInfo tail, Texture2D tailLostPortrait, FilterMode? filterMode = null, IEnumerable mods = null) { var tailLostSprite = !filterMode.HasValue @@ -482,11 +482,11 @@ public static CardInfo SetTail(this CardInfo info, CardInfo tail, Texture2D tail /// /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. /// - /// CardInfo to access. + /// CardInfo to access. /// The card that will be generated as the "tail" when the first hit is dodged. /// The sprite containing the card portrait. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTail(this CardInfo info, CardInfo tail, Sprite tailLostPortrait, IEnumerable mods = null) { info.tailParams = new() @@ -510,12 +510,12 @@ public static CardInfo SetTail(this CardInfo info, CardInfo tail, Sprite tailLos /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. /// This function uses delayed loading to attach the tail to the card, so if the tail card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// CardInfo to access. /// The name of the card that will be generated as the "tail" when the first hit is dodged. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetTail(this CardInfo info, string tailName, Texture2D tailLostPortrait, FilterMode? filterMode = null, IEnumerable mods = null) { var tailLostSprite = !filterMode.HasValue @@ -528,11 +528,11 @@ public static CardInfo SetTail(this CardInfo info, string tailName, Texture2D ta /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. /// This function uses delayed loading to attach the tail to the card, so if the tail card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// CardInfo to access. /// The name of the card that will be generated as the "tail" when the first hit is dodged. /// The sprite containing the card portrait. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue.. + /// The same CardInfo so a chain can continue.. public static CardInfo SetTail(this CardInfo info, string tailName, Sprite tailLostPortrait, IEnumerable mods = null) { CardInfo tail = CardManager.AllCardsCopy.CardByName(tailName); @@ -566,12 +566,12 @@ public static CardInfo SetTail(this CardInfo info, string tailName, Sprite tailL /// /// Sets the cost of the card. Any and all costs can be set this way. /// - /// CardInfo to access. + /// CardInfo to access. /// The cost in blood (sacrifices). /// The cost in bones. /// The cost in energy. /// The cost in gems. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetCost(this CardInfo info, int? bloodCost = 0, int? bonesCost = 0, int? energyCost = 0, List gemsCost = null) { info.SetBloodCost(bloodCost); @@ -583,9 +583,9 @@ public static CardInfo SetCost(this CardInfo info, int? bloodCost = 0, int? bone /// /// Sets the blood cost of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The cost in blood (sacrifices). - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetBloodCost(this CardInfo info, int? bloodCost = 0) { if (bloodCost.HasValue) @@ -596,9 +596,9 @@ public static CardInfo SetBloodCost(this CardInfo info, int? bloodCost = 0) /// /// Sets the bones cost of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The cost in bones. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetBonesCost(this CardInfo info, int? bonesCost = 0) { if (bonesCost.HasValue) @@ -609,9 +609,9 @@ public static CardInfo SetBonesCost(this CardInfo info, int? bonesCost = 0) /// /// Sets the energy cost of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The cost in energy. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetEnergyCost(this CardInfo info, int? energyCost = 0) { if (energyCost.HasValue) @@ -622,9 +622,9 @@ public static CardInfo SetEnergyCost(this CardInfo info, int? energyCost = 0) /// /// Sets the gems cost of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The cost in Mox. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetGemsCost(this CardInfo info, List gemsCost = null) { info.gemsCost = gemsCost ?? new(); @@ -633,9 +633,9 @@ public static CardInfo SetGemsCost(this CardInfo info, List gemsCost = /// /// Sets the gems cost of the card. /// - /// CardInfo to access. + /// CardInfo to access. /// The cost in Mox. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetGemsCost(this CardInfo info, params GemType[] gemsCost) { info.gemsCost = gemsCost.ToList(); @@ -663,7 +663,7 @@ public static CardInfo SetHideStats(this CardInfo info, bool hideStats = true) return info; } /// - /// Sets whether or not the CardInfo's portrait will be flipped when Strafe and similar abilities change direction. + /// Sets whether or not the CardInfo's portrait will be flipped when Strafe and similar abilities change direction. /// /// The same card info so a chain can continue. public static CardInfo SetStrafeFlipsPortrait(this CardInfo info, bool flipPortrait = true) @@ -676,7 +676,7 @@ public static CardInfo SetStrafeFlipsPortrait(this CardInfo info, bool flipPortr /// /// Indicates if this is a base game card or not. /// - /// CardInfo to access. + /// CardInfo to access. /// True of this card came from the base game; false otherwise. public static bool IsBaseGameCard(this CardInfo info) => info.GetExtendedPropertyAsBool("BaseGameCard") ?? false; @@ -692,7 +692,7 @@ public static CardInfo SetStrafeFlipsPortrait(this CardInfo info, bool flipPortr /// /// The card. /// The custom unlock check, a func that needs to return true for the card to be unlocked. The bool argument is true when the game is in Kaycee's Mod mode and the int argument is the current Kaycee's Mod challenge level. - /// The same CardInfo so a chain can continue. + /// The same CardInfo so a chain can continue. public static CardInfo SetCustomUnlockCheck(this CardInfo c, Func check) { if (check == null && CardManager.CustomCardUnlocks.ContainsKey(c.name)) diff --git a/InscryptionAPI/Card/CardManager.cs b/InscryptionAPI/Card/CardManager.cs index 4a9bb9c7..43ae997a 100644 --- a/InscryptionAPI/Card/CardManager.cs +++ b/InscryptionAPI/Card/CardManager.cs @@ -335,15 +335,15 @@ public static CardInfo New(string modPrefix, string name, string displayName, in /// /// Retrieves the dictionary of card extended properties associated with the given CardInfo. /// - /// The CardInfo whose extended properties we wish to retrieve. + /// The CardInfo whose extended properties we wish to retrieve. /// The extension property dictionary for the given CardInfo. Creates and returns an empty dictionary if none exists. public static Dictionary GetCardExtensionTable(this CardInfo card) => CardExtensionProperties.GetOrCreateValue(card).StringMap; internal static CardAltPortraits GetAltPortraits(this CardInfo card) => CardAlternatePortraits.GetOrCreateValue(card); /// - /// Retrieves the Sprite for the CardInfo's alternate portrait in Act 2 if it exists. + /// Retrieves the Sprite for the CardInfo's alternate portrait in Act 2 if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the pixel alternate portrait or null if it doesn't exist. /// /// Pixel alternate portraits are added through the API; they are not a vanilla feature. @@ -353,9 +353,9 @@ public static Sprite PixelAlternatePortrait(this CardInfo card) return card.GetAltPortraits().PixelAlternatePortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait used when Steel Trap activates if it exists. + /// Retrieves the Sprite for the CardInfo's portrait used when Steel Trap activates if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the Steel Trap portrait or null if it doesn't exist. /// /// Steel Trap portraits are added through the API; they are not a vanilla feature. @@ -365,9 +365,9 @@ public static Sprite SteelTrapPortrait(this CardInfo card) return card.GetAltPortraits().SteelTrapPortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait emission used when Steel Trap activates if it exists. + /// Retrieves the Sprite for the CardInfo's portrait emission used when Steel Trap activates if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the Steel Trap portrait emission or null if it doesn't exist. /// /// Steel Trap portraits are added through the API; they are not a vanilla feature. @@ -377,9 +377,9 @@ public static Sprite EmissiveSteelTrapPortrait(this CardInfo card) return card.GetAltPortraits().SteelTrapPortrait.GetEmissionSprite(); } /// - /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when Steel Trap activates if it exists. + /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when Steel Trap activates if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the pixel Steel Trap portrait or null if it doesn't exist. /// /// Pixel Steel Trap portraits are added through the API; they are not a vanilla feature. @@ -389,9 +389,9 @@ public static Sprite PixelSteelTrapPortrait(this CardInfo card) return card.GetAltPortraits().PixelSteelTrapPortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait used when a card's shield breaks if it exists. + /// Retrieves the Sprite for the CardInfo's portrait used when a card's shield breaks if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the broken shield portrait or null if it doesn't exist. /// /// Broken shield portraits are added through the API; they are not a vanilla feature. @@ -401,9 +401,9 @@ public static Sprite BrokenShieldPortrait(this CardInfo card) return card.GetAltPortraits().BrokenShieldPortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait emission used when a card's shield breaks if it exists. + /// Retrieves the Sprite for the CardInfo's portrait emission used when a card's shield breaks if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the broken shield portrait emission or null if it doesn't exist. /// /// Broken shield portraits are added through the API; they are not a vanilla feature. @@ -413,9 +413,9 @@ public static Sprite EmissiveBrokenShieldPortrait(this CardInfo card) return card.GetAltPortraits().BrokenShieldPortrait.GetEmissionSprite(); } /// - /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when a card's shield breaks if it exists. + /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when a card's shield breaks if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the pixel broken shield portrait or null if it doesn't exist. /// /// Pixel broken shield portraits are added through the API; they are not a vanilla feature. @@ -425,9 +425,9 @@ public static Sprite PixelBrokenShieldPortrait(this CardInfo card) return card.GetAltPortraits().PixelBrokenShieldPortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait used when a card on the board can be sacrificed if it exists. + /// Retrieves the Sprite for the CardInfo's portrait used when a card on the board can be sacrificed if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the sacrificable portrait or null if it doesn't exist. /// /// Sacrificable portraits are added through the API; they are not a vanilla feature. @@ -437,9 +437,9 @@ public static Sprite SacrificablePortrait(this CardInfo card) return card.GetAltPortraits().SacrificablePortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait emission used when a card on the board can be sacrificed if it exists. + /// Retrieves the Sprite for the CardInfo's portrait emission used when a card on the board can be sacrificed if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the sacrificable portrait emission or null if it doesn't exist. /// /// Sacrificable portraits are added through the API; they are not a vanilla feature. @@ -449,9 +449,9 @@ public static Sprite EmissiveSacrificablePortrait(this CardInfo card) return card.GetAltPortraits().SacrificablePortrait.GetEmissionSprite(); } /// - /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when a card on the board can be sacrificed if it exists. + /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when a card on the board can be sacrificed if it exists. /// - /// The CardInfo whose portrait we're retrieving. + /// The CardInfo whose portrait we're retrieving. /// The Sprite for the pixel sacrificable portrait or null if it doesn't exist. /// /// Pixel sacrificable portraits are added through the API; they are not a vanilla feature. @@ -611,8 +611,8 @@ private static IEnumerable Transpiler(IEnumerable /// Adds a null check when calling GetCardByName. If the returned CardInfo is null, outputs a console log error. /// - /// The CardInfo being returned by GetCardByName. - /// The internal name of the CardInfo attempting to be retrieved. + /// The CardInfo being returned by GetCardByName. + /// The internal name of the CardInfo attempting to be retrieved. /// The return value of GetCardByName. public static CardInfo LogCardInfo(CardInfo info, string cardInfoName) { diff --git a/InscryptionAPI/Card/CostProperties.cs b/InscryptionAPI/Card/CostProperties.cs index ac1b5d2d..69b4a6cc 100644 --- a/InscryptionAPI/Card/CostProperties.cs +++ b/InscryptionAPI/Card/CostProperties.cs @@ -152,7 +152,7 @@ public static List ImprovedGemsCost(CardInfo instance) /// Determines whether or not Gemified should reduce the blood cost on a multicost card. /// /// The gemified PlayableCard we're checking. - /// The PlayableCard's blood cost. Defaults to using the CardInfo's blood cost if null. + /// The PlayableCard's blood cost. Defaults to using the CardInfo's blood cost if null. /// True if Gemified should reduce the blood cost by 1. /// /// Used for multicost cards to determine which cost Gemified should affect. @@ -166,7 +166,7 @@ public static bool ReduceGemifiedBlood(PlayableCard card, int? bloodCost = null) /// Determines whether or not Gemified should reduce the gems cost on a multicost card. /// /// The gemified PlayableCard we're checking. - /// The PlayableCard's gems cost. Defaults to using the CardInfo's gems cost if null. + /// The PlayableCard's gems cost. Defaults to using the CardInfo's gems cost if null. /// True if Gemified should reduce the gems cost by 1. /// /// Used for multicost cards to determine which cost Gemified should affect. @@ -180,7 +180,7 @@ public static bool ReduceGemifiedMox(PlayableCard card, List gemsCost = /// Determines whether or not Gemified should reduce the bone cost on a multicost card. /// /// The gemified PlayableCard we're checking. - /// The PlayableCard's bone cost. Defaults to using the CardInfo's bone cost if null. + /// The PlayableCard's bone cost. Defaults to using the CardInfo's bone cost if null. /// True if Gemified should reduce the bone cost by 1. /// /// Used for multicost cards to determine which cost Gemified should affect. @@ -194,7 +194,7 @@ public static bool ReduceGemifiedBones(PlayableCard card, int? bonesCost = null) /// Determines whether or not Gemified should reduce the energy cost on a multicost card. /// /// The gemified PlayableCard we're checking. - /// The PlayableCard's energy cost. Defaults to using the CardInfo's energy cost if null. + /// The PlayableCard's energy cost. Defaults to using the CardInfo's energy cost if null. /// True if Gemified should reduce the energy cost by 1. /// /// Used for multicost cards to determine which cost Gemified should affect. @@ -264,7 +264,7 @@ private static bool DisableVanillaEnergyCost(PlayableCard __instance, ref int __ //private static void GetCardInfoReferences(PlayableCard __instance) { // // if this is a new PlayableCard being associated with the given CardInfo - // // returns true if the CardInfo is in the table + // // returns true if the CardInfo is in the table // if (CostProperties.CardInfoToPlayableCardReferences.TryGetValue(__instance.Info, out List> connectedCards)) { // PlayableCard card = null; // for (int i = connectedCards.Count - 1; i >= 0; i--) { @@ -302,7 +302,7 @@ private static void Postfix(PlayableCard __instance) refreshCostDisplay.playableCard = __instance; // if this is a new PlayableCard being associated with the given CardInfo - // returns true if the CardInfo is in the table + // returns true if the CardInfo is in the table if (CostProperties.CardInfoToCard.TryGetValue(__instance.Info, out List> cardList)) { PlayableCard card = null; for (int i = cardList.Count - 1; i >= 0; i--) { diff --git a/InscryptionAPI/Card/SpecialStatIconManager.cs b/InscryptionAPI/Card/SpecialStatIconManager.cs index 67353e69..6b7a31ac 100644 --- a/InscryptionAPI/Card/SpecialStatIconManager.cs +++ b/InscryptionAPI/Card/SpecialStatIconManager.cs @@ -57,7 +57,7 @@ public class FullStatIcon public Dictionary RulebookDescriptionRedirects = new(); /// - /// Creates a new instance of FullStatIcon and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Creates a new instance of FullStatIcon and registers its behaviour type with the . /// /// The unique ID for this stat icon. /// The unique ID for this stat icon's associated special ability. diff --git a/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs b/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs index 5d67091c..e7c7c64e 100644 --- a/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs +++ b/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs @@ -32,7 +32,7 @@ public class FullSpecialTriggeredAbility public readonly Type AbilityBehaviour; /// - /// Creates a new instance of FullSpecialTriggeredAbility and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Creates a new instance of FullSpecialTriggeredAbility and registers its behaviour type with the . /// /// The unique ID for this special ability. /// A subclass of SpecialCardBehaviour that implements the logic for the ability. @@ -43,7 +43,7 @@ public FullSpecialTriggeredAbility(SpecialTriggeredAbility id, Type abilityBehav } /// - /// Creates a new instance of FullSpecialTriggeredAbility and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Creates a new instance of FullSpecialTriggeredAbility and registers its behaviour type with the . /// /// The GUID of the mod that added this. /// The name of this special ability. diff --git a/InscryptionAPI/Costs/CardCostManager.cs b/InscryptionAPI/Costs/CardCostManager.cs index 5beab146..fbab5b02 100644 --- a/InscryptionAPI/Costs/CardCostManager.cs +++ b/InscryptionAPI/Costs/CardCostManager.cs @@ -54,7 +54,7 @@ public class FullCardCost /// /// Retrieves the correct texture corresponding to CardInfo's cost. Used in the 3D Acts (Act 1, Act 3, etc.). /// Parameters: - /// int: how much of the custom cost the CardInfo/PlayableCard needs to be played. + /// int: how much of the custom cost the CardInfo/PlayableCard needs to be played. /// CardInfo: the base CardInfo of the current card. /// PlayableCard: the PlayableCard possessing the base CardInfo. Can be null. /// Returns: @@ -64,7 +64,7 @@ public class FullCardCost /// /// Retrieves the correct texture corresponding to CardInfo's cost. Used in Act 2. /// Parameters: - /// int: how much of the custom cost the CardInfo/PlayableCard needs to be played. + /// int: how much of the custom cost the CardInfo/PlayableCard needs to be played. /// CardInfo: the base CardInfo of the current card. /// PlayableCard: the PlayableCard possessing the base CardInfo. Can be null. /// Returns: @@ -119,8 +119,8 @@ public Texture2D CostTexture(int amount, CardInfo cardInfo, PlayableCard playabl return GetCostTexture(amount, cardInfo, playableCard); } - /// The cost value of the CardInfo being checked. - /// The CardInfo being checked. + /// The cost value of the CardInfo being checked. + /// The CardInfo being checked. /// The PlayableCard associated with the card. Can be null. /// The texture for this cost based on the amount. Used in Act 2. public Texture2D PixelCostTexture(int amount, CardInfo cardInfo, PlayableCard playableCard) @@ -139,8 +139,8 @@ public int CostTier(int amount) return GetCostTier(amount); } - /// The cost value of the CardInfo being checked. - /// The CardInfo being checked. + /// The cost value of the CardInfo being checked. + /// The CardInfo being checked. /// The list of other cards in the player's hand. /// Whether or not the provided card can be played by turn 2. public bool CanBePlayedByTurn2WithHand(int amount, CardInfo card, List hand) @@ -152,7 +152,7 @@ public bool CanBePlayedByTurn2WithHand(int amount, CardInfo card, List } /// - /// Creates a new instance of FullCardCost and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Creates a new instance of FullCardCost and registers its behaviour type with the . /// /// The GUID of the mod that added this. /// The unique id/name for this cost. @@ -189,7 +189,7 @@ public FullCardCost(string modGUID, string costName, Type costBehaviour, } /// - /// Creates a new instance of FullCardCost and registers its behaviour type with the [TypeManager](InscryptionAPI.Guid.TypeManager). + /// Creates a new instance of FullCardCost and registers its behaviour type with the . /// Simplified version of the full constructor. /// /// The GUID of the mod that added this. @@ -806,7 +806,7 @@ private static IEnumerator CustomCostChoiceChosen(IEnumerator enumerator, CardSi /// For use in the Act 1 card cost choice node. /// /// The random seed for the current run. - /// The CardInfo of a valid Energy card, or null if none exists. + /// The CardInfo of a valid Energy card, or null if none exists. public static CardInfo GetRandomChoosableEnergyCard(int randomSeed) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature).FindAll(x => x.energyCost > 0); @@ -818,7 +818,7 @@ public static CardInfo GetRandomChoosableEnergyCard(int randomSeed) /// /// The random seed for the current run. /// The gem colour valid cards must have to be valid. - /// The CardInfo of a valid Gems card, or null if none exists. + /// The CardInfo of a valid Gems card, or null if none exists. public static CardInfo GetRandomChoosableMoxCard(int randomSeed, GemType gem) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature).FindAll(x => x.gemsCost.Count > 0 && x.gemsCost.Contains(gem)); @@ -831,7 +831,7 @@ public static CardInfo GetRandomChoosableMoxCard(int randomSeed, GemType gem) /// /// The random seed for the current run. /// The List of custom costs to check for a random card for. - /// The CardInfo of a valid custom cost card, or null if none exists. + /// The CardInfo of a valid custom cost card, or null if none exists. public static CardInfo GetRandomChoosableCustomCostCard(int randomSeed, List customCosts) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature) @@ -849,7 +849,7 @@ public static CardInfo GetRandomChoosableCustomCostCard(int randomSeed, ListThe random seed for the current run. /// The custom cost valid cards will have. /// The collection of cost amounts to search for. - /// The CardInfo of a valid card, or null if none exists. + /// The CardInfo of a valid card, or null if none exists. public static CardInfo GetRandomChoosableCustomCostCardWithAmounts(int randomSeed, FullCardCost customCost, params int[] costAmounts) { List list = CardLoader.GetUnlockedCards(CardMetaCategory.ChoiceNode, CardTemple.Nature) diff --git a/InscryptionAPI/Helpers/Extensions/CardSlotExtensions.cs b/InscryptionAPI/Helpers/Extensions/CardSlotExtensions.cs index 832fb8ba..98621e1d 100644 --- a/InscryptionAPI/Helpers/Extensions/CardSlotExtensions.cs +++ b/InscryptionAPI/Helpers/Extensions/CardSlotExtensions.cs @@ -1,4 +1,4 @@ -using DiskCardGame; +using DiskCardGame; using System.Collections; namespace InscryptionAPI.Helpers.Extensions; @@ -34,7 +34,7 @@ public static bool HasCard(this CardSlot cardSlot, string cardName) /// Create a card in a specific slot from the CardSlot object. A much more robust way that's the same as `yield return BoardManager.Instance.CreateCardInSlot()`. /// /// The slot to spawn in. - /// The CardInfo object to spawn in said slot. + /// The CardInfo object to spawn in said slot. /// Time to transition the card to the slot. The longer the time, the longer it will take to be placed at the slot. /// Whether or not to activate these triggers, in order: cards on board OtherCardAssignedToSlot, this card ResolveOnBoard, cards on board OtherCardResolve. /// The enumeration of the card being placed in the slot. diff --git a/InscryptionAPI/Pelts/PeltManager.cs b/InscryptionAPI/Pelts/PeltManager.cs index cc35a9eb..76170d88 100644 --- a/InscryptionAPI/Pelts/PeltManager.cs +++ b/InscryptionAPI/Pelts/PeltManager.cs @@ -124,7 +124,7 @@ private static List CreateBasePelts() /// Creates a new instance of CustomPeltData then adds it to the game. /// /// GUID of the mod adding this pelt. - /// The CardInfo for the actual pelt card. + /// The CardInfo for the actual pelt card. /// The list of possible cards the Trader will offer for this pelt. /// The starting price of this pelt when buying from the Trapper. /// The number of extra sigils card choices will have when trading this pelt to the Trader. From a79384b52ce330e08db5ff7cd98c8c3df73db068 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 11:45:14 -0800 Subject: [PATCH 29/42] Add missing XML, cref tags --- InscryptionAPI/Card/AbilityExtensions.cs | 133 ++++++++++++++++------- 1 file changed, 91 insertions(+), 42 deletions(-) diff --git a/InscryptionAPI/Card/AbilityExtensions.cs b/InscryptionAPI/Card/AbilityExtensions.cs index ceae0413..9de75cb4 100644 --- a/InscryptionAPI/Card/AbilityExtensions.cs +++ b/InscryptionAPI/Card/AbilityExtensions.cs @@ -251,22 +251,44 @@ public static FullAbility SetPowerlevel(this FullAbility fullAbility, int powerL fullAbility.Info.powerLevel = powerLevel; return fullAbility; } - + /// + /// Sets the rulebook description for this ability. + /// + /// The to access. + /// The ability's rulebook name. + /// The same so a chain can continue. public static AbilityInfo SetRulebookDescription(this AbilityInfo abilityInfo, string description) { abilityInfo.rulebookDescription = description; return abilityInfo; } + /// + /// Sets the rulebook description for this ability. + /// + /// The to access. + /// The ability's rulebook name. + /// The same so a chain can continue. public static FullAbility SetRulebookDescription(this FullAbility fullAbility, string description) { fullAbility.Info.rulebookDescription = description; return fullAbility; } - + /// + /// Sets the rulebook name for this ability. + /// + /// The to access. + /// The ability's rulebook name. + /// The same so a chain can continue. public static AbilityInfo SetRulebookName(this AbilityInfo abilityInfo, string name) { abilityInfo.rulebookName = name; return abilityInfo; } + /// + /// Sets the rulebook name for this ability. + /// + /// The to access. + /// The ability's rulebook name. + /// The same so a chain can continue. public static FullAbility SetRulebookName(this FullAbility fullAbility, string name) { fullAbility.Info.rulebookName = name; return fullAbility; @@ -498,18 +520,38 @@ public static AbilityInfo ResetDescription(this AbilityInfo abilityInfo) return abilityInfo; } + /// + /// Marks the given ability as appearing in the rulebook during Act 1. + /// + /// The to access. + /// The same so a chain can continue. public static FullAbility SetPart1Rulebook(this FullAbility full) { full.Info.AddMetaCategories(AbilityMetaCategory.Part1Rulebook); return full; } + /// + /// Marks the given ability as appearing in the rulebook during Act 3. + /// + /// The to access. + /// The same so a chain can continue. public static FullAbility SetPart3Rulebook(this FullAbility full) { full.Info.AddMetaCategories(AbilityMetaCategory.Part3Rulebook); return full; } + /// + /// Marks the given ability as appearing in the rulebook during Grimora's act. + /// + /// The to access. + /// The same so a chain can continue. public static FullAbility SetGrimoraRulebook(this FullAbility full) { full.Info.AddMetaCategories(AbilityMetaCategory.GrimoraRulebook); return full; } + /// + /// Marks the given ability as appearing in the rulebook during Magnificus's act. + /// + /// The to access. + /// The same so a chain can continue. public static FullAbility SetMagnificusRulebook(this FullAbility full) { full.Info.AddMetaCategories(AbilityMetaCategory.MagnificusRulebook); return full; @@ -545,10 +587,10 @@ public static bool HasMetaCategory(this AbilityInfo info, AbilityMetaCategory ca /// /// Sets the icon that will be displayed for this stat icon when the card is in the player's hand. /// - /// The instance of StatIconInfo. + /// The instance of . /// A 49x49 texture containing the icon. /// The filter mode for the icon texture. Leave this at its default value unless you have a specific reason to change it. - /// The same StatIconInfo so a chain can continue. + /// The same so a chain can continue. public static StatIconInfo SetIcon(this StatIconInfo info, Texture2D icon, FilterMode? filterMode = null) { info.iconGraphic = icon; if (filterMode.HasValue) @@ -559,10 +601,10 @@ public static StatIconInfo SetIcon(this StatIconInfo info, Texture2D icon, Filte /// /// Sets the icon that will be displayed for this stat icon when the card is in the player's hand. /// - /// The instance of StatIconInfo. + /// The instance of . /// The path to a 49x49 texture containing the icon on disk. /// The filter mode for the icon texture. Leave this at its default value unless you have a specific reason to change it. - /// The same StatIconInfo so a chain can continue. + /// The same so a chain can continue. public static StatIconInfo SetIcon(this StatIconInfo info, string pathToArt, FilterMode? filterMode = null) { info.iconGraphic = TextureHelper.GetImageAsTexture(pathToArt); if (filterMode.HasValue) @@ -571,24 +613,24 @@ public static StatIconInfo SetIcon(this StatIconInfo info, string pathToArt, Fil } /// - /// Set the StatIconInfo's rulebookName and rulebookDescription. Does not make the stat icon appear in the Rulebook. + /// Set the stat icon's rulebook name and description. Does not make the stat icon appear in the Rulebook. /// - /// - /// - /// - /// The same StatIconInfo so a chain can continue. + /// The instance of + /// The stat icon's rulebook name. + /// The stat icon's rulebook description. + /// The same so a chain can continue. public static StatIconInfo SetRulebookInfo(this StatIconInfo info, string rulebookName, string rulebookDescription = null) { info.rulebookName = rulebookName; info.rulebookDescription = rulebookDescription; return info; } /// - /// Sets the StatIconInfo's appliesToAttack and appliesToHealth fields. Note these fields don't make the stat icon affect the stat; you still need to implement that logic. + /// Sets the stat icon's appliesToAttack and appliesToHealth fields. Note these fields don't make the stat icon affect the stat; you still need to implement that logic. /// - /// + /// The instance of /// If the stat icon should cover a card's Power. /// If the stat icon should cover a card's Health. - /// The same StatIconInfo so a chain can continue. + /// The same so a chain can continue. public static StatIconInfo SetAppliesToStats(this StatIconInfo info, bool appliesToAttack, bool appliesToHealth) { info.appliesToAttack = appliesToAttack; info.appliesToHealth = appliesToHealth; @@ -598,14 +640,21 @@ public static StatIconInfo SetAppliesToStats(this StatIconInfo info, bool applie /// /// Sets the icon that will be displayed for this stat icon when the card is in the player's hand in Act 2. /// - /// The instance of StatIconInfo. - /// A 16x8 texture containing the icon . + /// The instance of . + /// A 16x8 texture containing the icon. /// The filter mode for the icon texture. Leave this at its default value unless you have a specific reason to change it. - /// The same StatIconInfo so a chain can continue. + /// The same so a chain can continue. public static StatIconInfo SetPixelIcon(this StatIconInfo info, Texture2D icon, FilterMode? filterMode = null) { info.pixelIconGraphic = TextureHelper.ConvertTexture(icon, TextureHelper.SpriteType.PixelStatIcon, filterMode ?? FilterMode.Point); return info; } + /// + /// Sets the icon that will be displayed for this stat icon when the card is in the player's hand in Act 2. + /// + /// The instance of . + /// The file path to the 16x8 texture file containing the icon. + /// The filter mode for the icon texture. Leave this at its default value unless you have a specific reason to change it. + /// The same so a chain can continue. public static StatIconInfo SetPixelIcon(this StatIconInfo info, string pathToArt, FilterMode? filterMode = null) { Texture2D tex = TextureHelper.GetImageAsTexture(pathToArt, filterMode ?? FilterMode.Point); info.pixelIconGraphic = TextureHelper.ConvertTexture(tex, TextureHelper.SpriteType.PixelStatIcon); @@ -615,9 +664,9 @@ public static StatIconInfo SetPixelIcon(this StatIconInfo info, string pathToArt /// /// Adds one or more metacategories to the stati icon. Duplicate categories will not be added. /// - /// The instance of StatIconInfo. + /// The instance of . /// The metacategories to add. - /// The same StatIconInfo so a chain can continue. + /// The same so a chain can continue. public static StatIconInfo AddMetaCategories(this StatIconInfo info, params AbilityMetaCategory[] categories) { info.metaCategories ??= new(); foreach (var app in categories) @@ -627,19 +676,19 @@ public static StatIconInfo AddMetaCategories(this StatIconInfo info, params Abil } /// - /// Helper method: automatically adds the Part1Rulebook metacategories to the stat icon. + /// Helper method: automatically adds the Part1Rulebook metacategory to the stat icon. /// - /// The instance of StatIconInfo. + /// The instance of . /// The same stati icon so a chain can continue. public static StatIconInfo SetDefaultPart1Ability(this StatIconInfo info) { return info.AddMetaCategories(AbilityMetaCategory.Part1Rulebook); } /// - /// Helper method: automatically adds the Part3Rulebook metacategories to the stat icon. + /// Helper method: automatically adds the Part3Rulebook metacategory to the stat icon. /// - /// The instance of StatIconInfo. - /// The same StatIconInfo so a chain can continue. + /// The instance of . + /// The same so a chain can continue. public static StatIconInfo SetDefaultPart3Ability(this StatIconInfo info) { return info.AddMetaCategories(AbilityMetaCategory.Part3Rulebook); } @@ -660,20 +709,20 @@ public static AbilityInfo SetTriggersOncePerStack(this AbilityInfo abilityInfo, } /// - /// Gets the value of TriggersOncePerStack. Returns false if TriggersOncePerStack has not been set. + /// Gets the value of TriggersOncePerStack. Returns false if TriggersOncePerStack has not been set. /// - /// Ability to access. - /// Whether double triggering is disabled. + /// Ability to access. + /// True if double triggering is enabled. False otherwise. public static bool GetTriggersOncePerStack(this Ability ability) { AbilityInfo abilityInfo = AllAbilityInfos.AbilityByID(ability); return abilityInfo.GetTriggersOncePerStack(); } /// - /// Gets the value of TriggersOncePerStack. Returns false if TriggersOncePerStack has not been set. + /// Gets the value of TriggersOncePerStack. Returns false if TriggersOncePerStack has not been set. /// /// The instance of . - /// Whether double triggering is disabled. + /// True if double triggering is enabled. False otherwise. public static bool GetTriggersOncePerStack(this AbilityInfo abilityInfo) { return abilityInfo.GetExtendedPropertyAsBool("TriggersOncePerStack") ?? false; @@ -695,19 +744,19 @@ public static AbilityInfo SetHideSingleStacks(this AbilityInfo abilityInfo, bool } /// - /// Gets the value of HideSingleStacks. Returns false if HideSingleStacks has not been set. + /// Gets the value of HideSingleStacks. Returns false if HideSingleStacks has not been set. /// - /// Ability to access. - /// Whether single stacks of this ability will be hidden when added to hiddenAbilities. + /// Ability to access. + /// Whether single stacks of this ability will be hidden when added to hiddenAbilities. public static bool GetHideSingleStacks(this Ability ability) { return AllAbilityInfos.AbilityByID(ability).GetHideSingleStacks(); } /// - /// Gets the value of HideSingleStacks. Returns false if HideSingleStacks has not been set. + /// Gets the value of HideSingleStacks. Returns false if HideSingleStacks has not been set. /// /// The instance of . - /// Whether single stacks of this ability will be hidden when added to hiddenAbilities. + /// Whether single stacks of this ability will be hidden when added to hiddenAbilities. public static bool GetHideSingleStacks(this AbilityInfo abilityInfo) { return abilityInfo.GetExtendedPropertyAsBool("HideSingleStacks") ?? false; @@ -717,9 +766,9 @@ public static bool GetHideSingleStacks(this AbilityInfo abilityInfo) #region ExtendedProperties /// - /// Adds a custom property value to the AbilityInfo. + /// Adds a custom property value to the . /// - /// Ability to access. + /// to access. /// The name of the property to set. /// The value of the property. /// The same so a chain can continue. @@ -729,9 +778,9 @@ public static AbilityInfo SetExtendedProperty(this AbilityInfo info, string prop return info; } /// - /// Adds a custom property value to the FullAbility's AbilityInfo - intended as a shorthand for when modders are first adding abilities to the game. + /// Adds a custom property value to the 's info field - intended as a shorthand for when modders are first adding abilities to the game. /// - /// FullAbility object to access. + /// object to access. /// The name of the property to set. /// The value of the property. /// The same so a chain can continue. @@ -755,7 +804,7 @@ public static string GetExtendedProperty(this Ability ability, string propertyNa /// /// Gets a custom property value from the card. /// - /// Ability to access. + /// to access. /// The name of the property to get the value of. /// The retrieved property if it exists. public static string GetExtendedProperty(this AbilityInfo info, string propertyName) @@ -778,7 +827,7 @@ public static string GetExtendedProperty(this AbilityInfo info, string propertyN /// /// Gets a custom property as an int (can by null) /// - /// Ability to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as an int or null if it didn't exist or couldn't be parsed as int. public static int? GetExtendedPropertyAsInt(this AbilityInfo info, string propertyName) @@ -801,7 +850,7 @@ public static string GetExtendedProperty(this AbilityInfo info, string propertyN /// /// Gets a custom property as a float (can by null) /// - /// Ability to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as a float or null if it didn't exist or couldn't be parsed as float. public static float? GetExtendedPropertyAsFloat(this AbilityInfo info, string propertyName) @@ -824,7 +873,7 @@ public static string GetExtendedProperty(this AbilityInfo info, string propertyN /// /// Gets a custom property as a boolean (can be null) /// - /// Ability to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as a boolean or null if it didn't exist or couldn't be parsed as boolean. public static bool? GetExtendedPropertyAsBool(this AbilityInfo info, string propertyName) From 38ee55c5f51affd7c207ccc3b1a0890bf2216790 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 11:50:55 -0800 Subject: [PATCH 30/42] Add cref tags --- InscryptionAPI/Card/AbilityManager.cs | 56 ++++++++++++++------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index 1cc277d3..a090bd16 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -49,7 +49,7 @@ public class FullAbility public readonly AbilityInfo Info; /// - /// A subclass of AbilityBehaviour that implements the logic for the ability + /// A subclass of that implements the logic for the ability /// public readonly Type AbilityBehavior; @@ -83,11 +83,11 @@ public class FullAbility // [TypeManager](InscryptionAPI.Guid.TypeManager) /// - /// Creates a new instance of FullAbility and registers its behaviour type with the . + /// Creates a new instance of and registers its behaviour type with the . /// /// The unique ID for this ability. /// The description object for this ability. - /// A subclass of AbilityBehaviour that implements the logic for the ability. + /// A subclass of that implements the logic for the ability. /// A 49x49 texture for the ability icon. [Obsolete("Use the constructor that takes a modGUID parameter instead")] public FullAbility(Ability id, AbilityInfo info, Type behaviour, Texture texture) : this("", id, info, behaviour, texture) @@ -95,12 +95,12 @@ public FullAbility(Ability id, AbilityInfo info, Type behaviour, Texture texture } /// - /// Creates a new instance of FullAbility and registers its behaviour type with the . + /// Creates a new instance of and registers its behaviour type with the . /// /// The GUID of the mod that added this. /// The unique ID for this ability. /// The description object for this ability. - /// A subclass of AbilityBehaviour that implements the logic for the ability. + /// A subclass of that implements the logic for the ability. /// A 49x49 texture for the ability icon. public FullAbility(string modGUID, Ability id, AbilityInfo info, Type behaviour, Texture texture) { @@ -116,7 +116,7 @@ public FullAbility(string modGUID, Ability id, AbilityInfo info, Type behaviour, } /// - /// Makes a deep copy of the current FullAbility object + /// Makes a deep copy of the current object /// public FullAbility Clone() { @@ -166,10 +166,11 @@ public FullAbility Clone() public static List AllAbilities { get; private set; } = BaseGameAbilities.ToList(); /// - /// The current processed list of all AbilityInfos in the game, including vanilla and mod-added abilities. + /// The current processed list of all objects in the game, including vanilla and mod-added abilities. /// public static List AllAbilityInfos { get; private set; } = BaseGameAbilities.Select(x => x.Info).ToList(); + // [SyncAbilityList](xref:InscryptionAPI.AbilityManager.SyncAbilityList) /// /// A hook for modders to add custom code to modify the ability list dynamically. /// @@ -180,20 +181,20 @@ public FullAbility Clone() /// /// The way this operates is as follows: /// - /// 1. The AbilityManager makes a copy of all FullAbility objects. Note that unlike the similar code in CardManager, this is actually a *deep* copy of the AbilityInfo. - /// 2. The code in ModifyAbiltyList is executed on the copy of those abilities. + /// 1. The makes a copy of all objects. Note that unlike the similar code in CardManager, this is actually a *deep* copy of the AbilityInfo. + /// 2. The code in is executed on the copy of those abilities. /// 3. The modified list becomes the game's new official list of abilities. /// /// The reason the abilities are cloned before processing is so that you can make any change to them you wish /// without affecting the original ability. This means that you do not need to try to track changes or remember - /// what the original version of the ability looked like before you started changing it; the next time - /// [SyncAbilityList](xref:InscryptionAPI.AbilityManager.SyncAbilityList) is called, all changes will be reverted + /// what the original version of the ability looked like before you started changing it; the next time + /// is called, all changes will be reverted /// and then re-applied. /// /// To use this, you need to add a delegate that accepts the current list of all abilities, then returns /// that same list back. /// - /// ```c# + /// ```c# /// AbilityManager.ModifyAbilityList += delegate(List<FullAbility> abilities) /// { /// // Add the rulebook metacategories to every single ability @@ -201,18 +202,19 @@ public FullAbility Clone() /// ability.info.AddMetaCategories(AbilityMetaCategory.Part1Rulebook, AbilityMetaCategory.Part3Rulebook); /// return abilities; /// } - /// ``` + /// ``` /// public static event Func, List> ModifyAbilityList; /// - /// Custom AbilityMetaCategory enum for marking an ability as modular in Part 2. + /// Custom AbilityMetaCategory enum for marking an ability as modular in Part 2. /// public static AbilityMetaCategory Part2Modular => GuidManager.GetEnumValue(InscryptionAPIPlugin.ModGUID, "Part2Modular"); + // [ModifyAbilityList](xref:InscryptionAPI.AbilityManager.ModifyAbilityList) /// /// Resynchronizes the ablity list. /// - /// Most importantly, this re-executes all custom code that was added to the [ModifyAbilityList](xref:InscryptionAPI.AbilityManager.ModifyAbilityList) + /// Most importantly, this re-executes all custom code that was added to the /// event. If you are doing any sort of context-aware processing of the ability list, you may need to manually /// call this method in order to make sure that your code executes correctly. However, this automatically gets called /// every time that the game transitions from either the main menu into the base game, or whenever a new run is @@ -289,12 +291,12 @@ private static List GenBaseGameAbilityList() /// Creates a new ability and registers it to be able to be added to cards /// /// The guid of the mod adding the ability. - /// An instance of AbilityInfo describing the ability. - /// A subclass of AbilityBehaviour that implements the logic for the ability. + /// An instance of describing the ability. + /// A subclass of that implements the logic for the ability. /// The ability icon as a 49x49 texture. - /// An instance of FullAbility containing all this ability's data.. + /// An instance of containing all this ability's data.. /// The actual unique identifier for the new ability will be found in the 'ability' field of - /// the returned AbilityInfo object. There is no way for the modder to create a specific ability ID; it will + /// the returned object. There is no way for the modder to create a specific ability ID; it will /// always be assigned by the API. /// /// **NOTE**: Even if you manually create an Ability identifier for your ability and attach it to the AbilityInfo @@ -316,11 +318,11 @@ public static FullAbility Add(string guid, AbilityInfo info, Type behavior, Text /// The guid of the mod adding the ability. /// The name of the ability. /// The description as it appears in the game's rulebook. - /// A subclass of AbilityBehaviour that implements the logic for the ability. + /// A subclass of that implements the logic for the ability. /// Path to the ability texture on disk. - /// An instance of AbilityInfo describing the new ability. + /// An instance of describing the new ability. /// The actual unique identifier for the new ability will be found in the 'ability' field of - /// the returned AbilityInfo object. There is no way for the modder to create a specific ability ID; it will + /// the returned object. There is no way for the modder to create a specific ability ID; it will /// always be assigned by the API. public static AbilityInfo New(string guid, string rulebookName, string rulebookDescription, Type behavior, string pathToArt) { @@ -333,11 +335,11 @@ public static AbilityInfo New(string guid, string rulebookName, string rulebookD /// The guid of the mod adding the ability. /// The name of the ability. /// The description as it appears in the game's rulebook. - /// A subclass of AbilityBehaviour that implements the logic for the ability. + /// A subclass of that implements the logic for the ability. /// The ability icon as a 49x49 texture. - /// An instance of AbilityInfo describing the new ability. + /// An instance of describing the new ability. /// The actual unique identifier for the new ability will be found in the 'ability' field of - /// the returned AbilityInfo object. There is no way for the modder to create a specific ability ID; it will + /// the returned object. There is no way for the modder to create a specific ability ID; it will /// always be assigned by the API. public static AbilityInfo New(string guid, string rulebookName, string rulebookDescription, Type behavior, Texture tex) { @@ -355,7 +357,7 @@ public static AbilityInfo New(string guid, string rulebookName, string rulebookD public static void Remove(Ability id) => NewAbilities.Remove(NewAbilities.FirstOrDefault(x => x.Id == id)); /// - /// Removes an ability from the game based on its FullAbility. Can only remove mod-added abilities, not vanilla abilities. + /// Removes an ability from the game based on its . Can only remove mod-added abilities, not vanilla abilities. /// /// The instance of the ability to remove. public static void Remove(FullAbility ability) => NewAbilities.Remove(ability); @@ -367,7 +369,7 @@ internal static Dictionary GetAbilityExtensionTable(this Ability #region LoadAbilityIcon /// - /// Reverse patch that provides access to the original, unmodified LoadAbilityIcon method. + /// Reverse patch that provides access to the original, unmodified method. /// [HarmonyReversePatch(HarmonyReversePatchType.Original)] [HarmonyPatch(typeof(AbilitiesUtil), nameof(AbilitiesUtil.LoadAbilityIcon))] From 65fbf9863003e225a0706681fd7193b790c0fc30 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 12:23:47 -0800 Subject: [PATCH 31/42] Add cref tags --- .../Card/CardAppearanceBehaviourManager.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs b/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs index 506a58e9..fb967535 100644 --- a/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs +++ b/InscryptionAPI/Card/CardAppearanceBehaviourManager.cs @@ -6,7 +6,7 @@ namespace InscryptionAPI.Card; /// -/// Class for managing custom CardAppearanceBehaviours. +/// Class for managing custom s. /// public static class CardAppearanceBehaviourManager { /// @@ -24,10 +24,10 @@ public class FullCardAppearanceBehaviour /// public readonly Type AppearanceBehaviour; /// - /// Creates a new instance of FullCardAppearanceBehaviour and registers its behaviour type with the . + /// Creates a new instance of and registers its behaviour type with the . /// /// Appearance enum id. - /// Type of the custom CardAppearanceBehaviour class. + /// Type of the custom class. public FullCardAppearanceBehaviour(CardAppearanceBehaviour.Appearance id, Type appearanceBehaviour) { Id = id; @@ -38,13 +38,13 @@ public FullCardAppearanceBehaviour(CardAppearanceBehaviour.Appearance id, Type a } /// - /// A collection of all CardAppearanceBehaviours from the base game. + /// A collection of all s from the base game. /// public readonly static ReadOnlyCollection BaseGameAppearances = new(GenBaseGameAppearanceList()); private readonly static ObservableCollection NewAppearances = new(); /// - /// All of CardAppearanceBehaviours, including vanilla and custom. + /// All of s, including vanilla and custom. /// public static List AllAppearances { get; private set; } = BaseGameAppearances.ToList(); @@ -68,12 +68,12 @@ private static List GenBaseGameAppearanceList() return baseGame; } /// - /// Registers a custom CardAppearanceBehaviour with the API. + /// Registers a custom with the API. /// /// The GUID of the mod adding the behaviour. /// The internal name identifier for the behaviour. - /// The Type of the custom CardAppearanceBehaviour class. - /// A FullCardAppearanceBehaviour object containing all the custom CardAppearanceBehaviour's data. + /// The Type of the custom class. + /// A object containing all the custom 's data. public static FullCardAppearanceBehaviour Add(string guid, string abilityName, Type behavior) { FullCardAppearanceBehaviour full = new(GuidManager.GetEnumValue(guid, abilityName), behavior); @@ -82,13 +82,13 @@ public static FullCardAppearanceBehaviour Add(string guid, string abilityName, T } /// - /// Unregisters a CardAppearanceBehaviour from the API. + /// Unregisters a from the API. /// /// The Appearance enum of the behaviour to remove. public static void Remove(CardAppearanceBehaviour.Appearance id) => NewAppearances.Remove(NewAppearances.FirstOrDefault(x => x.Id == id)); /// - /// Unregisters a CardAppearanceBehaviour from the API. + /// Unregisters a from the API. /// - /// The FullCardAppearanceBehaviour object of the behaviour to remove. + /// The object of the behaviour to remove. public static void Remove(FullCardAppearanceBehaviour ability) => NewAppearances.Remove(ability); } From dd870da206edc493a0463fe8f5fdb29a0f6fec04 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 12:32:44 -0800 Subject: [PATCH 32/42] Add cref tags --- InscryptionAPI/Card/CardExtensions.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/InscryptionAPI/Card/CardExtensions.cs b/InscryptionAPI/Card/CardExtensions.cs index 917ccb6b..37486673 100644 --- a/InscryptionAPI/Card/CardExtensions.cs +++ b/InscryptionAPI/Card/CardExtensions.cs @@ -149,9 +149,9 @@ public static CardInfo AddTribes(this CardInfo info, params Tribe[] tribes) /// /// Removes all stacks of any number of abilities from the card. /// - /// Card to access. + /// to access. /// The abilities to remove. - /// The same card info so a chain can continue. + /// The same so a chain can continue. public static CardInfo RemoveAbilities(this CardInfo info, params Ability[] abilities) { if (info.abilities?.Count > 0) @@ -166,9 +166,9 @@ public static CardInfo RemoveAbilities(this CardInfo info, params Ability[] abil /// /// Removes any number of abilities from the card. Will remove one instance of each passed ability; multiple instances can be passed. /// - /// Card to access. + /// to access. /// The abilities to remove. - /// The same card info so a chain can continue. + /// The same so a chain can continue. public static CardInfo RemoveAbilitiesSingle(this CardInfo info, params Ability[] abilities) { if (info.abilities?.Count > 0) @@ -328,9 +328,9 @@ public static CardInfo RemoveMetaCategoriesSingle(this CardInfo info, params Car /// /// Removes any number of traits from the card. /// - /// Card to access. + /// to access. /// The traits to remove. - /// The same card info so a chain can continue. + /// The same so a chain can continue. public static CardInfo RemoveTraits(this CardInfo info, params Trait[] traits) { if (info.traits?.Count > 0) @@ -347,9 +347,9 @@ public static CardInfo RemoveTraits(this CardInfo info, params Trait[] traits) /// /// Removes any number of traits from the card. /// - /// Card to access. + /// to access. /// The tribes to remove. - /// The same card info so a chain can continue. + /// The same so a chain can continue. public static CardInfo RemoveTribes(this CardInfo info, params Tribe[] tribes) { if (info.traits?.Count > 0) @@ -364,11 +364,11 @@ public static CardInfo RemoveTribes(this CardInfo info, params Tribe[] tribes) } /// - /// Removes any number of CardMetaCategories from the card. + /// Removes any number of metaategories from the card. /// - /// Card to access. - /// The CardMetaCategories to remove. - /// The same card info so a chain can continue. + /// to access. + /// The metacategories to remove. + /// The same so a chain can continue. public static CardInfo RemoveCardMetaCategories(this CardInfo info, params CardMetaCategory[] cardMetaCategories) { if (info.metaCategories?.Count > 0) From d46af02e718bc0cda5e6270f171d4f7885cec9a1 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 12:52:44 -0800 Subject: [PATCH 33/42] Add cref tags --- InscryptionAPI/Card/CardExtensionsCosts.cs | 28 +- InscryptionAPI/Card/CardExtensionsHelpers.cs | 350 +++++++++---------- 2 files changed, 189 insertions(+), 189 deletions(-) diff --git a/InscryptionAPI/Card/CardExtensionsCosts.cs b/InscryptionAPI/Card/CardExtensionsCosts.cs index 36ea9330..91d4eae7 100644 --- a/InscryptionAPI/Card/CardExtensionsCosts.cs +++ b/InscryptionAPI/Card/CardExtensionsCosts.cs @@ -5,11 +5,11 @@ namespace InscryptionAPI.Card; public static partial class CardExtensions { /// - /// Gets a PlayableCards using this specific CardInfo. - /// Inscryption often clones CardInfos and sometimes they're reused, meaning there can be more than 1 card using the same CardInfo object. + /// Gets a using this specific . + /// Inscryption often clones s and sometimes they're reused, meaning there can be more than 1 card using the same object. /// - /// CardInfo to check for. - /// The PlayableCard with the specified CardInfo. Checks the board, the player's hand and miscellaneous card displays. + /// to check for. + /// The with the specified . Checks the board, the player's hand and miscellaneous card displays. public static PlayableCard GetPlayableCard(this CardInfo cardInfo) { if (CostProperties.CostProperties.CardInfoToCard.TryGetValue(cardInfo, out List> cardList)) @@ -107,26 +107,26 @@ public static List GemsCost(this PlayableCard card) } /// - /// Checks if the given PlayableCard is gemified in either its CardInfo or TemporaryMods. + /// Checks if the given is gemified in either its or TemporaryMods. /// - /// True if the PlayableCard is gemified. + /// True if this card is gemified. public static bool IsGemified(this PlayableCard card) => card.Info.Gemified || card.TemporaryMods.Exists((CardModificationInfo x) => x.gemify); /// - /// Determines if the given PlayableCard's owner possesses a blue gem. Works for the opponent and player. + /// Determines if the given 's owner possesses a blue gem. Works for the opponent and player. /// public static bool OwnerHasBlueGem(this PlayableCard card) { return card.OpponentCard ? OpponentGemsManager.Instance.HasGem(GemType.Blue) : ResourcesManager.Instance.HasGem(GemType.Blue); } /// - /// Whether or not the given PlayableCard is affected by a blue gem and should have its cost reduced. + /// Whether or not the given is affected by a blue gem and should have its cost reduced. /// public static bool IsUsingBlueGem(this PlayableCard card) => card.IsGemified() && card.OwnerHasBlueGem(); /// /// Determines if this card provides its owner with a blue gem. /// - /// Card to check + /// to check. public static bool ProvidesBlueGem(this PlayableCard card) { return card.HasAbility(Ability.GainGemTriple) || card.HasAbility(Ability.GainGemBlue); @@ -134,7 +134,7 @@ public static bool ProvidesBlueGem(this PlayableCard card) /// /// Determines if this card provides its owner with a green gem. /// - /// Card to check + /// to check. public static bool ProvidesGreenGem(this PlayableCard card) { return card.HasAbility(Ability.GainGemTriple) || card.HasAbility(Ability.GainGemGreen); @@ -142,7 +142,7 @@ public static bool ProvidesGreenGem(this PlayableCard card) /// /// Determines if this card provides its owner with a orange gem. /// - /// Card to check + /// to check. public static bool ProvidesOrangeGem(this PlayableCard card) { return card.HasAbility(Ability.GainGemTriple) || card.HasAbility(Ability.GainGemOrange); @@ -151,7 +151,7 @@ public static bool ProvidesOrangeGem(this PlayableCard card) /// /// Determines if this card provides its owner with a blue gem. /// - /// CardInfo to check + /// to check. public static bool ProvidesBlueGem(this CardInfo card) { return card.HasAbility(Ability.GainGemTriple) || card.HasAbility(Ability.GainGemBlue); @@ -159,7 +159,7 @@ public static bool ProvidesBlueGem(this CardInfo card) /// /// Determines if this card provides its owner with a green gem. /// - /// CardInfo to check + /// to check. public static bool ProvidesGreenGem(this CardInfo card) { return card.HasAbility(Ability.GainGemTriple) || card.HasAbility(Ability.GainGemGreen); @@ -167,7 +167,7 @@ public static bool ProvidesGreenGem(this CardInfo card) /// /// Determines if this card provides its owner with a orange gem. /// - /// CardInfo to check + /// to check. public static bool ProvidesOrangeGem(this CardInfo card) { return card.HasAbility(Ability.GainGemTriple) || card.HasAbility(Ability.GainGemOrange); diff --git a/InscryptionAPI/Card/CardExtensionsHelpers.cs b/InscryptionAPI/Card/CardExtensionsHelpers.cs index 088360d3..00f37ef7 100644 --- a/InscryptionAPI/Card/CardExtensionsHelpers.cs +++ b/InscryptionAPI/Card/CardExtensionsHelpers.cs @@ -8,17 +8,17 @@ public static partial class CardExtensions { #region Ability /// - /// Checks if the CardModificationInfo does not have a specific Ability. + /// Checks if the does not have a specific Ability. /// - /// CardModificationInfo to access. + /// to access. /// The ability to check for. /// Returns true if the ability does not exist. public static bool LacksAbility(this CardModificationInfo mod, Ability ability) => !mod.HasAbility(ability); /// - /// Checks if the CardInfo does not have a specific Ability. + /// Checks if the does not have a specific Ability. /// - /// CardInfo to access. + /// to access. /// The ability to check for. /// Returns true if the ability does not exist. public static bool LacksAbility(this CardInfo cardInfo, Ability ability) @@ -27,11 +27,11 @@ public static bool LacksAbility(this CardInfo cardInfo, Ability ability) } /// - /// Checks if the CardInfo has all of the given Abilities. + /// Checks if the has all of the given Abilities. /// - /// CardInfo to access. + /// to access. /// The Abilities to check for. - /// Returns true if cardInfo has all of the given Abilities. + /// Returns true if this card has all of the given Abilities. public static bool HasAllAbilities(this CardInfo cardInfo, params Ability[] abilities) { foreach (Ability ability in abilities) @@ -43,11 +43,11 @@ public static bool HasAllAbilities(this CardInfo cardInfo, params Ability[] abil } /// - /// Checks if the CardInfo has none of the specified Abilities. + /// Checks if the has none of the specified Abilities. /// - /// CardInfo to access. + /// to access. /// The Abilities to check for. - /// Returns true if cardInfo has none of the given Abilities. + /// Returns true if this card has none of the given Abilities. public static bool LacksAllAbilities(this CardInfo cardInfo, params Ability[] abilities) { foreach (Ability ability in abilities) @@ -59,11 +59,11 @@ public static bool LacksAllAbilities(this CardInfo cardInfo, params Ability[] ab } /// - /// Checks if the CardInfo has any of the specified Abilities. + /// Checks if the has any of the specified Abilities. /// - /// CardInfo to access. + /// to access. /// The Abilities to check for. - /// Returns true if cardInfo has at least one of the given Abilities. + /// Returns true if this card has at least one of the given Abilities. public static bool HasAnyOfAbilities(this CardInfo cardInfo, params Ability[] abilities) { foreach (Ability ability in abilities) @@ -77,11 +77,11 @@ public static bool HasAnyOfAbilities(this CardInfo cardInfo, params Ability[] ab #region SpecialAbility /// - /// Checks if the CardInfo has a specific SpecialTriggeredAbility. + /// Checks if the has a specific SpecialTriggeredAbility. /// - /// A condensed version of `cardInfo.SpecialAbilities.Contains(ability)`. + /// An extension version of cardInfo.SpecialAbilities.Contains(ability). /// - /// CardInfo to access. + /// to access. /// The specialTriggeredAbility to check for. /// Returns true if the specialTriggeredAbility does exist. public static bool HasSpecialAbility(this CardInfo cardInfo, SpecialTriggeredAbility ability) @@ -90,9 +90,9 @@ public static bool HasSpecialAbility(this CardInfo cardInfo, SpecialTriggeredAbi } /// - /// Checks if the CardInfo does not have a specific SpecialTriggeredAbility. + /// Checks if the does not have a specific SpecialTriggeredAbility. /// - /// CardInfo to access. + /// to access. /// The specialTriggeredAbility to check for. /// Returns true if the specialTriggeredAbility does not exist. public static bool LacksSpecialAbility(this CardInfo cardInfo, SpecialTriggeredAbility ability) @@ -101,11 +101,11 @@ public static bool LacksSpecialAbility(this CardInfo cardInfo, SpecialTriggeredA } /// - /// Checks if the CardInfo has all of the specified SpecialTriggeredAbilities. + /// Checks if the has all of the specified SpecialTriggeredAbilities. /// - /// CardInfo to access. + /// to access. /// The SpecialTriggeredAbilities to check for. - /// Returns true if cardInfo has all of the specified SpecialTriggeredAbilities. + /// Returns true if this card has all of the specified SpecialTriggeredAbilities. public static bool HasAllSpecialAbilities(this CardInfo cardInfo, params SpecialTriggeredAbility[] specialAbilities) { foreach (SpecialTriggeredAbility special in specialAbilities) @@ -117,11 +117,11 @@ public static bool HasAllSpecialAbilities(this CardInfo cardInfo, params Special } /// - /// Checks if the CardInfo has none of the specified SpecialTriggeredAbilities. + /// Checks if the has none of the specified SpecialTriggeredAbilities. /// - /// CardInfo to access. + /// to access. /// The SpecialTriggeredAbilitiess to check for. - /// Returns true if cardInfo has none of the specified SpecialTriggeredAbilities. + /// Returns true if this card has none of the specified SpecialTriggeredAbilities. public static bool LacksAllSpecialAbilities(this CardInfo cardInfo, params SpecialTriggeredAbility[] specialAbilities) { foreach (SpecialTriggeredAbility special in specialAbilities) @@ -133,11 +133,11 @@ public static bool LacksAllSpecialAbilities(this CardInfo cardInfo, params Speci } /// - /// Checks if the CardInfo has any of the specified SpecialTriggeredAbilities. + /// Checks if the has any of the specified SpecialTriggeredAbilities. /// - /// CardInfo to access. + /// to access. /// The SpecialTriggeredAbilities to check for. - /// Returns true if cardInfo has at least one of the specified SpecialTriggeredAbilities. + /// Returns true if this card has at least one of the specified SpecialTriggeredAbilities. public static bool HasAnyOfSpecialAbilities(this CardInfo cardInfo, params SpecialTriggeredAbility[] specialAbilities) { foreach (SpecialTriggeredAbility special in specialAbilities) @@ -151,27 +151,27 @@ public static bool HasAnyOfSpecialAbilities(this CardInfo cardInfo, params Speci #region Trait /// - /// Checks if the CardInfo does not belong to a specific Tribe. + /// Checks if the does not belong to a specific Tribe. /// - /// CardInfo to access. + /// to access. /// The tribe to check for. /// Returns true if the card is not of the specified tribe. public static bool IsNotOfTribe(this CardInfo cardInfo, Tribe tribe) => !cardInfo.IsOfTribe(tribe); /// - /// Checks if the CardInfo does not have a specific Trait. + /// Checks if the does not have a specific Trait. /// - /// CardInfo to access. + /// to access. /// The Trait to check for. /// Returns true if the card is does not have the specified Trait. public static bool LacksTrait(this CardInfo cardInfo, Trait trait) => !cardInfo.HasTrait(trait); /// - /// Checks if the CardInfo has all of the specified Traits. + /// Checks if the has all of the specified Traits. /// - /// CardInfo to access. + /// to access. /// The Traits to check for. - /// Returns true if cardInfo has all of the specified Traits. + /// Returns true if this card has all of the specified Traits. public static bool HasAllTraits(this CardInfo cardInfo, params Trait[] traits) { foreach (Trait trait in traits) @@ -183,11 +183,11 @@ public static bool HasAllTraits(this CardInfo cardInfo, params Trait[] traits) } /// - /// Checks if the CardInfo has none of the specified Traits. + /// Checks if the has none of the specified Traits. /// - /// CardInfo to access. + /// to access. /// The Traits to check for. - /// Returns true if cardInfo has none of the specified Traits. + /// Returns true if this card has none of the specified Traits. public static bool LacksAllTraits(this CardInfo cardInfo, params Trait[] traits) { foreach (Trait trait in traits) @@ -199,11 +199,11 @@ public static bool LacksAllTraits(this CardInfo cardInfo, params Trait[] traits) } /// - /// Checks if the CardInfo has any of the specified Traits. + /// Checks if the has any of the specified Traits. /// - /// CardInfo to access. + /// to access. /// The Traits to check for. - /// Returns true if cardInfo has at least one of the specified Traits. + /// Returns true if this card has at least one of the specified Traits. public static bool HasAnyOfTraits(this CardInfo cardInfo, params Trait[] traits) { foreach (Trait trait in traits) @@ -228,25 +228,25 @@ public static bool HasAnyOfTraits(this CardInfo cardInfo, params Trait[] traits) #region CardMetaCategory /// - /// Checks if the CardInfo has a specific CardMetaCategory. + /// Checks if the has a specific CardMetaCategory. /// - /// CardInfo to access. + /// to access. /// The CardMetaCategory to check for. /// Returns true if the card is does not have the specified CardMetaCategory. public static bool HasCardMetaCategory(this CardInfo cardInfo, CardMetaCategory metaCategory) => cardInfo.metaCategories.Contains(metaCategory); /// - /// Checks if the CardInfo does not have a specific CardMetaCategory. + /// Checks if the does not have a specific CardMetaCategory. /// - /// CardInfo to access. + /// to access. /// The CardMetaCategory to check for. /// Returns true if the card is does not have the specified CardMetaCategory. public static bool LacksCardMetaCategory(this CardInfo cardInfo, CardMetaCategory metaCategory) => !cardInfo.HasCardMetaCategory(metaCategory); /// - /// Checks if the CardInfo has any of the specified CardMetaCategories. + /// Checks if the has any of the specified CardMetaCategories. /// - /// CardInfo to access. + /// to access. /// The CardMetaCategories to check for. /// Returns true if the card has at least one of the specified CardMetaCategories. public static bool HasAnyOfCardMetaCategories(this CardInfo cardInfo, params CardMetaCategory[] metaCategories) @@ -260,9 +260,9 @@ public static bool HasAnyOfCardMetaCategories(this CardInfo cardInfo, params Car } /// - /// Checks if the CardInfo has none of the specified CardMetaCategories. + /// Checks if the has none of the specified CardMetaCategories. /// - /// CardInfo to access. + /// to access. /// The CardMetaCategories to check for. /// Returns true if the card has none of the specified CardMetaCategories. public static bool LacksAllCardMetaCategories(this CardInfo cardInfo, params CardMetaCategory[] metaCategories) @@ -278,10 +278,10 @@ public static bool LacksAllCardMetaCategories(this CardInfo cardInfo, params Car #region PlayableCard /// - /// Gets the health adjustment given by a PlayableCard's Stat Icon. + /// Gets the health adjustment given by a 's stat icon. /// - /// The PlayableCard to access. - /// How much Health the Stat Icon gives. + /// The to access. + /// How much Health the stat icon gives. public static int GetStatIconHealthBuffs(this PlayableCard card) { int num = 0; @@ -295,7 +295,7 @@ public static int GetStatIconHealthBuffs(this PlayableCard card) /// /// Gets the number of Ability stacks a card has. /// - /// The PlayableCard to access. + /// The to access. /// The Ability to check for. /// The number of Ability stacks the card has. public static int GetAbilityStacks(this PlayableCard card, Ability ability) @@ -315,7 +315,7 @@ public static int GetAbilityStacks(this PlayableCard card, Ability ability) /// /// Gets the number of Ability stacks a card has. /// - /// The CardInfo to access. + /// The to access. /// The Ability to check for. /// The number of Ability stacks the card has. public static int GetAbilityStacks(this CardInfo info, Ability ability) @@ -329,10 +329,10 @@ public static int GetAbilityStacks(this CardInfo info, Ability ability) } /// - /// Check if the other PlayableCard is on the same side of the board as this PlayableCard. + /// Check if the other is on the same side of the board as this . /// - /// The PlayableCard to access. - /// The other PlayableCard. + /// The to access. + /// The other to check. /// Returns true if both cards are on the board and both are on the opponent cards or both are player cards. public static bool OtherCardIsOnSameSide(this PlayableCard playableCard, PlayableCard otherCard) { @@ -340,22 +340,22 @@ public static bool OtherCardIsOnSameSide(this PlayableCard playableCard, Playabl } /// - /// Retrieve a list of all abilities that exist on the PlayableCard. + /// Retrieve a list of all abilities that exist on the . /// - /// This will retrieve all Abilities from both TemporaryMods and from the underlying CardInfo object. + /// This will retrieve all Abilities from both TemporaryMods and from the underlying object. /// - /// The PlayableCard to access. - /// A list of Abilities from the PlayableCard and underlying CardInfo object. + /// The to access. + /// A list of Abilities from the and underlying object. public static List AllAbilities(this PlayableCard playableCard) { return playableCard.GetAbilitiesFromAllMods().Concat(playableCard.Info.Abilities).ToList(); } /// - /// A variant of PlayableCard.AllAbilities that can account for negated abilities in the PlayableCard's TemporaryMods. + /// A variant of that can account for negated abilities in the 's TemporaryMods. /// - /// The PlayableCard to access. - /// Whether or not to check TemporaryMods for negated abilities. - /// A list of Abilities from the PlayableCard and underlying CardInfo object + /// The to access. + /// Whether or not to check TemporaryMods for negated abilities. + /// A list of Abilities from the and underlying object public static List AllAbilities(this PlayableCard playableCard, bool accountForNegation) { List retval = playableCard.AllAbilities(); @@ -373,24 +373,24 @@ public static List AllAbilities(this PlayableCard playableCard, bool ac } /// - /// Retrieve a list of all CardModificationInfos that exist on the PlayableCard. + /// Retrieve a list of all CardModificationInfos that exist on the . /// - /// This will retrieve all mods from TemporaryMods and the underlying CardInfo.Mods. + /// This will retrieve all mods from TemporaryMods and the underlying CardInfo.Mods. /// - /// The PlayableCard to access. - /// A list of CardModificationInfos from the PlayableCard and underlying CardInfo object. + /// The to access. + /// A list of s from the and underlying object. public static List AllCardModificationInfos(this PlayableCard playableCard) { return playableCard.TemporaryMods.Concat(playableCard.Info.Mods).ToList(); } /// - /// Removes the provided CardModificationInfo from the PlayableCard. + /// Removes the provided CardModificationInfo from the . /// - /// Searches both its TemporaryMods list and its CardInfo.Mods list. + /// Searches both its TemporaryMods list and its CardInfo.Mods list. /// - /// The PlayableCard to access. - /// The CardModificationInfo object to remove. + /// The to access. + /// The object to remove. /// Whether or not to call OnStatsChanged after removing the card mod. /// True if the mod was successfully removed or false if the mod was not removed or was null. public static bool RemoveCardModificationInfo(this PlayableCard playableCard, CardModificationInfo modToRemove, bool updateDisplay = true) @@ -418,22 +418,22 @@ public static bool RemoveCardModificationInfo(this PlayableCard playableCard, Ca return false; } /// - /// Retrieve a list of all special triggered abilities that exist on the PlayableCard. + /// Retrieve a list of all special triggered abilities that exist on the . /// - /// This will retrieve all SpecialTriggeredAbility from both TemporaryMods and from the underlying CardInfo object. + /// This will retrieve all SpecialTriggeredAbility from both TemporaryMods and from the underlying object. /// - /// The PlayableCard to access. - /// A list of SpecialTriggeredAbility from the PlayableCard and underlying CardInfo object. + /// The to access. + /// A list of SpecialTriggeredAbility from the and underlying object. public static List AllSpecialAbilities(this PlayableCard playableCard) { return new List(playableCard.TemporaryMods.Concat(playableCard.Info.Mods).SelectMany(mod => mod.specialAbilities)); } /// - /// Retrieve a list of Ability that exist in TemporaryMods and the underlying CardInfo.Mods lists. + /// Retrieve a list of Ability that exist in TemporaryMods and the underlying CardInfo.Mods lists. /// - /// The PlayableCard to access. - /// A list of Ability from the PlayableCard and underlying CardInfo object. + /// The to access. + /// A list of Ability from the and underlying object. public static List GetAbilitiesFromAllMods(this PlayableCard playableCard) { return AbilitiesUtil.GetAbilitiesFromMods(playableCard.TemporaryMods.Concat(playableCard.Info.Mods).ToList()); @@ -442,7 +442,7 @@ public static List GetAbilitiesFromAllMods(this PlayableCard playableCa /// /// Checks if the card has a specific Trait. /// - /// PlayableCard to access. + /// to access. /// The trait to check for. /// Returns true if the card has the specified trait. public static bool HasTrait(this PlayableCard playableCard, Trait trait) => playableCard.Info.HasTrait(trait); @@ -450,47 +450,47 @@ public static List GetAbilitiesFromAllMods(this PlayableCard playableCa /// /// Checks if the card does not have a specific Trait. /// - /// PlayableCard to access. + /// to access. /// The trait to check for. /// Returns true if the card does not have the specified trait. public static bool LacksTrait(this PlayableCard playableCard, Trait trait) => playableCard.Info.LacksTrait(trait); /// - /// Checks if the PlayableCard has all of the specified Traits. + /// Checks if the has all of the specified Traits. /// - /// PlayableCard to access. + /// to access. /// The Traits to check for. - /// Returns true if playableCard has all of the specified Traits. + /// Returns true if playableCard has all of the specified Traits. public static bool HasAllTraits(this PlayableCard playableCard, params Trait[] traits) => playableCard.Info.HasAllTraits(traits); /// - /// Checks if the PlayableCard has none of the specified Traits. + /// Checks if the has none of the specified Traits. /// - /// PlayableCard to access. + /// to access. /// The Traits to check for. - /// Returns true if playableCard has none of the specified Traits. + /// Returns true if playableCard has none of the specified Traits. public static bool LacksAllTraits(this PlayableCard playableCard, params Trait[] traits) => playableCard.Info.LacksAllTraits(traits); /// - /// Checks if the PlayableCard has any of the specified Traits. + /// Checks if the has any of the specified Traits. /// - /// PlayableCard to access. + /// to access. /// The Traits to check for. - /// Returns true if playableCard has at least one of the specified Traits. + /// Returns true if this card has at least one of the specified Traits. public static bool HasAnyOfTraits(this PlayableCard playableCard, params Trait[] traits) => playableCard.Info.HasAnyOfTraits(traits); /// - /// Checks if the PlayableCard is of a specified Tribe. + /// Checks if the is of a specified Tribe. /// - /// PlayableCard to access. + /// to access. /// The tribe to check for. /// Returns true if the card is of the specified tribe. public static bool IsOfTribe(this PlayableCard playableCard, Tribe tribe) => playableCard.Info.IsOfTribe(tribe); /// - /// Checks if the PlayableCard is not of a specified Tribe. + /// Checks if the is not of a specified Tribe. /// - /// PlayableCard to access. + /// to access. /// The tribe to check for. /// Returns true if the card is not of the specified tribe. public static bool IsNotOfTribe(this PlayableCard playableCard, Tribe tribe) => playableCard.Info.IsNotOfTribe(tribe); @@ -498,33 +498,33 @@ public static List GetAbilitiesFromAllMods(this PlayableCard playableCa /// /// Checks if the card is not null and not Dead. /// - /// PlayableCard to access. + /// to access. /// Returns true if the card is not null or not Dead. public static bool NotDead(this PlayableCard playableCard) => playableCard && !playableCard.Dead; /// /// Checks if the card is not the opponent's card. /// - /// PlayableCard to access. + /// to access. /// Returns true if card is not the opponent's card. public static bool IsPlayerCard(this PlayableCard playableCard) => !playableCard.OpponentCard; /// - /// Check the PlayableCard not having a specific Ability. + /// Check the not having a specific Ability. /// - /// PlayableCard to access. + /// to access. /// The ability to check for. /// Returns true if the ability does not exist. public static bool LacksAbility(this PlayableCard playableCard, Ability ability) => !playableCard.HasAbility(ability); /// - /// Check if the PlayableCard has all of the given abilities. + /// Check if the has all of the given abilities. /// - /// A condensed version of `CardInfo.HasAllAbilities`. + /// An extension version of . /// - /// PlayableCard to access. + /// to access. /// The Abilities to check for. - /// Returns true if playableCard has all of the given Abilities. + /// Returns true if the card has all of the given Abilities. public static bool HasAllAbilities(this PlayableCard playableCard, params Ability[] abilities) { foreach (Ability ability in abilities) @@ -536,13 +536,13 @@ public static bool HasAllAbilities(this PlayableCard playableCard, params Abilit } /// - /// Checks if the PlayableCard has none of the specified Abilities. + /// Checks if the has none of the specified Abilities. /// - /// A condensed version of `CardInfo.LacksAllSpecialAbilities`. + /// An extension version of . /// - /// PlayableCard to access. + /// to access. /// The Abilities to check for. - /// Returns true if playableCard has none of the given Abilities. + /// Returns true if this card has none of the given Abilities. public static bool LacksAllAbilities(this PlayableCard playableCard, params Ability[] abilities) { foreach (Ability ability in abilities) @@ -554,13 +554,13 @@ public static bool LacksAllAbilities(this PlayableCard playableCard, params Abil } /// - /// Check if the PlayableCard has any of the specified Abilities. + /// Check if the has any of the specified Abilities. /// - /// A condensed version of `CardInfo.HasAnyOfAbilities`. + /// An extension version of . /// - /// PlayableCard to access. + /// to access. /// The Abilities to check for. - /// Returns true if playableCard has at least one of the given Abilities. + /// Returns true if this card has at least one of the given Abilities. public static bool HasAnyOfAbilities(this PlayableCard playableCard, params Ability[] abilities) { foreach (Ability ability in abilities) @@ -572,21 +572,21 @@ public static bool HasAnyOfAbilities(this PlayableCard playableCard, params Abil } /// - /// Check the PlayableCard not having a specific SpecialTriggeredAbility. + /// Check the not having a specific SpecialTriggeredAbility. /// - /// A condensed version of `!playableCard.Info.SpecialAbilities.Contains(ability)`. + /// An extension version of !. /// - /// PlayableCard to access. + /// to access. /// The specialTriggeredAbility to check for. /// Returns true if the specialTriggeredAbility does not exist. public static bool LacksSpecialAbility(this PlayableCard playableCard, SpecialTriggeredAbility ability) => !playableCard.HasSpecialAbility(ability); /// - /// Check the PlayableCard having a specific SpecialTriggeredAbility. + /// Check the having a specific SpecialTriggeredAbility. /// - /// A condensed version of `playableCard.Info.SpecialAbilities.Contains(ability)`. + /// An extension version of playableCard.Info.SpecialAbilities.Contains(ability). /// - /// PlayableCard to access. + /// to access. /// The specialTriggeredAbility to check for. /// Returns true if the specialTriggeredAbility does exist. public static bool HasSpecialAbility(this PlayableCard playableCard, SpecialTriggeredAbility ability) @@ -596,13 +596,13 @@ public static bool HasSpecialAbility(this PlayableCard playableCard, SpecialTrig } /// - /// Checks if the PlayableCard has all of the specified SpecialTriggeredAbilities. + /// Checks if the has all of the specified SpecialTriggeredAbilities. /// - /// A condensed version of `CardInfo.HasAllSpecialAbilities`. + /// An extension version of . /// - /// PlayableCard to access. + /// to access. /// The SpecialTriggeredAbilities to check for. - /// Returns true if playableCard has all of the specified SpecialTriggeredAbilities. + /// Returns true if this card has all of the specified SpecialTriggeredAbilities. public static bool HasAllSpecialAbilities(this PlayableCard playableCard, params SpecialTriggeredAbility[] specialAbilities) { foreach (SpecialTriggeredAbility special in specialAbilities) @@ -614,11 +614,11 @@ public static bool HasAllSpecialAbilities(this PlayableCard playableCard, params } /// - /// Checks if the PlayableCard has none of the specified SpecialTriggeredAbilities. + /// Checks if the has none of the specified SpecialTriggeredAbilities. /// - /// A condensed version of `CardInfo.LacksAllSpecialAbilities`. + /// An extension version of . /// - /// PlayableCard to access. + /// to access. /// The SpecialTriggeredAbilitiess to check for. /// Returns true if playableCard has none of the specified SpecialTriggeredAbilities. public static bool LacksAllSpecialAbilities(this PlayableCard playableCard, params SpecialTriggeredAbility[] specialAbilities) @@ -632,12 +632,12 @@ public static bool LacksAllSpecialAbilities(this PlayableCard playableCard, para } /// - /// Checks if the PlayableCard has any of the specified SpecialTriggeredAbilities. + /// Checks if the has any of the specified SpecialTriggeredAbilities. /// - /// A condensed version of `CardInfo.HasAnyOfSpecialAbilities`. + /// An extension version of . /// - /// PlayableCard to access. - /// The SpecialTriggeredAbilities to check for. + /// to access. + /// The special abilities to check for. /// Returns true if playableCard has at least one of the specified SpecialTriggeredAbilities. public static bool HasAnyOfSpecialAbilities(this PlayableCard playableCard, params SpecialTriggeredAbility[] specialAbilities) { @@ -650,35 +650,35 @@ public static bool HasAnyOfSpecialAbilities(this PlayableCard playableCard, para } /// - /// Check if the PlayableCard has a card opposing it in the opposite slot. + /// Check if the has a card opposing it in the opposite slot. /// - /// Also acts as a null check if this PlayableCard is in a slot. + /// Also acts as a null check if this is in a slot. /// - /// PlayableCard to access. + /// to access. /// Returns true if a card exists in the opposing slot. public static bool HasOpposingCard(this PlayableCard playableCard) => playableCard.Slot && playableCard.Slot.opposingSlot.Card; /// - /// Retrieve the CardSlot object that is opposing this PlayableCard. + /// Retrieve the CardSlot object that is opposing this . /// /// It is on the implementer to check if the returned value is not null - /// PlayableCard to access. - /// The card slot opposite of this playableCard, otherwise return null. + /// to access. + /// The card slot opposite of this , otherwise return null. public static CardSlot OpposingSlot(this PlayableCard playableCard) => playableCard.Slot ? playableCard.Slot.opposingSlot : null; /// - /// Retrieve the PlayableCard that is opposing this PlayableCard in the opposite slot. + /// Retrieve the that is opposing this in the opposite slot. /// /// It is on the implementer to check if the returned value is not null - /// PlayableCard to access. + /// to access. /// The card in the opposing slot, otherwise return null. public static PlayableCard OpposingCard(this PlayableCard playableCard) => playableCard.OpposingSlot()?.Card; /// - /// Adds all given CardModificationInfos to a PlayableCard as temporary mods. + /// Adds all given s to a as temporary mods. /// - /// The PlayableCard to access. - /// The collection of CardModificationInfos to add as temporary mods to the card. + /// The to access. + /// The collection of s to add as temporary mods to the card. public static void AddTemporaryMods(this PlayableCard card, params CardModificationInfo[] mods) { foreach (CardModificationInfo mod in mods) @@ -686,10 +686,10 @@ public static void AddTemporaryMods(this PlayableCard card, params CardModificat } /// - /// Removes all given CardModificationInfos from a PlayableCard's list of temporary mods. + /// Removes all given s from a 's list of temporary mods. /// - /// The PlayableCard to access. - /// The collection of CardModificationInfos to remove from the card's temporary mods. + /// The to access. + /// The collection of s to remove from the card's temporary mods. public static void RemoveTemporaryMods(this PlayableCard card, params CardModificationInfo[] mods) { foreach (CardModificationInfo mod in mods) @@ -697,10 +697,10 @@ public static void RemoveTemporaryMods(this PlayableCard card, params CardModifi } /// - /// A version of TransformIntoCard tailored to visually work on cards in the hand. + /// A version of tailored to visually work on cards in the hand. /// - /// The PlayableCard to access. - /// The CardInfo to change the card into. + /// The to access. + /// The to change the card into. /// An Action to invoke before the evolvedInfo is set. /// An Action to invoke after the evolvedInfo is set. public static IEnumerator TransformIntoCardInHand(this PlayableCard card, CardInfo evolvedInfo, Action onTransformedCallback = null, Action preTransformCallback = null) @@ -715,7 +715,7 @@ public static IEnumerator TransformIntoCardInHand(this PlayableCard card, CardIn AbilityManager.FixStackTriggers(card); } /// - /// A version of TransformIntoCardInHand that incorporates MoveCardAboveHand. + /// A version of that incorporates . /// public static IEnumerator TransformIntoCardAboveHand(this PlayableCard card, CardInfo evolvedInfo, Action onTransformedCallback = null, Action preTransformCallback = null) { @@ -736,7 +736,7 @@ public static IEnumerator TransformIntoCardAboveHand(this PlayableCard card, Car /// /// Increases the amount of shields the card has. Affects the internal counter; does not add or remove shield sigil stacks. /// - /// The PlayableCard to access. + /// The to access. /// How many shields to add. /// Whether to update the card's display, meaning sigil stack numbers and any shield effects. public static void AddShieldCount(this PlayableCard card, int amount, bool updateDisplay = true) @@ -746,7 +746,7 @@ public static void AddShieldCount(this PlayableCard card, int amount, bool updat /// /// Increases the amount of shields a specific ability is currently giving. /// - /// The PlayableCard to access. + /// The to access. /// How many shields to add. /// The shield-giving ability to add more shields to. /// Whether to update the card's display, meaning sigil stack numbers and any shield effects. @@ -761,7 +761,7 @@ public static void AddShieldCount(this PlayableCard card, int amount, Ability ab component.AddShields(amount, updateDisplay); } /// - /// Increases the amount of shields a specific ability's AbilityBehaviour is currently giving. + /// Increases the amount of shields a specific ability's is currently giving. /// public static void AddShieldCount(this PlayableCard card, int amount, bool updateDisplay = true) where T : DamageShieldBehaviour { @@ -769,9 +769,9 @@ public static void AddShieldCount(this PlayableCard card, int amount, bool up } /// - /// Removes shields from the given PlayableCard. + /// Removes shields from the given . /// - /// The PlayableCard to access. + /// The to access. /// How many shields to add. /// Whether to update the card's display, meaning sigil stack numbers and any shield effects. public static void RemoveShieldCount(this PlayableCard card, int amount, bool updateDisplay = true) @@ -781,7 +781,7 @@ public static void RemoveShieldCount(this PlayableCard card, int amount, bool up /// /// Reduces the amount of shields a specific ability is currently giving. /// - /// The PlayableCard to access. + /// The to access. /// How many shields to add. /// The shield-giving ability to remove shields from. /// Whether to update the card's display, meaning sigil stack numbers and any shield effects. @@ -799,7 +799,7 @@ public static void RemoveShieldCount(this PlayableCard card, int amount, Ability /// Reduces a card's shield count from a specific shield-giving ability. /// /// The class of the ability to remove shield count from. - /// PlayableCard instance to remove shield from. + /// instance to remove shield from. /// How many shields to remove. /// Whether or not to update the card's rendering. public static void RemoveShieldCount(this PlayableCard card, int amount, bool updateDisplay = true) where T : DamageShieldBehaviour @@ -810,7 +810,7 @@ public static void RemoveShieldCount(this PlayableCard card, int amount, bool /// /// Gets the number of shields the target card has. Each shield negates one damaging hit. /// - /// The PlayableCard to access. + /// The to access. /// The number of shields the card has. public static int GetTotalShields(this PlayableCard card) { @@ -841,11 +841,11 @@ public static int GetTotalShields(this PlayableCard card) } /// - /// Retrieves the current value of a DamageShieldBehaviour's NumShield. + /// Retrieves the current value of a 's NumShield. /// - /// - /// - /// The current value of the DamageShieldBehaviour's NumShield. + /// The to access. + /// The to access. + /// The current value of the 's NumShield. public static int GetShieldCount(this PlayableCard card) where T : DamageShieldBehaviour { T comp = card.GetComponent(); @@ -853,11 +853,11 @@ public static int GetShieldCount(this PlayableCard card) where T : DamageShie } /// - /// Retrieves the DamageShieldBehaviour component corresponding to the given Ability, or null if it does not exist. + /// Retrieves the component corresponding to the given Ability, or null if it does not exist. /// - /// - /// - /// The DamageShieldBehaviour component of the given Ability, or null if it does not exist. + /// The to access. + /// The shield-giving ability to access. + /// The component of the given Ability, or null if it does not exist. public static DamageShieldBehaviour GetShieldBehaviour(this PlayableCard card, Ability ability) { Type type = ShieldManager.AllShieldAbilities.AbilityByID(ability)?.AbilityBehavior; @@ -867,9 +867,9 @@ public static DamageShieldBehaviour GetShieldBehaviour(this PlayableCard card, A return card.GetComponent(type) as DamageShieldBehaviour; } /// - /// A variant of ResetShield that only resets shields belonging is a certain ability. + /// An extension variant of that only resets shields belonging is a certain ability. /// - /// The PlayableCard to access. + /// The to access. /// The shield ability to look for. public static void ResetShield(this PlayableCard card, Ability ability) { @@ -891,16 +891,16 @@ public static bool IsShieldAbility(this Ability ability) return ShieldManager.AllShieldInfos.AbilityByID(ability) != null; } /// - /// Determines whether the given AbilityInfo corresponds to a shield-giving ability. + /// Determines whether the given corresponds to a shield-giving ability. /// - /// The AbilityInfo for the ability to check. - /// True if the AbilityInfo is for an ability that gives sigils using the API's features. + /// The for the ability to check. + /// True if the is for an ability that gives sigils using the API's features. public static bool IsShieldAbility(this AbilityInfo abilityInfo) { return ShieldManager.AllShieldInfos.Contains(abilityInfo); } /// - /// Returns whether or not the PlayableCard has an Ability that overrides DamageShieldBehaviour. + /// Returns whether or not the has an Ability that overrides . /// /// The PlayableCard object to check. public static bool HasShieldAbility(this PlayableCard card) @@ -908,9 +908,9 @@ public static bool HasShieldAbility(this PlayableCard card) return card.AllAbilities().Exists(x => x.IsShieldAbility()); } /// - /// Returns whether or not the CardInfo has an Ability that overrides DamageShieldBehaviour. + /// Returns whether or not the has an Ability that overrides . /// - /// The CardInfo object to check. + /// The object to check. public static bool HasShieldAbility(this CardInfo cardInfo) { return cardInfo.Abilities.Exists(x => x.IsShieldAbility()); @@ -919,10 +919,10 @@ public static bool HasShieldAbility(this CardInfo cardInfo) #endregion /// - /// Spawns the CardInfo object to the player's hand. + /// Spawns the object to the player's hand. /// - /// CardInfo to access. - /// The mods that will be added to the PlayableCard object. + /// to access. + /// The mods that will be added to the object. /// The position of where the card will appear from. Default is a Vector3 of (0, 6, 1.5). /// The amount of time to wait before being added to the hand. /// @@ -941,10 +941,10 @@ public static IEnumerator SpawnInHand(this CardInfo cardInfo, List - /// Creates a basic EncounterBlueprintData.CardBlueprint based off the CardInfo object. + /// Creates a basic based off the object. /// - /// CardInfo to create the blueprint with. - /// The CardBlueprint object that can be used when creating EncounterData. + /// to create the blueprint with. + /// The CardBlueprint object that can be used when creating . public static EncounterBlueprintData.CardBlueprint CreateBlueprint(this CardInfo cardInfo) { return new EncounterBlueprintData.CardBlueprint From 838c3e8a86055c3dda5910ed45872a2c26f980dd Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:11:32 -0800 Subject: [PATCH 34/42] Add cref tags, fix mistakes --- InscryptionAPI/Card/AbilityManager.cs | 1 - InscryptionAPI/Card/CardExtensions.cs | 2 +- .../Card/CardExtensionsPortraits.cs | 336 +++++++++--------- .../Card/CardExtensionsProperties.cs | 124 +++---- InscryptionAPI/Card/CardExtensionsSetters.cs | 200 +++++------ InscryptionAPI/Card/CardManager.cs | 94 ++--- .../Card/CardModificationInfoExtensions.cs | 322 ++++++++--------- .../Card/CardModificationInfoManager.cs | 31 +- InscryptionAPI/Card/CostProperties.cs | 58 +-- InscryptionAPI/Card/DamageShieldBehaviour.cs | 22 +- InscryptionAPI/Card/DeathCardManager.cs | 12 +- InscryptionAPI/Card/DefaultBoneGainOnDeath.cs | 12 +- .../Card/ExtendedAbilityBehaviour.cs | 16 +- .../Card/ExtendedActivatedAbilityBehaviour.cs | 14 +- InscryptionAPI/Card/OpponentGemsManager.cs | 8 +- InscryptionAPI/Card/ShieldManager.cs | 10 +- InscryptionAPI/Card/SpecialStatIconManager.cs | 16 +- .../Card/SpecialTriggeredAbilityManager.cs | 18 +- InscryptionAPI/Card/TribeManager.cs | 26 +- 19 files changed, 662 insertions(+), 660 deletions(-) diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index a090bd16..9d9bca0c 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -4,7 +4,6 @@ using InscryptionAPI.Helpers; using InscryptionAPI.Helpers.Extensions; using InscryptionAPI.RuleBook; -using Sirenix.Utilities; using System.Collections; using System.Collections.ObjectModel; using System.Reflection; diff --git a/InscryptionAPI/Card/CardExtensions.cs b/InscryptionAPI/Card/CardExtensions.cs index 37486673..2232cc4e 100644 --- a/InscryptionAPI/Card/CardExtensions.cs +++ b/InscryptionAPI/Card/CardExtensions.cs @@ -364,7 +364,7 @@ public static CardInfo RemoveTribes(this CardInfo info, params Tribe[] tribes) } /// - /// Removes any number of metaategories from the card. + /// Removes any number of metacategories from the card. /// /// to access. /// The metacategories to remove. diff --git a/InscryptionAPI/Card/CardExtensionsPortraits.cs b/InscryptionAPI/Card/CardExtensionsPortraits.cs index 75f111b3..2ece2579 100644 --- a/InscryptionAPI/Card/CardExtensionsPortraits.cs +++ b/InscryptionAPI/Card/CardExtensionsPortraits.cs @@ -10,9 +10,9 @@ public static partial class CardExtensions /// /// Sets the default card portrait for the card /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPortrait(this CardInfo info, string pathToArt) { try @@ -28,10 +28,10 @@ public static CardInfo SetPortrait(this CardInfo info, string pathToArt) /// /// Sets the default card portrait for the card /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -40,7 +40,7 @@ public static CardInfo SetPortrait(this CardInfo info, Texture2D portrait, Filte /// /// Sets the cards portrait and emission at the same time. /// - /// The CardInfon to access. + /// The n to access. /// The texture containing the card portrait. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. @@ -55,9 +55,9 @@ public static CardInfo SetPortrait(this CardInfo info, Texture2D portrait, Textu /// /// Sets the default card portrait for the card /// - /// CardInfo to access. + /// to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPortrait(this CardInfo info, Sprite sprite) { info.portraitTex = sprite; @@ -71,10 +71,10 @@ public static CardInfo SetPortrait(this CardInfo info, Sprite sprite) /// /// Sets the cards portrait and emission at the same time. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). /// The path to the .png file containing the emission artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPortraitAndEmission(this CardInfo info, string pathToArt, string pathToEmission) { info.SetPortrait(pathToArt); @@ -85,11 +85,11 @@ public static CardInfo SetPortraitAndEmission(this CardInfo info, string pathToA /// /// Sets the cards portrait and emission at the same time. /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPortraitAndEmission(this CardInfo info, Texture2D portrait, Texture2D emission, FilterMode? filterMode = null) { info.SetPortrait(portrait, filterMode); @@ -100,10 +100,10 @@ public static CardInfo SetPortraitAndEmission(this CardInfo info, Texture2D port /// /// Sets the cards portrait and emission at the same time. /// - /// CardInfo to access. + /// to access. /// The sprite containing the card portrait. /// The sprite containing the emission. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPortraitAndEmission(this CardInfo info, Sprite portrait, Sprite emission) { info.SetPortrait(portrait); @@ -117,9 +117,9 @@ public static CardInfo SetPortraitAndEmission(this CardInfo info, Sprite portrai /// /// Sets the card's alternate portrait. This portrait is only used when asked for by an ability or an appearance behavior. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetAltPortrait(this CardInfo info, string pathToArt) { return info.SetAltPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -128,10 +128,10 @@ public static CardInfo SetAltPortrait(this CardInfo info, string pathToArt) /// /// Sets the card's alternate portrait. This portrait is only used when asked for by an ability or an appearance behavior. /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetAltPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetAltPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -140,9 +140,9 @@ public static CardInfo SetAltPortrait(this CardInfo info, Texture2D portrait, Fi /// /// Sets the card's alternate portrait. This portrait is only used when asked for by an ability or an appearance behavior. /// - /// CardInfo to access. + /// to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetAltPortrait(this CardInfo info, Sprite portrait) { info.alternatePortrait = portrait; @@ -160,9 +160,9 @@ public static CardInfo SetAltPortrait(this CardInfo info, Sprite portrait) /// /// Sets the emissive portrait for the card. This can only be done after the default portrait has been set (SetPortrait). /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissivePortrait(this CardInfo info, string pathToArt) { try @@ -178,10 +178,10 @@ public static CardInfo SetEmissivePortrait(this CardInfo info, string pathToArt) /// /// Sets the emissive portrait for the card. This can only be done after the default portrait has been set (SetPortrait). /// - /// CardInfo to access. + /// to access. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissivePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissivePortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -190,9 +190,9 @@ public static CardInfo SetEmissivePortrait(this CardInfo info, Texture2D portrai /// /// Sets the emissive portrait for the card. This can only be done after the default portrait has been set (SetPortrait). /// - /// CardInfo to access. + /// to access. /// The sprite containing the emission. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissivePortrait(this CardInfo info, Sprite sprite) { if (info.portraitTex == null) @@ -204,18 +204,18 @@ public static CardInfo SetEmissivePortrait(this CardInfo info, Sprite sprite) } /// - /// Retrieves the given CardInfo's emissive portrait. + /// Retrieves the given 's emissive portrait. /// - /// The CardInfo to access. + /// The to access. /// Null if there is no emissive portrait. public static Sprite GetEmissivePortrait(this CardInfo info) => info.portraitTex.GetEmissionSprite(); /// /// Sets the emissive alternate portrait for the card. This can only be done after the alternate portrait has been set (SetAltPortrait). /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveAltPortrait(this CardInfo info, string pathToArt) { return info.SetEmissiveAltPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -224,10 +224,10 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, string pathToA /// /// Sets the emissive alternate portrait for the card. This can only be done after the alternate portrait has been set (SetAltPortrait). /// - /// CardInfo to access. + /// to access. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveAltPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -236,9 +236,9 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Texture2D port /// /// Sets the emissive alternate portrait for the card. This can only be done after the alternate portrait has been set (SetAltPortrait). /// - /// CardInfo to access. + /// to access. /// The sprite containing the emission. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Sprite portrait) { if (info.alternatePortrait == null) @@ -250,9 +250,9 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Sprite portrai } /// - /// Retrives the given CardInfo's emissive alternate portrait. + /// Retrives the given 's emissive alternate portrait. /// - /// The CardInfo to access. + /// The to access. /// Null if there is no emissive alternate portrait. public static Sprite GetEmissiveAltPortrait(this CardInfo info) => info.alternatePortrait.GetEmissionSprite(); @@ -262,9 +262,9 @@ public static CardInfo SetEmissiveAltPortrait(this CardInfo info, Sprite portrai /// /// Sets the card's pixel portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelPortrait(this CardInfo info, string pathToArt) { return info.SetPixelPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -273,10 +273,10 @@ public static CardInfo SetPixelPortrait(this CardInfo info, string pathToArt) /// /// Sets the card's pixel portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -285,9 +285,9 @@ public static CardInfo SetPixelPortrait(this CardInfo info, Texture2D portrait, /// /// Sets the card's pixel portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelPortrait(this CardInfo info, Sprite portrait) { info.pixelPortrait = portrait; @@ -299,9 +299,9 @@ public static CardInfo SetPixelPortrait(this CardInfo info, Sprite portrait) } /// - /// Retrieves the given CardInfo's pixel portrait. + /// Retrieves the given 's pixel portrait. /// - /// The CardInfo to access. + /// The to access. /// Null if there is no pixel portrait. public static Sprite GetPixelPortrait(this CardInfo info) { @@ -312,11 +312,11 @@ public static Sprite GetPixelPortrait(this CardInfo info) #region LostTail /// - /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. + /// Sets the card's lost tail portrait. This portrait is used when the card has the ability and has dodged a hit. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetLostTailPortrait(this CardInfo info, string pathToArt) { if (info.tailParams == null) @@ -328,12 +328,12 @@ public static CardInfo SetLostTailPortrait(this CardInfo info, string pathToArt) } /// - /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. + /// Sets the card's lost tail portrait. This portrait is used when the card has the ability and has dodged a hit. /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetLostTailPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { if (info.tailParams == null) @@ -345,11 +345,11 @@ public static CardInfo SetLostTailPortrait(this CardInfo info, Texture2D portrai } /// - /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. + /// Sets the card's lost tail portrait. This portrait is used when the card has the ability and has dodged a hit. /// - /// CardInfo to access. + /// to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetLostTailPortrait(this CardInfo info, Sprite portrait) { if (info.tailParams == null) @@ -363,9 +363,9 @@ public static CardInfo SetLostTailPortrait(this CardInfo info, Sprite portrait) /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, string pathToArt) { if (info.tailParams == null) @@ -379,10 +379,10 @@ public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, string pa /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { if (info.tailParams == null) @@ -396,9 +396,9 @@ public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, Texture2D /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// CardInfo to access. + /// to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, Sprite portrait) { if (info.tailParams == null) @@ -410,12 +410,12 @@ public static CardInfo SetEmissiveLostTailPortrait(this CardInfo info, Sprite po } /// - /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. + /// Sets the card's lost tail portrait. This portrait is used when the card has the ability and has dodged a hit. /// - /// Tail to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). /// The card that the tail parameters belongs to. - /// The same TailParams so a chain can continue. + /// The same so a chain can continue. public static TailParams SetLostTailPortrait(this TailParams info, string pathToArt, CardInfo owner) { owner.tailParams = info; @@ -423,13 +423,13 @@ public static TailParams SetLostTailPortrait(this TailParams info, string pathTo } /// - /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. + /// Sets the card's lost tail portrait. This portrait is used when the card has the ability and has dodged a hit. /// - /// Tail to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. /// The card that the tail parameters belongs to. - /// The same TailParams so a chain can continue. + /// The same so a chain can continue. public static TailParams SetLostTailPortrait(this TailParams info, Texture2D portrait, CardInfo owner, FilterMode? filterMode = null) { var tailSprite = !filterMode.HasValue @@ -440,12 +440,12 @@ public static TailParams SetLostTailPortrait(this TailParams info, Texture2D por } /// - /// Sets the card's lost tail portrait. This portrait is used when the card has the TailOnHit ability and has dodged a hit. + /// Sets the card's lost tail portrait. This portrait is used when the card has the ability and has dodged a hit. /// - /// Tail to access. + /// to access. /// The sprite containing the card portrait. /// The card that the tail parameters belongs to. - /// The same TailParams so a chain can continue. + /// The same so a chain can continue. public static TailParams SetLostTailPortrait(this TailParams info, Sprite portrait, CardInfo owner) { info.tailLostPortrait = portrait; @@ -461,9 +461,9 @@ public static TailParams SetLostTailPortrait(this TailParams info, Sprite portra /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// Tail to access. + /// to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same TailParams so a chain can continue. + /// The same so a chain can continue. public static TailParams SetEmissiveLostTailPortrait(this TailParams info, string pathToArt) { return info.SetEmissiveLostTailPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -472,10 +472,10 @@ public static TailParams SetEmissiveLostTailPortrait(this TailParams info, strin /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// Tail to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same TailParams so a chain can continue. + /// The same so a chain can continue. public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveLostTailPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -484,9 +484,9 @@ public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Textu /// /// Sets the emissive lost tail portrait for the card. This can only be done after the default lost tail portrait has been set (SetLostTailPortrait). /// - /// Tail to access. + /// to access. /// The Sprite containing the card portrait. - /// The same TailParams so a chain can continue. + /// The same so a chain can continue. public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Sprite portrait) { if (info.tailLostPortrait == null) @@ -497,9 +497,9 @@ public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Sprit } /// - /// Retrieves the given CardInfo's emissive tail lost portrait. + /// Retrieves the given 's emissive tail lost portrait. /// - /// The CardInfo to access. + /// The to access. /// Null if there is no emissive tail lost portrait. public static Sprite GetEmissiveTailLostPortrait(this TailParams info) => info.tailLostPortrait?.GetEmissionSprite(); @@ -509,9 +509,9 @@ public static TailParams SetEmissiveLostTailPortrait(this TailParams info, Sprit /// /// Sets the card's pixel alternate portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelAlternatePortrait(this CardInfo info, string pathToArt) { return info.SetPixelAlternatePortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -519,10 +519,10 @@ public static CardInfo SetPixelAlternatePortrait(this CardInfo info, string path /// /// Sets the card's pixel alternate portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelAlternatePortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -530,9 +530,9 @@ public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Texture2D p /// /// Sets the card's pixel alternate portrait. This portrait is used when the card is displayed in GBC mode (Act 2). /// - /// CardInfo to access. + /// to access. /// The sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -543,43 +543,43 @@ public static CardInfo SetPixelAlternatePortrait(this CardInfo info, Sprite port } /// - /// Retrieves the given CardInfo's alternate Act 2 portrait. + /// Retrieves the given 's alternate Act 2 portrait. /// - /// The CardInfo to access. + /// The to access. /// Null if there is no alternate pixel portrait. public static Sprite GetPixelAlternatePortrait(this CardInfo info) => info.PixelAlternatePortrait(); #endregion #region Steel Trap Alt /// - /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers. + /// Sets the card's alternate steep trap portrait. This portrait is only used when the ability triggers. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetSteelTrapPortrait(this CardInfo info, string pathToArt) { return info.SetSteelTrapPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } /// - /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// Sets the card's alternate steep trap portrait. This portrait is only used when the ability triggers in Act 2. /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetSteelTrapPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetSteelTrapPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); } /// - /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// Sets the card's alternate steep trap portrait. This portrait is only used when the ability triggers in Act 2. /// - /// CardInfo to access. + /// to access. /// The Sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -590,33 +590,33 @@ public static CardInfo SetSteelTrapPortrait(this CardInfo info, Sprite portrait) } /// - /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// Sets the card's alternate steep trap portrait. This portrait is only used when the ability triggers in Act 2. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, string pathToArt) { return info.SetPixelSteelTrapPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } /// - /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// Sets the card's alternate steep trap portrait. This portrait is only used when the ability triggers in Act 2. /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelSteelTrapPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); } /// - /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// Sets the card's alternate steep trap portrait. This portrait is only used when the ability triggers in Act 2. /// - /// CardInfo to access. + /// to access. /// The Sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -629,32 +629,32 @@ public static CardInfo SetPixelSteelTrapPortrait(this CardInfo info, Sprite port /// /// Sets the emissive steel trap portrait for the card. This can only be done after the default steel trap portrait has been set (SetSteelTrapPortrait). /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, string pathToArt) { return info.SetEmissiveSteelTrapPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } /// - /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// Sets the card's alternate steep trap portrait. This portrait is only used when the ability triggers in Act 2. /// - /// CardInfo to access. + /// to access. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveSteelTrapPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); } /// - /// Sets the card's alternate steep trap portrait. This portrait is only used when the Steel Trap ability triggers in Act 2. + /// Sets the card's alternate steep trap portrait. This portrait is only used when the ability triggers in Act 2. /// - /// CardInfo to access. + /// to access. /// The Sprite containing the card portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Sprite portrait) { if (info.SteelTrapPortrait() == null) @@ -665,7 +665,7 @@ public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Sprite p } /// - /// Retrieves the given CardInfo's emissive steel trap portrait. + /// Retrieves the given 's emissive steel trap portrait. /// /// /// Null if there is no emissive steel trap portrait. @@ -674,34 +674,34 @@ public static CardInfo SetEmissiveSteelTrapPortrait(this CardInfo info, Sprite p #region Shield Alt /// - /// Sets the card's alternate broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. + /// Sets the card's alternate broken shield portrait. This portrait is only used when a card with this has its shield broken. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetBrokenShieldPortrait(this CardInfo info, string pathToArt) { return info.SetBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); } /// - /// Sets the card's broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. + /// Sets the card's broken shield portrait. This portrait is only used when a card with this has its shield broken. /// - /// CardInfo to access. + /// to access. /// The sacrificable portrait's Texture. /// Filter mode to apply to the texture in-game. Defaults to Point. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetBrokenShieldPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); } /// - /// Sets the card's broken shield portrait. This portrait is only used when a card with this CardInfo has its shield broken. + /// Sets the card's broken shield portrait. This portrait is only used when a card with this has its shield broken. /// - /// CardInfo to access. + /// to access. /// The sacrificable portrait's Portrait. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -714,9 +714,9 @@ public static CardInfo SetBrokenShieldPortrait(this CardInfo info, Sprite portra /// /// Sets the card's alternate pixel broken shield portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, string pathToArt) { return info.SetPixelBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -725,10 +725,10 @@ public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, string p /// /// Sets the card's broken shield portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// to access. /// The sacrificable portrait's Texture. /// Filter mode to apply to the texture in-game. Defaults to Point. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelBrokenShieldPortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -737,9 +737,9 @@ public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Texture2 /// /// Sets the card's broken shield portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// to access. /// The sacrificable portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -752,9 +752,9 @@ public static CardInfo SetPixelBrokenShieldPortrait(this CardInfo info, Sprite p /// /// Sets the emissive broken shield portrait for the card. This can only be done after the default broken shield portrait has been set (SetBrokenShieldPortrait). /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, string pathToArt) { return info.SetEmissiveBrokenShieldPortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -763,10 +763,10 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, strin /// /// Sets the emissive broken shield portrait for the card. This can only be done after the default broken shield portrait has been set (SetBrokenShieldPortrait). /// - /// CardInfo to access. + /// to access. /// The sacrificable portrait's Texture. /// Filter mode to apply to the texture in-game. Defaults to Point. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveBrokenShieldPortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -775,9 +775,9 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Textu /// /// Sets the emissive broken shield portrait for the card. This can only be done after the default broken shield portrait has been set (SetBrokenShieldPortrait). /// - /// CardInfo to access. + /// to access. /// The sacrificable portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Sprite portrait) { if (info.BrokenShieldPortrait() == null) @@ -788,41 +788,41 @@ public static CardInfo SetEmissiveBrokenShieldPortrait(this CardInfo info, Sprit } /// - /// Retrieves the given CardInfo's emissive broken shield portrait. + /// Retrieves the given 's emissive broken shield portrait. /// - /// The CardInfo to access. + /// The to access. /// Null if there is no emissive broken shield portrait. public static Sprite GetEmissiveBrokenShieldPortrait(this CardInfo info) => info.BrokenShieldPortrait()?.GetEmissionSprite(); #endregion #region Sacrifice Alt /// - /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this CardInfo is on the board when the player is selecting sacrifices. + /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this is on the board when the player is selecting sacrifices. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetSacrificablePortrait(this CardInfo info, string pathToArt) { return info.SetSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); } /// - /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this CardInfo is on the board when the player is selecting sacrifices. + /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this is on the board when the player is selecting sacrifices. /// - /// CardInfo to access. + /// to access. /// The sacrificable portrait's Texture. /// Filter mode to apply to the texture in-game. Defaults to Point. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetSacrificablePortrait(portrait.ConvertTexture(TextureHelper.SpriteType.CardPortrait, filterMode ?? default)); } /// - /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this CardInfo is on the board when the player is selecting sacrifices. + /// Sets the card's alternate sacricable portrait. This portrait is only used when a card with this is on the board when the player is selecting sacrifices. /// - /// CardInfo to access. + /// to access. /// The sacrificable portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetSacrificablePortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -835,9 +835,9 @@ public static CardInfo SetSacrificablePortrait(this CardInfo info, Sprite portra /// /// Sets the card's pixel sacrificable portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the portrait artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, string pathToArt) { return info.SetPixelSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -846,10 +846,10 @@ public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, string p /// /// Sets the card's pixel sacrificable portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// to access. /// The card portrait's Texture. /// The filter mode applied to the portrait in-game (defaults to Point). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetPixelSacrificablePortrait(portrait.ConvertTexture(TextureHelper.SpriteType.PixelPortrait, filterMode ?? default)); @@ -858,9 +858,9 @@ public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Texture2 /// /// Sets the card's pixel sacrificable portrait. This portrait is only used in Act 2. /// - /// CardInfo to access. + /// to access. /// The card portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Sprite portrait) { if (!string.IsNullOrEmpty(info.name)) @@ -873,9 +873,9 @@ public static CardInfo SetPixelSacrificablePortrait(this CardInfo info, Sprite p /// /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). /// - /// CardInfo to access. + /// to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, string pathToArt) { return info.SetEmissiveSacrificablePortrait(TextureHelper.GetImageAsTexture(pathToArt)); @@ -884,10 +884,10 @@ public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, strin /// /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). /// - /// CardInfo to access. + /// to access. /// The card portrait's Texture. /// The filter mode applied to the portrait in-game (defaults to Point). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetEmissiveSacrificablePortrait(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -896,9 +896,9 @@ public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Textu /// /// Sets the emissive sacrificable portrait for the card. This can only be done after the sacrificable portrait has been set (SetSacrifablePortrait). /// - /// CardInfo to access. + /// to access. /// The card portrait's Sprite. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Sprite portrait) { if (info.SacrificablePortrait() == null) @@ -908,19 +908,19 @@ public static CardInfo SetEmissiveSacrificablePortrait(this CardInfo info, Sprit return info; } /// - /// Retrieves the given CardInfo's sacrificable portrait's emission. + /// Retrieves the given 's sacrificable portrait's emission. /// /// - /// The CardInfo's emissive sacrificable portrait, or null if one doesn't exist. + /// The 's emissive sacrificable portrait, or null if one doesn't exist. public static Sprite GetEmissiveSacrificablePortrait(this CardInfo info) => info.SacrificablePortrait().GetEmissionSprite(); #endregion /// - /// Sets the animated portrait for the given CardInfo. + /// Sets the animated portrait for the given . /// - /// CardInfo to access. + /// to access. /// The to check for. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetAnimatedPortrait(this CardInfo info, GameObject portrait) { info.animatedPortrait = portrait; @@ -928,47 +928,47 @@ public static CardInfo SetAnimatedPortrait(this CardInfo info, GameObject portra } /// - /// Returns whether or not the given PlayableCard's CardInfo has an alternate card portrait. + /// Returns whether or not this card has an alternate card portrait. /// public static bool HasAlternatePortrait(this PlayableCard card) => card.Info.HasAlternatePortrait(); /// - /// Returns whether or not the given CardInfo has an alternate card portrait. + /// Returns whether or not the given has an alternate card portrait. /// public static bool HasAlternatePortrait(this CardInfo info) => info.alternatePortrait != null; /// - /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait. + /// Returns whether or not the given has an alternate Act 2 card portrait. /// public static bool HasPixelAlternatePortrait(this CardInfo info) => info.PixelAlternatePortrait() != null; /// - /// Returns whether or not the given CardInfo has an alternate Steel Trap card portrait for when Steel Trap triggers on a card. + /// Returns whether or not the given has an alternate Steel Trap card portrait for when Steel Trap triggers on a card. /// public static bool HasSteelTrapPortrait(this CardInfo info) => info.SteelTrapPortrait() != null; /// - /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait for when Steel Trap triggers on a card. + /// Returns whether or not the given has an alternate Act 2 card portrait for when Steel Trap triggers on a card. /// public static bool HasPixelSteelTrapPortrait(this CardInfo info) => info.PixelSteelTrapPortrait() != null; /// - /// Returns whether or not the given CardInfo has an alternate card portrait for when a card's shield is broken. + /// Returns whether or not the given has an alternate card portrait for when a card's shield is broken. /// public static bool HasBrokenShieldPortrait(this CardInfo info) => info.BrokenShieldPortrait() != null; /// - /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait for when a card's shield is broken. + /// Returns whether or not the given has an alternate Act 2 card portrait for when a card's shield is broken. /// public static bool HasPixelBrokenShieldPortrait(this CardInfo info) => info.PixelBrokenShieldPortrait() != null; /// - /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait for when a card can be sacrificed. + /// Returns whether or not the given has an alternate Act 2 card portrait for when a card can be sacrificed. /// public static bool HasSacrificablePortrait(this CardInfo info) => info.SacrificablePortrait() != null; /// - /// Returns whether or not the given CardInfo has an alternate Act 2 card portrait for when a card can be sacrificed. + /// Returns whether or not the given has an alternate Act 2 card portrait for when a card can be sacrificed. /// public static bool HasPixelSacrificablePortrait(this CardInfo info) => info.PixelSacrificablePortrait() != null; } \ No newline at end of file diff --git a/InscryptionAPI/Card/CardExtensionsProperties.cs b/InscryptionAPI/Card/CardExtensionsProperties.cs index b20ebc88..54c1630a 100644 --- a/InscryptionAPI/Card/CardExtensionsProperties.cs +++ b/InscryptionAPI/Card/CardExtensionsProperties.cs @@ -9,10 +9,10 @@ public static partial class CardExtensions { /// /// Adds a custom property value to the card. /// - /// CardInfo to access. + /// to access. /// The name of the property to set. /// The value of the property. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetExtendedProperty(this CardInfo info, string propertyName, object value) { info.GetCardExtensionTable()[propertyName] = value?.ToString(); @@ -22,7 +22,7 @@ public static CardInfo SetExtendedProperty(this CardInfo info, string propertyNa /// /// Gets a custom property value from the card. /// - /// CardInfo to access. + /// to access. /// The name of the property to get the value of. /// The custom property value as a string. If it doesn't exist, returns null. public static string GetExtendedProperty(this CardInfo info, string propertyName) @@ -34,7 +34,7 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// /// Gets a custom property as a nullable int. /// - /// CardInfo to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as an int or null if it didn't exist or couldn't be parsed as int. public static int? GetExtendedPropertyAsInt(this CardInfo info, string propertyName) @@ -46,7 +46,7 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// /// Gets a custom property as a nullable float. /// - /// CardInfo to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as a float or null if it didn't exist or couldn't be parsed as float. public static float? GetExtendedPropertyAsFloat(this CardInfo info, string propertyName) @@ -58,7 +58,7 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// /// Gets a custom property as a nullable boolean. /// - /// CardInfo to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as a boolean or null if it didn't exist or couldn't be parsed as boolean. public static bool? GetExtendedPropertyAsBool(this CardInfo info, string propertyName) @@ -71,22 +71,22 @@ public static string GetExtendedProperty(this CardInfo info, string propertyName /// /// Checks if this card will be killed by the effect of Tidal Lock. /// - /// PlayableCard to access. + /// to access. /// True if the card is affected by Tidal Lock. public static bool IsAffectedByTidalLock(this PlayableCard item) => item.Info.IsAffectedByTidalLock(); /// /// Checks if this card info will be killed by the effect of Tidal Lock. /// - /// CardInfo to access. + /// to access. /// True if the card info is affected by Tidal Lock. public static bool IsAffectedByTidalLock(this CardInfo info) => info.GetExtendedPropertyAsBool("AffectedByTidalLock") ?? false; /// /// Sets whether the card should be killed by Tidal Lock's effect. /// - /// CardInfo to access. + /// to access. /// Whether or not this card should be affected by Tidal Lock. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetAffectedByTidalLock(this CardInfo info, bool affectedByTidalLock = true) { info.SetExtendedProperty("AffectedByTidalLock", affectedByTidalLock); @@ -98,22 +98,22 @@ public static CardInfo SetAffectedByTidalLock(this CardInfo info, bool affectedB /// /// Gets the string value of the extended property TransformerCardId. Can be null. /// - /// PlayableCard to access. + /// to access. /// The string value of the extended property TransformerCardId. public static string GetTransformerCardId(this PlayableCard item) => item.Info.GetTransformerCardId(); /// /// Gets the string value of the extended property TransformerCardId. Can be null. /// - /// CardInfo to access. + /// to access. /// The string value of the extended property TransformerCardId. public static string GetTransformerCardId(this CardInfo info) => info.GetExtendedProperty("TransformerCardId"); /// /// Sets whether the card should be killed by Tidal Lock's effect. /// - /// CardInfo to access. + /// to access. /// The internal name of the card this card should transform into. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTransformerCardId(this CardInfo info, string transformerCardId) { info.SetExtendedProperty("TransformerCardId", transformerCardId); @@ -124,38 +124,38 @@ public static CardInfo SetTransformerCardId(this CardInfo info, string transform #region Custom Costs /// - /// Determines if the given CardInfo has the given custom card cost. + /// Determines if the given has the given custom card cost. /// - /// The CardInfo to access. + /// The to access. /// The custom card cost to check for. - /// True if the CardInfo needs the given custom cost to be played. + /// True if the needs the given custom cost to be played. public static bool HasCustomCost(this CardInfo info, FullCardCost customCost) => info.GetCustomCost(customCost) != 0; /// - /// Sets a card's custom cost property using the provided FullCardCost object as a reference. + /// Sets a card's custom cost property using the provided object as a reference. /// - /// The CardInfo to modify. - /// The FullCardCost representing the cost we want to set. - /// How much of the custom cost the CardInfo should need to be played. - /// The same CardInfo so a chain can continue. + /// The to modify. + /// The representing the cost we want to set. + /// How much of the custom cost the should need to be played. + /// The same so a chain can continue. public static CardInfo SetCustomCost(this CardInfo info, FullCardCost customCost, int amount) => info.SetCustomCost(customCost.CostName, amount); /// /// A variant of intended to be used to set properties representing custom costs. Primarily provided for clarity of purpose. /// - /// The CardInfo to modify. + /// The to modify. /// The name of the cost we want to set. - /// How much of the custom cost the CardInfo should need to be played. - /// The same CardInfo so a chain can continue. + /// How much of the custom cost the should need to be played. + /// The same so a chain can continue. public static CardInfo SetCustomCost(this CardInfo info, string costName, int amount) => info.SetExtendedProperty(costName, amount); /// /// A variant of intended to be used to set properties representing custom costs. Primarily provided for clarity of purpose. /// - /// The CardInfo to modify. - /// The class of the cost we want to set. - /// How much of the custom cost the CardInfo should need to be played. - /// The same CardInfo so a chain can continue. + /// The to modify. + /// The we want to set. + /// How much of the custom cost the should need to be played. + /// The same so a chain can continue. public static CardInfo SetCustomCost(this CardInfo info, int amount) where T : CustomCardCost { FullCardCost cost = CardCostManager.AllCustomCosts.Find(x => x.CostBehaviour == typeof(T)); @@ -165,7 +165,7 @@ public static CardInfo SetCustomCost(this CardInfo info, int amount) where T /// /// Variant of that automatically retrieves the given cost's canBeNegative value when retrieving the cost amount. /// - /// The PlayableCard to access. + /// The to access. /// The name of the custom card cost. /// How much of the given cost is needed for the given card to be played. public static int GetCustomCostAmount(this PlayableCard card, string costName) => card.Info.GetCustomCostAmount(costName); @@ -173,24 +173,24 @@ public static CardInfo SetCustomCost(this CardInfo info, int amount) where T /// /// Variant of that automatically retrieves the given cost's canBeNegative value when retrieving the cost amount. /// - /// The CardInfo to access. + /// The to access. /// The name of the custom card cost. /// How much of the given cost is needed for the given card to be played. public static int GetCustomCostAmount(this CardInfo cardInfo, string costName) => cardInfo.GetCustomCost(costName, AllCustomCosts.Find(x => x.CostName == costName).CanBeNegative); /// - /// Retrieves the given PlayableCard's custom card cost amount. + /// Retrieves the given 's custom card cost amount. /// - /// The PlayableCard to access. + /// The to access. /// The name of the custom card cost. /// Whether the card cost amount can be negative. If false, returns 0 for negative cost values. /// How much of the given cost is needed for the given card to be played. public static int GetCustomCost(this PlayableCard card, string costName, bool canBeNegative = false) => card.Info.GetCustomCost(costName, canBeNegative); /// - /// Retrieves the given CardInfo's custom card cost amount. + /// Retrieves the given 's custom card cost amount. /// - /// The CardInfo to access. + /// The to access. /// The name of the custom card cost. /// Whether the card cost amount can be negative. If false, returns 0 for negative cost values. /// How much of the given cost is needed for the given card to be played. @@ -208,10 +208,10 @@ public static int GetCustomCost(this CardInfo cardInfo, string costName, bool ca } /// - /// Retrieves the custom card cost amount of the given class Type from the given PlayableCard. + /// Retrieves the custom card cost amount of the given class Type from the given . /// /// The class of the card cost to check. - /// The PlayableCard to access. + /// The to access. /// If the returned value can be negative. If false, returns 0 instead. /// The card cost amount this card costs. public static int GetCustomCost(this PlayableCard card, bool canBeNegative = false) where T : CustomCardCost @@ -221,10 +221,10 @@ public static int GetCustomCost(this PlayableCard card, bool canBeNegative = } /// - /// Retrieves the custom card cost amount of the given class Type from the given CardInfo. + /// Retrieves the custom card cost amount of the given class Type from the given . /// /// The class of the card cost to check. - /// The CardInfo to access. + /// The to access. /// If the returned value can be negative. If false, returns 0 instead. /// The card cost amount this card costs. public static int GetCustomCost(this CardInfo cardInfo, bool canBeNegative = false) where T : CustomCardCost @@ -234,10 +234,10 @@ public static int GetCustomCost(this CardInfo cardInfo, bool canBeNegative = } /// - /// Retrieves the custom card cost amount of the given class Type from the given PlayableCard. + /// Retrieves the custom card cost amount of the given class Type from the given . /// /// The class of the card cost to check. - /// The PlayableCard to access. + /// The to access. /// The card cost amount this card costs. public static int GetCustomCostAmount(this PlayableCard card) where T : CustomCardCost { @@ -246,10 +246,10 @@ public static int GetCustomCostAmount(this PlayableCard card) where T : Custo } /// - /// Retrieves the custom card cost amount of the given class Type from the given CardInfo. + /// Retrieves the custom card cost amount of the given class Type from the given . /// /// The class of the card cost to check. - /// The CardInfo to access. + /// The to access. /// The card cost amount this card costs. public static int GetCustomCostAmount(this CardInfo cardInfo) where T : CustomCardCost { @@ -258,10 +258,10 @@ public static int GetCustomCostAmount(this CardInfo cardInfo) where T : Custo } /// - /// Retrieves the given custom card cost amount from the given PlayableCard. + /// Retrieves the given custom card cost amount from the given . /// Only returns negative values if the custom cost allows it. /// - /// The PlayableCard to access. + /// The to access. /// The custom card cost to check for. /// The card cost amount this card costs. public static int GetCustomCost(this PlayableCard card, FullCardCost fullCardCost) @@ -269,10 +269,10 @@ public static int GetCustomCost(this PlayableCard card, FullCardCost fullCardCos return card.GetCustomCostAmount(fullCardCost.CostName); } /// - /// Retrieves the given custom card cost amount from the given CardInfo. + /// Retrieves the given custom card cost amount from the given . /// Only returns negative values if the custom cost allows it. /// - /// The CardInfo to access. + /// The to access. /// The custom card cost to check for. /// The card cost amount this card costs. public static int GetCustomCost(this CardInfo cardInfo, FullCardCost fullCardCost) @@ -280,10 +280,10 @@ public static int GetCustomCost(this CardInfo cardInfo, FullCardCost fullCardCos return cardInfo.GetCustomCostAmount(fullCardCost.CostName); } /// - /// Retrieves all custom card costs from the given Card. + /// Retrieves all custom card costs from the given . /// - /// The Card to access. - /// A List of CustomCardCost objects for each custom cost the Card needs to be played. + /// The to access. + /// A List of objects for each custom cost the needs to be played. public static List GetCustomCardCosts(this DiskCardGame.Card card) { try @@ -308,10 +308,10 @@ public static List GetCustomCardCosts(this DiskCardGame.Card car } /// - /// Retrieves all custom card costs from the given CardInfo. + /// Retrieves all custom card costs from the given . /// - /// The CardInfo to access. - /// A List of CustomCardCost objects for each custom cost the CardInfo needs to be played. + /// The to access. + /// A List of objects for each custom cost the needs to be played. public static List GetCustomCosts(this CardInfo info) { List costs = new(); @@ -331,27 +331,27 @@ public static List GetCustomCosts(this CardInfo info) #region SteelTrapPelt /// - /// Set the Pelt that should be given when this card is slain by a trap. + /// Set the pelt card that should be given when this card is killed by the ability. /// - /// The Card this is being applied to. - /// The Card to be given to the Player on Death by Trap + /// The card this is being applied to. + /// The card to be given to the Player on Death by Trap public static void SetSteelTrapPelt(this PlayableCard card, string peltName) => SetSteelTrapPelt(card.Info, peltName); /// - /// Get the Pelt that should be given when this card is slain by a trap. + /// Set the pelt card that should be given when this card is killed by the ability. /// - /// The Card this is being applied to. + /// The card this is being applied to. /// A string representing the Pelt that should be returned. public static string GetSteelTrapPelt(this PlayableCard card) => GetSteelTrapPelt(card.Info); /// - /// Set the Pelt that should be given when this card is slain by a trap. + /// Set the pelt card that should be given when this card is killed by the ability. /// - /// The CardInfo this is being applied to. + /// The this is being applied to. /// The Card to be given to the Player on Death by Trap public static void SetSteelTrapPelt(this CardInfo cardInfo, string peltName) => cardInfo.SetExtendedProperty("SteelTrapPelt", peltName); /// - /// Get the Pelt that should be given when this card is slain by a trap. + /// Set the pelt card that should be given when this card is killed by the ability. /// - /// The CardInfo this is being applied to. + /// The this is being applied to. /// A string representing the Pelt that should be returned. public static string GetSteelTrapPelt(this CardInfo cardInfo) => cardInfo.GetExtendedProperty("SteelTrapPelt"); diff --git a/InscryptionAPI/Card/CardExtensionsSetters.cs b/InscryptionAPI/Card/CardExtensionsSetters.cs index d43b4315..608589d1 100644 --- a/InscryptionAPI/Card/CardExtensionsSetters.cs +++ b/InscryptionAPI/Card/CardExtensionsSetters.cs @@ -11,12 +11,12 @@ public static partial class CardExtensions /// /// Sets a number of basic properties of the card /// - /// CardInfo to access. + /// to access. /// Displayed name of the card. /// Attack of the card. /// Health of the card. /// The description that plays when the card is seen for the first time. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetBasic(this CardInfo info, string displayedName, int attack, int health, string description = default) { info.displayedName = displayedName; @@ -29,10 +29,10 @@ public static CardInfo SetBasic(this CardInfo info, string displayedName, int at /// /// Sets the base attack and health of the card. /// - /// CardInfo to access. + /// to access. /// The base attack for the card. /// The base health for the card. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetBaseAttackAndHealth(this CardInfo info, int? baseAttack = 0, int? baseHealth = 0) { if (baseAttack.HasValue) @@ -48,9 +48,9 @@ public static CardInfo SetBaseAttackAndHealth(this CardInfo info, int? baseAttac /// Sets the CardTemple for the card. Used to determine what cards are obtainable in each Act. /// Act 1 uses Nature cards, Act 2 uses all Temples for each region, Act 3 uses Tech cards. /// - /// CardInfo to access. + /// to access. /// The CardTemple to use. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetCardTemple(this CardInfo info, CardTemple temple) { info.temple = temple; @@ -63,9 +63,9 @@ public static CardInfo SetCardTemple(this CardInfo info, CardTemple temple) /// Intermediate: unlocked after the second tutorial /// Advanced: unlocked after the third tutorial if all its abilities have been learned /// - /// CardInfo to access. + /// to access. /// The CardComplexity to use. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetCardComplexity(this CardInfo info, CardComplexity complexity) { info.cardComplexity = complexity; @@ -75,9 +75,9 @@ public static CardInfo SetCardComplexity(this CardInfo info, CardComplexity comp /// /// Sets the displayed name of the card. /// - /// CardInfo to access. + /// to access. /// The displayed name for the card. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetDisplayedName(this CardInfo info, string displayedName) { info.displayedName = displayedName.IsNullOrWhitespace() ? "" : displayedName; @@ -87,10 +87,10 @@ public static CardInfo SetDisplayedName(this CardInfo info, string displayedName /// /// Sets the name of the card. /// - /// CardInfo to access. + /// to access. /// The name for the card. /// The string that will be prefixed to the card name if it doesn't already exist. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetName(this CardInfo info, string name, string modPrefix = default) { info.name = !string.IsNullOrEmpty(modPrefix) && !name.StartsWith(modPrefix) ? $"{modPrefix}_{name}" : name; @@ -100,11 +100,11 @@ public static CardInfo SetName(this CardInfo info, string name, string modPrefix /// /// Sets the card name and displayed name of the card. /// - /// CardInfo to access. + /// to access. /// The name for the card. /// The displayed name for the card. /// The string that will be prefixed to the card name if it doesn't already exist. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetNames(this CardInfo info, string name, string displayedName, string modPrefix = default) { info.SetDisplayedName(displayedName); @@ -112,11 +112,11 @@ public static CardInfo SetNames(this CardInfo info, string name, string displaye } /// - /// Sets the CardInfo's special abilities field to any number of special abilities to the card. + /// Sets the 's special abilities field to any number of special abilities to the card. /// - /// CardInfo to access. + /// to access. /// The abilities to add. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetSpecialAbilities(this CardInfo info, params SpecialTriggeredAbility[] abilities) { info.specialAbilities = abilities?.ToList(); @@ -126,9 +126,9 @@ public static CardInfo SetSpecialAbilities(this CardInfo info, params SpecialTri /// /// Sets the stat icon to the card. /// - /// CardInfo to access. + /// to access. /// The stat icon to set. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetStatIcon(this CardInfo info, SpecialStatIcon statIcon) { info.specialStatIcon = statIcon; @@ -139,9 +139,9 @@ public static CardInfo SetStatIcon(this CardInfo info, SpecialStatIcon statIcon) /// /// Sets any number of traits to the card. /// - /// CardInfo to access. + /// to access. /// The traits to add. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTraits(this CardInfo info, params Trait[] traits) { info.traits = traits?.ToList(); @@ -152,9 +152,9 @@ public static CardInfo SetTraits(this CardInfo info, params Trait[] traits) /// /// Set any number of tribes to the card. /// - /// CardInfo to access. + /// to access. /// The tribes to add. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTribes(this CardInfo info, params Tribe[] tribes) { info.tribes = tribes?.ToList(); @@ -164,9 +164,9 @@ public static CardInfo SetTribes(this CardInfo info, params Tribe[] tribes) /// /// Sets whether the card should be Gemified or not. Can and will un-Gemify cards. /// - /// CardInfo to access. + /// to access. /// Whether the card should be gemified. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetGemify(this CardInfo info, bool gemify = true) { if (gemify && !info.Mods.Exists(x => x.gemify)) @@ -181,10 +181,11 @@ public static CardInfo SetGemify(this CardInfo info, bool gemify = true) #region MetaCategories /// - /// Sets the card to behave as a "normal" card in Part 1. The CardTemple is Nature and it will appear in choice nodes and trader nodes. + /// Sets the card to behave as a "normal" card in Part 1. + /// The CardTemple is Nature and it will appear in choice nodes and trader nodes. /// - /// CardInfo to access. - /// The same CardInfo so a chain can continue. + /// to access. + /// The same so a chain can continue. public static CardInfo SetDefaultPart1Card(this CardInfo info) { if (!info.metaCategories.Contains(CardMetaCategory.Rare)) @@ -197,10 +198,11 @@ public static CardInfo SetDefaultPart1Card(this CardInfo info) } /// - /// Sets the card to behave as a "normal" card in Part 3. The CardTemple is Tech and it will appear in choice nodes and as a potential random card from GiftBot. + /// Sets the card to behave as a "normal" card in Part 3. + /// The CardTemple is Tech and it will appear in choice nodes and as a potential random card from GiftBot. /// - /// CardInfo to access. - /// The same CardInfo so a chain can continue. + /// to access. + /// The same so a chain can continue. public static CardInfo SetDefaultPart3Card(this CardInfo info) { if (!info.metaCategories.Contains(CardMetaCategory.Rare)) @@ -215,9 +217,9 @@ public static CardInfo SetDefaultPart3Card(this CardInfo info) /// /// Makes the card fully playable in GBC mode and able to appear in card packs. /// - /// CardInfo to access. + /// to access. /// The temple that the card will exist under. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetGBCPlayable(this CardInfo info, CardTemple temple) { info.AddMetaCategories(CardMetaCategory.GBCPack, CardMetaCategory.GBCPlayable); @@ -229,8 +231,8 @@ public static CardInfo SetGBCPlayable(this CardInfo info, CardTemple temple) /// /// Sets the card so it shows up for rare card choices and applies the rare background. /// - /// CardInfo to access. - /// The same CardInfo so a chain can continue. + /// to access. + /// The same so a chain can continue. public static CardInfo SetRare(this CardInfo info) { info.AddMetaCategories(CardMetaCategory.Rare); @@ -249,8 +251,8 @@ public static CardInfo SetRare(this CardInfo info) /// /// Adds the terrain trait and background to this card. /// - /// Card to access. - /// The same card info so a chain can continue. + /// to access. + /// The same so a chain can continue. public static CardInfo SetTerrain(this CardInfo info) { info.AddTraits(Trait.Terrain); @@ -258,11 +260,11 @@ public static CardInfo SetTerrain(this CardInfo info) return info; } /// - /// Adds the Terrain trait and background to this card, with the option to not use TerrainLayout. + /// Adds the Terrain trait and background to this card, with the option to not use . /// - /// CardInfo to access. - /// Whether or not the CardInfo should be given the TerrainLayout appearance behaviour. - /// The same CardInfo so a chain can continue. + /// to access. + /// Whether or not the should be given the appearance behaviour. + /// The same so a chain can continue. public static CardInfo SetTerrain(this CardInfo info, bool useTerrainLayout) { info.AddTraits(Trait.Terrain); @@ -273,11 +275,11 @@ public static CardInfo SetTerrain(this CardInfo info, bool useTerrainLayout) } /// - /// Adds the Pelt trait and background to this card, and optionally adds the SpawnLice special ability. + /// Adds the Pelt trait and background to this card, and optionally adds the special ability. /// - /// CardInfo to access. - /// Whether or not the given CardInfo should also spawn lice. - /// The same CardInfo so a chain can continue. + /// to access. + /// Whether or not the given should also spawn lice. + /// The same so a chain can continue. public static CardInfo SetPelt(this CardInfo info, bool spawnLice = true) { info.AddTraits(Trait.Pelt); @@ -291,13 +293,13 @@ public static CardInfo SetPelt(this CardInfo info, bool spawnLice = true) #region EvolveIceCubeTail /// - /// Sets the evolve parameters of the card. These parameters are used to make the Evolve ability function correctly. + /// Sets the evolve parameters of the card. These parameters are used to make the ability function correctly. /// - /// CardInfo to access. + /// to access. /// The card that will be generated after the set number of turns. /// The number of turns before the card evolves. /// A set of card mods to be applied to the evolved card. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEvolve(this CardInfo info, CardInfo evolveCard, int numberOfTurns, IEnumerable mods = null) { info.evolveParams = new() @@ -316,14 +318,14 @@ public static CardInfo SetEvolve(this CardInfo info, CardInfo evolveCard, int nu } /// - /// Sets the evolve parameters of the card. These parameters are used to make the Evolve ability function correctly. + /// Sets the evolve parameters of the card. These parameters are used to make the ability function correctly. /// This function uses delayed loading to attach the evolution to the card, so if the evolve card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// to access. /// The name of card that will be generated after the set number of turns. /// The number of turns before the card evolves. /// A set of card mods to be applied to the evolved card. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEvolve(this CardInfo info, string evolveInto, int numberOfTurns, IEnumerable mods = null) { CardInfo evolution = CardManager.AllCardsCopy.CardByName(evolveInto); @@ -354,9 +356,9 @@ public static CardInfo SetEvolve(this CardInfo info, string evolveInto, int numb /// /// Sets the default evolution name for the card. This is the name used when the card doesn't evolve into another card. /// - /// CardInfo to access. + /// to access. /// The default evolution name to use. Pass in 'null' to use the vanilla default. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetDefaultEvolutionName(this CardInfo info, string defaultName) { info.defaultEvolutionName = defaultName; @@ -364,12 +366,12 @@ public static CardInfo SetDefaultEvolutionName(this CardInfo info, string defaul } /// - /// Sets the ice cube parameters of the card. These parameters are used to make the IceCube ability function correctly. + /// Sets the ice cube parameters of the card. These parameters are used to make the ability function correctly. /// - /// CardInfo to access. + /// to access. /// The card that will be generated when this card dies. /// A set of card mods to be applied to the ice cube contents. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetIceCube(this CardInfo info, CardInfo iceCube, IEnumerable mods = null) { info.iceCubeParams = new() @@ -387,13 +389,13 @@ public static CardInfo SetIceCube(this CardInfo info, CardInfo iceCube, IEnumera } /// - /// Sets the ice cube parameters of the card. These parameters are used to make the IceCube ability function correctly. + /// Sets the ice cube parameters of the card. These parameters are used to make the ability function correctly. /// This function uses delayed loading to attach the ice cube to the card, so if the ice cube card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// to access. /// The name of the card that will be generated when this card dies. /// A set of card mods to be applied to the ice cube contents. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetIceCube(this CardInfo info, string iceCubeName, IEnumerable mods = null) { CardInfo creatureWithin = CardManager.AllCardsCopy.CardByName(iceCubeName); @@ -423,14 +425,14 @@ public static CardInfo SetIceCube(this CardInfo info, string iceCubeName, IEnume } /// - /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. + /// Sets the tail parameters of the card. These parameters are used to make the ability function correctly. /// This function uses delayed loading to attach the tail to the card, so if the tail card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// to access. /// The name of the card that will be generated as the "tail" when the first hit is dodged. /// The path to the .png file containing the lost tail artwork (relative to the Plugins directory). /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTail(this CardInfo info, string tailName, string pathToLostTailArt = null, IEnumerable mods = null) { Texture2D lostTailPortrait = pathToLostTailArt == null ? null : TextureHelper.GetImageAsTexture(pathToLostTailArt); @@ -438,39 +440,39 @@ public static CardInfo SetTail(this CardInfo info, string tailName, string pathT } /// - /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. + /// Sets the tail parameters of the card. These parameters are used to make the ability function correctly. /// This function uses delayed loading to attach the tail to the card, so if the tail card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// to access. /// The name of the card that will be generated as the "tail" when the first hit is dodged. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTail(this CardInfo info, string tailName, IEnumerable mods = null) { return info.SetTail(tailName, tailLostPortrait: null, mods: mods); } /// - /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. + /// Sets the tail parameters of the card. These parameters are used to make the ability function correctly. /// - /// CardInfo to access. + /// to access. /// The card that will be generated as the "tail" when the first hit is dodged. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTail(this CardInfo info, CardInfo tail, IEnumerable mods = null) { return info.SetTail(tail, null, mods); } /// - /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. + /// Sets the tail parameters of the card. These parameters are used to make the ability function correctly. /// - /// CardInfo to access. + /// to access. /// The card that will be generated as the "tail" when the first hit is dodged. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTail(this CardInfo info, CardInfo tail, Texture2D tailLostPortrait, FilterMode? filterMode = null, IEnumerable mods = null) { var tailLostSprite = !filterMode.HasValue @@ -480,13 +482,13 @@ public static CardInfo SetTail(this CardInfo info, CardInfo tail, Texture2D tail } /// - /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. + /// Sets the tail parameters of the card. These parameters are used to make the ability function correctly. /// - /// CardInfo to access. + /// to access. /// The card that will be generated as the "tail" when the first hit is dodged. /// The sprite containing the card portrait. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTail(this CardInfo info, CardInfo tail, Sprite tailLostPortrait, IEnumerable mods = null) { info.tailParams = new() @@ -507,15 +509,15 @@ public static CardInfo SetTail(this CardInfo info, CardInfo tail, Sprite tailLos } /// - /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. + /// Sets the tail parameters of the card. These parameters are used to make the ability function correctly. /// This function uses delayed loading to attach the tail to the card, so if the tail card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// to access. /// The name of the card that will be generated as the "tail" when the first hit is dodged. /// The texture containing the card portrait. /// The filter mode for the texture, or null if no change. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetTail(this CardInfo info, string tailName, Texture2D tailLostPortrait, FilterMode? filterMode = null, IEnumerable mods = null) { var tailLostSprite = !filterMode.HasValue @@ -525,14 +527,14 @@ public static CardInfo SetTail(this CardInfo info, string tailName, Texture2D ta } /// - /// Sets the tail parameters of the card. These parameters are used to make the TailOnHit ability function correctly. + /// Sets the tail parameters of the card. These parameters are used to make the ability function correctly. /// This function uses delayed loading to attach the tail to the card, so if the tail card doesn't exist yet, this function will still work. /// - /// CardInfo to access. + /// to access. /// The name of the card that will be generated as the "tail" when the first hit is dodged. /// The sprite containing the card portrait. /// A set of card mods to be applied to the tail. - /// The same CardInfo so a chain can continue.. + /// The same so a chain can continue.. public static CardInfo SetTail(this CardInfo info, string tailName, Sprite tailLostPortrait, IEnumerable mods = null) { CardInfo tail = CardManager.AllCardsCopy.CardByName(tailName); @@ -566,12 +568,12 @@ public static CardInfo SetTail(this CardInfo info, string tailName, Sprite tailL /// /// Sets the cost of the card. Any and all costs can be set this way. /// - /// CardInfo to access. + /// to access. /// The cost in blood (sacrifices). /// The cost in bones. /// The cost in energy. /// The cost in gems. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetCost(this CardInfo info, int? bloodCost = 0, int? bonesCost = 0, int? energyCost = 0, List gemsCost = null) { info.SetBloodCost(bloodCost); @@ -583,9 +585,9 @@ public static CardInfo SetCost(this CardInfo info, int? bloodCost = 0, int? bone /// /// Sets the blood cost of the card. /// - /// CardInfo to access. + /// to access. /// The cost in blood (sacrifices). - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetBloodCost(this CardInfo info, int? bloodCost = 0) { if (bloodCost.HasValue) @@ -596,9 +598,9 @@ public static CardInfo SetBloodCost(this CardInfo info, int? bloodCost = 0) /// /// Sets the bones cost of the card. /// - /// CardInfo to access. + /// to access. /// The cost in bones. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetBonesCost(this CardInfo info, int? bonesCost = 0) { if (bonesCost.HasValue) @@ -609,9 +611,9 @@ public static CardInfo SetBonesCost(this CardInfo info, int? bonesCost = 0) /// /// Sets the energy cost of the card. /// - /// CardInfo to access. + /// to access. /// The cost in energy. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetEnergyCost(this CardInfo info, int? energyCost = 0) { if (energyCost.HasValue) @@ -622,9 +624,9 @@ public static CardInfo SetEnergyCost(this CardInfo info, int? energyCost = 0) /// /// Sets the gems cost of the card. /// - /// CardInfo to access. + /// to access. /// The cost in Mox. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetGemsCost(this CardInfo info, List gemsCost = null) { info.gemsCost = gemsCost ?? new(); @@ -633,9 +635,9 @@ public static CardInfo SetGemsCost(this CardInfo info, List gemsCost = /// /// Sets the gems cost of the card. /// - /// CardInfo to access. + /// to access. /// The cost in Mox. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetGemsCost(this CardInfo info, params GemType[] gemsCost) { info.gemsCost = gemsCost.ToList(); @@ -645,9 +647,9 @@ public static CardInfo SetGemsCost(this CardInfo info, params GemType[] gemsCost #region Bools /// - /// Sets the card's onePerDeck field, which controls whether the player can own multiple copies of it in their deck. + /// Sets the card's onePerDeck field, which controls whether the player can own multiple copies of it in their deck. /// - /// The same card info so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetOnePerDeck(this CardInfo info, bool onePerDeck = true) { info.onePerDeck = onePerDeck; @@ -656,16 +658,16 @@ public static CardInfo SetOnePerDeck(this CardInfo info, bool onePerDeck = true) /// /// Sets whether or not the card's Power and Health stats will be displayed. /// - /// The same card info so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetHideStats(this CardInfo info, bool hideStats = true) { info.hideAttackAndHealth = hideStats; return info; } /// - /// Sets whether or not the CardInfo's portrait will be flipped when Strafe and similar abilities change direction. + /// Sets whether or not the 's portrait will be flipped when and similar abilities change direction. /// - /// The same card info so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetStrafeFlipsPortrait(this CardInfo info, bool flipPortrait = true) { info.flipPortraitForStrafe = flipPortrait; @@ -676,7 +678,7 @@ public static CardInfo SetStrafeFlipsPortrait(this CardInfo info, bool flipPortr /// /// Indicates if this is a base game card or not. /// - /// CardInfo to access. + /// to access. /// True of this card came from the base game; false otherwise. public static bool IsBaseGameCard(this CardInfo info) => info.GetExtendedPropertyAsBool("BaseGameCard") ?? false; @@ -692,7 +694,7 @@ public static CardInfo SetStrafeFlipsPortrait(this CardInfo info, bool flipPortr /// /// The card. /// The custom unlock check, a func that needs to return true for the card to be unlocked. The bool argument is true when the game is in Kaycee's Mod mode and the int argument is the current Kaycee's Mod challenge level. - /// The same CardInfo so a chain can continue. + /// The same so a chain can continue. public static CardInfo SetCustomUnlockCheck(this CardInfo c, Func check) { if (check == null && CardManager.CustomCardUnlocks.ContainsKey(c.name)) diff --git a/InscryptionAPI/Card/CardManager.cs b/InscryptionAPI/Card/CardManager.cs index 43ae997a..3b76c04e 100644 --- a/InscryptionAPI/Card/CardManager.cs +++ b/InscryptionAPI/Card/CardManager.cs @@ -25,26 +25,26 @@ private class CardExt // Needs to be defined first so the implicit static constr public readonly Dictionary StringMap = new(); } /// - /// Class for storing the data for custom portrait Sprites added via the API. + /// Class for storing the data for custom portrait sprites added via the API. /// /// - /// Only tracks custom API portraits like sacrificable steel trap, etc. + /// Only tracks custom API portraits like sacrificable, steel trap, etc. /// public class CardAltPortraits { /// - /// Portrait sprite used when calling GetAlternatePortrait in Act 2. + /// Portrait sprite used when calling in Act 2. /// public Sprite PixelAlternatePortrait = null; /// - /// Portrait sprite used when the Steel Trap sigil is triggered. + /// Portrait sprite used when the sigil is triggered. /// /// /// Example: Leaping Trap /// public Sprite SteelTrapPortrait = null; /// - /// Portrait sprite used when the Steel Trap sigil is triggered in Act 2. + /// Portrait sprite used when the sigil is triggered in Act 2. /// public Sprite PixelSteelTrapPortrait = null; /// @@ -76,7 +76,7 @@ public class CardAltPortraits internal static readonly Dictionary> CustomCardUnlocks = new(); /// - /// The set of cards that are in the base game + /// The set of cards that are in the base game. /// /// . public static readonly ReadOnlyCollection BaseGameCards = new(GetBaseGameCards().ToList()); @@ -297,7 +297,7 @@ public static void Remove(CardInfo card) /// The Power of the card. /// The Health of the card. /// The spoken description when the card is first encountered. - /// The newly created card's CardInfo. + /// The newly created card's . public static CardInfo New(string modPrefix, string name, string displayName, int attack, int health, string description = default) { CardInfo retval = ScriptableObject.CreateInstance(); @@ -333,18 +333,18 @@ public static CardInfo New(string modPrefix, string name, string displayName, in } /// - /// Retrieves the dictionary of card extended properties associated with the given CardInfo. + /// Retrieves the dictionary of card extended properties associated with the given . /// - /// The CardInfo whose extended properties we wish to retrieve. - /// The extension property dictionary for the given CardInfo. Creates and returns an empty dictionary if none exists. + /// The whose extended properties we wish to retrieve. + /// The extension property dictionary for the given . Creates and returns an empty dictionary if none exists. public static Dictionary GetCardExtensionTable(this CardInfo card) => CardExtensionProperties.GetOrCreateValue(card).StringMap; internal static CardAltPortraits GetAltPortraits(this CardInfo card) => CardAlternatePortraits.GetOrCreateValue(card); /// - /// Retrieves the Sprite for the CardInfo's alternate portrait in Act 2 if it exists. + /// Retrieves the for the 's alternate portrait in Act 2 if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the pixel alternate portrait or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the pixel alternate portrait or null if it doesn't exist. /// /// Pixel alternate portraits are added through the API; they are not a vanilla feature. /// @@ -353,46 +353,46 @@ public static Sprite PixelAlternatePortrait(this CardInfo card) return card.GetAltPortraits().PixelAlternatePortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait used when Steel Trap activates if it exists. + /// Retrieves the for the 's portrait used when activates if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the Steel Trap portrait or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the steel trap portrait or null if it doesn't exist. /// - /// Steel Trap portraits are added through the API; they are not a vanilla feature. + /// Steel trap portraits are added through the API; they are not a vanilla feature. /// public static Sprite SteelTrapPortrait(this CardInfo card) { return card.GetAltPortraits().SteelTrapPortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait emission used when Steel Trap activates if it exists. + /// Retrieves the for the 's portrait emission used when activates if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the Steel Trap portrait emission or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the steel trap portrait emission or null if it doesn't exist. /// - /// Steel Trap portraits are added through the API; they are not a vanilla feature. + /// Steel trap portraits are added through the API; they are not a vanilla feature. /// public static Sprite EmissiveSteelTrapPortrait(this CardInfo card) { return card.GetAltPortraits().SteelTrapPortrait.GetEmissionSprite(); } /// - /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when Steel Trap activates if it exists. + /// Retrieves the for the 's Act 2 portrait used when activates if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the pixel Steel Trap portrait or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the pixel steel trap portrait or null if it doesn't exist. /// - /// Pixel Steel Trap portraits are added through the API; they are not a vanilla feature. + /// Pixel Steel trap portraits are added through the API; they are not a vanilla feature. /// public static Sprite PixelSteelTrapPortrait(this CardInfo card) { return card.GetAltPortraits().PixelSteelTrapPortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait used when a card's shield breaks if it exists. + /// Retrieves the for the 's portrait used when a card's shield breaks if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the broken shield portrait or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the broken shield portrait or null if it doesn't exist. /// /// Broken shield portraits are added through the API; they are not a vanilla feature. /// @@ -401,10 +401,10 @@ public static Sprite BrokenShieldPortrait(this CardInfo card) return card.GetAltPortraits().BrokenShieldPortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait emission used when a card's shield breaks if it exists. + /// Retrieves the for the 's portrait emission used when a card's shield breaks if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the broken shield portrait emission or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the broken shield portrait emission or null if it doesn't exist. /// /// Broken shield portraits are added through the API; they are not a vanilla feature. /// @@ -413,10 +413,10 @@ public static Sprite EmissiveBrokenShieldPortrait(this CardInfo card) return card.GetAltPortraits().BrokenShieldPortrait.GetEmissionSprite(); } /// - /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when a card's shield breaks if it exists. + /// Retrieves the for the 's Act 2 portrait used when a card's shield breaks if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the pixel broken shield portrait or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the pixel broken shield portrait or null if it doesn't exist. /// /// Pixel broken shield portraits are added through the API; they are not a vanilla feature. /// @@ -425,10 +425,10 @@ public static Sprite PixelBrokenShieldPortrait(this CardInfo card) return card.GetAltPortraits().PixelBrokenShieldPortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait used when a card on the board can be sacrificed if it exists. + /// Retrieves the for the 's portrait used when a card on the board can be sacrificed if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the sacrificable portrait or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the sacrificable portrait or null if it doesn't exist. /// /// Sacrificable portraits are added through the API; they are not a vanilla feature. /// @@ -437,10 +437,10 @@ public static Sprite SacrificablePortrait(this CardInfo card) return card.GetAltPortraits().SacrificablePortrait; } /// - /// Retrieves the Sprite for the CardInfo's portrait emission used when a card on the board can be sacrificed if it exists. + /// Retrieves the for the 's portrait emission used when a card on the board can be sacrificed if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the sacrificable portrait emission or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the sacrificable portrait emission or null if it doesn't exist. /// /// Sacrificable portraits are added through the API; they are not a vanilla feature. /// @@ -449,10 +449,10 @@ public static Sprite EmissiveSacrificablePortrait(this CardInfo card) return card.GetAltPortraits().SacrificablePortrait.GetEmissionSprite(); } /// - /// Retrieves the Sprite for the CardInfo's Act 2 portrait used when a card on the board can be sacrificed if it exists. + /// Retrieves the for the 's Act 2 portrait used when a card on the board can be sacrificed if it exists. /// - /// The CardInfo whose portrait we're retrieving. - /// The Sprite for the pixel sacrificable portrait or null if it doesn't exist. + /// The whose portrait we're retrieving. + /// The for the pixel sacrificable portrait or null if it doesn't exist. /// /// Pixel sacrificable portraits are added through the API; they are not a vanilla feature. /// @@ -609,11 +609,11 @@ private static IEnumerable Transpiler(IEnumerable - /// Adds a null check when calling GetCardByName. If the returned CardInfo is null, outputs a console log error. + /// Adds a null check when calling . If the returned is null, outputs a console log error. /// - /// The CardInfo being returned by GetCardByName. - /// The internal name of the CardInfo attempting to be retrieved. - /// The return value of GetCardByName. + /// The being returned by . + /// The internal name of the attempting to be retrieved. + /// The return value of . public static CardInfo LogCardInfo(CardInfo info, string cardInfoName) { if (info == null) diff --git a/InscryptionAPI/Card/CardModificationInfoExtensions.cs b/InscryptionAPI/Card/CardModificationInfoExtensions.cs index bff05581..46f7f5bd 100644 --- a/InscryptionAPI/Card/CardModificationInfoExtensions.cs +++ b/InscryptionAPI/Card/CardModificationInfoExtensions.cs @@ -5,24 +5,24 @@ namespace InscryptionAPI.Card; /// -/// Class of helper extensions for CardModificationInfo objects. +/// Class of helper extensions for objects. /// public static class CardModificationInfoExtensions { /// - /// Determines if the given CardModificationInfo contains info for a death card. + /// Determines if the given contains info for a death card. /// - /// The CardModificationInfo to access. - /// True if the CardModificationInfo has death card info. + /// The to access. + /// True if the has death card info. public static bool HasDeathCardInfo(this CardModificationInfo mod) => mod.deathCardInfo != null; #region Adders /// - /// Adds decal ID strings to the given CardModificationInfo. + /// Adds decal ID strings to the given . /// - /// The CardModificationInfo to access. + /// The to access. /// The decal IDs to add. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo AddDecalIds(this CardModificationInfo mod, params string[] decalIds) { foreach (string decalId in decalIds) @@ -33,12 +33,12 @@ public static CardModificationInfo AddDecalIds(this CardModificationInfo mod, pa return mod; } /// - /// Adds the given abilities to the given CardModificationInfos list of negated abilities. + /// Adds the given abilities to the given s list of negated abilities. /// THIS WILL NOT NEGATE THE GIVEN ABILITIES ON ITS OWN. /// - /// The CardModificationInfo to access. + /// The to access. /// The list of abilities to negate. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo AddNegateAbilities(this CardModificationInfo mod, params Ability[] negateAbilities) { mod.negateAbilities ??= new(); @@ -49,22 +49,22 @@ public static CardModificationInfo AddNegateAbilities(this CardModificationInfo #region Setters /// - /// Sets the name replacement field for the given CardModificationInfo. + /// Sets the name replacement field for the given . /// - /// The CardModification to access. + /// The to access. /// The name replacement. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetNameReplacement(this CardModificationInfo mod, string name = null) { mod.nameReplacement = name; return mod; } /// - /// Sets the singleton ID field for the given CardModificationInfo. + /// Sets the singleton ID field for the given . /// - /// The CardModification to access. + /// The to access. /// The singleton ID. If null, does not set it. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetSingletonId(this CardModificationInfo mod, string id = null) { if (id != null) @@ -72,12 +72,12 @@ public static CardModificationInfo SetSingletonId(this CardModificationInfo mod, return mod; } /// - /// Sets the attack and health adjustment fields for the given CardModificationInfo. + /// Sets the attack and health adjustment fields for the given . /// - /// The CardModification to access. + /// The to access. /// How much attack this mod should give. Can be negative. /// How much health this mod should give. Can be negative. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetAttackAndHealth(this CardModificationInfo mod, int attack = 0, int health = 0) { mod.attackAdjustment = attack; @@ -85,57 +85,57 @@ public static CardModificationInfo SetAttackAndHealth(this CardModificationInfo return mod; } /// - /// Sets the cost adjustment fields for the given CardModificationInfo. + /// Sets the cost adjustment fields for the given . /// - /// The CardModification to access. + /// The to access. /// The amount the mod should modify a card's blood cost. Can be negative. /// The amount the mod should modify a card's bones cost. Can be negative. /// The amount the mod should modify a card's energy cost. Can be negative. /// The amount the mod should modify a card's gems cost. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetCosts(this CardModificationInfo mod, int blood = 0, int bones = 0, int energy = 0, List gems = null) { return mod.SetBloodCost(blood).SetBonesCost(bones).SetEnergyCost(energy).SetGemsCost(gems); } /// - /// Sets the blood cost adjustment field for the given CardModificationInfo. + /// Sets the blood cost adjustment field for the given . /// - /// The CardModification to access. + /// The to access. /// The amount the mod should modify a card's blood cost. Can be negative. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetBloodCost(this CardModificationInfo mod, int cost = 0) { mod.bloodCostAdjustment = cost; return mod; } /// - /// Sets the bones cost adjustment field for the given CardModificationInfo. + /// Sets the bones cost adjustment field for the given . /// - /// The CardModification to access. + /// The to access. /// The amount the mod should modify a card's bones cost. Can be negative. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetBonesCost(this CardModificationInfo mod, int cost = 0) { mod.bonesCostAdjustment = cost; return mod; } /// - /// Sets the energy cost adjustment field for the given CardModificationInfo. + /// Sets the energy cost adjustment field for the given . /// - /// The CardModification to access. + /// The to access. /// The amount the mod should modify a card's energy cost. Can be negative. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetEnergyCost(this CardModificationInfo mod, int cost = 0) { mod.energyCostAdjustment = cost; return mod; } /// - /// Sets the addGemsCost field for the given CardModificationInfo. + /// Sets the addGemsCost field for the given . /// - /// The CardModification to access. + /// The to access. /// List of gems cost this mod should add to a card. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetGemsCost(this CardModificationInfo mod, List cost = null) { if (cost != null) @@ -143,11 +143,11 @@ public static CardModificationInfo SetGemsCost(this CardModificationInfo mod, Li return mod; } /// - /// Sets the addGemsCost field for the given CardModificationInfo. + /// Sets the addGemsCost field for the given . /// - /// The CardModification to access. + /// The to access. /// Collection of gems cost this mod should add to a card. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetGemsCost(this CardModificationInfo mod, params GemType[] cost) { if (cost.Length > 0) @@ -155,25 +155,25 @@ public static CardModificationInfo SetGemsCost(this CardModificationInfo mod, pa return mod; } /// - /// Adds the given abilities to the given CardModificationInfo. + /// Adds the given abilities to the given . /// - /// The CardModificationInfo to access. + /// The to access. /// - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo AddAbilities(this CardModificationInfo mod, params Ability[] abilities) { mod.abilities.AddRange(abilities); return mod; } /// - /// Sets the given CardModificationInfo's deathCardInfo field with a new death card portrait. + /// Sets the given 's deathCardInfo field with a new death card portrait. /// - /// The CardModificationInfo to access. + /// The to access. /// What head the portrait should use. /// What mouth the portrait should use. /// What eyes the portrait should use. /// If the portrait should be missing an eye. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetDeathCardPortrait(this CardModificationInfo mod, CompositeFigurine.FigurineType headType = CompositeFigurine.FigurineType.SettlerMan, int mouthIndex = 0, int eyesIndex = 0, bool lostEye = false) @@ -189,17 +189,17 @@ public static CardModificationInfo SetDeathCardPortrait(this CardModificationInf /// public static void SetTemporaryDecal(this CardModificationInfo mod) => mod.SetExtendedProperty("API:TemporaryDecal", true); /// - /// Determines if the given CardModificationInfo is an API temporary decal. + /// Determines if the given is an API temporary decal. /// public static bool IsTemporaryDecal(this CardModificationInfo mod) => mod.GetExtendedPropertyAsBool("API:TemporaryDecal") ?? false; #region Singleton ID /// - /// Removes the custom properties field from a CardModificationInfo's singletonId. + /// Removes the custom properties field from a 's singletonId. /// - /// The CardModificationInfo object whose properties we want to clear. - /// The same CardModificationInfo so a chain can continue. + /// The object whose properties we want to clear. + /// The same so a chain can continue. public static CardModificationInfo ClearCustomPropertiesId(this CardModificationInfo mod) { string properties = GetCustomPropertiesIdString(mod); @@ -209,15 +209,15 @@ public static CardModificationInfo ClearCustomPropertiesId(this CardModification return mod; } /// - /// Removes the custom costs ID field from a CardModificationInfo's singletonId. + /// Removes the custom costs ID field from a 's singletonId. /// - /// The CardModificationInfo object whose custom costs ID we want to clear. - /// The same CardModificationInfo so a chain can continue. + /// The object whose custom costs ID we want to clear. + /// The same so a chain can continue. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
public static CardModificationInfo ClearCustomCostsId(this CardModificationInfo mod) @@ -231,9 +231,9 @@ public static CardModificationInfo ClearCustomCostsId(this CardModificationInfo #region Properties /// - /// Determines if the given CardModificationInfo has a singleton ID containing an API custom (extended) property. + /// Determines if the given has a singleton ID containing an API custom (extended) property. /// - /// The CardModificationInfo to access. + /// The to access. /// What custom property to look for. /// True if the given property is present, false if it isn't present or there is no custom property section. public static bool HasCustomPropertyId(this CardModificationInfo mod, string propertyName) => HasCustomPropertiesId(mod.singletonId) && mod.singletonId.Contains(propertyName); @@ -245,9 +245,9 @@ public static CardModificationInfo ClearCustomCostsId(this CardModificationInfo /// True if the given property is present, false if it isn't present or there is no custom property section. public static bool HasCustomPropertyId(this string singletonId, string propertyName) => HasCustomPropertiesId(singletonId) && singletonId.Contains(propertyName); /// - /// Determines if the given CardModificationInfo has any custom (extended) properties in its singleton ID. + /// Determines if the given has any custom (extended) properties in its singleton ID. /// - /// The CardModificationInfo to access. + /// The to access. /// True if there are any custom properties, false otherwise. public static bool HasCustomPropertiesId(this CardModificationInfo mod) => !mod.singletonId.IsNullOrWhitespace() && mod.singletonId.Contains(PROPERTIES); /// @@ -257,12 +257,12 @@ public static CardModificationInfo ClearCustomCostsId(this CardModificationInfo /// True if there are any custom properties, false otherwise. public static bool HasCustomPropertiesId(this string singletonId) => !singletonId.IsNullOrWhitespace() && singletonId.Contains(PROPERTIES); /// - /// Creates and/or modifies the custom properties section inside the given CardModificationInfo's singleton ID. + /// Creates and/or modifies the custom properties section inside the given 's singleton ID. /// - /// The CardModificationInfo to access. + /// The to access. /// The name of the property to add. /// What value to set for the property. Will be converted to a string. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetPropertiesId(this CardModificationInfo mod, string propertyName, object value) { string valuePair = $"{propertyName},{value}"; @@ -298,16 +298,16 @@ public static CardModificationInfo SetPropertiesId(this CardModificationInfo mod } /// - /// Determines if the given CardModificationInfo has a custom property with the given name. Checks extended properties before checking the singleton ID. + /// Determines if the given has a custom property with the given name. Checks extended properties before checking the singleton ID. /// /// The CardModificationInfo /// The custom property to search for. - /// True if the CardModificationInfo has an extended property or custom property ID with the given name. False otherwise. + /// True if the has an extended property or custom property ID with the given name. False otherwise. public static bool HasCustomProperty(this CardModificationInfo mod, string propertyName) => mod.GetCustomProperty(propertyName) != null; /// - /// Gets the custom property value from the given CardModificationInfo using the given property name. Checks extended properties before checking the singleton ID. + /// Gets the custom property value from the given using the given property name. Checks extended properties before checking the singleton ID. /// - /// The CardModificationInfo to access. + /// The to access. /// The custom property's name. /// The value of the custom property, or null. public static string GetCustomProperty(this CardModificationInfo mod, string propertyName) @@ -315,9 +315,9 @@ public static string GetCustomProperty(this CardModificationInfo mod, string pro return mod.GetExtendedProperty(propertyName) ?? mod.GetCustomPropertyId(propertyName); } /// - /// Retrieves the value of the given custom property ID in the given CardModificationInfo. + /// Retrieves the value of the given custom property ID in the given . /// - /// The CardModificationInfo to access. + /// The to access. /// The custom property whose value we want. /// The value of the custom property, or null if there is none. public static string GetCustomPropertyId(this CardModificationInfo mod, string propertyName) @@ -342,16 +342,16 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p #region CustomCosts /// - /// Determines if the given CardModificationInfo adds the given custom cost. + /// Determines if the given adds the given custom cost. /// - /// The CardModificationInfo to access. + /// The to access. /// The name of the custom cost to search for. /// True if the CardModification adds the given card cost. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] @@ -360,29 +360,29 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p /// /// Determines if the given singleton ID string has the given custom cost in its custom costs substring. /// - /// The CardModificationInfo to access. + /// The to access. /// The name of the custom cost to search for. /// True if the string has the given card cost in its custom costs substring. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostId(this string singletonId, string costName) => HasCustomCostsId(singletonId) && singletonId.Contains(costName); /// - /// Determines if the given CardModificationInfo adds any custom costs. + /// Determines if the given adds any custom costs. /// - /// The CardModificationInfo to access. + /// The to access. /// True if the CardModification adds any card costs. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] @@ -391,30 +391,30 @@ public static string GetCustomPropertyId(this CardModificationInfo mod, string p /// /// Determines if the given singleton ID string has the custom costs substring. /// - /// The CardModificationInfo to access. + /// The to access. /// True if the string has the custom costs substring. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCostsId(this string singletonId) => !singletonId.IsNullOrWhitespace() && singletonId.Contains(CUSTOM_COSTS); /// - /// Sets the custom cost ID and play amount to the given CardModificationInfo's singleton ID. + /// Sets the custom cost ID and play amount to the given 's singleton ID. /// - /// The CardModificationInfo to access. + /// The to access. /// /// - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] @@ -451,22 +451,22 @@ public static CardModificationInfo SetCustomCostId(this CardModificationInfo mod } /// - /// Whetehr or not the given CardModificationInfo has the given custom cost. + /// Whetehr or not the given has the given custom cost. /// - /// The CardModificationInfo to access. + /// The to access. /// The name of the custom cost to find. - /// True if the CardModificationInfo uses the given custom cost. False otherwise; + /// True if the uses the given custom cost. False otherwise; /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] public static bool HasCustomCost(this CardModificationInfo mod, string costName) => (mod.GetExtendedProperty(costName) ?? mod.GetCustomCostId(costName)) != null; /// - /// Retrieves the play amount of the given custom cost on the given CardModificationInfo. + /// Retrieves the play amount of the given custom cost on the given . /// Checks extended properties before checking custom cost IDs. /// /// The CardModificationinfo to access. @@ -474,9 +474,9 @@ public static CardModificationInfo SetCustomCostId(this CardModificationInfo mod /// The custom cost's play amount as an int. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] @@ -485,16 +485,16 @@ public static int GetCustomCost(this CardModificationInfo mod, string costName) return mod.GetExtendedPropertyAsInt(costName) ?? mod.GetCustomCostIdValue(costName); } /// - /// Retrieves the amount of the given custom cost the given CardModificationInfo costs as a string. + /// Retrieves the amount of the given custom cost the given costs as a string. /// - /// The CardModificationInfo to access. + /// The to access. /// The name of the custom cost to find. /// The string representation of the custom cost's play amount, or null if the custom cost ID is not present. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] @@ -517,16 +517,16 @@ public static string GetCustomCostId(this CardModificationInfo mod, string costN return pairString.Substring(0, valueIdx).Replace(costName + ",", ""); } /// - /// Retrieves the cost amount of the given custom cost on the given CardModificationInfo. + /// Retrieves the cost amount of the given custom cost on the given . /// - /// The CardModificationInfo to access. + /// The to access. /// Name of the custom cost to check for. /// How much of the custom cost this CardModificationInfo needs, or 0 if the cost is not present. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] @@ -539,15 +539,15 @@ public static int GetCustomCostIdValue(this CardModificationInfo mod, string cos return int.TryParse(valueStr, out int result) ? result : 0; } /// - /// Retrieves a list of all custom costs that the given CardModificationInfo adds. + /// Retrieves a list of all custom costs that the given adds. /// - /// The CardModificationInfo to access. - /// A List of all FullCardCosts the given CardModificationInfo adds to the attached card. + /// The to access. + /// A List of all FullCardCosts the given adds to the attached card. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
// [Obsolete("Custom cost IDs on CardModInfos have been deprecated, please use the CardCostManager instead.")] @@ -572,16 +572,16 @@ public static int GetCustomCostIdValue(this CardModificationInfo mod, string cos #region ID Getters /// - /// Creates a copy of the given CardModificationInfo's singleton ID without any of the API's custom property or cost substrings. + /// Creates a copy of the given 's singleton ID without any of the API's custom property or cost substrings. /// - /// The CardModificationInfo to access. - /// A new string that is a copy of the CardModificationInfo's singleton ID but without any API-added substrings. + /// The to access. + /// A new string that is a copy of the 's singleton ID but without any API-added substrings. public static string CleanId(this CardModificationInfo mod) => mod.IdWithoutCosts().IdWithoutProperties(); /// - /// Creates a new string that is a copy of the given CardModificationInfo's singleton ID string without the custom properties ID substring. + /// Creates a new string that is a copy of the given 's singleton ID string without the custom properties ID substring. /// - /// The CardModificationInfo to access. - /// A clean copy of the CardModificationInfo's singleton ID without the custom properties ID substring. + /// The to access. + /// A clean copy of the 's singleton ID without the custom properties ID substring. public static string IdWithoutProperties(this CardModificationInfo mod) => mod.singletonId.IdWithoutProperties(); /// /// Creates a new string that is a copy of the given string without the custom properties ID substring. @@ -597,10 +597,10 @@ public static string IdWithoutProperties(this string singletonId) return singletonId.Replace(properties, ""); } /// - /// Creates a new string that is a copy of the given CardModificationInfo's singleton ID string without the custom costs ID substring. + /// Creates a new string that is a copy of the given 's singleton ID string without the custom costs ID substring. /// - /// The CardModificationInfo to access. - /// A clean copy of the CardModificationInfo's singleton ID without the custom costs substring. + /// The to access. + /// A clean copy of the 's singleton ID without the custom costs substring. public static string IdWithoutCosts(this CardModificationInfo mod) => mod.singletonId.IdWithoutCosts(); /// /// Creates a new string that is a copy of the given string without the custom costs substring. @@ -623,13 +623,13 @@ public static string IdWithoutCosts(this string singletonId) #region Extended Properties /// - /// Adds a custom property value to the CardModificationInfo. + /// Adds a custom property value to the . /// - /// CardModificationInfo to access. + /// to access. /// The name of the property to set. /// The value of the property. /// Appends a string containing the custom property name and value to the mod's singletonId in the forme of "[ExtProperty:{propertyName},{value}:ExtProperty]". - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo SetExtendedProperty(this CardModificationInfo mod, string propertyName, object value, bool addToSingletonId = false) { mod.GetCardModExtensionTable()[propertyName] = value?.ToString(); @@ -642,7 +642,7 @@ public static CardModificationInfo SetExtendedProperty(this CardModificationInfo /// /// Gets a custom property value from the card. /// - /// CardModificationInfo to access. + /// to access. /// The name of the property to get the value of. /// The custom property value as a string. If it doesn't exist, returns null. public static string GetExtendedProperty(this CardModificationInfo mod, string propertyName) @@ -654,7 +654,7 @@ public static string GetExtendedProperty(this CardModificationInfo mod, string p /// /// Gets a custom property as an int (can be null). /// - /// CardModificationInfo to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as an int or null if it didn't exist or couldn't be parsed as int. public static int? GetExtendedPropertyAsInt(this CardModificationInfo mod, string propertyName) @@ -666,7 +666,7 @@ public static string GetExtendedProperty(this CardModificationInfo mod, string p /// /// Gets a custom property as a float (can be null). /// - /// CardModificationInfo to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as a float or null if it didn't exist or couldn't be parsed as float. public static float? GetExtendedPropertyAsFloat(this CardModificationInfo mod, string propertyName) @@ -678,7 +678,7 @@ public static string GetExtendedProperty(this CardModificationInfo mod, string p /// /// Gets a custom property as a boolean (can be null). /// - /// CardModificationInfo to access. + /// to access. /// Property name to get value of. /// Returns the value of the property as a boolean or null if it didn't exist or couldn't be parsed as boolean. public static bool? GetExtendedPropertyAsBool(this CardModificationInfo mod, string propertyName) @@ -690,10 +690,10 @@ public static string GetExtendedProperty(this CardModificationInfo mod, string p #region RemoveGems /// - /// Removes all gem cost negations on the CardModificationInfo. + /// Removes all gem cost negations on the . /// Only considers extended properties. /// - /// The CardModificationInfo to access. + /// The to access. public static void ClearAllRemovedGemsCosts(this CardModificationInfo mod) { if (mod.HasRemovedGreenGemCost()) @@ -706,9 +706,9 @@ public static void ClearAllRemovedGemsCosts(this CardModificationInfo mod) mod.RemoveBlueGemCost(false); } /// - /// Determines which gem costs have been removed/negated by the given CardModificationInfo using extended properties. + /// Determines which gem costs have been removed/negated by the given using extended properties. /// - /// The CardModificationInfo to access. + /// The to access. /// A List of all removed gem cost colours. public static List RemovedGemsCosts(this CardModificationInfo mod) { @@ -725,11 +725,11 @@ public static List RemovedGemsCosts(this CardModificationInfo mod) return gems; } /// - /// Clears extended properties on the given CardModificationInfo that remove single gem costs with the given types. + /// Clears extended properties on the given that remove single gem costs with the given types. /// - /// The CardModificationInfo to access. + /// The to access. /// A collection of all gem colours that should be re-added/stop being negated. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo RemoveGemsCost(this CardModificationInfo mod, params GemType[] gemTypes) { if (gemTypes.Contains(GemType.Green)) @@ -744,11 +744,11 @@ public static CardModificationInfo RemoveGemsCost(this CardModificationInfo mod, return mod; } /// - /// Clears all extended properties on the given CardModificationInfo that remove single gem costs. + /// Clears all extended properties on the given that remove single gem costs. /// - /// The CardModificationInfo to access. + /// The to access. /// A collection of all gem colours that should be re-added/stop being negated. - /// The same CardModificationInfo so a chain can continue. + /// The same so a chain can continue. public static CardModificationInfo ClearRemovedGemsCost(this CardModificationInfo mod, params GemType[] gemTypes) { if (gemTypes.Contains(GemType.Green)) @@ -763,64 +763,64 @@ public static CardModificationInfo ClearRemovedGemsCost(this CardModificationInf return mod; } /// - /// Uses extended properties to make the given CardModificationInfo negate a single green gem cost. + /// Uses extended properties to make the given negate a single green gem cost. /// - /// The CardModificationInfo to access. - /// Whether the given CardModificationInfo should remove a single green gem from the play cost. - /// The same CardModificationInfo so a chain can continue. - /// If you want to negate multiple gems of the same colour, you'll need to create multiple CardModificationInfos. + /// The to access. + /// Whether the given should remove a single green gem from the play cost. + /// The same so a chain can continue. + /// If you want to negate multiple gems of the same colour, you'll need to create multiple s. public static CardModificationInfo RemoveGreenGemCost(this CardModificationInfo mod, bool remove) => mod.SetExtendedProperty("RemoveGreenGem", remove, true); /// - /// Uses extended properties to make the given CardModificationInfo negate a single orange gem cost. + /// Uses extended properties to make the given negate a single orange gem cost. /// - /// The CardModificationInfo to access. - /// Whether the given CardModificationInfo should remove a single orange gem from the play cost. - /// The same CardModificationInfo so a chain can continue. - /// If you want to negate multiple gems of the same colour, you'll need to create multiple CardModificationInfos. + /// The to access. + /// Whether the given should remove a single orange gem from the play cost. + /// The same so a chain can continue. + /// If you want to negate multiple gems of the same colour, you'll need to create multiple s. public static CardModificationInfo RemoveOrangeGemCost(this CardModificationInfo mod, bool remove) => mod.SetExtendedProperty("RemoveOrangeGem", remove, true); /// - /// Uses extended properties to make the given CardModificationInfo negate a single blue gem cost. + /// Uses extended properties to make the given negate a single blue gem cost. /// - /// The CardModificationInfo to access. - /// Whether the given CardModificationInfo should remove a single blue gem from the play cost. - /// The same CardModificationInfo so a chain can continue. - /// If you want to negate multiple gems of the same colour, you'll need to create multiple CardModificationInfos. + /// The to access. + /// Whether the given should remove a single blue gem from the play cost. + /// The same so a chain can continue. + /// If you want to negate multiple gems of the same colour, you'll need to create multiple s. public static CardModificationInfo RemoveBlueGemCost(this CardModificationInfo mod, bool remove) => mod.SetExtendedProperty("RemoveBlueGem", remove, true); /// - /// Determines if the given CardModificationInfo removes a green gems cost. + /// Determines if the given removes a green gems cost. /// Separate from the vanilla nullifyGemsCost, which negates all gem costs. /// - /// The CardModificationInfo to access. - /// True if the CardModificationInfo negates a green gem. + /// The to access. + /// True if the negates a green gem. public static bool HasRemovedGreenGemCost(this CardModificationInfo mod) => mod.GetExtendedPropertyAsBool("RemoveGreenGem") ?? false; /// - /// Determines if the given CardModificationInfo removes a orange gems cost. + /// Determines if the given removes a orange gems cost. /// Separate from the vanilla nullifyGemsCost, which negates all gem costs. /// - /// The CardModificationInfo to access. - /// True if the CardModificationInfo negates a orange gem. + /// The to access. + /// True if the negates a orange gem. public static bool HasRemovedOrangeGemCost(this CardModificationInfo mod) => mod.GetExtendedPropertyAsBool("RemoveOrangeGem") ?? false; /// - /// Determines if the given CardModificationInfo removes a blue gems cost. + /// Determines if the given removes a blue gems cost. /// Separate from the vanilla nullifyGemsCost, which negates all gem costs. /// - /// The CardModificationInfo to access. - /// True if the CardModificationInfo negates a blue gem. + /// The to access. + /// True if the negates a blue gem. public static bool HasRemoveBlueGemCost(this CardModificationInfo mod) => mod.GetExtendedPropertyAsBool("RemoveBlueGem") ?? false; /// - /// Determines if the given CardModificationInfo removes any gem costs using the API's extended properties. + /// Determines if the given removes any gem costs using the API's extended properties. /// Does not check nullifyGemsCost. /// - /// The CardModificationInfo to access. - /// True if the CardModificationInfo negates any single gem. + /// The to access. + /// True if the negates any single gem. public static bool HasRemovedAnyGemCost(this CardModificationInfo mod) => mod.HasRemovedGreenGemCost() || mod.HasRemovedOrangeGemCost() || mod.HasRemoveBlueGemCost(); /// - /// Determines if the given CardModificationInfo removes a gems cost of the given colour. + /// Determines if the given removes a gems cost of the given colour. /// Separate from the vanilla nullifyGemsCost, which negates all gem costs. /// - /// The CardModificationInfo to access. + /// The to access. /// The colour gem to search for. - /// True if the CardModificationInfo negates a gem with the given colour. + /// True if the negates a gem with the given colour. public static bool HasRemovedGemCost(this CardModificationInfo mod, GemType gemType) { return gemType switch diff --git a/InscryptionAPI/Card/CardModificationInfoManager.cs b/InscryptionAPI/Card/CardModificationInfoManager.cs index 1a93c812..6c791ca1 100644 --- a/InscryptionAPI/Card/CardModificationInfoManager.cs +++ b/InscryptionAPI/Card/CardModificationInfoManager.cs @@ -7,7 +7,7 @@ namespace InscryptionAPI.Card; /// -/// Class for managing special CardModificationInfos. +/// Class for managing special s. /// These include persistent extended properties and custom costs. /// [HarmonyPatch] @@ -27,7 +27,7 @@ private class CardModExt // Needs to be defined first so the implicit static con /// Get a custom extension class that will exist on all clones of a card /// /// Card to access. - /// The custom class + /// The custom class. /// The instance of T for this card. public static T GetExtendedClass(this CardModificationInfo card) where T : class, new() { @@ -74,7 +74,7 @@ internal static Dictionary GetCardModExtensionTable(this CardMod return exp.StringMap; } /// - /// Re-executes events and rebuilds the special CardModificationInfo pool. + /// Re-executes events and rebuilds the special pool. /// public static void SyncCardMods() { @@ -125,8 +125,11 @@ public static List GetCustomPropertiesFromId(string singletonId) /// The singleton ID string to retrieve custom costs from. /// A List of all custom costs stored by the singleton ID. /// - /// With the improved system of adding custom costs using the [CardCostManager](InscryptionAPI.CardCosts.CardCostManager), - /// it's recommended to avoid using the custom costs ID system unless you want to do something akin to the vanilla CardModInfo cost adjustments. + /// + /// Avoid using s to add custom costs to cards. Instead use and the much better . + ///

+ /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. + ///
///
public static List GetCustomCostsFromId(string singletonId) { @@ -146,9 +149,9 @@ public static List GetCustomCostsFromId(string singletonId) } /// - /// Retrieves the custom properties substring from the given CardModificationInfo's singleton ID. + /// Retrieves the custom properties substring from the given 's singleton ID. /// - /// The CardModificationInfo to access. + /// The to access. /// The custom properties substring or null if one doesn't exist. public static string GetCustomPropertiesIdString(CardModificationInfo mod) => mod.HasCustomPropertiesId() ? GetCustomPropertiesIdString(mod.singletonId) : null; /// @@ -169,15 +172,15 @@ public static string GetCustomPropertiesIdString(string singletonId) } /// - /// Retrieves the custom costs substring from the given CardModificationInfo's singleton ID. + /// Retrieves the custom costs substring from the given 's singleton ID. /// - /// The CardModificationInfo to access. + /// The to access. /// The custom costs substring or null if one doesn't exist. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
public static string GetCustomCostsIdString(CardModificationInfo mod) => mod.HasCustomCostsId() ? GetCustomCostsIdString(mod.singletonId) : null; @@ -188,9 +191,9 @@ public static string GetCustomPropertiesIdString(string singletonId) /// The custom costs substring or null if one doesn't exist. /// /// - /// Avoid using CardModificationInfos to add custom costs to cards. Instead use CardInfo.SetCustomCost and the much better [CardCostManager](InscryptionAPI.CardCosts.CardCostManager). + /// Avoid using s to add custom costs to cards. Instead use and the much better . ///

- /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and CardModificationInfos. + /// Only use this if you're trying to do cost adjustments like you can with vanilla costs and s. ///
///
public static string GetCustomCostsIdString(string singletonId) @@ -206,7 +209,7 @@ public static string GetCustomCostsIdString(string singletonId) } /// - /// Retrieves the property name and associated value from the provided 'properties' string. + /// Retrieves the property name and associated value from the provided properties string. /// /// A string representing all properties. /// The property name to search for. diff --git a/InscryptionAPI/Card/CostProperties.cs b/InscryptionAPI/Card/CostProperties.cs index 69b4a6cc..eee2f4bf 100644 --- a/InscryptionAPI/Card/CostProperties.cs +++ b/InscryptionAPI/Card/CostProperties.cs @@ -8,16 +8,16 @@ namespace InscryptionAPI.Card.CostProperties; /// -/// Class that handles dynamic costs on PlayableCards. +/// Class that handles dynamic costs on objects. /// [HarmonyPatch] public static class CostProperties { /// - /// Class that's attached to PlayableCard objects to ensure their costs are updated appropriately. + /// Class that's attached to objects to ensure their costs are updated appropriately. /// public class RefreshCostMonoBehaviour : MonoBehaviour { /// - /// PlayableCard instance this behaviour is attached to. + /// instance this behaviour is attached to. /// public PlayableCard playableCard; private int cachedBloodCost = -1, cachedBoneCost = -1; @@ -62,10 +62,10 @@ private bool DidCostsChangeThisFrame() /// /// Determines if a card's list of Gem costs has been updated. /// - /// - /// - /// - /// + /// GemType. + /// First list of gems. + /// Second list of gems. + /// True if a does not equal b public bool GemsChanged(List a, List b) { if (a.Count != b.Count) @@ -82,43 +82,43 @@ public bool GemsChanged(List a, List b) } /// - /// A table that maps a CardInfo object to a list of weak references to every PlayableCard that uses that same CardInfo + /// A table that maps a object to a list of weak references to every that uses that same . /// public static ConditionalWeakTable>> CardInfoToCard = new(); - + // duplicate of above, kept in case something breaks //public static ConditionalWeakTable>> CardInfoToPlayableCardReferences = new(); /// - /// ChangeCardCostGetter patches BloodCost so we can change the cost on the fly + /// patches so we can change the cost on the fly /// This reverse patch gives us access to the original method without any changes. - /// This method has a copy of all the code that CardInfo.BloodCost had so it doesn't result in a StackOverflow and freezing the game when called. + /// This method has a copy of all the code that had so it doesn't result in a StackOverflow and freezing the game when called. /// [HarmonyReversePatch, HarmonyPatch(typeof(CardInfo), nameof(CardInfo.BloodCost), MethodType.Getter), MethodImpl(MethodImplOptions.NoInlining)] public static int OriginalBloodCost(CardInfo __instance) { return 0; } /// - /// ChangeCardCostGetter patches BoneCost so we can change the cost on the fly + /// patches so we can change the cost on the fly /// This reverse patch gives us access to the original method without any changes. - /// This method has a copy of all the code that CardInfo.BoneCost had so it doesn't result in a StackOverflow and freezing the game when called. + /// This method has a copy of all the code that had so it doesn't result in a StackOverflow and freezing the game when called. /// [HarmonyReversePatch, HarmonyPatch(typeof(CardInfo), nameof(CardInfo.BonesCost), MethodType.Getter), MethodImpl(MethodImplOptions.NoInlining)] public static int OriginalBonesCost(CardInfo __instance) { return 0; } /// - /// ChangeCardCostGetter patches GemsCost so we can change the cost on the fly + /// patches so we can change the cost on the fly /// This reverse patch gives us access to the original method without any changes. - /// This method has a copy of all the code that CardInfo.GemsCost had so it doesn't result in a StackOverflow and freezing the game when called. + /// This method has a copy of all the code that had so it doesn't result in a StackOverflow and freezing the game when called. /// [HarmonyReversePatch, HarmonyPatch(typeof(CardInfo), nameof(CardInfo.GemsCost), MethodType.Getter), MethodImpl(MethodImplOptions.NoInlining)] public static List OriginalGemsCost(CardInfo __instance) { return null; } /// - /// Improved version of CardInfo.GemsCost that accounts for addGemCost and RemovedGemsCost(). + /// Improved version of that accounts for addGemCost and . /// - /// For consistency's sake, it's recommended you use this method over OriginalGemsCost in most cases. + /// For consistency's sake, it's recommended you use this method over in most cases. /// public static List ImprovedGemsCost(CardInfo instance) { @@ -141,9 +141,9 @@ public static List ImprovedGemsCost(CardInfo instance) } /// - /// ChangeCardCostGetter patches EnergyCost so we can change the cost on the fly + /// patches so we can change the cost on the fly /// This reverse patch gives us access to the original method without any changes. - /// This method has a copy of all the code that CardInfo.EnergyCost had so it doesn't result in a StackOverflow and freezing the game when called. + /// This method has a copy of all the code that had so it doesn't result in a StackOverflow and freezing the game when called. /// [HarmonyReversePatch, HarmonyPatch(typeof(CardInfo), nameof(CardInfo.EnergyCost), MethodType.Getter), MethodImpl(MethodImplOptions.NoInlining)] public static int OriginalEnergyCost(CardInfo __instance) { return 0; } @@ -151,8 +151,8 @@ public static List ImprovedGemsCost(CardInfo instance) /// /// Determines whether or not Gemified should reduce the blood cost on a multicost card. /// - /// The gemified PlayableCard we're checking. - /// The PlayableCard's blood cost. Defaults to using the CardInfo's blood cost if null. + /// The gemified we're checking. + /// The 's blood cost. Defaults to using the 's blood cost if null. /// True if Gemified should reduce the blood cost by 1. /// /// Used for multicost cards to determine which cost Gemified should affect. @@ -165,8 +165,8 @@ public static bool ReduceGemifiedBlood(PlayableCard card, int? bloodCost = null) /// /// Determines whether or not Gemified should reduce the gems cost on a multicost card. /// - /// The gemified PlayableCard we're checking. - /// The PlayableCard's gems cost. Defaults to using the CardInfo's gems cost if null. + /// The gemified we're checking. + /// The 's gems cost. Defaults to using the 's gems cost if null. /// True if Gemified should reduce the gems cost by 1. /// /// Used for multicost cards to determine which cost Gemified should affect. @@ -179,8 +179,8 @@ public static bool ReduceGemifiedMox(PlayableCard card, List gemsCost = /// /// Determines whether or not Gemified should reduce the bone cost on a multicost card. /// - /// The gemified PlayableCard we're checking. - /// The PlayableCard's bone cost. Defaults to using the CardInfo's bone cost if null. + /// The gemified we're checking. + /// The 's bone cost. Defaults to using the 's bone cost if null. /// True if Gemified should reduce the bone cost by 1. /// /// Used for multicost cards to determine which cost Gemified should affect. @@ -193,8 +193,8 @@ public static bool ReduceGemifiedBones(PlayableCard card, int? bonesCost = null) /// /// Determines whether or not Gemified should reduce the energy cost on a multicost card. /// - /// The gemified PlayableCard we're checking. - /// The PlayableCard's energy cost. Defaults to using the CardInfo's energy cost if null. + /// The gemified we're checking. + /// The 's energy cost. Defaults to using the 's energy cost if null. /// True if Gemified should reduce the energy cost by 1. /// /// Used for multicost cards to determine which cost Gemified should affect. @@ -264,7 +264,7 @@ private static bool DisableVanillaEnergyCost(PlayableCard __instance, ref int __ //private static void GetCardInfoReferences(PlayableCard __instance) { // // if this is a new PlayableCard being associated with the given CardInfo - // // returns true if the CardInfo is in the table + // // returns true if the is in the table // if (CostProperties.CardInfoToPlayableCardReferences.TryGetValue(__instance.Info, out List> connectedCards)) { // PlayableCard card = null; // for (int i = connectedCards.Count - 1; i >= 0; i--) { @@ -302,7 +302,7 @@ private static void Postfix(PlayableCard __instance) refreshCostDisplay.playableCard = __instance; // if this is a new PlayableCard being associated with the given CardInfo - // returns true if the CardInfo is in the table + // returns true if the is in the table if (CostProperties.CardInfoToCard.TryGetValue(__instance.Info, out List> cardList)) { PlayableCard card = null; for (int i = cardList.Count - 1; i >= 0; i--) { diff --git a/InscryptionAPI/Card/DamageShieldBehaviour.cs b/InscryptionAPI/Card/DamageShieldBehaviour.cs index 31b20de4..8ae03b80 100644 --- a/InscryptionAPI/Card/DamageShieldBehaviour.cs +++ b/InscryptionAPI/Card/DamageShieldBehaviour.cs @@ -9,7 +9,7 @@ namespace InscryptionAPI.Card; /// /// A custom class implementing shield-giving behaviour. -/// With the most recent API versions, shield-giving sigils like DeathShield/Nano Armour/ Armoured can now stack and instead use a counter rather than a simple boolean. +/// With the most recent API versions, shield-giving sigils like DeathShield/Nano Armour/Armoured can now stack and instead use a counter rather than a simple boolean. /// public abstract class DamageShieldBehaviour : AbilityBehaviour { /// @@ -54,7 +54,7 @@ public virtual void Start() } /// - /// Method for adding more shield count to this ability. Resets the loseShields Status boolean if the net shields are > 0. + /// Method for adding more shield count to this ability. Resets the loseShields Status boolean if the net shields are > 0. /// /// How many more shields this ability should give. /// Whether or not to update the card's render. @@ -116,7 +116,7 @@ public virtual void ResetShields(bool updateDisplay) } /// -/// A custom class combining [DamageShieldBehaviour](InscryptionAPI.Card.DamageShieldBehaviour) and [ExtendedActivatedBehaviour](InscryptionAPI.Card.ExtendedActivatedBehaviour). +/// A custom class combining and . /// public abstract class ActivatedDamageShieldBehaviour : DamageShieldBehaviour { /// @@ -223,31 +223,31 @@ public List GemsCost { public int HealthCost => Mathf.Max(0, StartingHealthCost + healthCostMod); /// - /// Dictionary of CardSlots that have been selected for sacrifices and the associated CardInfo. + /// Dictionary of CardSlots that have been selected for sacrifices and the associated . /// public Dictionary currentSacrificedCardInfos = new(); /// - /// Determines if the PostResolveOnBoard trigger should activate. + /// Determines if the trigger should activate. /// - /// True if PostResolveOnBoard should activate. + /// True if should activate. public virtual bool RespondsToPostResolveOnBoard() { return false; } /// /// Trigger that's called after card's with this ability resolve on the board. - /// Used since ResolveOnBoard is sealed to prevent the ability breaking. + /// Used since is sealed to prevent the ability breaking. /// public virtual IEnumerator OnPostResolveOnBoard() { yield break; } /// - /// If the ResolveOnBoard trigger should be called. + /// If the trigger should be called. /// /// True if it should be activated. public sealed override bool RespondsToResolveOnBoard() => RespondsToPostResolveOnBoard() || LearnMechanic(); /// - /// Runs the logic that teaches the player how activated abilities work in Act 2, plus any PostResolveOnBoard logic. + /// Runs the logic that teaches the player how activated abilities work in Act 2, plus any logic. /// public sealed override IEnumerator OnResolveOnBoard() { if (LearnMechanic()) // Act 2 tutorial dialogue @@ -357,7 +357,6 @@ public sealed override IEnumerator OnActivatedAbility() { /// /// Sequence called after the ability finishes activation. /// - /// public virtual IEnumerator PostActivate() { yield break; } @@ -369,7 +368,6 @@ public virtual IEnumerator PostActivate() { /// /// Player-implemented sequence for what this ability will actually do when activated. /// - /// public abstract IEnumerator Activate(); private IEnumerator ChooseSacrifices() { @@ -468,7 +466,7 @@ private int SacrificeValue() { } /// -/// A custom AbilityBehaviour that's attached to the DeathShield ability so it functions with the API's shield logic changes. +/// A custom that's attached to the ability so it functions with the API's shield logic changes. /// public class APIDeathShield : DamageShieldBehaviour { /// diff --git a/InscryptionAPI/Card/DeathCardManager.cs b/InscryptionAPI/Card/DeathCardManager.cs index 169f77c6..56d02e9c 100644 --- a/InscryptionAPI/Card/DeathCardManager.cs +++ b/InscryptionAPI/Card/DeathCardManager.cs @@ -11,7 +11,7 @@ namespace InscryptionAPI.Card; public static class DeathCardManager { /// - /// The prefix used by the API to demark custom death cards added through the DeathCardManager. + /// The prefix used by the API to demark custom death cards added through the . /// public const string CardPrefix = "apiDeathCard"; /// @@ -24,8 +24,8 @@ public static class DeathCardManager /// /// Adds a death card to the list of default death cards available at the start of each run. /// - /// The CardModificationInfo containing the death card data. - /// If true, will add deathCardMod to the list of ascension death cards rather than the default (Part 1) pool. + /// The containing the death card data. + /// If true, will add deathCardMod to the list of ascension death cards rather than the default (Part 1) pool. public static void AddDefaultDeathCard(CardModificationInfo deathCardMod, bool addToAscension = false) { if (addToAscension) @@ -42,11 +42,11 @@ private static bool MatchingDeathCardInfo(DeathCardInfo info, DeathCardInfo comp info.mouthIndex == compareAgainst.mouthIndex; } /// - /// Gets the name of an API-added death card from the given CardModificationInfo. Can also create a new death card using the given CardModificationInfo. + /// Gets the name of an API-added death card from the given . Can also create a new death card using the given . /// - /// The CardModificationInfo to access. + /// The to access. /// Whether or not to create a new death card with the given name. Appends a number for duplicate card names. - /// The internal name of the death card associated with the given CardModificationInfo. + /// The internal name of the death card associated with the given . public static string GetAPIDeathCardName(CardModificationInfo mod, bool createNewCard = false) { string cleanId = mod.CleanId(); // use the clean singleton id to reduce chance of duplicate name diff --git a/InscryptionAPI/Card/DefaultBoneGainOnDeath.cs b/InscryptionAPI/Card/DefaultBoneGainOnDeath.cs index fc40bb0b..c2844849 100644 --- a/InscryptionAPI/Card/DefaultBoneGainOnDeath.cs +++ b/InscryptionAPI/Card/DefaultBoneGainOnDeath.cs @@ -7,7 +7,7 @@ namespace InscryptionAPI.Card; /// -/// Class for handling exposing the bone-on-death behaviour present in the vanilla PlayableCard.Die method. +/// Class for handling exposing the bone-on-death behaviour present in the vanilla method. /// Allows for modifying the default behaviour through Harmony patches. /// [HarmonyPatch] @@ -117,17 +117,17 @@ private static IEnumerable InsertBoneMethodHook(IEnumerable /// Simple boolean check that by default replicates the vanilla check for whether a card should award a Bone on death. /// - /// The PlayableCard that has died. - /// The CardSlot of card. + /// The that has died. + /// The of card. /// True if card should give a Bone (calls DoDefaultBoneGain). public static bool ShouldDoDefaultBoneGain(PlayableCard card, CardSlot slotBeforeDeath) { return slotBeforeDeath.IsPlayerSlot && !card.HasAbility(Ability.QuadrupleBones); } /// - /// A simple call to ResourcesManager.AddBones, intended to give modders some more flexibility over the default death behaviour of player cards giving 1 Bone. + /// A simple call to , intended to give modders some more flexibility over the default death behaviour of player cards giving 1 Bone. /// - /// The PlayableCard that has died. - /// The CardSlot of card. + /// The that has died. + /// The of card. /// How many Bones to drop whenever a player's card dies (default is 1). public static IEnumerator DoDefaultBoneGain(PlayableCard card, CardSlot slotBeforeDeath, int amount) { yield return Singleton.Instance.AddBones(amount, slotBeforeDeath); diff --git a/InscryptionAPI/Card/ExtendedAbilityBehaviour.cs b/InscryptionAPI/Card/ExtendedAbilityBehaviour.cs index 89273f68..cc35e9d4 100644 --- a/InscryptionAPI/Card/ExtendedAbilityBehaviour.cs +++ b/InscryptionAPI/Card/ExtendedAbilityBehaviour.cs @@ -6,7 +6,7 @@ namespace InscryptionAPI.Card; /// -/// Extended subclass of AbilityBehaviour that implements several custom API triggers. +/// Extended subclass of that implements several custom API triggers. /// [HarmonyPatch] public abstract class ExtendedAbilityBehaviour : AbilityBehaviour, IGetOpposingSlots, IActivateWhenFacedown, IPassiveAttackBuff, IPassiveHealthBuff @@ -32,16 +32,16 @@ public abstract class ExtendedAbilityBehaviour : AbilityBehaviour, IGetOpposingS public virtual bool ShouldTriggerCustomWhenFaceDown(Type customTrigger) => TriggerWhenFacedown; /// - /// Whether or not this ability should modify what CardSlots cards with this ability will target when attacking. + /// Whether or not this ability should modify what s cards with this ability will target when attacking. /// /// True if this ability should modify the list of cards being added. public virtual bool RespondsToGetOpposingSlots() => false; /// - /// Gets an additional list of CardSlots that cards with this ability should target when attacking. + /// Gets an additional list of s that cards with this ability should target when attacking. /// - /// List of CardSlots that were originally being targeted before custom abilities were applied. - /// Other CardSlots added by other abilities to the list of targeted slots. - /// List of CardSlots that should be added to the list of targeted slots. + /// List of s that were originally being targeted before custom abilities were applied. + /// Other s added by other abilities to the list of targeted slots. + /// List of s that should be added to the list of targeted slots. public virtual List GetOpposingSlots(List originalSlots, List otherAddedSlots) => new(); /// @@ -104,7 +104,7 @@ private static List GetHealthBuffs(PlayableCard card) /// /// Determines the passive attack buff given by this ability if one is given. /// - /// The PlayableCard current being checked. + /// The current being checked. /// The attack buff to give to the target card. public virtual int GetPassiveAttackBuff(PlayableCard target) { @@ -125,7 +125,7 @@ public virtual int GetPassiveAttackBuff(PlayableCard target) /// /// Determines the passive health buff given by this ability if one is given. /// - /// The PlayableCard current being checked. + /// The current being checked. /// The health buff to give to the target card. public virtual int GetPassiveHealthBuff(PlayableCard target) { diff --git a/InscryptionAPI/Card/ExtendedActivatedAbilityBehaviour.cs b/InscryptionAPI/Card/ExtendedActivatedAbilityBehaviour.cs index 2fd2bfcf..a93145b1 100644 --- a/InscryptionAPI/Card/ExtendedActivatedAbilityBehaviour.cs +++ b/InscryptionAPI/Card/ExtendedActivatedAbilityBehaviour.cs @@ -8,7 +8,7 @@ namespace InscryptionAPI.Card; /// -/// A version of ActivatedAbilityBehaviour that allows for the creation of activated abilities that cost Blood, Gems, or Health. Also supports dynamic activation costs. +/// A version of that allows for the creation of activated abilities that cost Blood, Gems, or Health. Also supports dynamic activation costs. /// public abstract class ExtendedActivatedAbilityBehaviour : AbilityBehaviour { @@ -116,33 +116,33 @@ public List GemsCost { public int HealthCost => Mathf.Max(0, StartingHealthCost + healthCostMod); /// - /// Dictionary of CardSlots that have been selected for sacrifices and the associated CardInfo. + /// Dictionary of s that have been selected for sacrifices and the associated CardInfo. /// public Dictionary currentSacrificedCardInfos = new(); /// - /// Determines if the PostResolveOnBoard trigger should activate. + /// Determines if should activate. /// - /// True if PostResolveOnBoard should activate. + /// True if should activate. public virtual bool RespondsToPostResolveOnBoard() { return false; } /// /// Trigger that's called after card's with this ability resolve on the board. - /// Used since ResolveOnBoard is sealed to prevent the ability breaking. + /// Used since is sealed to prevent the ability breaking. /// public virtual IEnumerator OnPostResolveOnBoard() { yield break; } /// - /// If the ResolveOnBoard trigger should be called. + /// If the trigger should be called. /// /// True if it should be activated. public sealed override bool RespondsToResolveOnBoard() => RespondsToPostResolveOnBoard() || LearnMechanic(); /// - /// Runs the logic that teaches the player how activated abilities work in Act 2, plus any PostResolveOnBoard logic. + /// Runs the logic that teaches the player how activated abilities work in Act 2, plus any logic. /// public sealed override IEnumerator OnResolveOnBoard() { diff --git a/InscryptionAPI/Card/OpponentGemsManager.cs b/InscryptionAPI/Card/OpponentGemsManager.cs index 4321e9a3..6a73f9aa 100644 --- a/InscryptionAPI/Card/OpponentGemsManager.cs +++ b/InscryptionAPI/Card/OpponentGemsManager.cs @@ -24,17 +24,17 @@ public class OpponentGemsManager : Singleton { /// True if the opponent owns at least one gem of the given type. False otherwise. public bool HasGem(GemType gem) => opponentGems.Contains(gem); /// - /// Adds a gem of the given type to the List of opponent-owned gems. + /// Adds a gem of the given type to the list of opponent-owned gems. /// /// Type of gem to add to the opponent's possession. public void AddGem(GemType gem) => opponentGems.Add(gem); /// - /// Removes a gem of the given type from the List of opponent-owned gems. + /// Removes a gem of the given type from the list of opponent-owned gems. /// /// Type of gem to remove from the opponent's possession. public void LoseGem(GemType gem) => opponentGems.Remove(gem); /// - /// Adds gems of the given types to the List of opponent-owned gems. + /// Adds gems of the given types to the list of opponent-owned gems. /// /// Types of gems to add to the opponent's possession. public void AddGems(params GemType[] gems) @@ -43,7 +43,7 @@ public void AddGems(params GemType[] gems) opponentGems.Add(gem); } /// - /// Removes gems of the given types from the List of opponent-owned gems. + /// Removes gems of the given types from the list of opponent-owned gems. /// /// Types of gems to remove from the opponent's possession. public void LoseGems(params GemType[] gems) diff --git a/InscryptionAPI/Card/ShieldManager.cs b/InscryptionAPI/Card/ShieldManager.cs index 76d39b49..ba6b6f72 100644 --- a/InscryptionAPI/Card/ShieldManager.cs +++ b/InscryptionAPI/Card/ShieldManager.cs @@ -18,16 +18,16 @@ namespace InscryptionAPI.Card; public static class ShieldManager { /// - /// A list of FullAbilities whose AbilityBehaviour inherits from DamageShieldBehaviour. + /// A list of FullAbilities whose inherits from . /// public static List AllShieldAbilities { get; internal set; } = new(AllAbilities); /// - /// The current processed list of all AbilityInfos in the game that inherit from DamageShieldBehaviour. + /// The current processed list of all s in the game that inherit from . /// public static List AllShieldInfos { get; internal set; } = AllShieldAbilities.Select(x => x.Info).ToList(); /// - /// IEnumerator method that wraps BreakShield. Also contains code for triggering IShieldPreventedDamage and IShieldPreventedDamageInHand. + /// IEnumerator method that wraps . Also contains code for triggering and . /// /// Card getting attacked. /// Damage being dealt. @@ -58,7 +58,7 @@ public static IEnumerator TriggerBreakShield(PlayableCard target, int damage, Pl } /// /// The method used for when a shielded card is damaged. Includes extra parameters for modders looking to modify this further. - /// This method is only called when damage > 0 and the target has a shield. + /// This method is only called when damage > 0 and the target has a shield. /// /// Card getting attacked. /// Damage being dealt. @@ -109,7 +109,7 @@ private static bool PreventShieldReset(PlayableCard target) } /// - /// Modified version of PlayableCard.HasShield that replaces the original method's result. + /// Modified version of that replaces the original method's result. /// public static bool NewHasShield(PlayableCard instance) { diff --git a/InscryptionAPI/Card/SpecialStatIconManager.cs b/InscryptionAPI/Card/SpecialStatIconManager.cs index 6b7a31ac..ae4d8744 100644 --- a/InscryptionAPI/Card/SpecialStatIconManager.cs +++ b/InscryptionAPI/Card/SpecialStatIconManager.cs @@ -43,26 +43,26 @@ public class FullStatIcon /// public readonly StatIconInfo Info; /// - /// A subclass of VariableStatBehaviour that implements the logic for this stat icon. + /// A subclass of that implements the logic for this stat icon. /// public readonly Type VariableStatBehavior; /// /// Tracks all rulebook redirects that this ability's description will have. Explanation of the variables is as follows: /// Key (string): the text that will be recoloured to indicate that it's clickable. - /// Tuple.Item1 (PageRangeType): the type of page the redirect will go to. Use PageRangeType.Unique if you want to redirect to a custom rulebook page using its pageId. + /// Tuple.Item1 (PageRangeType): the type of page the redirect will go to. Use if you want to redirect to a custom rulebook page using its pageId. /// Tuple.Item2 (Color): the colour the Key text will be recoloured to. /// Tuple.Item3 (string): the id that the API will match against to find the redirect page. Eg, for ability redirects this will be the Ability id as a string. /// public Dictionary RulebookDescriptionRedirects = new(); /// - /// Creates a new instance of FullStatIcon and registers its behaviour type with the . + /// Creates a new instance of and registers its behaviour type with the . /// /// The unique ID for this stat icon. /// The unique ID for this stat icon's associated special ability. /// The description object for this ability. - /// A subclass of VariableStatBehaviour that implements the logic for the ability. + /// A subclass of that implements the logic for the ability. public FullStatIcon(SpecialStatIcon id, SpecialTriggeredAbility abilityId, StatIconInfo info, Type variableStatBehavior) { Id = id; @@ -85,7 +85,7 @@ public FullStatIcon(SpecialStatIcon id, SpecialTriggeredAbility abilityId, StatI /// public static List AllStatIcons { get; private set; } = BaseGameStatIcons.ToList(); /// - /// The current processed list of all StatIconInfos in the game, including vanilla and mod-added abilities. + /// The current processed list of all s in the game, including vanilla and mod-added abilities. /// public static List AllStatIconInfos { get; private set; } = BaseGameStatIcons.Select(x => x.Info).ToList(); @@ -134,8 +134,8 @@ private static List GenBaseGameStatIconList() /// /// The guid of the mod adding the ability. /// An instance of StatIconInfo describing the ability. - /// A subclass of VariableStatBehaviour that implements the logic for the stat icon. - /// An instance of FullStatIcon containing all necessary data for the stat icon to work.. + /// A subclass of that implements the logic for the stat icon. + /// An instance of containing all necessary data for the stat icon to work. public static FullStatIcon Add(string guid, StatIconInfo info, Type behavior) { // Register the special ability at the same time @@ -154,7 +154,7 @@ public static FullStatIcon Add(string guid, StatIconInfo info, Type behavior) /// The guid of the mod adding the ability. /// The name of the stat icon when it appears in the Rulebook. /// The description of the stat icon when it appears in the Rulebook. - /// A subclass of VariableStatBehaviour that implements the logic for the stat icon. + /// A subclass of that implements the logic for the stat icon. /// An instance of StatIconInfo describing the new ability. public static StatIconInfo New(string guid, string rulebookName, string rulebookDescription, Type behavior) { diff --git a/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs b/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs index e7c7c64e..a5fbbc61 100644 --- a/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs +++ b/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs @@ -15,11 +15,11 @@ public static class SpecialTriggeredAbilityManager { public class FullSpecialTriggeredAbility { /// - /// The unique ID for this special ability + /// The unique ID for this special ability. /// public readonly SpecialTriggeredAbility Id; /// - /// The guid of the mod that added this special ability + /// The guid of the mod that added this special ability. /// public readonly string ModGUID; /// @@ -27,15 +27,15 @@ public class FullSpecialTriggeredAbility /// public readonly string AbilityName; /// - /// A subclass of SpecialCardBehaviour that implements the logic for this special ability + /// A subclass of that implements the logic for this special ability. /// public readonly Type AbilityBehaviour; /// - /// Creates a new instance of FullSpecialTriggeredAbility and registers its behaviour type with the . + /// Creates a new instance of and registers its behaviour type with the . /// /// The unique ID for this special ability. - /// A subclass of SpecialCardBehaviour that implements the logic for the ability. + /// A subclass of that implements the logic for the ability. [Obsolete("Use the constructor that takes a guid parameter instead")] public FullSpecialTriggeredAbility(SpecialTriggeredAbility id, Type abilityBehaviour) : this(null, abilityBehaviour.ToString(), id, abilityBehaviour) { @@ -43,12 +43,12 @@ public FullSpecialTriggeredAbility(SpecialTriggeredAbility id, Type abilityBehav } /// - /// Creates a new instance of FullSpecialTriggeredAbility and registers its behaviour type with the . + /// Creates a new instance of and registers its behaviour type with the . /// /// The GUID of the mod that added this. /// The name of this special ability. /// The unique ID for this special ability. - /// A subclass of SpecialCardBehaviour that implements the logic for the ability. + /// A subclass of that implements the logic for the ability. public FullSpecialTriggeredAbility(string guid, string name, SpecialTriggeredAbility id, Type abilityBehaviour) { Id = id; @@ -96,7 +96,7 @@ private static List GenBaseGameSpecialTriggersList( /// /// The guid of the mod adding the special ability. /// The name of the special ability. - /// A subclass of SpecialCardBehaviour that implements the logic for the ability. + /// A subclass of that implements the logic for the ability. public static FullSpecialTriggeredAbility Add(string guid, string abilityName, Type behavior) { FullSpecialTriggeredAbility full = new(guid, abilityName, GuidManager.GetEnumValue(guid, abilityName), behavior); @@ -110,7 +110,7 @@ public static FullSpecialTriggeredAbility Add(string guid, string abilityName, T /// The unique ID of the special ability to remove. public static void Remove(SpecialTriggeredAbility id) => NewSpecialTriggers.Remove(NewSpecialTriggers.FirstOrDefault(x => x.Id == id)); /// - /// Removes a special ability from the game based on its FullSpecialTriggeredAbility. Can only remove mod-added special abilities, not vanilla ones. + /// Removes a special ability from the game based on its . Can only remove mod-added special abilities, not vanilla ones. /// /// The instance of the ability to remove. public static void Remove(FullSpecialTriggeredAbility ability) => NewSpecialTriggers.Remove(ability); diff --git a/InscryptionAPI/Card/TribeManager.cs b/InscryptionAPI/Card/TribeManager.cs index 95eedb70..9322c1d0 100644 --- a/InscryptionAPI/Card/TribeManager.cs +++ b/InscryptionAPI/Card/TribeManager.cs @@ -21,19 +21,19 @@ public static class TribeManager ///
public class TribeInfo { /// - /// The guid of the mod that added this ability + /// The guid of the mod that added this ability. /// public string guid; /// - /// The name of this tribe + /// The name of this tribe. /// public string name; /// - /// The unique ID for this tribe + /// The unique ID for this tribe. /// public Tribe tribe; /// - /// The Sprite displayed on cards of this tribe + /// The Sprite displayed on cards of this tribe. /// public Sprite icon; /// @@ -101,24 +101,24 @@ public static Tribe Add(string guid, string name, string pathToTribeIcon = null, } /// - /// Determines if the given Tribe was added by a mod. + /// Determines if the given was added by a mod. /// - /// The Tribe to check. - /// True if tribe is not from the base game. + /// The to check. + /// True if tribe is not from the base game. public static bool IsCustomTribe(Tribe tribe) => tribeTypes.Contains(tribe); /// - /// Retrieves the TribeInfo object associated with the given Tribe enum value. + /// Retrieves the object associated with the given enum value. /// - /// Tribe to retrieve the TribeInfo of. - /// Only custom Tribes have an associated TribeInfo; returns null for vanilla Tribes. + /// Tribe to retrieve the of. + /// Only custom tribes have an associated ; returns null for vanilla tribes. public static TribeInfo GetCustomTribeInfo(Tribe tribe) => tribes.Find(x => x.tribe == tribe); /// - /// Returns the icon texture associated with the given Tribe. + /// Returns the icon texture associated with the given . /// - /// Tribe to get the icon of. - /// If true, return the missing icon texure when the checked Tribe has no icon texture. + /// to get the icon of. + /// If true, return the missing icon texure when the checked has no icon texture. public static Texture2D GetTribeIcon(Tribe tribe, bool useMissingIconIfNull = true) { Texture2D texture2D = null; if (IsCustomTribe(tribe)) { From 4433c9e791525e87e48c890cfbcf42c2d7920168 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:23:11 -0800 Subject: [PATCH 35/42] Add XML, comment out unused field --- .../Ascension/AscensionChallengePaginator.cs | 69 +++++++++++++++++-- 1 file changed, 64 insertions(+), 5 deletions(-) diff --git a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs index aaff322d..715af23a 100644 --- a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs +++ b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs @@ -6,11 +6,18 @@ using UnityEngine; namespace InscryptionAPI.Ascension; +/// +/// Class that handles adding displaying custom challenges in the challenge select screen. +/// +public class AscensionChallengePaginator : MonoBehaviour { + // not sure if this will break any mods but it's not being used or assigned to. + //public bool initialized; -public class AscensionChallengePaginator : MonoBehaviour -{ - public bool initialized; - + /// + /// Initialises the challenge screen, adding custom challenges and UI elements. + /// + /// + /// public void Initialize(AscensionChallengeScreen screen, AscensionMenuScreenTransition transition = null) { if (challengeObjectsForPages == null) @@ -39,6 +46,10 @@ public void Initialize(AscensionChallengeScreen screen, AscensionMenuScreenTrans this.screen = screen; } + /// + /// Creates the for the placeholder challenge. + /// This placeholder is used when errors occur when loading challenges. + /// public void InitialiseMissingChallengeInfo() { missingChallengeInfo = ScriptableObject.CreateInstance(); @@ -51,6 +62,11 @@ public void InitialiseMissingChallengeInfo() missingChallengeInfo.pointValue = 0; } + /// + /// Adds a new page of challenges to the list of pages. + /// Pages contain (by default) up to 14 challenge icons. Excess challenges overflow onto new pages. + /// + /// public void AddPage(List challengeInfos) { // create the challenge info for missingChallengeInfo challenges @@ -165,6 +181,9 @@ private GameObject CreateIconGameObject(GameObject objectRef, int index, Ascensi return newIcon; } + /// + /// Initialise the challenge screen and pages whenever the challenge screen is enabled. + /// public void OnEnable() { // if there are still active challenges, don't rebuild the pages @@ -291,6 +310,13 @@ public void OnEnable() InstantiateArrowObjects(icons); } + /// + /// Creates the leftArrow and rightArrow UI elements for the challenge screen. + /// Positioning is determined by the positions of the challenge icons. + /// By default, the API tries to place the arrows on the left and right sides of the screen. + /// If there isn't enough space due to screen resolution (or if the user has toggled the config option), the arrows are placed at the top of the screen instead. + /// + /// public void InstantiateArrowObjects(List icons) { Vector3 topRight = new(float.MinValue, float.MinValue); @@ -343,6 +369,9 @@ public void InstantiateArrowObjects(List icons) rightArrow.ClearDelegates(); rightArrow.CursorSelectStarted += (x) => NextPage(); } + /// + /// Loads the next page. Wraps around to the first page if currently on the last page. + /// public void NextPage() { pageIndex++; @@ -351,6 +380,9 @@ public void NextPage() LoadPage(pageIndex); } + /// + /// Loads the previous page. Wraps around to the last page if currently on the first page. + /// public void PreviousPage() { pageIndex--; @@ -359,7 +391,10 @@ public void PreviousPage() LoadPage(pageIndex); } - + /// + /// Loads the challenge page at the given index. + /// + /// Index of the page to load. public void LoadPage(int page) { // if page index corresponds to an index in challengeObjects @@ -463,17 +498,41 @@ private char DebugArrayCode(GameObject icon, AscensionChallengeInfo info = null) /// public List> challengeObjectsForPages; + /// + /// The current page index. Determines what challenges are currently displayed. + /// public int pageIndex; + /// + /// How many icons are displayed on each page. + /// public int pageLength; + /// + /// Object that handles displaying challenges. + /// public AscensionChallengeScreen screen; + /// + /// Object that handles the transition to and from the menu screens. + /// public AscensionMenuScreenTransition transition; + /// + /// The UI interactable for moving to the previous page. + /// public AscensionMenuInteractable leftArrow; + /// + /// The UI interactable for moving to the next page. + /// public AscensionMenuInteractable rightArrow; + /// + /// for the placeholder challenge that appears in empty slots or when an error occurs. + /// public static Sprite missingChallengeSprite; + /// + /// for the placeholder challenge that appears in empty slots or when an error occurs. + /// public static AscensionChallengeInfo missingChallengeInfo; private class NoneChallengeDisplayer : MonoBehaviour From 699110729877148fca07265d63585744aa9a3187 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:23:36 -0800 Subject: [PATCH 36/42] Rename files to indicate they contain patches, fix minor error in StarterDeckSelectScreenPatches class name --- ...ionChallengeScreen.cs => AscensionChallengeScreenPatches.cs} | 0 ...terDeckSelectScreen.cs => StarterDeckSelectScreenPatches.cs} | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename InscryptionAPI/Ascension/{AscensionChallengeScreen.cs => AscensionChallengeScreenPatches.cs} (100%) rename InscryptionAPI/Ascension/{StarterDeckSelectScreen.cs => StarterDeckSelectScreenPatches.cs} (99%) diff --git a/InscryptionAPI/Ascension/AscensionChallengeScreen.cs b/InscryptionAPI/Ascension/AscensionChallengeScreenPatches.cs similarity index 100% rename from InscryptionAPI/Ascension/AscensionChallengeScreen.cs rename to InscryptionAPI/Ascension/AscensionChallengeScreenPatches.cs diff --git a/InscryptionAPI/Ascension/StarterDeckSelectScreen.cs b/InscryptionAPI/Ascension/StarterDeckSelectScreenPatches.cs similarity index 99% rename from InscryptionAPI/Ascension/StarterDeckSelectScreen.cs rename to InscryptionAPI/Ascension/StarterDeckSelectScreenPatches.cs index e5af2ed1..931578f7 100644 --- a/InscryptionAPI/Ascension/StarterDeckSelectScreen.cs +++ b/InscryptionAPI/Ascension/StarterDeckSelectScreenPatches.cs @@ -8,7 +8,7 @@ namespace InscryptionAPI.Ascension; [HarmonyPatch] -internal static class StarterDeckSelectscreenPatches +internal static class StarterDeckSelectScreenPatches { [HarmonyPatch(typeof(AscensionChooseStarterDeckScreen), "Start")] [HarmonyPostfix] From 652ca8d3ea1b43d69fde55bba184f1ede629960a Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:33:47 -0800 Subject: [PATCH 37/42] Add xml --- .../Ascension/AscensionChallengePaginator.cs | 8 +- .../AscensionChallengePaginatorSetupifier.cs | 6 + .../Ascension/AscensionRunSetupScreenBase.cs | 174 ++++++++++++++++-- .../Ascension/AscensionScreenManager.cs | 10 + .../Ascension/AscensionScreenSort.cs | 29 ++- .../Ascension/ChallengeDisplayerPlus.cs | 47 ++++- InscryptionAPI/Ascension/ChallengeManager.cs | 18 +- .../Ascension/StarterDeckExtensions.cs | 17 +- .../StarterDeckExtensionsPortraits.cs | 12 +- .../Ascension/StarterDeckManager.cs | 86 ++++++++- .../Ascension/StarterDeckPaginator.cs | 44 ++++- InscryptionAPI/Card/AbilityManager.cs | 20 +- 12 files changed, 412 insertions(+), 59 deletions(-) diff --git a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs index 715af23a..1866bdba 100644 --- a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs +++ b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs @@ -7,7 +7,7 @@ namespace InscryptionAPI.Ascension; /// -/// Class that handles adding displaying custom challenges in the challenge select screen. +/// Class that handles adding displaying custom challenges and allows for multiple pages of challenges. /// public class AscensionChallengePaginator : MonoBehaviour { // not sure if this will break any mods but it's not being used or assigned to. @@ -16,8 +16,8 @@ public class AscensionChallengePaginator : MonoBehaviour { /// /// Initialises the challenge screen, adding custom challenges and UI elements. /// - /// - /// + /// The to attach this paginator to. + /// The default transition object to use. public void Initialize(AscensionChallengeScreen screen, AscensionMenuScreenTransition transition = null) { if (challengeObjectsForPages == null) @@ -66,7 +66,7 @@ public void InitialiseMissingChallengeInfo() /// Adds a new page of challenges to the list of pages. /// Pages contain (by default) up to 14 challenge icons. Excess challenges overflow onto new pages. ///
- /// + /// s that will be displayed on this page. public void AddPage(List challengeInfos) { // create the challenge info for missingChallengeInfo challenges diff --git a/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs b/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs index 5e85925d..efd02129 100644 --- a/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs +++ b/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs @@ -3,8 +3,14 @@ namespace InscryptionAPI.Ascension; // adding this comment to say that setupifier is a ridiculous word, very fun +/// +/// Handles adding the to the ascension menu object. +/// public class AscensionChallengePaginatorSetupifier : ManagedBehaviour { + /// + /// Adds the to the ascension menu object. + /// public void Start() { AscensionMenuScreenTransition screen = gameObject.GetComponent(); diff --git a/InscryptionAPI/Ascension/AscensionRunSetupScreenBase.cs b/InscryptionAPI/Ascension/AscensionRunSetupScreenBase.cs index bcbcad6a..31135226 100644 --- a/InscryptionAPI/Ascension/AscensionRunSetupScreenBase.cs +++ b/InscryptionAPI/Ascension/AscensionRunSetupScreenBase.cs @@ -5,49 +5,106 @@ namespace InscryptionAPI.Ascension; +/// +/// Abstract class for creating custom menu screens to be displayed in Kaycee's Mod. +/// public abstract class AscensionRunSetupScreenBase : ManagedBehaviour { - // This will display near the top of the screen. - // The very top will be the challenge level text; below that will be this + /// + /// Header name of this screen. + /// + /// + /// This will display near the top of the screen. + /// The very top will be the challenge level text; below that will be this. + /// public abstract string headerText { get; } - // If this is true, it will show the card displayer at the footer below the challenge text - // Seting this to true will also enable the DisplayCardInfo and ClearCardInfo methods - // If this is not true, those methods will do nothing + /// + /// Whether the card displayer should be shown and usable on this screen. + /// + /// + /// If this is true, it will show the card displayer at the footer below the challenge text + /// Seting this to true will also enable the and methods + /// If this is not true, those methods will do nothing + /// public abstract bool showCardDisplayer { get; } - // If this is true, it will put a card panel in the middle of the screen - // The card panel will be able to display up to 7 cards - // and will have a left/right button + /// + /// Whether the card panel should be shown on this screen. + /// + /// + /// If this is true, it will put a card panel in the middle of the screen + /// The card panel will be able to display up to 7 cards and will have a left/right button + /// public abstract bool showCardPanel { get; } // This is the hook for the implementer to build their own UI elements. + /// + /// Hook for building this screen's UI elements. + /// + /// public virtual void InitializeScreen(GameObject partialScreen) { } + /// + /// Objects for handling the text lines that appear in the card displayer when a card is selected/hovered over. + /// public SequentialPixelTextLines cardInfoLines; + /// + /// Object for handling the footer text lines. + /// public SequentialPixelTextLines challengeFooterLines; + /// + /// Object for storing the header text. + /// public ChallengeLevelText challengeHeaderDisplay; + /// + /// All cards currently displayed in the card displayer. + /// public List cards; + /// + /// Object for the card panel. + /// public GameObject cardPanel; + /// + /// UI interactable for going to the previous page (if applicable). + /// public MainInputInteractable leftButton; + /// + /// UI interactable for going to the next page (if applicable). + /// public MainInputInteractable rightButton; + /// + /// UI interactble for continuing to the next screen.. + /// public AscensionMenuInteractable continueButton; + /// + /// UI interactable for backing out of the current screen. + /// public AscensionMenuBackButton backButton; + /// + /// Text object for displaying the screen's title. + /// public PixelText screenTitle; + /// + /// Text object for displaying information without using the card displayer. + /// public PixelText secondaryInfoDisplayer; + /// + /// Object that handles transitions to and from this screen. + /// public AscensionMenuScreenTransition transitionController; @@ -65,6 +122,12 @@ private static void CleanupGameObject(GameObject obj, AscensionMenuScreenTransit GameObject.Destroy(obj); } + /// + /// Constructs this screen's paginator buttons. Used to transition to the previous and next screens. + /// + /// The object the paginators will be parented to. + /// If the paginator should be anchored to the top of the screen. + /// public static (AscensionMenuInteractable, AscensionMenuInteractable) BuildPaginators(Transform parent, bool upperPosition = false) { GameObject leftPseudoPrefab = AscensionMenuScreens.Instance.cardUnlockSummaryScreen.transform.Find("Unlocks/ScreenAnchor/PageLeftButton").gameObject; @@ -120,6 +183,13 @@ public static (AscensionMenuInteractable, AscensionMenuInteractable) BuildPagina return (leftIcon.GetComponent(), rightIcon.GetComponent()); } + /// + /// Constructs this screen and adds it to the game. + /// + /// The to build. + /// The ID of the screen that comes before this screen. + /// The ID of the screen that comes after this screen. + /// public static AscensionRunSetupScreenBase BuildScreen(Type screenType, AscensionMenuScreens.Screen previousScreen, AscensionMenuScreens.Screen nextScreen) { // Create the new screen @@ -314,6 +384,11 @@ private static void TransitionToGame() } } + /// + /// Clears any message currently being displayed. + /// If is true, clears the message using . + /// Otherwise, sets the to inactive. + /// public virtual void ClearMessage() { if (this.gameObject.activeSelf) @@ -329,6 +404,12 @@ public virtual void ClearMessage() } } + /// + /// Displays the given message. + /// If is true, displays the message using . + /// Otherwise, uses the to display the message. + /// + /// String to show. public virtual void DisplayMessage(string message) { if (this.showCardDisplayer) @@ -342,22 +423,41 @@ public virtual void DisplayMessage(string message) } } + /// + /// Hook for when the left button is clicked. + /// + /// Interactable corresponding to the left button. public virtual void LeftButtonClicked(MainInputInteractable button) { } + /// + /// Hook for when the right button is clicked. + /// + /// Interactable corresponding to the right button. public virtual void RightButtonClicked(MainInputInteractable button) { } + /// + /// Hook for when a card is moused over in the card displayer. + /// + /// The card that was moused over. + /// + /// If is true, will call by default. + /// public virtual void CardCursorEntered(PixelSelectableCard card) { if (this.showCardDisplayer) this.DisplayCardInfo(card.Info); } + /// + /// Hook for when a card is selected in the card panel displayer. + /// + /// The card that was selected. public virtual void CardClicked(PixelSelectableCard card) { @@ -367,6 +467,13 @@ public virtual void CardClicked(PixelSelectableCard card) private static Vector2 BETWEEN_CARD_OFFSET = new Vector2(0.5f, 0f); + /// + /// Displays the given cards in the card displayer. + /// + /// The s to display. + /// + /// Only functions if is true. + /// public void ShowCards(List cardsToDisplay) { if (!this.showCardDisplayer) @@ -388,9 +495,26 @@ public void ShowCards(List cardsToDisplay) } } + /// + /// String comprised entirely of dashes. + /// Used for displaying the centre delimiters. + /// public const string CENTER_DASHES = "-------------------------------------------------------------------------------------------------------------------------------"; + /// + /// String comprised entirely of dashes that covers the entire screen horizontal. + /// public const string FULL_DASHES = "---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; + /// + /// Displays the given information in the card displayer. + /// + /// The to display. + /// String to display instead of the default displayed name. Use null to use the default. + /// String to display instead of the default description. Leave null to use the default. + /// If the text should be immediately updated or play a transition. + /// + /// Only functions if is true. + /// public void DisplayCardInfo(CardInfo info, string nameOverride = null, string descOverride = null, bool immediate = false) { if (!showCardDisplayer) @@ -408,6 +532,13 @@ public void DisplayCardInfo(CardInfo info, string nameOverride = null, string de }, immediate); } + /// + /// Clears the displayed information in the card displayer. + /// + /// If the text should be immediately updated or play a transition. + /// + /// Only functions if is true. + /// public void ClearCardInfo(bool immediate = true) { if (!showCardDisplayer) @@ -421,6 +552,12 @@ public void ClearCardInfo(bool immediate = true) }, immediate); } + /// + /// Displays the given information in the same format as challenges. + /// + /// The message to display on line 1. + /// The points amount to be displayed on line 2. + /// If a transition should play before displaying the challenge. public void DisplayChallengeInfo(string message, int points, bool immediate = false) { string lineOne = Localization.Translate(message); @@ -468,6 +605,20 @@ public void DisplayChallengeInfo(string message, int points, bool immediate = fa challengeHeaderDisplay.UpdateText(); } + /// + /// Displays information on the given challenge. + /// + /// The challenge to display. + /// If a transition should play before displaying the challenge. + public void DisplayChallengeInfo(AscensionChallenge challenge, bool immediate = false) { + AscensionChallengeInfo info = AscensionChallengesUtil.GetInfo(challenge); + int points = info.pointValue * (AscensionSaveData.Data.ChallengeIsActive(challenge) ? 1 : -1); + DisplayChallengeInfo(info.title, points, immediate); + } + + /// + /// Corrects the viewport cameras in this screen's children's components. + /// public override void OnEnable() { // Set all the viewport camera stuff @@ -476,11 +627,4 @@ public override void OnEnable() base.OnEnable(); } - - public void DisplayChallengeInfo(AscensionChallenge challenge, bool immediate = false) - { - AscensionChallengeInfo info = AscensionChallengesUtil.GetInfo(challenge); - int points = info.pointValue * (AscensionSaveData.Data.ChallengeIsActive(challenge) ? 1 : -1); - DisplayChallengeInfo(info.title, points, immediate); - } } \ No newline at end of file diff --git a/InscryptionAPI/Ascension/AscensionScreenManager.cs b/InscryptionAPI/Ascension/AscensionScreenManager.cs index a2242720..25704882 100644 --- a/InscryptionAPI/Ascension/AscensionScreenManager.cs +++ b/InscryptionAPI/Ascension/AscensionScreenManager.cs @@ -5,6 +5,9 @@ namespace InscryptionAPI.Ascension; +/// +/// Manager class for handling custom menu screens in Kaycee's Mod. +/// [HarmonyPatch] public static class AscensionScreenManager { @@ -18,6 +21,10 @@ public static class AscensionScreenManager private static string challengeScreenHoverText = "START RUN"; + /// + /// Creates a new ascension menu screen and registers it with the API. + /// + /// public static void RegisterScreen() where T : AscensionRunSetupScreenBase { registeredScreens.Add(typeof(T)); @@ -32,6 +39,9 @@ private static AscensionScreenSort.Direction GetPreferredDirection(Type t) return sortAttr.preferredDirection; } + /// + /// Creates and initialises registered menu screens. + /// public static void InitializeAllScreens() { // Sort the screens diff --git a/InscryptionAPI/Ascension/AscensionScreenSort.cs b/InscryptionAPI/Ascension/AscensionScreenSort.cs index 7033c811..296fd6c1 100644 --- a/InscryptionAPI/Ascension/AscensionScreenSort.cs +++ b/InscryptionAPI/Ascension/AscensionScreenSort.cs @@ -1,19 +1,46 @@ namespace InscryptionAPI.Ascension; -// Decorates a custom screen and marks how it should be sorted +/// +/// Decorates a custom screen and marks how it should be sorted. +/// public class AscensionScreenSort : System.Attribute { + /// + /// Where in the new run sequence a custom screen should appear. + /// public enum Direction : int { + /// + /// Requires being the starting screen when selecting a new run. + /// RequiresStart = 1, + /// + /// Prefers being the starting screen when selecting a new run. + /// PrefersStart = 2, + /// + /// Does not care where in the line up of screen this screen appears. + /// NoPreference = 3, + /// + /// Prefers being the final screen when selecting a new run. + /// PrefersEnd = 4, + /// + /// Requires being the starting screen when selecting a new run. + /// RequiresEnd = 5, } + /// + /// The preferred position for this custom screen. + /// public Direction preferredDirection; + /// + /// Marks a custom screen with its preferred direction. + /// + /// public AscensionScreenSort(Direction preferredDirection = Direction.NoPreference) { this.preferredDirection = preferredDirection; diff --git a/InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs b/InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs index 67cf8272..529f6bc7 100644 --- a/InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs +++ b/InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs @@ -5,8 +5,16 @@ namespace InscryptionAPI.Ascension; +/// +/// Improved version of that can handle custom challenges. +/// public class ChallengeDisplayerPlus : ManagedBehaviour { + /// + /// Attempts to attach this class to the vanilla . + /// + /// The vanilla displayer instance. + /// The newly added API displayer. public static ChallengeDisplayerPlus TryAddChallengeDisplayerPlusToDisplayer(AscensionChallengeDisplayer displayer) { ChallengeDisplayerPlus plus = displayer.GetComponent(); @@ -70,6 +78,10 @@ public static ChallengeDisplayerPlus TryAddChallengeDisplayerPlusToDisplayer(Asc return plus; } + /// + /// Retrieves the best y position for anchoring footer text. + /// + /// The best available y-value. public float GetBestAvailableY() { float y = originalTitlePos; @@ -84,8 +96,16 @@ public float GetBestAvailableY() return y; } + /// + /// A reference to the . + /// public AscensionChallengeDisplayer displayer => GetComponent(); + /// + /// Displays the challenge icon for the given . + /// + /// The to display. + /// If the challenge should be displayed immediately or after a transition plays. public void DisplayChallenge(AscensionChallengeInfo challengeInfo, bool immediate = false) { string dependency = "", incompatibility = ""; @@ -153,6 +173,12 @@ public void DisplayChallenge(AscensionChallengeInfo challengeInfo, bool immediat DisplayText(dependency, incompatibility, immediate); } + /// + /// Handles displaying the footer text that appears when hovering over a challenge icon. + /// + /// String that lists this challenge's dependencies. + /// String that lists this challenge's incompatibiities. + /// If the challenge should be displayed immediately or after a transition plays. public void DisplayText(string dependency, string incompatibility, bool immediate = false) { float yOffset = (!string.IsNullOrEmpty(dependency) ? 0.11f : 0f) + (!string.IsNullOrEmpty(incompatibility) ? 0.11f : 0f); @@ -217,12 +243,29 @@ private IEnumerator DisplayTextSequence(string dependency, string incompatibilit private float originalDescriptionPos; private float originalPointsPos; - public class PrefixedString - { + /// + /// Handles displaying challenge dependency strings when hovering over a challenge icon. + /// + public class PrefixedString { + /// + /// The full dependency string. + /// public string FullText => prefix + (number > 1 ? " (x" + number + ")" : ""); + /// + /// The full dependency string with the number (if applicable) coloured red. + /// public string RedPrefixText => prefix + (number > 1 ? " [c:R](x" + number + ")[c]" : ""); + /// + /// Prefix string for the dependency. + /// public string prefix; + /// + /// The dependency challenge's ID. + /// public AscensionChallenge challenge; + /// + /// How many of the given challenge are required. + /// public int number; } } \ No newline at end of file diff --git a/InscryptionAPI/Ascension/ChallengeManager.cs b/InscryptionAPI/Ascension/ChallengeManager.cs index 5824764b..fc5f532a 100644 --- a/InscryptionAPI/Ascension/ChallengeManager.cs +++ b/InscryptionAPI/Ascension/ChallengeManager.cs @@ -288,6 +288,12 @@ public FullChallenge SetCustomUnlock(Func check) CustomUnlockCheck = check; return this; } + /// + /// Marks this challenge as using the boss icon appearance in the select screen. + /// This means occupying an entire column. + /// + /// Whether or not this challenge's icon should occupy an entire column of its page. + /// The same so a chain can continue. public FullChallenge SetBoss(bool boss) { Boss = boss; @@ -295,12 +301,12 @@ public FullChallenge SetBoss(bool boss) } } /// - /// The list of all base game challenges in the form of ChallengeManager.FullChallenge. + /// The list of all base game challenges in the form of . /// public static readonly ReadOnlyCollection BaseGameChallenges = new(GenBaseGameChallenges()); internal static readonly ObservableCollection NewInfos = new(); /// - /// The list of all new challenges added with the API in the form of ChallengeManager.FullChallenge. + /// The list of all new challenges added with the API in the form of . /// public static readonly ReadOnlyCollection NewChallenges = new(NewInfos); @@ -349,7 +355,9 @@ internal static FullChallenge[] GetChallengeIcons() return screen.icons?.FindAll(x => x != null && x.challengeInfo != null && x.challengeInfo.challengeType != AscensionChallenge.None && x.challengeInfo.GetFullChallenge() != null)? .ConvertAll(x => x.challengeInfo.challengeType.GetFullChallenge())?.ToArray() ?? new FullChallenge[0]; } - + /// + /// A hook for modders to add custom code to modify the challenge list dynamically. + /// public static event Func, List> ModifyChallenges; private static AscensionChallengeInfo CloneChallengeInfo(AscensionChallengeInfo info) @@ -366,7 +374,9 @@ private static AscensionChallengeInfo CloneChallengeInfo(AscensionChallengeInfo }; return retval; } - + /// + /// Resynchronizes the challenge list. + /// public static void SyncChallengeList() { List asci = new(NewInfos); diff --git a/InscryptionAPI/Ascension/StarterDeckExtensions.cs b/InscryptionAPI/Ascension/StarterDeckExtensions.cs index 92baaa61..1c0959e2 100644 --- a/InscryptionAPI/Ascension/StarterDeckExtensions.cs +++ b/InscryptionAPI/Ascension/StarterDeckExtensions.cs @@ -4,6 +4,9 @@ namespace InscryptionAPI.Ascension; +/// +/// Class that stores extensions related to starter decks. +/// public static partial class StarterDeckExtensions { private static Sprite GetPortrait(Texture2D portrait, TextureHelper.SpriteType spriteType, FilterMode? filterMode = null) @@ -12,10 +15,10 @@ private static Sprite GetPortrait(Texture2D portrait, TextureHelper.SpriteType s } /// - /// Sets the Unlock Level of a Starter Deck. + /// Sets this starter deck's unlock level. /// - /// The StarterDeckInfo of the Deck. - /// The Unlock Level to set the Starter Deck with. + /// The of the Deck. + /// The challenge level required before this starter deck is available. public static void SetUnlockLevel(this StarterDeckInfo info, int unlockLevel) { StarterDeckManager.FullStarterDeck fullStarterDeck = StarterDeckManager.AllDecks.FirstOrDefault(x => x.Info == info); @@ -26,10 +29,10 @@ public static void SetUnlockLevel(this StarterDeckInfo info, int unlockLevel) } /// - /// Gets the Unlock Level associated with a Starter deck. + /// Gets the unlock level for the given . /// - /// The StarterDeckInfo of the Deck. - /// Returns the Unlock Level, if it fails it will return . + /// The to access. + /// Returns the starter deck's unlock level, or -1 if an error occurs. public static int GetUnlockLevel(this StarterDeckInfo info) { StarterDeckManager.FullStarterDeck fullStarterDeck = StarterDeckManager.AllDecks.FirstOrDefault(x => x.Info == info); @@ -37,6 +40,6 @@ public static int GetUnlockLevel(this StarterDeckInfo info) { return fullStarterDeck.UnlockLevel; } - return int.MaxValue; + return -1; } } \ No newline at end of file diff --git a/InscryptionAPI/Ascension/StarterDeckExtensionsPortraits.cs b/InscryptionAPI/Ascension/StarterDeckExtensionsPortraits.cs index 14889232..2a733db8 100644 --- a/InscryptionAPI/Ascension/StarterDeckExtensionsPortraits.cs +++ b/InscryptionAPI/Ascension/StarterDeckExtensionsPortraits.cs @@ -10,9 +10,9 @@ public static partial class StarterDeckExtensions /// /// Sets the icon texture for the starter deck. /// - /// StarterDeckInfo to access. + /// to access. /// The path to the .png file containing the artwork (relative to the Plugins directory). - /// The same StarterDeckInfo so a chain can continue. + /// The same so a chain can continue. public static StarterDeckInfo SetIconTexture(this StarterDeckInfo info, string pathToArt) { try @@ -28,10 +28,10 @@ public static StarterDeckInfo SetIconTexture(this StarterDeckInfo info, string p /// /// Sets the icon texture for the starter deck. /// - /// StarterDeckInfo to access. + /// to access. /// The texture containing the emission. /// The filter mode for the texture, or null if no change. - /// The same StarterDeckInfo so a chain can continue. + /// The same so a chain can continue. public static StarterDeckInfo SetIconTexture(this StarterDeckInfo info, Texture2D portrait, FilterMode? filterMode = null) { return info.SetIconTexture(GetPortrait(portrait, TextureHelper.SpriteType.CardPortrait, filterMode)); @@ -40,9 +40,9 @@ public static StarterDeckInfo SetIconTexture(this StarterDeckInfo info, Texture2 /// /// Sets the icon texture for the starter deck. /// - /// StarterDeckInfo to access. + /// to access. /// The sprite containing the emission. - /// The same StarterDeckInfo so a chain can continue. + /// The same so a chain can continue. public static StarterDeckInfo SetIconTexture(this StarterDeckInfo info, Sprite sprite) { if (info.iconSprite == null) diff --git a/InscryptionAPI/Ascension/StarterDeckManager.cs b/InscryptionAPI/Ascension/StarterDeckManager.cs index 2b5e3680..3b77a25e 100644 --- a/InscryptionAPI/Ascension/StarterDeckManager.cs +++ b/InscryptionAPI/Ascension/StarterDeckManager.cs @@ -7,28 +7,51 @@ namespace InscryptionAPI.Ascension; +/// +/// This manager class handles the creation and management of mod-added starter decks. +/// [HarmonyPatch] -public static class StarterDeckManager -{ +public static class StarterDeckManager { + /// + /// A utility class that holds all of the required information about a starter deck in order to be able to use it in-game. + /// public class FullStarterDeck { + /// + /// The description object for this starter deck. + /// public StarterDeckInfo Info { get; set; } + /// + /// The challenge level this starter deck becomes available. + /// public int UnlockLevel { get; set; } /// /// A function that needs to return true for the starter deck to be unlocked. Optional. If this isn't set, this check will be bypassed. The int argument is the current Kaycee's Mod challenge level. /// public Func CustomUnlockCheck { get; set; } + /// + /// The internal names of the cards contained in this starter deck. + /// public List CardNames { get; set; } // For delayed loading of actual card names } + /// + /// All of the vanilla game's starter decks. + /// public static readonly ReadOnlyCollection BaseGameDecks = new(GetBaseGameDecks()); internal static readonly ObservableCollection NewDecks = new(); - public static List AllDecks = BaseGameDecks.ToList(); - public static List AllDeckInfos = BaseGameDecks.Select(fsd => fsd.Info).ToList(); + /// + /// The current processed list of all starter decks in the game, including vanilla and mod-added starter decks. + /// + public static List AllDecks { get; private set; } = BaseGameDecks.ToList(); + /// + /// The current processed list of all objects in the game, including vanilla and mod-added starter decks. + /// + public static List AllDeckInfos { get; private set; } = BaseGameDecks.Select(fsd => fsd.Info).ToList(); private static List GetBaseGameDecks() { @@ -63,8 +86,14 @@ private static FullStarterDeck CloneStarterDeck(FullStarterDeck info) return retval; } + /// + /// A hook for modders to add custom code to modify the starter deck list dynamically. + /// public static event Func, List> ModifyDeckList; + /// + /// Resynchronizes the starter deck list. + /// public static void SyncDeckList() { var decks = BaseGameDecks.Concat(NewDecks).Select(CloneStarterDeck).ToList(); @@ -118,6 +147,13 @@ static StarterDeckManager() }; } + /// + /// Creates a new starter deck using the given and registers it with the API. + /// + /// The GUID of the mod adding this starter deck. + /// The for this starter deck. + /// The minimum challenge level for this starter deck to become available. + /// The object containing this starter deck's information. public static FullStarterDeck Add(string pluginGuid, StarterDeckInfo info, int unlockLevel = 0) { info.name = pluginGuid + "_" + (info.title ?? info.name); @@ -133,6 +169,15 @@ public static FullStarterDeck Add(string pluginGuid, StarterDeckInfo info, int u return fsd; } + /// + /// Creates a new starter deck and registers it with the API. + /// + /// The GUID of the mod adding this starter deck. + /// The title and internal name of this starter deck. + /// The icon texture to display for this starter deck in the deck selection screen. + /// The internal names of the cards contained in this starter deck. + /// The minimum challenge level for this starter deck to become available. + /// The object containing this starter deck's information. public static FullStarterDeck New(string pluginGuid, string title, Texture2D iconTexture, string[] cardNames, int unlockLevel = 0) { StarterDeckInfo info = ScriptableObject.CreateInstance(); @@ -149,7 +194,17 @@ public static FullStarterDeck New(string pluginGuid, string title, Texture2D ico return fsd; } - + + /// + /// Variant of that allows for a separate internal name to be defined rather than using the title. + /// + /// The GUID of the mod adding this starter deck. + /// The internal name of this starter deck. + /// The title/name of this starter deck. + /// The icon texture to display for this starter deck in the deck selection screen. + /// The internal names of the cards contained in this starter deck. + /// The minimum challenge level for this starter deck to become available. + /// The object containing this starter deck's information. public static FullStarterDeck New(string pluginGuid, string name, string title, Texture2D iconTexture, string[] cardNames, int unlockLevel = 0) { StarterDeckInfo info = ScriptableObject.CreateInstance(); @@ -167,12 +222,31 @@ public static FullStarterDeck New(string pluginGuid, string name, string title, return fsd; } + /// + /// Creates a new starter deck and registers it with the API. + /// + /// The GUID of the mod adding this starter deck. + /// The title/name of this starter deck. + /// The file path for the icon texture to display for this starter deck in the deck selection screen (relative to the Plugins folder). + /// The internal names of the cards contained in this starter deck. + /// The minimum challenge level for this starter deck to become available. + /// The object containing this starter deck's information. public static FullStarterDeck New(string pluginGuid, string title, string pathToIconTexture, string[] cardNames, int unlockLevel = 0) { Texture2D texture = TextureHelper.GetImageAsTexture(pathToIconTexture); return New(pluginGuid, title, texture, cardNames, unlockLevel); } - + + /// + /// Variant of that allows for a separate internal name to be defined rather than using the title. + /// + /// The GUID of the mod adding this starter deck. + /// The internal name of this starter deck. + /// The title/name of this starter deck. + /// The file path for the icon texture to display for this starter deck in the deck selection screen (relative to the Plugins folder). + /// The internal names of the cards contained in this starter deck. + /// The minimum challenge level for this starter deck to become available. + /// The object containing this starter deck's information. public static FullStarterDeck New(string pluginGuid, string name, string title, string pathToIconTexture, string[] cardNames, int unlockLevel = 0) { Texture2D texture = TextureHelper.GetImageAsTexture(pathToIconTexture); diff --git a/InscryptionAPI/Ascension/StarterDeckPaginator.cs b/InscryptionAPI/Ascension/StarterDeckPaginator.cs index 2580b5fe..8ce8ec46 100644 --- a/InscryptionAPI/Ascension/StarterDeckPaginator.cs +++ b/InscryptionAPI/Ascension/StarterDeckPaginator.cs @@ -5,6 +5,9 @@ namespace InscryptionAPI.Ascension; +/// +/// Class that handles adding displaying starter decks and allows for multiple pages of starter decks. +/// public class StarterDeckPaginator : MonoBehaviour { private static Sprite noneDeckSprite; @@ -15,7 +18,11 @@ private void Initialize(AscensionChooseStarterDeckScreen screen) pageLength = screen.deckIcons.Count; this.screen = screen; } - + /// + /// Adds a new page of starter decks to the list of pages. + /// Pages contain (by default) up to 8 starter deck. Excess decks overflow onto new pages. + /// + /// s that will be displayed on this page. public void AddPage(List page) { if (page.Count < pageLength) @@ -27,7 +34,9 @@ public void AddPage(List page) } pages.Add(page); } - + /// + /// Loads the next page. Wraps around to the first page if currently on the last page. + /// public void NextPage() { pageIndex++; @@ -37,7 +46,9 @@ public void NextPage() } LoadPage(pages[pageIndex]); } - + /// + /// Loads the previous page. Wraps around to the last page if currently on the first page. + /// public void PreviousPage() { pageIndex--; @@ -48,6 +59,10 @@ public void PreviousPage() LoadPage(pages[pageIndex]); } + /// + /// Loads the challenge page at the given index. + /// + /// Index of the page to load. public void LoadPage(List page) { List sorted = new List(screen.deckIcons); @@ -82,7 +97,9 @@ public void LoadPage(List page) } CommandLineTextDisplayer.PlayCommandLineClickSound(); } - + /// + /// Initialise the starter deck screen and pages whenever the starter deck screen is enabled. + /// public void OnEnable() { StarterDeckManager.SyncDeckList(); @@ -156,10 +173,29 @@ public void OnEnable() LoadPage(pages[0]); } + /// + /// The UI interactable for moving to the previous page. + /// public GameObject leftArrow; + /// + /// The UI interactable for moving to the next page. + /// public GameObject rightArrow; + /// + /// The current page index. Determines what starter decks are currently displayed. + /// public int pageIndex; + /// + /// A List representing the entire collection of pages. + /// public List> pages; + /// + /// How many decks are displayed on each page. + /// public int pageLength; + + /// + /// Object that handles displaying starter decks. + /// public AscensionChooseStarterDeckScreen screen; } \ No newline at end of file diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index 9d9bca0c..4f9de7fe 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -33,33 +33,33 @@ private class AbilityExt public class FullAbility { /// - /// The unique ID for this ability + /// The unique ID for this ability. /// public readonly Ability Id; /// - /// The guid of the mod that added this ability + /// The GUID of the mod that added this ability. /// public readonly string ModGUID; /// - /// The description object for this ability + /// The description object for this ability. /// public readonly AbilityInfo Info; /// - /// A subclass of that implements the logic for the ability + /// A subclass of that implements the logic for the ability. /// public readonly Type AbilityBehavior; /// - /// A 49x49 texture for the ability icon + /// A 49x49 texture for the ability icon. /// /// public Texture Texture { get; internal set; } /// - /// A 49x49 texture for the ability icon, used when the card belongs to the opponent + /// A 49x49 texture for the ability icon, used when the card belongs to the opponent. /// /// public Texture CustomFlippedTexture { get; internal set; } @@ -287,9 +287,9 @@ private static List GenBaseGameAbilityList() } /// - /// Creates a new ability and registers it to be able to be added to cards + /// Creates a new ability and registers it to be able to be added to cards. /// - /// The guid of the mod adding the ability. + /// The GUID of the mod adding the ability. /// An instance of describing the ability. /// A subclass of that implements the logic for the ability. /// The ability icon as a 49x49 texture. @@ -314,7 +314,7 @@ public static FullAbility Add(string guid, AbilityInfo info, Type behavior, Text /// /// Creates a new ability and registers it to be able to be added to cards /// - /// The guid of the mod adding the ability. + /// The GUID of the mod adding the ability. /// The name of the ability. /// The description as it appears in the game's rulebook. /// A subclass of that implements the logic for the ability. @@ -331,7 +331,7 @@ public static AbilityInfo New(string guid, string rulebookName, string rulebookD /// /// Creates a new ability and registers it to be able to be added to cards /// - /// The guid of the mod adding the ability. + /// The GUID of the mod adding the ability. /// The name of the ability. /// The description as it appears in the game's rulebook. /// A subclass of that implements the logic for the ability. From 7425126d12c23a1c80923070f18d9143a384b49b Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:46:15 -0800 Subject: [PATCH 38/42] Add XML --- InscryptionAPI/Boons/BoonBehaviour.cs | 20 ++++++++++---------- InscryptionAPI/Boons/BoonManager.cs | 23 ++++++++++++++++++++++- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/InscryptionAPI/Boons/BoonBehaviour.cs b/InscryptionAPI/Boons/BoonBehaviour.cs index 27dfc811..e6934dfe 100644 --- a/InscryptionAPI/Boons/BoonBehaviour.cs +++ b/InscryptionAPI/Boons/BoonBehaviour.cs @@ -4,24 +4,24 @@ namespace InscryptionAPI.Boons; /// -/// Base class for all custom Boons +/// Base class for all custom Boons. /// public class BoonBehaviour : NonCardTriggerReceiver { private static List instances; /// - /// The unique id for this boon + /// The unique id for this boon. /// public BoonManager.FullBoon boon { get; internal set; } /// - /// The instance number for this boon once instantiated + /// The instance number for this boon once instantiated. /// public int instanceNumber { get; internal set; } /// - /// Fires when the boon behavior starts up + /// Fires when the starts up. /// public void Start() { @@ -32,7 +32,7 @@ public void Start() } /// - /// Fires when the boon behaviour is destroyed + /// Fires when the is destroyed. /// public new void OnDestroy() { @@ -40,27 +40,27 @@ public void Start() } /// - /// Gets all active boon behaviours for the given boon type + /// Gets all active s for the given boon type. /// /// The boon type to search for. - /// A list of all boon behaviours that are active in battle. + /// A list of all s that are active in battle. public static List FindInstancesOfType(BoonData.Type type) { return Instances.FindAll((x) => x.boon.boon.type == type); } /// - /// Gets the count of active boon behaviours for the given boon type + /// Gets the count of active s for the given boon type /// /// The boon type to search for. - /// The count of all boon behaviours that are active in battle. + /// The count of all s that are active in battle. public static int CountInstancesOfType(BoonData.Type type) { return FindInstancesOfType(type).Count; } /// - /// Indicates if there are any active boon behaviours of the given type + /// Indicates if there are any active s of the given type /// /// The boon type to search for. /// True if there is at least one boon of the given type; false otherwise. diff --git a/InscryptionAPI/Boons/BoonManager.cs b/InscryptionAPI/Boons/BoonManager.cs index 7046ba0c..cb182c1c 100644 --- a/InscryptionAPI/Boons/BoonManager.cs +++ b/InscryptionAPI/Boons/BoonManager.cs @@ -26,7 +26,7 @@ public class FullBoon public BoonData boon; /// - /// A subclass of [BoonBehaviour](xref:InscryptionAPI.Boons.BoonBehaviour) that implements the boon's behaviour. + /// A subclass of that implements the boon's logic. /// public Type boonHandlerType; @@ -40,6 +40,9 @@ public class FullBoon ///
public bool stacks; + /// + /// Metacategories for what rulebooks this boon should appear in. + /// public List metaCategories = new(); /// @@ -56,6 +59,10 @@ public class FullBoon /// All boons that come as part of the vanilla game. /// public static readonly ReadOnlyCollection BaseGameBoons = new(Resources.LoadAll("Data/Boons")); + + /// + /// All of the vanilla game's boons as objects. + /// public static readonly List FullBaseGameBoons = BaseGameBoons.Select(x => new FullBoon() { appearInRulebook = true, @@ -66,6 +73,9 @@ public class FullBoon }).ToList(); internal static readonly ObservableCollection NewBoons = new(); + /// + /// The current processed list of all boons in the game, including vanilla and mod-added boons. + /// public static List AllFullBoons { get; private set; } = new(FullBaseGameBoons); /// @@ -163,6 +173,12 @@ public static BoonData.Type New(string guid, string name, string rulebookDesc return New(guid, name, rulebookDescription, pathToIcon, pathToCardArt, stackable, appearInLeshyTrials, appearInRulebook); } + /// + /// Extension method for adding metacategories to a boon based on its ID. + /// + /// The boon ID. + /// Metacategories to add. + /// The same Boon ID so a chain can continue. public static BoonData.Type AddRuleBookCategories(this BoonData.Type boonType, params AbilityMetaCategory[] categories) { FullBoon boon = boonType.GetFullBoon(); @@ -176,6 +192,11 @@ public static BoonData.Type AddRuleBookCategories(this BoonData.Type boonType, p } return boonType; } + /// + /// Retrieves the object associated with the given boon ID. + /// + /// The boon ID. + /// The boon's object, or null if not found. public static FullBoon GetFullBoon(this BoonData.Type boonType) { return AllFullBoons.Find(x => x.boon.type == boonType); From 1f05ef6fa038d96a28d7a36d9033820370403062 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:48:17 -0800 Subject: [PATCH 39/42] Add tag --- InscryptionAPI/Card/AbilityManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index 4f9de7fe..49ff0a2d 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -173,7 +173,8 @@ public FullAbility Clone() /// /// A hook for modders to add custom code to modify the ability list dynamically. /// - /// There are two primary use cases for this hook: + /// + /// There are two primary use cases for this hook: /// /// - Making changes to abilities that may be added after your plugin initializes /// - Making context-aware changes to abilities @@ -193,7 +194,7 @@ public FullAbility Clone() /// To use this, you need to add a delegate that accepts the current list of all abilities, then returns /// that same list back. /// - /// ```c# + /// /// AbilityManager.ModifyAbilityList += delegate(List<FullAbility> abilities) /// { /// // Add the rulebook metacategories to every single ability @@ -201,7 +202,7 @@ public FullAbility Clone() /// ability.info.AddMetaCategories(AbilityMetaCategory.Part1Rulebook, AbilityMetaCategory.Part3Rulebook); /// return abilities; /// } - /// ``` + /// /// public static event Func, List> ModifyAbilityList; From e4c956b35ce0c94e4e7988158b213ac9f6263a68 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:49:40 -0800 Subject: [PATCH 40/42] Add break tags to retain XML formatting in actual documentation --- InscryptionAPI/Card/AbilityManager.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index 49ff0a2d..8cecfa61 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -175,25 +175,25 @@ public FullAbility Clone() /// /// /// There are two primary use cases for this hook: - /// + ///

/// - Making changes to abilities that may be added after your plugin initializes /// - Making context-aware changes to abilities - /// + ///

/// The way this operates is as follows: - /// + ///

/// 1. The makes a copy of all objects. Note that unlike the similar code in CardManager, this is actually a *deep* copy of the AbilityInfo. /// 2. The code in is executed on the copy of those abilities. /// 3. The modified list becomes the game's new official list of abilities. - /// + ///

/// The reason the abilities are cloned before processing is so that you can make any change to them you wish /// without affecting the original ability. This means that you do not need to try to track changes or remember /// what the original version of the ability looked like before you started changing it; the next time /// is called, all changes will be reverted /// and then re-applied. - /// + ///

/// To use this, you need to add a delegate that accepts the current list of all abilities, then returns /// that same list back. - /// + ///

/// /// AbilityManager.ModifyAbilityList += delegate(List<FullAbility> abilities) /// { @@ -214,7 +214,8 @@ public FullAbility Clone() /// /// Resynchronizes the ablity list. /// - /// Most importantly, this re-executes all custom code that was added to the + /// + /// Most importantly, this re-executes all custom code that was added to the /// event. If you are doing any sort of context-aware processing of the ability list, you may need to manually /// call this method in order to make sure that your code executes correctly. However, this automatically gets called /// every time that the game transitions from either the main menu into the base game, or whenever a new run is From b000129c551b1c2be538257d029c42208cc24e21 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:50:20 -0800 Subject: [PATCH 41/42] Fix duplicate /// --- InscryptionAPI/Card/SpecialStatIconManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InscryptionAPI/Card/SpecialStatIconManager.cs b/InscryptionAPI/Card/SpecialStatIconManager.cs index ae4d8744..8e2fa1bc 100644 --- a/InscryptionAPI/Card/SpecialStatIconManager.cs +++ b/InscryptionAPI/Card/SpecialStatIconManager.cs @@ -148,7 +148,7 @@ public static FullStatIcon Add(string guid, StatIconInfo info, Type behavior) return full; } - /// /// + /// /// Creates a new stat icon and registers it to be able to be added to cards /// /// The guid of the mod adding the ability. From 1b7df0459271952e7b8ad7c92ea66354b1545021 Mon Sep 17 00:00:00 2001 From: WhistleWind <69230920+HumabHatterZed@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:51:31 -0800 Subject: [PATCH 42/42] Fix numbered list in XML --- InscryptionAPI/Card/AbilityManager.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index 8cecfa61..dc65222e 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -182,17 +182,15 @@ public FullAbility Clone() /// The way this operates is as follows: ///

/// 1. The makes a copy of all objects. Note that unlike the similar code in CardManager, this is actually a *deep* copy of the AbilityInfo. - /// 2. The code in is executed on the copy of those abilities. - /// 3. The modified list becomes the game's new official list of abilities. + ///
2. The code in is executed on the copy of those abilities. + ///
3. The modified list becomes the game's new official list of abilities. ///

/// The reason the abilities are cloned before processing is so that you can make any change to them you wish /// without affecting the original ability. This means that you do not need to try to track changes or remember /// what the original version of the ability looked like before you started changing it; the next time - /// is called, all changes will be reverted - /// and then re-applied. + /// is called, all changes will be reverted and then re-applied. ///

- /// To use this, you need to add a delegate that accepts the current list of all abilities, then returns - /// that same list back. + /// To use this, you need to add a delegate that accepts the current list of all abilities, then returns that same list back. ///

/// /// AbilityManager.ModifyAbilityList += delegate(List<FullAbility> abilities)