diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
index c42877047..5c2346157 100644
--- a/.github/workflows/documentation.yml
+++ b/.github/workflows/documentation.yml
@@ -5,40 +5,51 @@ on:
branches:
- main
+permissions:
+ contents: write
+
jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Setup .NET
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v6
with:
- dotnet-version: 6.0.x
+ dotnet-version: '10.0.x'
- name: Restore Project
run: dotnet restore
- - name: Add Mono Repository
- run: |
- sudo apt install gnupg ca-certificates
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
- sudo apt update
-
- - name: Install Mono
- run: sudo apt install mono-runtime mono-devel msbuild
-
- name: Install DocFX
run: |
- curl -LJ https://github.com/dotnet/docfx/releases/download/v2.59.0/docfx.zip -o docfx.zip
+ curl -LJ https://github.com/dotnet/docfx/releases/download/v2.81.0/docfx-linux-x64-v2.81.0.zip -o docfx.zip
unzip -d docfx/ docfx.zip
+ chmod +x docfx/docfx
- name: Generate documentation
- run: mono docfx/docfx.exe docs/docfx.json
+ env:
+ REPOSITORY_OWNER: ${{ github.repository_owner }}
+ REPOSITORY_NAME: ${{ github.event.repository.name }}
+ run: |
+ if [ "$REPOSITORY_NAME" = "$REPOSITORY_OWNER.github.io" ]; then
+ DOCFX_BASE_URL="https://${REPOSITORY_OWNER}.github.io/"
+ else
+ DOCFX_BASE_URL="https://${REPOSITORY_OWNER}.github.io/${REPOSITORY_NAME}/"
+ fi
+
+ jq --arg base "$DOCFX_BASE_URL" \
+ '.build.globalMetadata._appBaseUrl = $base' \
+ docs/docfx.json > docs/docfx.generated.json
+
+ ./docfx/docfx docs/docfx.generated.json
+
+ rm docs/docfx.generated.json
- - uses: actions/checkout@v3
+ - name: Checkout gh-pages
+ uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
@@ -50,11 +61,10 @@ jobs:
cp -R ../docs/_site/* .
- name: Push update
- continue-on-error: true
run: |
cd gh-pages
git config user.name github-actions
git config user.email github-actions@github.com
git add .
- git commit -a -m "Generated from ${{ github.event.head_commit.id }}"
+ git commit -a -m "Generated from ${{ github.event.head_commit.id }}" || echo "No changes needed"
git push
diff --git a/.github/workflows/ts-build.yml b/.github/workflows/ts-build.yml
new file mode 100644
index 000000000..5f368da30
--- /dev/null
+++ b/.github/workflows/ts-build.yml
@@ -0,0 +1,34 @@
+
+name: TS-Build
+
+on:
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ name: Run TS-Build
+ runs-on: windows-latest
+
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v4
+
+ - name: Setup .NET SDK
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 10.0.x
+
+ - name: Run TS-Build Script
+ shell: cmd
+ run: call InscryptionAPI\TS-Build.bat
+
+ - name: Send Artifacts to GitHub Workflow for Later Use.
+ uses: actions/upload-artifact@v4
+ with:
+ name: InscryptionAPI-Thunderstore-${{ github.run_number }}
+ path: InscryptionAPI/GITHUB RELEASE/NET/*.zip
+ if-no-files-found: error
+ retention-days: 30
diff --git a/.gitignore b/.gitignore
index dbfec3681..5bac3001c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,8 @@ bin/
.vscode/
*.user
build/
-
+InscryptionAPI/GITHUB RELEASE/
+InscryptionAPI/GITHUB PRERELEASE/
+InscryptionAPI/Thunderstore-Package-Elements/monomod/Assembly-CSharp.APIPatcher.mm.dll
+InscryptionAPI/Thunderstore-Package-Elements/monomod/Assembly-CSharp.APIPatcher.mm.pdb
+InscryptionAPI/Thunderstore-Package-Elements/monomod/Assembly-CSharp.APIPatcher.mm.xml
\ No newline at end of file
diff --git a/.run/TS-Build InscryptionAPI.run.xml b/.run/TS-Build InscryptionAPI.run.xml
new file mode 100644
index 000000000..ab052550e
--- /dev/null
+++ b/.run/TS-Build InscryptionAPI.run.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/APIPatcher/APIPatcher.csproj b/APIPatcher/APIPatcher.csproj
index 296ee20b0..bd589d91e 100644
--- a/APIPatcher/APIPatcher.csproj
+++ b/APIPatcher/APIPatcher.csproj
@@ -1,16 +1,27 @@
- netframework4.7.2
+ netframework4.7.2
+ win-x64;win-x86;win-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm64;osx-x64;osx-arm64
+ Assembly-CSharp.APIPatcher.mm
+ The MonoMod Patcher for the Inscryption API.
+ 2.24.2
+ Cyantist, IngoH, WhistleWind, Chaosyr and Contibutors
+ true
+ Latest
+ APIPatcher
+ full
+ $(NoWarn);AD0001;CS0612;CS8604;CS0252;CS0618;Harmony003;Publicizer001enabledisable
- latest
+ false
+ true
+ false
+ false
+ truefalse
- Assembly-CSharp.APIPatcher.mm
-
-
-
- $(NoWarn);AD0001;CS0612;CS8604;CS0252;CS0618;Harmony003;Publicizer001
+ true
+ ..\InscryptionAPI\Thunderstore-Package-Elements\monomod\
@@ -22,4 +33,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/APIPatcher/ScriptableObjectLoader.cs b/APIPatcher/ScriptableObjectLoader.cs
index 3c67a6dcc..66c6beab1 100644
--- a/APIPatcher/ScriptableObjectLoader.cs
+++ b/APIPatcher/ScriptableObjectLoader.cs
@@ -3,9 +3,16 @@
namespace APIPatcher;
+///
+/// Uses MonoMod to patch Unity's ScriptableObjectLoader to also use our version of the ScriptableObjectLoader seen in the Inscryption API itself.
+///
+///
[MonoModPatch("global::ScriptableObjectLoader`1")]
internal class patch_ScriptableObjectLoader : ScriptableObjectLoader where T : UnityObject
{
+ ///
+ /// A List of AllData used within the overarching system, e.g. a List of .
+ ///
new public static List AllData
{
get
diff --git a/APIPatcher/Singleton.cs b/APIPatcher/Singleton.cs
index ce178f8aa..1291c79fe 100644
--- a/APIPatcher/Singleton.cs
+++ b/APIPatcher/Singleton.cs
@@ -4,9 +4,16 @@
namespace APIPatcher;
+///
+/// Uses MonoMod to patch the Singleton for later usability by the Inscryption API.
+///
+/// A ManagedBehaviour associated with the Singleton System.
[MonoModPatch("global::Singleton`1")]
internal class patch_Singleton : Singleton where T : ManagedBehaviour
{
+ ///
+ /// A simple function used to Find a Specified UnityObject of the specified Type within the Active Scene, if it fails it tosses a Warning.
+ ///
new protected static void FindInstance()
{
if (m_Instance == null)
@@ -21,7 +28,13 @@ internal class patch_Singleton : Singleton where T : ManagedBehaviour
}
}
+///
+/// A simple class object for singletons in correlation with the API.
+///
internal static class Singleton
{
+ ///
+ /// A ManualLogSource specifically for logging issues related to Singletons.
+ ///
internal static readonly ManualLogSource SingletonLogSource = Logger.CreateLogSource("Singleton");
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d4bddb221..efeea4694 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,783 +1,827 @@
+# 2.24.2
+* Updated Installation Guides to Include Pulsar Mod Manager.
+* Added more null checks into the following patches `GainGemsForOpponents`, `LoseGemsForOpponents`, `GainTripleGemsForOpponents`, `LoseTripleGemsForOpponents`.
+* Removed `_specialSequencer` from `SpecialSequenceManager` as it was unused.
+* Removed `FontReplacementDataInitialized` from `LocalizationManager` as it was unused.
+* Added new Support for Custom Appearances.
+ * Image Handling is to be handled by the mods using the API.
+ * We now provide a storage of Base Game Decals that mods can reference without needing to instantiate their own.
+ * This comes with 5 new Dictionaries `BaseGameCustomAppearances` (Internal), `BaseGameCustomAppearancesPublic`, `ModdedCustomAppearancesDictionary` (Internal), `ModdedCustomAppearancesDictionaryPublic`, `CombinedCustomAppearancesDictionaryPublic`.
+ * This system is stored under the `TextureHelper` class.
+* Improved In-Code Documentation via XML Comments.
+* Added a way to easily patch and modify the default bone gain when a player's card dies.
+* Added the following class: `DefaultBoneGainOnDeath` and the following methods within that class: `DefaultBoneGainOnDeath.ShouldDoDefaultBoneGain` and `DefaultBoneGainOnDeeath.DoDefaultBoneGain`
+* Privatized several Internal Functions.
+* Rename and Reorder configs internally for clarity as to what they are for.
+* Clean up Code formatting.
+* Fix casing of some variables.
+* Implement new Material Overrides to `MaterialOverride` related to changing `Metallic`, `Smoothness` and `Height` for consistency.
+* Add `OverrideQueuedBackground` to the `PixelCardBehaviours`.
+ * This is used for overriding the Queued Background of a card.
+* Upgraded the API's `.csproj`'s, and TCLI Build system.
+* Publicized the `_originalColor`, `_enterColor`, and `_selectedColor` used within `ActivatedAbilityIconInteractable` of the Community Patch.
+* Update the API to use Latest BepInEx.
+* Bug Fix overlapping challenge icons.
+* Removed some Debug Logging.
+
# 2.24.1
* Added Extensions for setting the IconTexture of a Starter Deck.
* Added 2 Alternate Constructors for making a StarterDeck with a Display Name different from its Internal Name.
* Added Getters and Setters for Starter Deck Unlock Level.
# 2.24.0
-- Fixed Part2CardCostRender.UpdatePlayableCardCost not being invoked
-- Fixed Part2CardCostRender.UpdateVanillaPlayableCardCost not being invoked
-- Fixed SetEmissiveSacrificablePortrait functions which used to refer to SteelTrapPortrait instead of SacrificablePortrait
-- Updated API and community patch target frameworks to `netframework4.7.2` (closer to the Runtime netframework.)
-- Updated community patch plugin's mod version to match the API's
-- Updated list of API contributors
-- Added ability to set custom card given by Steel Trap sigil (cr. Snowi and SpecialAPI)
-- Added `GetSteelTrapPelt` and `SetSteelTrapPelt` card extensions
-- Added debug mode cards for testing custom Steel Trap pelts
-- Added functions to set 'TailLostPortrait' emission sprites
-- Added functions for setting 'TailLostPortrait' from a Sprite object
-- Added NoWarn property to API and community patch projects for AD0001, CS0612, CS0618, Publicizer001
+* Fixed Part2CardCostRender.UpdatePlayableCardCost not being invoked
+* Fixed Part2CardCostRender.UpdateVanillaPlayableCardCost not being invoked
+* Fixed SetEmissiveSacrificablePortrait functions which used to refer to SteelTrapPortrait instead of SacrificablePortrait
+* Updated API and community patch target frameworks to `netframework4.7.2` (closer to the Runtime netframework.)
+* Updated community patch plugin's mod version to match the API's
+* Updated list of API contributors
+* Added ability to set custom card given by Steel Trap sigil (cr. Snowi and SpecialAPI)
+* Added `GetSteelTrapPelt` and `SetSteelTrapPelt` card extensions
+* Added debug mode cards for testing custom Steel Trap pelts
+* Added functions to set 'TailLostPortrait' emission sprites
+* Added functions for setting 'TailLostPortrait' from a Sprite object
+* Added NoWarn property to API and community patch projects for AD0001, CS0612, CS0618, Publicizer001
# 2.23.7
-- Fixed log spam due to inverted condition in CardExtensions.GemsCost
+* Fixed log spam due to inverted condition in CardExtensions.GemsCost
# 2.23.6
-- Fixed card modifications added to a card's base ice cube card via CardInfo.SetIceCube being ignored
-- Fixed PlayableCard.CanPlay not consistently accounting for temporary mod cost adjustments
-- Fixed dynamic play costs not consistently updating
-- Added additional methods for adding specific types of resources to the ResourceBank
-- Added CardSlot.ClearSlotModification extension method
-- Added additional FullAbility helper extension methods for setting act-specific rulebook categories
+* Fixed card modifications added to a card's base ice cube card via CardInfo.SetIceCube being ignored
+* Fixed PlayableCard.CanPlay not consistently accounting for temporary mod cost adjustments
+* Fixed dynamic play costs not consistently updating
+* Added additional methods for adding specific types of resources to the ResourceBank
+* Added CardSlot.ClearSlotModification extension method
+* Added additional FullAbility helper extension methods for setting act-specific rulebook categories
# 2.23.5
-- Fixed cards appearing as blank outside Act 1
-- Added extension methods for FullAbility that mirror AbilityInfo extension methods
+* Fixed cards appearing as blank outside Act 1
+* Added extension methods for FullAbility that mirror AbilityInfo extension methods
# 2.23.4
-- Fixed GemsDraw only considering the player's slots when determining how many cards to draw
-- Fixed Act 2 Tutor sequence softlocking when there are no cards to display
-- Fixed Act 2 Tutor sequence not displaying cards when you have less than 7 cards remaining in your deck
-- Fixed Gemify reducing multiple card costs at once for multicost cards - now only affects 1 as intended
-- Fixed emission textures appearing stretched on Giant cards
-- Added Gems Cost support for ExtendedActivatedAbilityBehaviour class
-- Added extension AbilityManager.FullAbility.FlipYIfOpponent
-- Added config option to prevent Act 1 card emissions from rendering above the play costs
+* Fixed GemsDraw only considering the player's slots when determining how many cards to draw
+* Fixed Act 2 Tutor sequence softlocking when there are no cards to display
+* Fixed Act 2 Tutor sequence not displaying cards when you have less than 7 cards remaining in your deck
+* Fixed Gemify reducing multiple card costs at once for multicost cards
+ * Now only affects 1 as intended
+* Fixed emission textures appearing stretched on Giant cards
+* Added Gems Cost support for ExtendedActivatedAbilityBehaviour class
+* Added extension AbilityManager.FullAbility.FlipYIfOpponent
+* Added config option to prevent Act 1 card emissions from rendering above the play costs
# 2.23.3
-- Fixed custom deck exhaust sequence not performing the requisite checks
-- Added 'CanAppearRandomly' bool and associated extension method for custom regions
-- All custom regions added through the API are now included in AllRegionsCopy and NewRegions (if addToPool was false then it won't be encounterable in-game like normal)
+* Fixed custom deck exhaust sequence not performing the requisite checks
+* Added 'CanAppearRandomly' bool and associated extension method for custom regions
+* All custom regions added through the API are now included in AllRegionsCopy and NewRegions (if addToPool was false then it won't be encounterable in-game like normal)
# 2.23.2
-- Fixed error when trying to create cards that evolve/transform in 4 or more turns
-- Fixed Fledgling and Transformer sigil appearing as black boxes when a card evolves/transform in 4 or more turns
-- Fixed Part2VanillaCardCost event not being invoked
-- Added 'UpdatePlayableCardCosts' event to community patch's Part1CardCostRender and Part2CardCostRender classes
-- Added extension methods for PlayableCard and CardInfo: ProvidesBlueGem, ProvidesGreenGem, ProvidesOrangeGem
-- Evolve and Transformer icons now support cards that evolve in 4 or more turns
-- Wiki: added articles 'Other Features' and 'Triggers and the Order of Operations'
-- Wiki: modified starting section of 'Custom Triggers' article
-- Documentation: fixed description for IPostCardGettingAttacked stating it triggers before CardGettingAttacked
+* Fixed error when trying to create cards that evolve/transform in 4 or more turns
+* Fixed Fledgling and Transformer sigil appearing as black boxes when a card evolves/transform in 4 or more turns
+* Fixed Part2VanillaCardCost event not being invoked
+* Added 'UpdatePlayableCardCosts' event to community patch's Part1CardCostRender and Part2CardCostRender classes
+* Added extension methods for PlayableCard and CardInfo: ProvidesBlueGem, ProvidesGreenGem, ProvidesOrangeGem
+* Evolve and Transformer icons now support cards that evolve in 4 or more turns
+* Wiki: added articles 'Other Features' and 'Triggers and the Order of Operations'
+* Wiki: modified starting section of 'Custom Triggers' article
+* Documentation: fixed description for IPostCardGettingAttacked stating it triggers before CardGettingAttacked
# 2.23.1
-- Fixed non-CardModificationInfo shields not breaking
-- Fixed ShieldGeneratorItem not correclty updating visuals
-- Fixed DamageShieldBehaviours not initialising before being called
-- Added CardInfo.GetAbilityStacks()
-- Changed how DamageShieldBehaviour.ResetShield works to be more inline with how vanilla shields work
-- Removed some shield-reset-related patches
+* Fixed non-CardModificationInfo shields not breaking
+* Fixed ShieldGeneratorItem not correclty updating visuals
+* Fixed DamageShieldBehaviours not initialising before being called
+* Added CardInfo.GetAbilityStacks()
+* Changed how DamageShieldBehaviour.ResetShield works to be more inline with how vanilla shields work
+* Removed some shield-reset-related patches
# 2.23.0
-- Added 'GBC Vanilla Render' config to community patches (false by default) - makes GBC cards render with vanilla cost sprites
-- Added 'Vanilla Stacking' config to community patches (false by default) - renders cards with only two (stacking) sigils as they appear in vanilla, eg Spore Mice and Sporedigger
-- Added PostCardGettingAttacked custom trigger
-- Added BoardManager.GetCards and BoardManager.GetOpenSlots overloads that retrieve from the entire board
-- Fixed incorrect rulebook icon scaling in Act 3
-- Fixed rulebook-related null errors when playing during Magnificus' Act
-- Fixed slot modification rulebook pages not appearing correctly during Magnificus' Act
-- Fixed cards shield sigils not rendering correctly
-- DamageShieldBehaviour class now has 'initialised' boolean field
-- Highest displayable bone cost value in Act 1 raised from 13+ to 15+
-- Minor tweaks to blood and bone cost icons
-- Rewrote SlotAttackSlotPatches transpilers to be cleaner
+* Added 'GBC Vanilla Render' config to community patches (false by default)
+ * Makes GBC cards render with vanilla cost sprites
+* Added 'Vanilla Stacking' config to community patches (false by default)
+ * Renders cards with only two (stacking) sigils as they appear in vanilla, eg Spore Mice and Sporedigger
+* Added PostCardGettingAttacked custom trigger
+* Added BoardManager.GetCards and BoardManager.GetOpenSlots overloads that retrieve from the entire board
+* Fixed incorrect rulebook icon scaling in Act 3
+* Fixed rulebook-related null errors when playing during Magnificus' Act
+* Fixed slot modification rulebook pages not appearing correctly during Magnificus' Act
+* Fixed cards shield sigils not rendering correctly
+* DamageShieldBehaviour class now has 'initialised' boolean field
+* Highest displayable bone cost value in Act 1 raised from 13+ to 15+
+* Minor tweaks to blood and bone cost icons
+* Rewrote SlotAttackSlotPatches transpilers to be cleaner
# 2.22.3
-- Fixed pelt names when a user goes to the trader with modded cards, Examples shown below.
+* Fixed pelt names when a user goes to the trader with modded cards, Examples shown below.
-- Fixed index error when loading custom challenges
-- Publicised ConsumableItemData.SetPrefabModelType
+* Fixed index error when loading custom challenges
+* Publicised ConsumableItemData.SetPrefabModelType
# 2.22.2
-- Added GetEnergyConfig method to community patch's EnergyDrone class - retrieves the current Act's EnergyConfigInfo
-- CommunityPatches: Added community config to move pelt price tags to the right of the card
-- Experimental: Changed gemified to only reduce a single cost on a card, with priority of Energy > Bones > Gems > Blood
-- Fixed positioning errors caused by having multiple custom boss challenge icons
-- EnergyConfigInfo's fields can now be modified when initialising a new instance
-- Updated installation guide on the ReadMe to match the wiki, added link to wiki.
+* Added GetEnergyConfig method to community patch's EnergyDrone class
+ * Retrieves the current Act's EnergyConfigInfo
+* CommunityPatches: Added community config to move pelt price tags to the right of the card
+* Experimental: Changed gemified to only reduce a single cost on a card, with priority of Energy > Bones > Gems > Blood
+* Fixed positioning errors caused by having multiple custom boss challenge icons
+* EnergyConfigInfo's fields can now be modified when initialising a new instance
+* Updated installation guide on the ReadMe to match the wiki, added link to wiki.
# 2.22.1
-- Added IShieldPreventedDamage and IShieldPreventedDamageInHand ability triggers and interfaces
-- Added TriggerBreakShield, wraps BreakShield in an IEnumerator for additional customisation by modders
-- Added ICustomExhaustSequence trigger interface for modifying the draw pile exhaustion effect - use with Opponents
-- Fixed board slots being uninteractable if a slot effect with a rulebook interactable was reset
-- Removed debug logging related to rulebook redirect coordinates
+* Added IShieldPreventedDamage and IShieldPreventedDamageInHand ability triggers and interfaces
+* Added TriggerBreakShield, wraps BreakShield in an IEnumerator for additional customisation by modders
+* Added ICustomExhaustSequence trigger interface for modifying the draw pile exhaustion effect
+ * Use with Opponents
+* Fixed board slots being uninteractable if a slot effect with a rulebook interactable was reset
+* Removed debug logging related to rulebook redirect coordinates
# 2.22.0
-- Added FullBoon objects for each vanilla Boon
-- Added 'AllFullBoons' list to BoonManager
-- Added support for boons and items appearing in multiple acts' rulebooks
-- Added RuleBookRedirectManager and support for rulebook text redirects/page links
-- Added additional methods to RuleBookManager: ItemShouldBeAdded, BoonShouldBeAdded, SlotModShouldBeAdded, GetUnformattedPageId
-- Added GetFullBoon and GetFullConsumableItemData extension methods
-- Added extension methods for adding text redirects to abilities, stat icons, items, boons, slot modifications, and rulebook pages
-- Added ModificationType.SetSharedRulebook - used for slot modifications that should share their rulebook entry with other slot modifications
-- Added support for multiple rulebook sprites for slot modifications (SetRulebookP03Sprite, SetRulebookGrimoraSprite, SetRulebookMagnificusSprite)
-- Added RuleBookController.Instance.OpenToCustomPage
-- Added CustomDiskTalkingCard abstract class
-- Added TalkingCardManager.NewDisk and TalkingCardManager.CreateDisk
-- Fixed RuleBook construction patches having lower patch priority than intended
-- Fixed slot modification interactable being enabled when no rulebook entry exists
-- Fixed slot modification rulebook pages not working in Act 3
-- Fixed rulebook sprites being smaller than normal after flipping to a slot modification rulebook page
-- Fixed DiskTalkingCards created through the API not correctly working under certain conditions
-- Moved ConsumableItemManager patches to a separate ConsumableItemPatches class
-- Modified implementation of rulebook fill page logic to let modders patch the API logic
- - Patch 'RuleBookManagerPatches.FillPage' to do this
-- Tweaked how custom rulebook pages are added and detected
-- Wiki: Tweaked page for adding custom rulebook sections
-- Wiki: Added section on adding text redirects
+* Added FullBoon objects for each vanilla Boon
+* Added 'AllFullBoons' list to BoonManager
+* Added support for boons and items appearing in multiple acts' rulebooks
+* Added RuleBookRedirectManager and support for rulebook text redirects/page links
+* Added additional methods to RuleBookManager: ItemShouldBeAdded, BoonShouldBeAdded, SlotModShouldBeAdded, GetUnformattedPageId
+* Added GetFullBoon and GetFullConsumableItemData extension methods
+* Added extension methods for adding text redirects to abilities, stat icons, items, boons, slot modifications, and rulebook pages
+* Added ModificationType.SetSharedRulebook
+ * Used for slot modifications that should share their rulebook entry with other slot modifications
+* Added support for multiple rulebook sprites for slot modifications (SetRulebookP03Sprite, SetRulebookGrimoraSprite, SetRulebookMagnificusSprite)
+* Added RuleBookController.Instance.OpenToCustomPage
+* Added CustomDiskTalkingCard abstract class
+* Added TalkingCardManager.NewDisk and TalkingCardManager.CreateDisk
+* Fixed RuleBook construction patches having lower patch priority than intended
+* Fixed slot modification interactable being enabled when no rulebook entry exists
+* Fixed slot modification rulebook pages not working in Act 3
+* Fixed rulebook sprites being smaller than normal after flipping to a slot modification rulebook page
+* Fixed DiskTalkingCards created through the API not correctly working under certain conditions
+* Moved ConsumableItemManager patches to a separate ConsumableItemPatches class
+* Modified implementation of rulebook fill page logic to let modders patch the API logic
+ * Patch 'RuleBookManagerPatches.FillPage' to do this
+* Tweaked how custom rulebook pages are added and detected
+* Wiki: Tweaked page for adding custom rulebook sections
+* Wiki: Added section on adding text redirects
# 2.21.1
-- Fixed RuleBookManager not syncing when playing with no custom rulebook sections
+* Fixed RuleBookManager not syncing when playing with no custom rulebook sections
# 2.21.0
-- Fixed ability stacks not rendering
-- Fixed rendering error when displaying a card with tribes outside of Act 1
-- Fixed ResetShields not re-setting lostShield to false under certain conditions
-- Fixed RemoveMaxEnergy not working as intended
-- Fixed custom AudioClips not loading correctly on Mac OSX
-- Added RuleBookManager for adding custom rulebook sections (see wiki for more info)
-- Added AllModificationInfos, AllModificationTypes, and modification syncing to SlotModificationManager
-- Added additional functionality to SlotModificationManager - Infos now store name and GUID
-- Added rulebook entry support for slot modifications - use extension method .SetRulebook() when adding your slot modification
-- Added more shield-related extensions
-- Added some AbilityInfo-related extensions
-- Added ShieldManager.AllShieldAbilities and ShieldManager.AllShieldInfos for easier tracking of custom shield abilities
-- Added config to the community patches to add a forced red emission to Undead Cat
-- Modified Obsolete warning for Helpers.CustomLine to point to Dialogue.CustomLine
+* Fixed ability stacks not rendering
+* Fixed rendering error when displaying a card with tribes outside of Act 1
+* Fixed ResetShields not re-setting lostShield to false under certain conditions
+* Fixed RemoveMaxEnergy not working as intended
+* Fixed custom AudioClips not loading correctly on Mac OSX
+* Added RuleBookManager for adding custom rulebook sections (see wiki for more info)
+* Added AllModificationInfos, AllModificationTypes, and modification syncing to SlotModificationManager
+* Added additional functionality to SlotModificationManager
+ * Infos now store name and GUID
+* Added rulebook entry support for slot modifications
+ * Use extension method .SetRulebook() when adding your slot modification
+* Added more shield-related extensions
+* Added some AbilityInfo-related extensions
+* Added ShieldManager.AllShieldAbilities and ShieldManager.AllShieldInfos for easier tracking of custom shield abilities
+* Added config to the community patches to add a forced red emission to Undead Cat
+* Modified Obsolete warning for Helpers.CustomLine to point to Dialogue.CustomLine
# 2.20.0
-- Updated wiki sections for Adding Map Nodes, and Conditional Map Nodes; moved Special Sequencers section to Opponents
-- Fixed issues related to challlenge icon sorting when a boss icon is present
-- Fixed TalkingCardManager not properly configuring talking cards in Part 3on the page
-- Fixed extension properties for CardModificationInfos saved to the save file not consistently loading
-- Fixed cards not shaking when losing a shield
-- Fixed ShieldManager.BreakShield not being called when a shielded card takes damage
-- Added SlotModificationManager for adding behaviour to card slots; see wiki for more info
-- Added SaveFileExtensions class
-- Added support for cards costing multiple of the same colour Mox
-- Added debugging to GetCustomCardCosts method; please let the API folks know if you receive any warnings/errors marked by '[GetCustomCardCosts]'
-- Added StatIconInfo.SetRulebookInfo and StatIconInfo.SetAppliesToStats
-- Added NodeData.SelectionCondition's ChallengeIsActive and NumChallengesOfTypeActive
-- Added PlayableCard.GetShieldCount<\T>() for getting a specific shield ability's NumShield value
-- Added new config to the community patches to reduce the size of the price tags during the Buy Pelts sequence
-- Added CardModificationInfo.AddNegateAbilities extension method
-- Removed leftover debugging related to boss challenge icons and custom costs
-- P03 Face Card Displayer can now show card costs other than energy
-- Publiciser warnings from the API and Community Patches no longer appear in the console
-- SaveFile.CurrentDeck now returns gbcData.deck in Act 2
-- DeathShieldLatch can longer target cards with an active shield
-- Cards with a broken shield return to their default portrait when regaining their shield
-- Shield abilities now use NumShields to determine visual sigil stacking
-- CardModificationInfo.SetNameReplacement now accepts null value for the name replacement
+* Updated wiki sections for Adding Map Nodes, and Conditional Map Nodes; moved Special Sequencers section to Opponents
+* Fixed issues related to challlenge icon sorting when a boss icon is present
+* Fixed TalkingCardManager not properly configuring talking cards in Part 3on the page
+* Fixed extension properties for CardModificationInfos saved to the save file not consistently loading
+* Fixed cards not shaking when losing a shield
+* Fixed ShieldManager.BreakShield not being called when a shielded card takes damage
+* Added SlotModificationManager for adding behaviour to card slots; see wiki for more info
+* Added SaveFileExtensions class
+* Added support for cards costing multiple of the same colour Mox
+* Added debugging to GetCustomCardCosts method; please let the API folks know if you receive any warnings/errors marked by '[GetCustomCardCosts]'
+* Added StatIconInfo.SetRulebookInfo and StatIconInfo.SetAppliesToStats
+* Added NodeData.SelectionCondition's ChallengeIsActive and NumChallengesOfTypeActive
+* Added PlayableCard.GetShieldCount<\T>() for getting a specific shield ability's NumShield value
+* Added new config to the community patches to reduce the size of the price tags during the Buy Pelts sequence
+* Added CardModificationInfo.AddNegateAbilities extension method
+* Removed leftover debugging related to boss challenge icons and custom costs
+* P03 Face Card Displayer can now show card costs other than energy
+* Publiciser warnings from the API and Community Patches no longer appear in the console
+* SaveFile.CurrentDeck now returns gbcData.deck in Act 2
+* DeathShieldLatch can longer target cards with an active shield
+* Cards with a broken shield return to their default portrait when regaining their shield
+* Shield abilities now use NumShields to determine visual sigil stacking
+* CardModificationInfo.SetNameReplacement now accepts null value for the name replacement
# 2.19.5
-- Fixed pixel Bones cost icons not appearing when the cost is greater than vanilla amounts
-- Fixed interaction where a Gemified card that gives a blue gem doesn't spend the correct resource amount when played
-- Fixed active challenges desyncing from the icons when returning to the select challenges screen from a custom screen
-- Added pixel icon to Aquasquirrel (courtesy of Zepht)
-- Added GetCustomCostAmount extension methods for automatically accounting for whether a custom cost can be negative
-- Added support for making custom challenges that use the Final Boss challenge's icon format (occupying the whole column)
-- AscensionChallengePaginator's leftArrow and rightArrow fields are now AscensionMenuInteractables
-- Changed method name of GenBaseGameChallengs to GenBaseGameChallenges
-- Changed Act 1 energy cost choice cardback to match the cost's icon colour
-- Changed TestCost.OnPlayed to no longer trigger on negative values
-- CustomCardCost.OnPlayed no longer triggers for custom costs with a value of 0 (negative values can still occur)
-- Challenges no longer show dependencies/incompatibilies when viewed in the pause menu and end screen
+* Fixed pixel Bones cost icons not appearing when the cost is greater than vanilla amounts
+* Fixed interaction where a Gemified card that gives a blue gem doesn't spend the correct resource amount when played
+* Fixed active challenges desyncing from the icons when returning to the select challenges screen from a custom screen
+* Added pixel icon to Aquasquirrel (courtesy of Zepht)
+* Added GetCustomCostAmount extension methods for automatically accounting for whether a custom cost can be negative
+* Added support for making custom challenges that use the Final Boss challenge's icon format (occupying the whole column)
+* AscensionChallengePaginator's leftArrow and rightArrow fields are now AscensionMenuInteractables
+* Changed method name of GenBaseGameChallengs to GenBaseGameChallenges
+* Changed Act 1 energy cost choice cardback to match the cost's icon colour
+* Changed TestCost.OnPlayed to no longer trigger on negative values
+* CustomCardCost.OnPlayed no longer triggers for custom costs with a value of 0 (negative values can still occur)
+* Challenges no longer show dependencies/incompatibilies when viewed in the pause menu and end screen
# 2.19.4
-- Fixed error when retrieving custom card costs from a card with no custom card costs
-- Fixed cards with custom card costs using the pixel cost icons in some circumstances
-- Fixed modifications to base Pelt choice amounts not being reflected in-game
-- Fixed latched sigils not appearing in Act 3
-- Added config to randomise cost choice order
-- Added additional functionality to FullCardCost - see wiki and documentation for more info
-- Added TestCost class to community patches - can be added to the game by enabling "Test Mode" in the configs
-- Added extension methods for setting and getting a custom card cost using the CustomCardCost class instance
-- Custom costs now support cost tiers and checking CanBePlayedByTurn2WithHand
-- Custom costs' textures now differentiate whether they're from Acts 1, 2, or 3 when storing them post-assemblage
-- Card choices when trading Pelts are now positioned correctly for amounts non-divisible by 4
-- Modified Act 1 latch patch logic
-- Publicised a number of TradePeltSequence patch methods
-- Refactored some TradePeltSequence patches
-- Reverted undocumented changes to some SniperFix parameter names in previous version
+* Fixed error when retrieving custom card costs from a card with no custom card costs
+* Fixed cards with custom card costs using the pixel cost icons in some circumstances
+* Fixed modifications to base Pelt choice amounts not being reflected in-game
+* Fixed latched sigils not appearing in Act 3
+* Added config to randomise cost choice order
+* Added additional functionality to FullCardCost
+ * See wiki and documentation for more info
+* Added TestCost class to community patches
+ * Can be added to the game by enabling "Test Mode" in the configs
+* Added extension methods for setting and getting a custom card cost using the CustomCardCost class instance
+* Custom costs now support cost tiers and checking CanBePlayedByTurn2WithHand
+* Custom costs' textures now differentiate whether they're from Acts 1, 2, or 3 when storing them post-assemblage
+* Card choices when trading Pelts are now positioned correctly for amounts non-divisible by 4
+* Modified Act 1 latch patch logic
+* Publicised a number of TradePeltSequence patch methods
+* Refactored some TradePeltSequence patches
+* Reverted undocumented changes to some SniperFix parameter names in previous version
# 2.19.3
-- Fixed index error related to Totem sigils
-- Fixed index error related to opponent sniper targeting
-- Fixed Shield Latch sigil not displaying the first latched sigil
-- Added config to community patches to reset Leshy's eye colour after triggering the grizzly bear sequence during boss fights
+* Fixed index error related to Totem sigils
+* Fixed index error related to opponent sniper targeting
+* Fixed Shield Latch sigil not displaying the first latched sigil
+* Added config to community patches to reset Leshy's eye colour after triggering the grizzly bear sequence during boss fights
# 2.19.2
-- Fixed activated abilities not being interactable in Act 3
-- Fixed cards with costs above vanilla defaults not displaying
-- Added debug logs to AddCustomTribesToList (used to add custom Tribes to the list of obtainable Totem tops)
+* Fixed activated abilities not being interactable in Act 3
+* Fixed cards with costs above vanilla defaults not displaying
+* Added debug logs to AddCustomTribesToList (used to add custom Tribes to the list of obtainable Totem tops)
# 2.19.1
-- Fixed API not retrieving pixel card costs above 5
+* Fixed API not retrieving pixel card costs above 5
# 2.19.0
-- Fixed decals added via temporary mods not being cleared from the base card
-- Fixed merged and totem sigils being uninteractable if the icon has been flipped vertically
-- Fixed pixel Shapeshifter patch not correctly patching DisguiseOutOfBattle
-- Fixed temporary decal mods not being removed in Act 1
-- Fixed softlock in Part 1 during the boon-gaining sequence
-- Fixed all copies of a custom challenge becoming activated/deactivated when the page is reloaded
-- Fixed Sentry ability softlocking when the base card dies before all Sentry stacks are triggered
-- Fixed softlock when talking card dialogue cannot be parsed in certain conditions
-- Added public method GetIjiraqDisguises to pixel Shapeshifter patch for easier modification of Shapeshifter for modders
-- Added variant of PeltManager.New
-- Added variant of PlayableCard.AllAbilities that accounts for negated abilities in TemporaryMods
-- Added support for creating custom card costs using new class CustomCardCost; see wiki for more information
-- Added ability to remove gems costs from a card using CardModificationInfos
-- Added a number of extension methods for CardModificationInfos (RemoveGemsCost, SetCustomCostId, etc)
-- Added helpers for getting TextBox.Style from CardInfo.temple or the chosen ambition
-- Rewrote CardModificationInfoManager's id system for setting persistent extended properties in a CardModificationInfo's singletonId
-- Rewrote pixel Shapeshifter patch to RevealInBattle to hopefully prevent errors in Act 1
-- PeltManager.New now throws an error when getCardChoices is null
-- Changed LogLevel of dialogue event insertion message from Info to Debug
-- API death cards now use the clean singleton id when creating the death card info mod
-- Temporary decal mods are now removed from Act 2 cards instead of being cleared
-- Opponent snipers will now target a random slot if there are no opposing cards (previously only targeted the opposing slot)
+* Fixed decals added via temporary mods not being cleared from the base card
+* Fixed merged and totem sigils being uninteractable if the icon has been flipped vertically
+* Fixed pixel Shapeshifter patch not correctly patching DisguiseOutOfBattle
+* Fixed temporary decal mods not being removed in Act 1
+* Fixed softlock in Part 1 during the boon-gaining sequence
+* Fixed all copies of a custom challenge becoming activated/deactivated when the page is reloaded
+* Fixed Sentry ability softlocking when the base card dies before all Sentry stacks are triggered
+* Fixed softlock when talking card dialogue cannot be parsed in certain conditions
+* Added public method GetIjiraqDisguises to pixel Shapeshifter patch for easier modification of Shapeshifter for modders
+* Added variant of PeltManager.New
+* Added variant of PlayableCard.AllAbilities that accounts for negated abilities in TemporaryMods
+* Added support for creating custom card costs using new class CustomCardCost; see wiki for more information
+* Added ability to remove gems costs from a card using CardModificationInfos
+* Added a number of extension methods for CardModificationInfos (RemoveGemsCost, SetCustomCostId, etc)
+* Added helpers for getting TextBox.Style from CardInfo.temple or the chosen ambition
+* Rewrote CardModificationInfoManager's id system for setting persistent extended properties in a CardModificationInfo's singletonId
+* Rewrote pixel Shapeshifter patch to RevealInBattle to hopefully prevent errors in Act 1
+* PeltManager.New now throws an error when getCardChoices is null
+* Changed LogLevel of dialogue event insertion message from Info to Debug
+* API death cards now use the clean singleton id when creating the death card info mod
+* Temporary decal mods are now removed from Act 2 cards instead of being cleared
+* Opponent snipers will now target a random slot if there are no opposing cards (previously only targeted the opposing slot)
# 2.18.7
-- Fixed softlock during Act 1's final boss cabin/boons sequence
-- Fixed startup errors relating to ShieldManager transpilers
-- Fixed resource drone not showing up outside of Act 3
-- Fixed latched sigils not visually disappearing when using RemoveTemporaryMod to remove a latch CardModInfo
-- Fixed stack sigil icons not correctly replacing the '1' in stackable sigil icons with the appropriate stack number
-- Fixed Act 2 Tutor sequence displaying the wrong number of cards above the max of 42
-- Fixed temporary mods not correctly updating a card's shield count above 1
-- Added extension methods PlayableCard.AllCardModificationInfos(), PlayableCard.RemoveCardModificationInfo()
-- Added SpriteType 'PixelStandardButton'
-- CustomTriggerFinder now caches the list of non-card triggers before iteration
-- ActivatedDamageShieldBehaviour now inherits from DamageShieldBehaviour instead of ActivateAbilityBehaviour
-- ActivatedDamageShieldBehaviour now implements the logic from ExtendedActivatedAbilityBehaviour
-- Mud Turtle now has a broken shield portrait (identical to its alternate portrait, which is unchanged)
-- CardTriggerHandler.RemoveAbility now only destroys the AbilityBehaviour if triggeredAbilities no longer contains the corresponding Ability
-- Act 2 Tutor now supports multiple pages of cards
+* Fixed softlock during Act 1's final boss cabin/boons sequence
+* Fixed startup errors relating to ShieldManager transpilers
+* Fixed resource drone not showing up outside of Act 3
+* Fixed latched sigils not visually disappearing when using RemoveTemporaryMod to remove a latch CardModInfo
+* Fixed stack sigil icons not correctly replacing the '1' in stackable sigil icons with the appropriate stack number
+* Fixed Act 2 Tutor sequence displaying the wrong number of cards above the max of 42
+* Fixed temporary mods not correctly updating a card's shield count above 1
+* Added extension methods PlayableCard.AllCardModificationInfos(), PlayableCard.RemoveCardModificationInfo()
+* Added SpriteType 'PixelStandardButton'
+* CustomTriggerFinder now caches the list of non-card triggers before iteration
+* ActivatedDamageShieldBehaviour now inherits from DamageShieldBehaviour instead of ActivateAbilityBehaviour
+* ActivatedDamageShieldBehaviour now implements the logic from ExtendedActivatedAbilityBehaviour
+* Mud Turtle now has a broken shield portrait (identical to its alternate portrait, which is unchanged)
+* CardTriggerHandler.RemoveAbility now only destroys the AbilityBehaviour if triggeredAbilities no longer contains the corresponding Ability
+* Act 2 Tutor now supports multiple pages of cards
# 2.18.6
-- Fixed Royal fight softlocking if config option 'Hide Act 1 Scenery' is set to true
-- Fixed activated custom challenges not remaining activated when returning to the challenge screen
-- Fixed TransformIntoCardInHand and TransformIntoCardAboveHand not checking for TriggersOncePerStack
-- Added missing null checks to ResourceDrone patches
-- Added pixel icon to Transformer
-- Transformer sigil icon will now display the number of turns till evolution if it's greater than 1
-- Transformer and Fledgling sigils now correctly update their display when evolving into another card with the Fledgling/Transformer sigil
-- Certain shield-giving effects no longer reset shields to prevent incorrect shield totals
-- Improved the 'Custom Card Costs' section of the wiki
+* Fixed Royal fight softlocking if config option 'Hide Act 1 Scenery' is set to true
+* Fixed activated custom challenges not remaining activated when returning to the challenge screen
+* Fixed TransformIntoCardInHand and TransformIntoCardAboveHand not checking for TriggersOncePerStack
+* Added missing null checks to ResourceDrone patches
+* Added pixel icon to Transformer
+* Transformer sigil icon will now display the number of turns till evolution if it's greater than 1
+* Transformer and Fledgling sigils now correctly update their display when evolving into another card with the Fledgling/Transformer sigil
+* Certain shield-giving effects no longer reset shields to prevent incorrect shield totals
+* Improved the 'Custom Card Costs' section of the wiki
# 2.18.5
-- Fixed DrawCopyOnDeath creating warnings in the console
-- Fixed talking cards locking the camera view when obtained during the Trapper boss's final phase
-- Fixed ResourceDrone softlocking during Leshy's goodbye sequence if ConfigDefaultDrone is false
-- Added missing null checks
-- Added PlayableCard.GetStatIconHealthBuffs()
-- Added PlayableCard.TransformIntoCardAboveHand() - variant of TransformIntoCardInHand that incorporates MoveCardAboveHand
-- Added FullAbility.SetExtendedProperty for setting an AbilityInfo's custom property during ability creation
-- Reverted change to resource drone preventing it from being parented to the scale outside of Act 1
-- Improved visual fix for the full pack Pack Rat sequence
+* Fixed DrawCopyOnDeath creating warnings in the console
+* Fixed talking cards locking the camera view when obtained during the Trapper boss's final phase
+* Fixed ResourceDrone softlocking during Leshy's goodbye sequence if ConfigDefaultDrone is false
+* Added missing null checks
+* Added PlayableCard.GetStatIconHealthBuffs()
+* Added PlayableCard.TransformIntoCardAboveHand()
+ * Variant of TransformIntoCardInHand that incorporates MoveCardAboveHand
+* Added FullAbility.SetExtendedProperty for setting an AbilityInfo's custom property during ability creation
+* Reverted change to resource drone preventing it from being parented to the scale outside of Act 1
+* Improved visual fix for the full pack Pack Rat sequence
# 2.18.4
-- Fixed Sniper sigil targeting the wrong side of the board
-- Fixed placeholder tribe choice icons being placed incorrectly
-- Auto-gen tribe choice texture is now only created if the tribe can be found in tribe choices
+* Fixed Sniper sigil targeting the wrong side of the board
+* Fixed placeholder tribe choice icons being placed incorrectly
+* Auto-gen tribe choice texture is now only created if the tribe can be found in tribe choices
# 2.18.3
-- Fixed resource drone behaving incorrectly outside of Act 1
-- Added null checks to various custom triggers
-- Added more extension methods for CardInfo and AbilityInfo
-- Added PlayableCard extension methods: AddShieldCount(Ability), AddShieldCount\() and AddShieldCount(Ability), RemoveShieldCount\()
- - These affect the internal numShields field, and do NOT add or remove ability stacks
-- Added alternate portrait 'SacrificablePortrait' for when a card can be sacrificed in Act 1 or Act 2 (part of the SetShaking method)
-- Added methods for getting the emissive portraits for extra alt portraits (EmissiveSteelTrapPortrait(), EmissiveBrokenShieldPortrait(), etc.)
-- Expanded SniperFix sniper logic with additional methods for easier patching and modification:
- - DoSniperLogic() - controls whether to use player or opponent sniper logic
- - DoAttackTargetSlotsLogic() - controls attack logic for each target slot
- - GetValidTargets() - returns the list of card slot the player and opponent can target
- - PlayerTargetSelectedCallback() - called when the player selects a valid target
- - PlayerSlotCursorEnterCallback() - called when the player's cursor enters a slot
- - OpponentSelectTarget() - returns a card slot for the opponent to target and attack
-- Revamped the wiki to (hopefully) make it easier to navigate and read through
+* Fixed resource drone behaving incorrectly outside of Act 1
+* Added null checks to various custom triggers
+* Added more extension methods for CardInfo and AbilityInfo
+* Added PlayableCard extension methods: AddShieldCount(Ability), AddShieldCount\() and AddShieldCount(Ability), RemoveShieldCount\()
+ * These affect the internal numShields field, and do NOT add or remove ability stacks
+* Added alternate portrait 'SacrificablePortrait' for when a card can be sacrificed in Act 1 or Act 2 (part of the SetShaking method)
+* Added methods for getting the emissive portraits for extra alt portraits (EmissiveSteelTrapPortrait(), EmissiveBrokenShieldPortrait(), etc.)
+* Expanded SniperFix sniper logic with additional methods for easier patching and modification:
+ * DoSniperLogic()
+ * Controls whether to use player or opponent sniper logic
+ * DoAttackTargetSlotsLogic()
+ * Controls attack logic for each target slot
+ * GetValidTargets()
+ * Returns the list of card slot the player and opponent can target
+ * PlayerTargetSelectedCallback()
+ * Called when the player selects a valid target
+ * PlayerSlotCursorEnterCallback()
+ * Called when the player's cursor enters a slot
+ * OpponentSelectTarget()
+ * Returns a card slot for the opponent to target and attack
+* Revamped the wiki to (hopefully) make it easier to navigate and read through
# 2.18.2
-- Fixed abilities marked TriggersOncePerStack not actually triggering once per stack on evolution
-- Fixed CardManager.Remove not actually removing cards
-- Fixed mods on card clones being lost during card sync
-- Added extension methods for setting the emissions for SteelTrap and BrokenShield alt portraits
-- Added Config to disable boss scenery for optimization purposes
-- Exposed EncounterManager.NewEncounters so JSONLoader may replace existing Encounters
-- Refactored Act 1 energy drone movement logic, added support for 'immediate' bool (Default Drone must be true)
-- Act 1 energy drone game object is now named 'Part1ResourceDrone'
-- Act 1 energy drone is now correctly synced with the scale when Default Drone config is false
+* Fixed abilities marked TriggersOncePerStack not actually triggering once per stack on evolution
+* Fixed CardManager.Remove not actually removing cards
+* Fixed mods on card clones being lost during card sync
+* Added extension methods for setting the emissions for SteelTrap and BrokenShield alt portraits
+* Added Config to disable boss scenery for optimization purposes
+* Exposed EncounterManager.NewEncounters so JSONLoader may replace existing Encounters
+* Refactored Act 1 energy drone movement logic, added support for 'immediate' bool (Default Drone must be true)
+* Act 1 energy drone game object is now named 'Part1ResourceDrone'
+* Act 1 energy drone is now correctly synced with the scale when Default Drone config is false
# 2.18.1
-- Fixed BoxCollider null reference during Act 3 Build-A-Card-Sequencer
-- Fixed Act 3 bone displayer screen changing to static whenever P03 changes their face
-- Added TryGetGuidAndKeyEnumValue for getting the mod GUID and key from enum value
-- Custom regions now store their mod GUID
+* Fixed BoxCollider null reference during Act 3 Build-A-Card-Sequencer
+* Fixed Act 3 bone displayer screen changing to static whenever P03 changes their face
+* Added TryGetGuidAndKeyEnumValue for getting the mod GUID and key from enum value
+* Custom regions now store their mod GUID
# 2.18.0
-- Fixed SetPixelAbilityIcon() not accepting 22x10 textures for activated abilities
-- Fixed IModifyDamageTaken priority sorting being reversed
-- Fixed null errors in TakeDamage and custom trigger calls
-- Added extension methods for getting emission portraits, setting animated portrait
-- Added CustomFields helper for associating data with objects or classes
-- Added IModifyDirectDamage, IOnTurnEndInQueue custom triggers
-- Custom Tribes now store their name and GUID
+* Fixed SetPixelAbilityIcon() not accepting 22x10 textures for activated abilities
+* Fixed IModifyDamageTaken priority sorting being reversed
+* Fixed null errors in TakeDamage and custom trigger calls
+* Added extension methods for getting emission portraits, setting animated portrait
+* Added CustomFields helper for associating data with objects or classes
+* Added IModifyDirectDamage, IOnTurnEndInQueue custom triggers
+* Custom Tribes now store their name and GUID
# 2.17.0
-- Fixed card extension GetAbilityStacks() being able to return a negative value; minimum value is now capped at 0
-- Added ability interfaces IModifyDamageTaken, IPreTakeDamage, which trigger at the start of PlayableCard.TakeDamage
-- Added PlayableCard extension method ResetShield(Ability) for only resetting shields belonging to a certain ability
-- Added ShieldManager class and changed how shields are managed in the game's logic
-- Added abstract classes DamageShieldBehaviour and ActivatedDamageShieldBehaviour
-- Added support for adding alternate portraits for SteelTrap activation and broken shields
-- Added portrait setters SetSteelTrapPortrait(), SetBrokenShieldPortrait(), SetPixelSteelTrapPortrait(), SetPixelBrokenShieldPortrait()
-- Added support for adding new language translations
-- Added AbilityInfo extension method SetHideSingleStacks(), affecting how stacking sigils are affected by being hidden (see wiki)
-- DeathShield ability now has a custom AbilityBehaviour attached to it
-- DeathShield ability is no longer passive, and can stack
-- TakeDamage trigger now requires damage to be above 0 to activate
-- Cards can no longer lose shields from attacks that deal 0 damage
-- Damage dealt to cards can no longer go below 0
-- Updated the wiki with sections on the additions
-- Zombie Parrot is now part of the Avian tribe
+* Fixed card extension GetAbilityStacks() being able to return a negative value; minimum value is now capped at 0
+* Added ability interfaces IModifyDamageTaken, IPreTakeDamage, which trigger at the start of PlayableCard.TakeDamage
+* Added PlayableCard extension method ResetShield(Ability) for only resetting shields belonging to a certain ability
+* Added ShieldManager class and changed how shields are managed in the game's logic
+* Added abstract classes DamageShieldBehaviour and ActivatedDamageShieldBehaviour
+* Added support for adding alternate portraits for SteelTrap activation and broken shields
+* Added portrait setters SetSteelTrapPortrait(), SetBrokenShieldPortrait(), SetPixelSteelTrapPortrait(), SetPixelBrokenShieldPortrait()
+* Added support for adding new language translations
+* Added AbilityInfo extension method SetHideSingleStacks(), affecting how stacking sigils are affected by being hidden (see wiki)
+* DeathShield ability now has a custom AbilityBehaviour attached to it
+* DeathShield ability is no longer passive, and can stack
+* TakeDamage trigger now requires damage to be above 0 to activate
+* Cards can no longer lose shields from attacks that deal 0 damage
+* Damage dealt to cards can no longer go below 0
+* Updated the wiki with sections on the additions
+* Zombie Parrot is now part of the Avian tribe
# 2.16.1
-- Gem Shield sigil now visually applies the Armoured sigil to cards in Act 1
+* Gem Shield sigil now visually applies the Armoured sigil to cards in Act 1
# 2.16.0
-- Added interface IGetAttackingSlots for altering the order cards attack in, see the wiki for more information
-- Added out-of-turn (cards attacking outside of their owner's turn) damage support
-- Added PlayableCard extension method GetAbilityStacks()
-- Added PlayableCard extension method TransformIntoCardInHand()
-- Moved SlotAttackSlotFixes and SelfAttackDamagePatch from community patches to the API, renamed to SlotAttackSlotPatches and DoCombatPhasePatches respectively
-- Made community patch method RandomAbilityPatches.GetRandomAbility public
+* Added interface IGetAttackingSlots for altering the order cards attack in, see the wiki for more information
+* Added out-of-turn (cards attacking outside of their owner's turn) damage support
+* Added PlayableCard extension method GetAbilityStacks()
+* Added PlayableCard extension method TransformIntoCardInHand()
+* Moved SlotAttackSlotFixes and SelfAttackDamagePatch from community patches to the API, renamed to SlotAttackSlotPatches and DoCombatPhasePatches respectively
+* Made community patch method RandomAbilityPatches.GetRandomAbility public
# 2.15.2
-- Fixed cards not evolving correctly if the Fledgling sigil was obtained via card mods (card merge, totem, etc.)
-- Moved the Squirrel Orbit community patch into the main API
-- Added SetTransformCardId(), GetTransformerCardId() for controlling the Transformer evolution separate of the standard evolution
-- Transformer sigil will now also check for a card's API-set TransformerCardId if no card mod is found
-- Transformer sigil now also adjusts Blood and Bone costs when transforming
-- Transformer sigil now correctly works for cards without a defined evolution/transformation
+* Fixed cards not evolving correctly if the Fledgling sigil was obtained via card mods (card merge, totem, etc.)
+* Moved the Squirrel Orbit community patch into the main API
+* Added SetTransformCardId(), GetTransformerCardId() for controlling the Transformer evolution separate of the standard evolution
+* Transformer sigil will now also check for a card's API-set TransformerCardId if no card mod is found
+* Transformer sigil now also adjusts Blood and Bone costs when transforming
+* Transformer sigil now correctly works for cards without a defined evolution/transformation
# 2.15.1
-- Fixed Transformer sigil disappearing upon transformation in certain scenarios
-- Fixed Act 3 Bone Display checking the wrong card cost, resulting in the display always appearing
-- Fixed Act 3 Bone Display null error in certain Acts
+* Fixed Transformer sigil disappearing upon transformation in certain scenarios
+* Fixed Act 3 Bone Display checking the wrong card cost, resulting in the display always appearing
+* Fixed Act 3 Bone Display null error in certain Acts
# 2.15.0
-- Fixed friend cards created by G0LLY not having any mods
-- Reverted previous change to cloned CardInfos
-- Tweaked RandomAbilityPatches to hopefully prevent obtaining sigils already possessed by the card
-- Added cost display support for Act 3
-- Added bone counter for Act 3
+* Fixed friend cards created by G0LLY not having any mods
+* Reverted previous change to cloned CardInfos
+* Tweaked RandomAbilityPatches to hopefully prevent obtaining sigils already possessed by the card
+* Added cost display support for Act 3
+* Added bone counter for Act 3
# 2.14.5
-- Cloned CardInfos now only copy over Gemify mods, unless they possess BountyHunterInfo/DeathCardInfo/BuildACardInfo
-- Fixed certain card mods duplicating when the card evolve
-- Added ResourcesManager.RemoveMaxEnergy, ResourcesManager.ShowRemoveMaxEnergy extension methods
+* Cloned CardInfos now only copy over Gemify mods, unless they possess BountyHunterInfo/DeathCardInfo/BuildACardInfo
+* Fixed certain card mods duplicating when the card evolve
+* Added ResourcesManager.RemoveMaxEnergy, ResourcesManager.ShowRemoveMaxEnergy extension methods
# 2.14.4
-- Fixed the first energy cell remaining closed in Act 1 when battle starts
-- Added new field to PeltManager.PeltData 'peltTierName' used when trading pelts
-- Added extension method PeltData.SetTierName
-- The Trader will now speak the correct name of custom pelts when trading with them
-- Added DialogueManager.GenerateTraderPeltsEvent for creating custom dialogue events spoken by the Trader when trading a custom pelt
-- Added DialogueManager.GenerateRegionIntroEvent for creating the dialogue event played upon entering a custom region
+* Fixed the first energy cell remaining closed in Act 1 when battle starts
+* Added new field to PeltManager.PeltData 'peltTierName' used when trading pelts
+* Added extension method PeltData.SetTierName
+* The Trader will now speak the correct name of custom pelts when trading with them
+* Added DialogueManager.GenerateTraderPeltsEvent for creating custom dialogue events spoken by the Trader when trading a custom pelt
+* Added DialogueManager.GenerateRegionIntroEvent for creating the dialogue event played upon entering a custom region
# 2.14.3
-- Fixed Act 2 bug relating to stackable sigils and activated sigils in the deck display menu
-- Fixed dynamic costs still not working in Act 2
-- Fixed dynamic gem costs checking ResourcesManager instead of OpponentGemsManager for opponent cards
-- Fixed dynamic costs not checking for owned blue gems
-- Fixed dynamic costs not updating energy display correctly
-- Changed dynamic costs to patch SetInfo instead of Awake
-- Re-added dynamic cost error messages for when the card or card info is null
-- Added ResourcesManager.Instance.GemsOfType(GemType) to check for owned gems of the specified type
+* Fixed Act 2 bug relating to stackable sigils and activated sigils in the deck display menu
+* Fixed dynamic costs still not working in Act 2
+* Fixed dynamic gem costs checking ResourcesManager instead of OpponentGemsManager for opponent cards
+* Fixed dynamic costs not checking for owned blue gems
+* Fixed dynamic costs not updating energy display correctly
+* Changed dynamic costs to patch SetInfo instead of Awake
+* Re-added dynamic cost error messages for when the card or card info is null
+* Added ResourcesManager.Instance.GemsOfType(GemType) to check for owned gems of the specified type
# 2.14.2
-- Fixed Overclock patch not checking for the correct Acts
-- Fixed appearance behaviour's Card field always returning null in Act 2
-- Added OverridePixelPortrait virtual method to PixelAppearanceBehaviour to allow for changing card portraits in Act 2
-- Added CardInfo.SetPixelAlternatePortrait() and Cardinfo.GetPixelAlternatePortrait() for storing alternate pixel portraits
-- Re-added SetTerrain method without optional bool parameter
-- SwitchToAlternatePortrait and SwitchToDefaultPortrait now work in Act 2 using the above system
-- Removed cost-related error spam in Act 2
+* Fixed Overclock patch not checking for the correct Acts
+* Fixed appearance behaviour's Card field always returning null in Act 2
+* Added OverridePixelPortrait virtual method to PixelAppearanceBehaviour to allow for changing card portraits in Act 2
+* Added CardInfo.SetPixelAlternatePortrait() and Cardinfo.GetPixelAlternatePortrait() for storing alternate pixel portraits
+* Re-added SetTerrain method without optional bool parameter
+* SwitchToAlternatePortrait and SwitchToDefaultPortrait now work in Act 2 using the above system
+* Removed cost-related error spam in Act 2
# 2.14.1
-- Custom tribes are now given a placeholder reward cardback if one isn't provided
-- Fixed visual error when flipping a custom tribe choice for a tribe without a custom cardback
-- Fixed pixel stat icons not hiding the underlying stat number
-- Fixed ChooseTarget null exception
-- Fixed opponent cards with mods not being created properly (eg Bounty Hunters)
-- Fixed being able to ring the bell in Part 2 during the Tutor sequence
-- Fixed GBC packs not checking for onePerDeck when selecting possible cards
-- Fixed decals added via temporary mods not clearing from cards in Act 2
-- Changed what vanilla abilities are marked as Act2Modular (see the Part2ModularAbilities file for the full list)
-- Removed leftover debug info during start-up
-- Added CardInfo.SetCardTemple()
-- Added CardModInfo extension methods SetTemporaryDecal and IsTemporaryDecal (primarily for internal use, maybe you'll find a use for it)
-- Added GBCPackManager.ModifyGBCPacks function for altering what cards can be found in GBC card packs
+* Custom tribes are now given a placeholder reward cardback if one isn't provided
+* Fixed visual error when flipping a custom tribe choice for a tribe without a custom cardback
+* Fixed pixel stat icons not hiding the underlying stat number
+* Fixed ChooseTarget null exception
+* Fixed opponent cards with mods not being created properly (eg Bounty Hunters)
+* Fixed being able to ring the bell in Part 2 during the Tutor sequence
+* Fixed GBC packs not checking for onePerDeck when selecting possible cards
+* Fixed decals added via temporary mods not clearing from cards in Act 2
+* Changed what vanilla abilities are marked as Act2Modular (see the Part2ModularAbilities file for the full list)
+* Removed leftover debug info during start-up
+* Added CardInfo.SetCardTemple()
+* Added CardModInfo extension methods SetTemporaryDecal and IsTemporaryDecal (primarily for internal use, maybe you'll find a use for it)
+* Added GBCPackManager.ModifyGBCPacks function for altering what cards can be found in GBC card packs
# 2.14.0
-- Fixed Sniper duplicating attacks from sigils like Double Strike
-- Fixed interaction between Waterborne and Fledgling in Act 2
-- Fixed Cuckoo sigil softlocking in Act 2 when making a Raven Egg
-- Fixed sigils added via temporary mods not displaying in Act 2
-- Fixed hiddenAbilities not affecting sigil display in Act 2
-- Fixed Handy sigil visual bug outside of Act 2
-- Fixed Shapeshifter special ability in Act 2
-- Added pixel sprites for Raven Egg and Cuckoo/Broken Egg
-- Added ResourceBankManager.AddDecal(), PlayableCard.AddTemporaryMods(), CardModificationInfo.AddDecalIds
-- Added AbilityInfo.SetPixelIcon(string pathToArt), CardInfo.RemoveAppearances(), CardInfo.SetDefaultEvolutionName()
-- Added DialogueManager.PlayDialogueEventSafe - combines TextDisplayer.PlayDialogueEvent and DialogueHandler.PlayDialogueHandler for multi-act support
-- Added support for directly loading AudioClips via the GramophoneManager
-- Added support for adding decals to pixel cards via DecalIds
-- Added pixel portrait for Ijiraq
-- Added support for changing costs midbattle using CardModificationInfos or a HarmonyPatch
-- Changed TranspilerHelpers.LogCodeInscryptions to also function as an extension method for List
-- FullSpecialTriggeredAbility now stores the ability name and mod GUID
-- Temporary mods can now be used to add decals to a card
-- CardRenderInfo.OverrideAbilityIcon now works for Act 2 sigils
-- CardInfo.SetTerrain() now has optional parameter 'useTerrainLayout', defaulting to true
-- Made method used to add stacks to pixel sigils public
-- Updated the wiki
+* Fixed Sniper duplicating attacks from sigils like Double Strike
+* Fixed interaction between Waterborne and Fledgling in Act 2
+* Fixed Cuckoo sigil softlocking in Act 2 when making a Raven Egg
+* Fixed sigils added via temporary mods not displaying in Act 2
+* Fixed hiddenAbilities not affecting sigil display in Act 2
+* Fixed Handy sigil visual bug outside of Act 2
+* Fixed Shapeshifter special ability in Act 2
+* Added pixel sprites for Raven Egg and Cuckoo/Broken Egg
+* Added ResourceBankManager.AddDecal(), PlayableCard.AddTemporaryMods(), CardModificationInfo.AddDecalIds
+* Added AbilityInfo.SetPixelIcon(string pathToArt), CardInfo.RemoveAppearances(), CardInfo.SetDefaultEvolutionName()
+* Added DialogueManager.PlayDialogueEventSafe
+ * Combines TextDisplayer.PlayDialogueEvent and DialogueHandler.PlayDialogueHandler for multi-act support
+* Added support for directly loading AudioClips via the GramophoneManager
+* Added support for adding decals to pixel cards via DecalIds
+* Added pixel portrait for Ijiraq
+* Added support for changing costs midbattle using CardModificationInfos or a HarmonyPatch
+* Changed TranspilerHelpers.LogCodeInscryptions to also function as an extension method for List
+* FullSpecialTriggeredAbility now stores the ability name and mod GUID
+* Temporary mods can now be used to add decals to a card
+* CardRenderInfo.OverrideAbilityIcon now works for Act 2 sigils
+* CardInfo.SetTerrain() now has optional parameter 'useTerrainLayout', defaulting to true
+* Made method used to add stacks to pixel sigils public
+* Updated the wiki
# 2.13.3
-- Fixed null error when opening card packs in Act 2
-- Fixed pixel cards with activated sigils showing the activated sigil icon twice (does not fix the button obscuring sigils)
-- Added new helper class GemsManagerHelpers with helper methods: OpponentHasGems, PlayerHasGems
-- Changed how Act 2 descriptions are altered to prevent conflicts
-- True Scholar now correctly requires a Blue Gem to be owned prior to use
+* Fixed null error when opening card packs in Act 2
+* Fixed pixel cards with activated sigils showing the activated sigil icon twice (does not fix the button obscuring sigils)
+* Added new helper class GemsManagerHelpers with helper methods: OpponentHasGems, PlayerHasGems
+* Changed how Act 2 descriptions are altered to prevent conflicts
+* True Scholar now correctly requires a Blue Gem to be owned prior to use
# 2.13.2
-- Fixed Hoarder sigil breaking when used by opponents in Act 2
-- Fixed Hodag special ability not working in Act 2
-- Fixed cards marked as AffectedByTidalLock not being killed by Tidal Lock when it's on a giant card
-- Added card extension methods SetAffectedByTidalLock and HasAlternatePortrait
-- Added ability extension method SetPart2Ability
-- Added AbilityCardMetaCategory AbilityManager.Part2Modular
-- Added pixel portraits for Empty Vessel and its Gemified variants, Ant, Bee, Dam, Chime, and the Tail cards
-- Amorphous sigil now works in Act 2
-- Vessel Printer sigil now works in Act 2
-- Trinket Bearer sigil is now disabled in Act 2
-- Hidden abilities are now properly hidden in Act 2
-- Fledgling sigil now properly shows the required (up to the number 3) in Act 2
-- Fledgling sigil's rulebook description now updates to show the selected card's actual number of required turns
-- Squirrel, Aqua Squirrel, and Rabbit are now marked as AffectedByTidalLock
-- SteelTrap sigil no longer changes a card's portrait to the closed trap; will now switch to an alternate portrait if it exists
+* Fixed Hoarder sigil breaking when used by opponents in Act 2
+* Fixed Hodag special ability not working in Act 2
+* Fixed cards marked as AffectedByTidalLock not being killed by Tidal Lock when it's on a giant card
+* Added card extension methods SetAffectedByTidalLock and HasAlternatePortrait
+* Added ability extension method SetPart2Ability
+* Added AbilityCardMetaCategory AbilityManager.Part2Modular
+* Added pixel portraits for Empty Vessel and its Gemified variants, Ant, Bee, Dam, Chime, and the Tail cards
+* Amorphous sigil now works in Act 2
+* Vessel Printer sigil now works in Act 2
+* Trinket Bearer sigil is now disabled in Act 2
+* Hidden abilities are now properly hidden in Act 2
+* Fledgling sigil now properly shows the required (up to the number 3) in Act 2
+* Fledgling sigil's rulebook description now updates to show the selected card's actual number of required turns
+* Squirrel, Aqua Squirrel, and Rabbit are now marked as AffectedByTidalLock
+* SteelTrap sigil no longer changes a card's portrait to the closed trap; will now switch to an alternate portrait if it exists
# 2.13.1
-- Fixed custom items falling through reality
-- Added card extension method IsAffectedByTidalLock
-- Mental Gemnastics sigil now works in Act 1
-- Tidal Lock sigil now works for non-Moon cards
+* Fixed custom items falling through reality
+* Added card extension method IsAffectedByTidalLock
+* Mental Gemnastics sigil now works in Act 1
+* Tidal Lock sigil now works for non-Moon cards
# 2.13.0
-- Fixed DontDestroyOnLoad warnings when using custom items
-- Fixed weird spacing for Mox cost textures in Act 1
-- Fixed player death cards not inheriting Energy, Mox, or custom costs
-- Fixed the hint dialogue for insufficient Energy in Act 1 being the wrong colour
-- Fixed ExtendedActivatedAbilityBehaviour discarding negative activation cost modifiers
-- Fixed Sniper not accounting for custom sigils that modify attack slots
-- Fixed Tutor not working in Act 2
-- Added more extension methods to BoardManager
-- Added new card extensions SetGemify and SetGemsCost(params GemType[])
-- Added catch-all cost textures for when Blood or Bones go above 13
-- Added CardModificationInfoManager and DeathCardManager
-- Added extended property support and extensions for CardModificationInfo
-- Added Blood activation cost support to ExtendedActivatedAbilityBehaviour
-- ExtendedActivatedAbilityBehaviour now calls PostActivate() if a card dies from paying the Health cost
-- Leshy now recognises death cards with multiple costs in his dialogue
-- Leshy will now let you create death cards with up to 8 sigils
-- Minor adjustments to some cost textures
-- Rearranged order of Mox cost textures to align with order of Mox on the Gem Module
-- Removed empty cost textures for Blood, Bones, Energy, Mox from the community patches
-- Sniper patch's methods are now public
+* Fixed DontDestroyOnLoad warnings when using custom items
+* Fixed weird spacing for Mox cost textures in Act 1
+* Fixed player death cards not inheriting Energy, Mox, or custom costs
+* Fixed the hint dialogue for insufficient Energy in Act 1 being the wrong colour
+* Fixed ExtendedActivatedAbilityBehaviour discarding negative activation cost modifiers
+* Fixed Sniper not accounting for custom sigils that modify attack slots
+* Fixed Tutor not working in Act 2
+* Added more extension methods to BoardManager
+* Added new card extensions SetGemify and SetGemsCost(params GemType[])
+* Added catch-all cost textures for when Blood or Bones go above 13
+* Added CardModificationInfoManager and DeathCardManager
+* Added extended property support and extensions for CardModificationInfo
+* Added Blood activation cost support to ExtendedActivatedAbilityBehaviour
+* ExtendedActivatedAbilityBehaviour now calls PostActivate() if a card dies from paying the Health cost
+* Leshy now recognises death cards with multiple costs in his dialogue
+* Leshy will now let you create death cards with up to 8 sigils
+* Minor adjustments to some cost textures
+* Rearranged order of Mox cost textures to align with order of Mox on the Gem Module
+* Removed empty cost textures for Blood, Bones, Energy, Mox from the community patches
+* Sniper patch's methods are now public
# 2.12.0
-- Fixed ExtendedActivatedAbilityBehaviour's Health cost not subtracting Health correctly
-- Fixed softlock in Act 1 during death card creation
-- Fixed custom cards that start Gemified not working as intended when obtained in-game
-- Potentially fixed softlock when making terrain for a region
-- Added further checks to challenge icon-related patch to prevent softlocks
-- Added decal, appearance behaviour, and Gemified card support for Act 2 cards
-- Added Singleton for keeping track of opponent gems
-- Added new helper method for creating Sprites from resource files in an assembly
-- Added new SpriteType for creating pixel card decals
-- Gemified visuals now work correctly for Act 3 opponents
-- Cost choice node now offers each Mox colour individually
-- Added new config "Default Drone" to change the model and position of the Energy Drone
-- Amorphous sigil now activates when used by opponents or obtained via evolution/temp mod
-- Owned Mox in Act 1 now updates when a card is hooked by the Angler or via the Hook item
+* Fixed ExtendedActivatedAbilityBehaviour's Health cost not subtracting Health correctly
+* Fixed softlock in Act 1 during death card creation
+* Fixed custom cards that start Gemified not working as intended when obtained in-game
+* Potentially fixed softlock when making terrain for a region
+* Added further checks to challenge icon-related patch to prevent softlocks
+* Added decal, appearance behaviour, and Gemified card support for Act 2 cards
+* Added Singleton for keeping track of opponent gems
+* Added new helper method for creating Sprites from resource files in an assembly
+* Added new SpriteType for creating pixel card decals
+* Gemified visuals now work correctly for Act 3 opponents
+* Cost choice node now offers each Mox colour individually
+* Added new config "Default Drone" to change the model and position of the Energy Drone
+* Amorphous sigil now activates when used by opponents or obtained via evolution/temp mod
+* Owned Mox in Act 1 now updates when a card is hooked by the Angler or via the Hook item
# 2.11.2
-- Fixed starter deck custom unlocks not working
-- Fixed card icons not being properly centred for starter decks with 4+ cards
-- Cards in Acts 2 and 3 can now display up to 8 sigils
-- Blood tokens in Act 3 now appear to the side of the board instead of on it
-- Blood tokens now stack on each other when there are more than 4
+* Fixed starter deck custom unlocks not working
+* Fixed card icons not being properly centred for starter decks with 4+ cards
+* Cards in Acts 2 and 3 can now display up to 8 sigils
+* Blood tokens in Act 3 now appear to the side of the board instead of on it
+* Blood tokens now stack on each other when there are more than 4
# 2.11.1
-- Fixed regions in Act 1 being out of order
-- Fixed the console message concerning custom dialogue events not giving the right amount
+* Fixed regions in Act 1 being out of order
+* Fixed the console message concerning custom dialogue events not giving the right amount
# 2.11.0
-- Refactored how regions are handled by the API to prevent duplicate bosses
-- Refactored how bosses are selected to prevent duplicates being encountered
-- Changed when modded Ascension data is cleared to allow for editing it post-clear
-- Added more descriptive error logs for some commonly encountered errors
-- Added config option to reduce the amount of debug info shown in the console
-- Added methods to aid in creating encounter turn plans
-- Added more methods for interacting with lists, new debug method to aid in making transpilers
-- Added ExtendedActivatedAbilityBehaviour class; allows for dynamic costs and Health costs
-- Fixed SetOnePerDeck() and SetHideStats() being inaccessible
-- Fixed AddCardBlueprint() not setting the replacement card correctly
+* Refactored how regions are handled by the API to prevent duplicate bosses
+* Refactored how bosses are selected to prevent duplicates being encountered
+* Changed when modded Ascension data is cleared to allow for editing it post-clear
+* Added more descriptive error logs for some commonly encountered errors
+* Added config option to reduce the amount of debug info shown in the console
+* Added methods to aid in creating encounter turn plans
+* Added more methods for interacting with lists, new debug method to aid in making transpilers
+* Added ExtendedActivatedAbilityBehaviour class; allows for dynamic costs and Health costs
+* Fixed SetOnePerDeck() and SetHideStats() being inaccessible
+* Fixed AddCardBlueprint() not setting the replacement card correctly
# 2.10.0
-- Completely revamped PeltManager to be more user friendly (Mod breaking)
-- Added LocalizationManager for more language support with mods
-- Added helper method for custom pelts to change cards trader
-- Pelts offered by Trapper capped at 8.
-- Pelts offered by Trapper are now randomized if more than 8
-- Fixed soft lock at trader when having more pelts than cards to offer
-- Fixed the campfire fix breaking the normal sequence
-- Fixed HasCardMetaCategory returning the inverse of its intended value
-- Fixed stackable sigils not showing numbers above 9
+* Completely revamped PeltManager to be more user friendly (Mod breaking)
+* Added LocalizationManager for more language support with mods
+* Added helper method for custom pelts to change cards trader
+* Pelts offered by Trapper capped at 8.
+* Pelts offered by Trapper are now randomized if more than 8
+* Fixed soft lock at trader when having more pelts than cards to offer
+* Fixed the campfire fix breaking the normal sequence
+* Fixed HasCardMetaCategory returning the inverse of its intended value
+* Fixed stackable sigils not showing numbers above 9
# 2.9.1
-- Fixed the campfire fix breaking the normal sequence
+* Fixed the campfire fix breaking the normal sequence
# 2.9.0
-- Added talking card support!
-- Moved the "CustomLine" struct outside of the Dialogue.Helpers class.
-- Fixed tribe choice node being able to offer vanilla tribes with no cards
-- Fixed totem choice node being able to offer tops for vanilla tribes with no cards
-- Added fallbacks for tribal choice node if there are less than 3 chooseable tribes
-- Added fallback to campfire node if you don't have any cards that can be buffed
-- Fixed 'outdated plugins' warning showing up when it shouldn't, tweaked message slightly
+* Added talking card support!
+* Moved the "CustomLine" struct outside of the Dialogue.Helpers class.
+* Fixed tribe choice node being able to offer vanilla tribes with no cards
+* Fixed totem choice node being able to offer tops for vanilla tribes with no cards
+* Added fallbacks for tribal choice node if there are less than 3 chooseable tribes
+* Added fallback to campfire node if you don't have any cards that can be buffed
+* Fixed 'outdated plugins' warning showing up when it shouldn't, tweaked message slightly
# 2.8.1
-- Added CardInfo extensions for checking CardMetaCategories, cause why not
-- Added DialogueManager for custom dialogue for regions and Custom Color support
-- Added ResourceBankManager for custom resources. Avoids doing this for every mod
-- Deprecated DialogueEventGenerator (Moved to Dialogue Manager)
-- Fixed repeating bosses on regions that have multiple boss possibilities
-- Fixed custom props not having a renderer on the top parent and breaking loading regions
-- Fixed arrows on the challenges select screen being offscreen at certain resolutions
-- Fixed tribe choice node being able to offer custom tribes with no cards
-- Fixed being able to get custom totem tops for tribes with no cards
+* Added CardInfo extensions for checking CardMetaCategories, cause why not
+* Added DialogueManager for custom dialogue for regions and Custom Color support
+* Added ResourceBankManager for custom resources. Avoids doing this for every mod
+* Deprecated DialogueEventGenerator (Moved to Dialogue Manager)
+* Fixed repeating bosses on regions that have multiple boss possibilities
+* Fixed custom props not having a renderer on the top parent and breaking loading regions
+* Fixed arrows on the challenges select screen being offscreen at certain resolutions
+* Fixed tribe choice node being able to offer custom tribes with no cards
+* Fixed being able to get custom totem tops for tribes with no cards
# 2.8.0
-- Added support for custom masks
-- Fixed sometimes items use the wrong behaviour
-- Added more resource and asset bundle helpers
+* Added support for custom masks
+* Fixed sometimes items use the wrong behaviour
+* Added more resource and asset bundle helpers
# 2.7.4
-- Fixed latch fix modifying the base info
-- Fixed stackable abilities activating twice when they shouldn't
+* Fixed latch fix modifying the base info
+* Fixed stackable abilities activating twice when they shouldn't
# 2.7.3
-- Fixed sniper fix not accounting for cards with Repulsive ability
-- Fixed latch abilities not working in Act 2
-- Added ExtendedProperties for abilities
-- Added new ability setter SetTriggersOncePerStack for controlling the behaviour of stackable abilities after a card evolves
-- Added new helper methods for creating cards: SetOnePerDeck, SetHideStats
-- Added new helper methods for abilities: SetCanStack, SetTriggersOncePerStack, SetActivated, SetPassive, SetConduit, SetConduitCell
-- Added new remover methods for cards: RemoveAbilities, RemoveAbilitiesSingle, RemoveTraits, RemoveTribes
+* Fixed sniper fix not accounting for cards with Repulsive ability
+* Fixed latch abilities not working in Act 2
+* Added ExtendedProperties for abilities
+* Added new ability setter SetTriggersOncePerStack for controlling the behaviour of stackable abilities after a card evolves
+* Added new helper methods for creating cards: SetOnePerDeck, SetHideStats
+* Added new helper methods for abilities: SetCanStack, SetTriggersOncePerStack, SetActivated, SetPassive, SetConduit, SetConduitCell
+* Added new remover methods for cards: RemoveAbilities, RemoveAbilitiesSingle, RemoveTraits, RemoveTribes
# v2.7.2
-- Added `CanActivateOutsideBattles` extension method to ConsumableItemData so they can be used outside of battles.
-- Added Missing Tribe Icon fallback texture for totem tops when a tribe has no icon
-- Changed TotemManager to accept a `CompositeTotemPiece` type for custom behaviour other than always a custom icon
-- Fixed lag when entering gain consumable item map node
-- Fixed crash when using custom consumable items
-- Fixed hard lock when getting totem top that doesn't have an icon
-- Fixed Pack Rat card object not having the correct background during the item node sequence
-- Fixed Latch abilities removing stat boosts when latching a card
-- Fixed latched abilities not properly rendering in some acts
+* Added `CanActivateOutsideBattles` extension method to ConsumableItemData so they can be used outside of battles.
+* Added Missing Tribe Icon fallback texture for totem tops when a tribe has no icon
+* Changed TotemManager to accept a `CompositeTotemPiece` type for custom behaviour other than always a custom icon
+* Fixed lag when entering gain consumable item map node
+* Fixed crash when using custom consumable items
+* Fixed hard lock when getting totem top that doesn't have an icon
+* Fixed Pack Rat card object not having the correct background during the item node sequence
+* Fixed Latch abilities removing stat boosts when latching a card
+* Fixed latched abilities not properly rendering in some acts
# v2.7.1
-- Changed Pelt Manager to no longer have an interface for future safety! (NOTE This will break all mods with custom pelts!)
-- Added Squirrel tribe art (Thanks Drift!)
-- Fixed Green Gem stat icon showing as a black square in act 1
-- Fixed Green Gem stat icon not appearing in rulebook
-- Fixed Squirrel totem top causing NMA when using custom totem tops
-- Fixed being unable to play cards with a Blood cost above 4 via sacrifices
+* Changed Pelt Manager to no longer have an interface for future safety! (NOTE This will break all mods with custom pelts!)
+* Added Squirrel tribe art (Thanks Drift!)
+* Fixed Green Gem stat icon showing as a black square in act 1
+* Fixed Green Gem stat icon not appearing in rulebook
+* Fixed Squirrel totem top causing NMA when using custom totem tops
+* Fixed being unable to play cards with a Blood cost above 4 via sacrifices
# v2.7.0
-- Added support for custom pelts
-- Added support for converting audio files to AudioClip objects
-- Added support for adding custom tracks to the Gramophone
-- Added support for adding custom audio files
-- Warning message for outdated plugins now lists the outdated plugins
-- Energy Drone now tweens with the scales, kinda
-- Fixed visual bug where energy cells didn't start closed in successive battles
+* Added support for custom pelts
+* Added support for converting audio files to AudioClip objects
+* Added support for adding custom tracks to the Gramophone
+* Added support for adding custom audio files
+* Warning message for outdated plugins now lists the outdated plugins
+* Energy Drone now tweens with the scales, kinda
+* Fixed visual bug where energy cells didn't start closed in successive battles
# v2.6.0
-- Added support for custom consumable items using a choice of a few models
-- Added support for custom consumable card in a bottle items
-- Added support for custom consumable items with a custom model
-- Added more helper extensions for checking abilities, traits, special abilities
-- Fixed null instances in Act 2 spamming the console with warnings
+* Added support for custom consumable items using a choice of a few models
+* Added support for custom consumable card in a bottle items
+* Added support for custom consumable items with a custom model
+* Added more helper extensions for checking abilities, traits, special abilities
+* Fixed null instances in Act 2 spamming the console with warnings
# v2.5.3
-- Added support for custom card unlock requirements
-- Fixed non-giant cards with Omni Strike not directly attacking their opposing slot when there are no opposing cards
-- Fixed cards attacking their own side of the board during combat not adding damage to the correct side of the scale
-- Fixed an issue where a challenge would go missing if you had more than 14 installed
+* Added support for custom card unlock requirements
+* Fixed non-giant cards with Omni Strike not directly attacking their opposing slot when there are no opposing cards
+* Fixed cards attacking their own side of the board during combat not adding damage to the correct side of the scale
+* Fixed an issue where a challenge would go missing if you had more than 14 installed
# v2.5.2
-- Fixed the sentry fix overriding patches to SlotAttackSlot
+* Fixed the sentry fix overriding patches to SlotAttackSlot
# v2.5.1
-- Reverted part of the sentry fix that was causing problems
-- Made it easier to override the default totem head
+* Reverted part of the sentry fix that was causing problems
+* Made it easier to override the default totem head
# v2.5.0
-- Added support for custom totem heads
-- Custom Tribes now appear as a totem in the Wood Carver nodes
-- Fixes for Sentry ability in Act 1 relating to PackMule, Loose Tail, and enemy totems
-- Fixed stacked ability icons causing issues when trying to render numbers on some sigil icons
-- Fixed Latches not working in Act 1
+* Added support for custom totem heads
+* Custom Tribes now appear as a totem in the Wood Carver nodes
+* Fixes for Sentry ability in Act 1 relating to PackMule, Loose Tail, and enemy totems
+* Fixed stacked ability icons causing issues when trying to render numbers on some sigil icons
+* Fixed Latches not working in Act 1
# v2.4.2
-- Switched to debug version
+* Switched to debug version
# v2.4.1
-- Fixed Sentry ability not working properly in Act for players or opponents
+* Fixed Sentry ability not working properly in Act for players or opponents
# v2.4.0
-- Reworked challenges
-- Fixed gemified opponent cards not working properly
-- Fixed stat icons in Act 3
+* Reworked challenges
+* Fixed gemified opponent cards not working properly
+* Fixed stat icons in Act 3
# v2.3.0
-- Fixed orange gem not counting towards passive attack
-- Fixed PackMule special ability not working on the player's side
-- Fixed Mox cost choice node not working
-- Fixed boon rulebook and removal
-- Fixed tribe choice nodes
-- Fixed error caused by passing null when assigning a custom tail portrait
-- Improved activated ability fix
-- Improved some extensions and attack buffs
-- Fixes for starter decks
-- Fixes for custom regions, more customisation when creating one
-- Added more extensions
-- Fixed stat icon rendering for Act 3
+* Fixed orange gem not counting towards passive attack
+* Fixed PackMule special ability not working on the player's side
+* Fixed Mox cost choice node not working
+* Fixed boon rulebook and removal
+* Fixed tribe choice nodes
+* Fixed error caused by passing null when assigning a custom tail portrait
+* Improved activated ability fix
+* Improved some extensions and attack buffs
+* Fixes for starter decks
+* Fixes for custom regions, more customisation when creating one
+* Added more extensions
+* Fixed stat icon rendering for Act 3
# v2.2.0
-- Added an interface that triggers when cards are facedown
-- Updated custom artwork for GBC numbers
-- Fixed flipped icons spamming the log with warnings
-- Fixed Tribe API breaking mods that use CardbackTexture
-- Added custom combat triggers
-- Added more custom extensions
-- Fixed Latch abilities in Act 1
-- Fixed extension methods for setting custom flipped portrait affecting the wrong card
-- Fixed optimisation issues caused by passive attack bufs
-- Fixed activated sigils
-- Added node manager for custom nodes
-- Fixed cards getting buffs after the game ends
+* Added an interface that triggers when cards are facedown
+* Updated custom artwork for GBC numbers
+* Fixed flipped icons spamming the log with warnings
+* Fixed Tribe API breaking mods that use CardbackTexture
+* Added custom combat triggers
+* Added more custom extensions
+* Fixed Latch abilities in Act 1
+* Fixed extension methods for setting custom flipped portrait affecting the wrong card
+* Fixed optimisation issues caused by passive attack bufs
+* Fixed activated sigils
+* Added node manager for custom nodes
+* Fixed cards getting buffs after the game ends
# v2.1.0
-- Fixed blurry portraits when playing on low graphics settings
+* Fixed blurry portraits when playing on low graphics settings
# v2.0.3
-- Added support for custom tribes and boons
-- Added config option to opt of custom cost renders for Act 2 cards
-- Refactored and added documentation for CardExtensions
+* Added support for custom tribes and boons
+* Added config option to opt of custom cost renders for Act 2 cards
+* Refactored and added documentation for CardExtensions
# v2.0.2
-- Improved the process of creating stat icons to automatically register and add the corresponding special ability
-- Added log warnings for improperly registered cards
+* Improved the process of creating stat icons to automatically register and add the corresponding special ability
+* Added log warnings for improperly registered cards
# v2.0.1
-- Bugfix for SaveData
+* Bugfix for SaveData
# v2.0
-- Rewritten to use base game objects
+* Rewritten to use base game objects
# v1.13.0
-- Added support for custom card backgrounds, dialogs, encounters and talking cards
-- Fixes to abilities loading and stackable custom abilities
+* Added support for custom card backgrounds, dialogs, encounters and talking cards
+* Fixes to abilities loading and stackable custom abilities
# v1.12.1
-- Bugfix so CustomCard doesn't wipe ability information.
+* Bugfix so CustomCard doesn't wipe ability information.
# v1.12
-- Fixes params.
-- Adds feature for special abilities and special stat icons.
-- Added support for emissions.
+* Fixes params.
+* Adds feature for special abilities and special stat icons.
+* Added support for emissions.
# v1.11
-- Added support for more identifiers
+* Added support for more identifiers
# v1.10.1
-- Fix for abilities which do not have identifier.
+* Fix for abilities which do not have identifier.
# v1.10
-- Added ability identifiers.
+* Added ability identifiers.
# v1.9.1
-- Added support for mox.
-- Forced ability texture to point filter.
+* Added support for mox.
+* Forced ability texture to point filter.
# v1.9
-- Added config options for energy.
+* Added config options for energy.
# v1.8.2
-- Fixed appearanceBehaviour (again).
+* Fixed appearanceBehaviour (again).
# v1.8.1
-- Fix pixelTex dimensions.
+* Fix pixelTex dimensions.
# v1.8
## Not compatible with v1.7.2
-- Changes to using TypeMapper.
+* Changes to using TypeMapper.
# v1.7.2
-- Fixed error when not adding any abilities.
+* Fixed error when not adding any abilities.
# v1.7.1
-- Fixed appearance behaviours not loading properly.
+* Fixed appearance behaviours not loading properly.
# v1.7
-- Added support for custom abilities!
+* Added support for custom abilities!
# v1.6
-- Changed textures to point filter to reduce blur.
+* Changed textures to point filter to reduce blur.
# v1.5.2
-- Enabled fix for evolveParams and some other disabled options.
+* Enabled fix for evolveParams and some other disabled options.
# v1.5.1
-- Fix to accessing private instance for regions.
+* Fix to accessing private instance for regions.
# v1.5
## Not compatible with v1.4
-- Changed all references to API including guid.
+* Changed all references to API including guid.
# v1.4
-- Set up support for customising and adding regions.
+* Set up support for customising and adding regions.
# v1.3
-- Set up project to work as a library for other plugins to use.
+* Set up project to work as a library for other plugins to use.
# v1.2.1.1
-- Fixed previous patch.
+* Fixed previous patch.
# v1.2.1
-- Fixed cards not being inserted into the card pool on chapter select.
+* Fixed cards not being inserted into the card pool on chapter select.
# v1.2
## Not compatible with v1.1
-- Added customising default cards through CustomCard.
-- Custom cards are added via the **CustomCard** constructor rather than through the **AddCard** method.
+* Added customising default cards through CustomCard.
+* Custom cards are added via the **CustomCard** constructor rather than through the **AddCard** method.
# v1.1
-- Hooked into a much more sensible method to load the cards into the card pool.
\ No newline at end of file
+* Hooked into a much more sensible method to load the cards into the card pool.
diff --git a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs
index aaff322d4..d7741a46c 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 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.
+ //public bool initialized;
-public class AscensionChallengePaginator : MonoBehaviour
-{
- public bool initialized;
-
+ ///
+ /// 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)
@@ -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.
+ ///
+ /// s that will be displayed on this page.
public void AddPage(List challengeInfos)
{
// create the challenge info for missingChallengeInfo challenges
@@ -71,7 +87,13 @@ public void AddPage(List challengeInfos)
int numIcons = Mathf.Min(14, challengeObjectsForPages[0].Count) - numBosses;
// the list index when we begin adding boss icons
- int bossStartingIndex = (1 + regularChallengeInfos.Count) / 2;
+ int bossStartingIndex;
+ if (numBosses == 0) {
+ bossStartingIndex = -1;
+ }
+ else {
+ bossStartingIndex = (1 + regularChallengeInfos.Count) / 2;
+ }
int numBossesAdded = 0;
// 14 = regular + boss * 2
@@ -165,6 +187,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
@@ -252,17 +277,23 @@ public void OnEnable()
List> pagesToAdd = new();
while (challengesToAdd.Count > 0)
{
+ int maxIcons = 14;
List<(ChallengeManager.FullChallenge, AscensionChallengeInfo)> page = new();
- for (int i = 0; i < 14; i++) // each page can have 14 icons max
- {
- if (challengesToAdd.Count > 0)
- {
- page.Add(challengesToAdd.Last());
- if (challengesToAdd.Last().Item1.Boss) // boss icons take up a whole column
- {
- i++;
+ // each page can have 14 icons max
+ for (int i = 0; i < maxIcons; i++) {
+ if (challengesToAdd.Count > 0) {
+ (ChallengeManager.FullChallenge, AscensionChallengeInfo) highestValChallenge = challengesToAdd.Last();
+
+
+ // boss icons take up a whole column
+ if (highestValChallenge.Item1.Boss) {
+ maxIcons--;
+ }
+
+ if (i < maxIcons) {
+ page.Add(highestValChallenge);
+ challengesToAdd.Remove(highestValChallenge);
}
- challengesToAdd.RemoveAt(challengesToAdd.Count - 1);
}
}
// re-sort the page so boss challenges have the correct info
@@ -274,7 +305,7 @@ public void OnEnable()
}
else
{
- return (x.Item1.UnlockLevel + (x2.Item1.Boss ? 0 : 0)) - (x2.Item1.UnlockLevel + (x.Item1.Boss ? 0 : 0));
+ return (x.Item1.UnlockLevel) - (x2.Item1.UnlockLevel);
}
});
pagesToAdd.Add(page.ConvertAll(x => x.Item2));
@@ -291,6 +322,13 @@ public void OnEnable()
InstantiateArrowObjects(icons);
}
+ ///
+ /// Creates the and 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 +381,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 +392,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 +403,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 +510,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
diff --git a/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs b/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs
index 5e85925d3..efd02129d 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/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/AscensionRunSetupScreenBase.cs b/InscryptionAPI/Ascension/AscensionRunSetupScreenBase.cs
index bcbcad6a4..31135226a 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 a2242720c..257048829 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 7033c8117..296fd6c18 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 67cf82728..529f6bc70 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 5824764b8..fc5f532aa 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 92baaa61b..1c0959e2e 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 14889232d..2a733db84 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 2b5e36803..4eae29631 100644
--- a/InscryptionAPI/Ascension/StarterDeckManager.cs
+++ b/InscryptionAPI/Ascension/StarterDeckManager.cs
@@ -7,28 +7,51 @@
namespace InscryptionAPI.Ascension;
+///
+/// Manager class that 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 2580b5fe2..8ce8ec464 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/Ascension/StarterDeckSelectScreen.cs b/InscryptionAPI/Ascension/StarterDeckSelectScreenPatches.cs
similarity index 99%
rename from InscryptionAPI/Ascension/StarterDeckSelectScreen.cs
rename to InscryptionAPI/Ascension/StarterDeckSelectScreenPatches.cs
index e5af2ed1c..931578f73 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]
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_blood_1.png b/InscryptionAPI/Assets/BaseGameDecals/decal_blood_1.png
new file mode 100644
index 000000000..8ecf3a094
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_blood_1.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_blood_2.png b/InscryptionAPI/Assets/BaseGameDecals/decal_blood_2.png
new file mode 100644
index 000000000..d0e839803
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_blood_2.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_blood_3.png b/InscryptionAPI/Assets/BaseGameDecals/decal_blood_3.png
new file mode 100644
index 000000000..e172d394e
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_blood_3.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_blood_4.png b/InscryptionAPI/Assets/BaseGameDecals/decal_blood_4.png
new file mode 100644
index 000000000..16c4c2e56
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_blood_4.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_child.png b/InscryptionAPI/Assets/BaseGameDecals/decal_child.png
new file mode 100644
index 000000000..1e5492ec0
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_child.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_fungus.png b/InscryptionAPI/Assets/BaseGameDecals/decal_fungus.png
new file mode 100644
index 000000000..257e67479
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_fungus.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_smoke.png b/InscryptionAPI/Assets/BaseGameDecals/decal_smoke.png
new file mode 100644
index 000000000..6bd48df87
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_smoke.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_smoke_abilityhole.png b/InscryptionAPI/Assets/BaseGameDecals/decal_smoke_abilityhole.png
new file mode 100644
index 000000000..79c961583
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_smoke_abilityhole.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_1.png b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_1.png
new file mode 100644
index 000000000..6d5a76a06
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_1.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_2.png b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_2.png
new file mode 100644
index 000000000..ff65c2cf1
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_2.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_3.png b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_3.png
new file mode 100644
index 000000000..86b02813c
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_3.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_4.png b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_4.png
new file mode 100644
index 000000000..f424a824c
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_4.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_5.png b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_5.png
new file mode 100644
index 000000000..93c2b6211
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_5.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_6.png b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_6.png
new file mode 100644
index 000000000..6a04dedee
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_6.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_main.png b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_main.png
new file mode 100644
index 000000000..eceba729a
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_snelk_main.png differ
diff --git a/InscryptionAPI/Assets/BaseGameDecals/decal_stitches.png b/InscryptionAPI/Assets/BaseGameDecals/decal_stitches.png
new file mode 100644
index 000000000..4127675dc
Binary files /dev/null and b/InscryptionAPI/Assets/BaseGameDecals/decal_stitches.png differ
diff --git a/InscryptionAPI/Boons/BoonBehaviour.cs b/InscryptionAPI/Boons/BoonBehaviour.cs
index 27dfc811f..e6934dfe7 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 7046ba0ce..25ae960fe 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,14 +40,13 @@ public class FullBoon
///
public bool stacks;
+ ///
+ /// Metacategories for what rulebooks this boon should appear in.
+ ///
public List metaCategories = new();
///
- /// 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.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.
+ /// Tracks all rulebook redirects that this boon's description will have.
///
public Dictionary RulebookDescriptionRedirects = new();
}
@@ -56,6 +55,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 +69,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 +169,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 +188,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);
diff --git a/InscryptionAPI/Card/AbilityExtensions.cs b/InscryptionAPI/Card/AbilityExtensions.cs
index 42acc4bab..761715d8f 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 and 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 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 , , and 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 objects.
+ /// 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 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 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 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 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,29 +244,51 @@ 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;
}
-
+ ///
+ /// 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;
@@ -270,9 +297,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 +308,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 +319,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 +330,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 +341,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 +352,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 +363,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 +374,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 +385,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 +396,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 +408,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 +422,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 +434,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 +445,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 +457,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 +474,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 +487,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 +500,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,31 +512,57 @@ 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;
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;
}
+ ///
+ /// 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 +572,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);
@@ -526,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)
@@ -540,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)
@@ -552,24 +613,27 @@ 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 and fields.
///
- ///
+ /// 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.
+ ///
+ /// Note these fields don't make the stat icon affect the stat; you still need to implement that logic.
+ ///
public static StatIconInfo SetAppliesToStats(this StatIconInfo info, bool appliesToAttack, bool appliesToHealth) {
info.appliesToAttack = appliesToAttack;
info.appliesToHealth = appliesToHealth;
@@ -579,14 +643,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);
@@ -596,9 +667,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)
@@ -608,19 +679,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 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 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);
}
@@ -631,9 +702,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);
@@ -641,20 +712,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 AbilityInfo.
- /// Whether double triggering is disabled.
+ /// The instance of .
+ /// True if double triggering is enabled. False otherwise.
public static bool GetTriggersOncePerStack(this AbilityInfo abilityInfo)
{
return abilityInfo.GetExtendedPropertyAsBool("TriggersOncePerStack") ?? false;
@@ -666,9 +737,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);
@@ -676,19 +747,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 .
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 AbilityInfo.
- /// Whether single stacks of this ability will be hidden when added to hiddenAbilities.
+ /// The instance of .
+ /// Whether single stacks of this ability will be hidden when added to .
public static bool GetHideSingleStacks(this AbilityInfo abilityInfo)
{
return abilityInfo.GetExtendedPropertyAsBool("HideSingleStacks") ?? false;
@@ -698,24 +769,24 @@ 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 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();
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 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();
@@ -736,7 +807,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)
@@ -759,7 +830,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)
@@ -782,7 +853,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)
@@ -805,7 +876,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)
diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs
index b8f858252..84e16debb 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;
@@ -16,7 +15,7 @@
namespace InscryptionAPI.Card;
///
-/// This manager class handles the creation and management of mod-added abilities (sigils).
+/// Manager class that handles the creation and management of mod-added abilities (sigils).
///
[HarmonyPatch]
public static class AbilityManager
@@ -34,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 AbilityBehaviour 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; }
@@ -71,22 +70,19 @@ public class FullAbility
public string BaseRulebookDescription { get; internal set; }
///
- /// 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.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.
+ /// Tracks all rulebook redirects that this ability's description will have.
///
public Dictionary RulebookDescriptionRedirects = new();
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 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)
@@ -94,12 +90,12 @@ 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 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)
{
@@ -115,7 +111,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()
{
@@ -165,34 +161,34 @@ 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.
///
- /// There are two primary use cases for this hook:
- ///
+ ///
+ /// There are two primary use cases for this hook:
+ ///