You are viewing a potentially older version of this package. View all versions.
WhistleWind-New_Spell_Card_Toolkit-1.1.1 icon

New Spell Card Toolkit

v1.1.1 - Minor bug fix for Give Stats. An updated version of Infiniscryption's Spell Card Toolkit with new features and general improvements.

Date uploaded 2 years ago
Version 1.1.1
Download link WhistleWind-New_Spell_Card_Toolkit-1.1.1.zip
Downloads 306
Dependency string WhistleWind-New_Spell_Card_Toolkit-1.1.1

This mod requires the following mods to function

API_dev-API-2.20.0 icon
API_dev-API

The de-facto standard core API for all Inscryption mods. This lets you create new cards, abilities, challenges, map nodes, starter decks, and more.

Preferred version: 2.20.0

README

Spell Cards

This is an updated version of DivisionByZ0rro's original Spell Card Toolkit. This mod seeks to improve upon what was left behind through bug fixes and minor content additions.

New additions and features include:

  • Opponent support for Leshy playing spell cards
  • The ability to cancel playing a spell card once you've selected it
  • The ability to create spell cards that display their stats during battle
  • Non- and global spell cards support for built-in sigils, allowing them to work properly on these kinds of cards
  • 3 new sigils: Give Stats, Give Sigils, Give Stats and Sigils
  • 4 new cards: Soul Without a Body, Body Without a Soul, Another's Desire, Hope

This mod is meant to replace the original version, not be used alongside it. Installing both will likely cause problems!!

This mod contains special abilities that allow you to create a new type of card called a 'spell'. Spells are cards that:

  • Do not need a space on board to resolve
  • Die immediately when played.

In other words, these are cards you play entirely because they have an immediate effect. There are also some additional sigils in this pack that might be useful for you when creating spells.

There are two types of spells:

Targeted Spells: These have an effect on one specific space on the board. Use this type if you want to use sigils like 'Direct Damage' (included in this pack) or something like the Beaver's dam creation ability.

Global Spells: These have an immediate, global effect when played. If you attach a sigil that expects to be in a specific slot on board, there may be unexpected behavior. For example, the Beaver's dam ability will more than likely give Leshy a free dam.

With this new version, you can also make spell cards display their stats.

By default, these kinds of cards can have their stats boosted at the campfire; you can disable this in the config.

Credits

Original mod by DivisionByZ0rro.

This mod would not be possible without signifcant contributions from the Inscryption Modding discord channel.

Pixel icons were contributed by Arakulele.

Does this pack add any cards?

It can, but it doesn't by default. If you want my example cards added to the card pool, go to the config file 'zorro.infiniscryption.sigils.cfg' and set 'AddCards' to true.

This will add the following cards:

  • Kettle of Avarice: 1 Blood, draws two cards.
  • Anger of the Gods: 1 Blood, destroys all creatures on board (Rare).
  • Lightning: 1 Blood, deals 2 damage to a card slot.
  • Trip to the Store: 1 blood, generates a random consumable.
  • Rot Healing: 1 Bone, heals for two.
  • Irritate: 2 Bones, does one damage but increases attack by one.
  • Go Fetch: Free to cast, generates 4 bones when cast.
  • Compost: 3 Bones, draws two cards.
  • Soul Without a Body: 1 Blood, gives its sigils to a target card.
  • Body Without a Soul: 2 Bones, gives its stats to a target card.
  • Another's Desire: 1 Blood, gives its stats and sigils to a target card.
  • Hope: 2 Bones, gives its stats to all player cards.

These cards are not meant to be balanced, but rather to demonstrate how the mod works (hence why they are not added by default).

Requirements

As with most mods, you need BepInEx installed.

You will also need the API installed.

I want to make a spell - how does this work?

When a spell is played, it will fire either three or four triggers (depending upon the type of spell) in this specific order.

  1. PlayFromHand
  2. ResolveOnBoard (if this is a targeted spell, the card's slot will be set to the slot that was targeted - otherwise, the card slot will be null)
  3. SlotTargetedForAttack (only if this is a targeted spell)
  4. Die

As a card developer, it is up to you to put sigils (either existing or custom) on the card to actually make it have an effect when played.

Target selection for targeted cards

When it comes time to select a target for a targeted card, the game will ask the card if it responds to being targeted at that card slot using the 'RespondsToSlotTargetedForAttack' override. It will only allow you to target a spell at a slot if the card says it will respond to being pointed at that slot. Additionally, if the card responds to 'ResolveOnBoard,' the game will allow you to target any of the player's four slots.

The sigils included in this pack are built so that the ones that do harm will respond 'false' when pointed at a player card and 'true' when pointed at an opposing card (and vice versa for sigils that are beneficial). Note that this means if you combine a positive and negative effect on the same card (for example, a spell that increases attack by one but also damages the card for one), that card will be able to target both friendly and enemy cards.

If you are adding sigils that are intended to be used on targeted spells, you need to make sure that the override bool 'RespondsToSlotTargetedForAttack' correctly identifies what slots should be targetable.

What sigils are in this pack?

So far we have the following:

  • Draw Twice ("zorro.infiniscryption.sigils.Draw Twice"): Draw the top card of your main deck and the top card of your side deck when this card dies.
  • Cataclysm ("zorro.infiniscryption.sigils.Cataclysm"): Kill every card on board when this card dies.
  • Direct Damage ("zorro.infiniscryption.sigils.Direct Damage"): Deals one damage to the targeted card slot. This ability stacks, so if you put two on a card, it will deal two damage. This only targets opponent cards.
  • Direct Healing ("zorro.infiniscryption.sigils.Direct Heal"): Heals the targeted card for one. This can overheal. This ability stacks. This only targets player cards.
  • Attack Up ("zorro.infiniscryption.sigils.Attack Up"): Increases the targeted card's attack by one for the rest of the battle. This only targets player cards.
  • Attack Down ("zorro.infiniscryption.sigils.Attack Down"): Decreases the targeted card's attack by one for the rest of the battle. This only targets opponent cards.
  • Gain Control ("zorro.infiniscryption.sigils.Gain Control"): Gains control of the targeted creature, but only if there is an empy slot for that creature to move into. Functionally similar to the fishook item.
  • Give Stats ("zorro.infiniscryption.sigils.Give Stats"): Gives the spell card's stats to the targeted creature for the rest of the battle.
  • Give Sigils ("zorro.infiniscryption.sigils.Give Sigils"): Gives the spell card's sigils (excluding this sigil) to the targeted creature for the rest of the battle.
  • Give Stats and Sigils ("zorro.infiniscryption.sigils.Give Stats and Sigils"): A combination of Give Stats and Give Sigils. Does not stack with either of them.

Split-, Tri-, and Omni Strike

These sigils do nothing for global spells, but behave as you would expect for targeted spells. Be careful when putting Split Strike on a targeted spell, as it will behave exactly as expected, which is not necessarily intuitive. Rather than affecting the targeted space, it will affect the spaces on either side.

The spell will trigger once for each targeted slot, but only the SlotTargetedForAttack and ResolveOnBoard triggers will fire multiple times. The PlayFromHand and Die triggers will only happen once.

So, for example:

  • A spell with Omni Strike and Create Dams will attempt to put a Dam in every space on the board.
  • A spell with Tri Strike and Direct Damage will deal one damage to the targeted space and both adjacent spaces.
  • A spell with Split Strike and Explode On Death will only explode once.

Note that abilities that modify the way cards attack (custom "strike" sigils) are not supported - only Split-, Tri-, and AllStrike.

Adding a spell through the API

The best way to add a spell using the API is to also create a reference to this mod's DLL in your project and use the custom extension method helpers "SetGlobalSpell()" or "SetTargetedSpell()" to turn a card into a spell:

using InscryptionAPI;
using Infiniscryption.Spells.Sigils;

CardManager.New("Spell_Kettle_of_Avarice", "Kettle of Avarice", 0, 0, "A jug that allows you to draw two more cards from your deck.")
           .SetDefaultPart1Card()
           .SetPortrait(AssetHelper.LoadTexture("kettle_of_avarice"))
           .SetGlobalSpell() // Makes this card into a global spell
           .SetCost(bloodCost: 1)
           .AddAbilities(DrawTwoCards.AbilityID);

CardManager.New("Spell_Lightning", "Lightning", 0, 0, "A perfectly serviceable amount of damage.")
           .SetDefaultPart1Card()
           .SetPortrait(AssetHelper.LoadTexture("lightning_bolt"))
           .SetTargetedSpell() // Makes this card into a targeted spell
           .SetCost(bloodCost: 1)
           .AddAbilities(DirectDamage.AbilityID, DirectDamage.AbilityID);

With the new version, you can use "SetTargetedSpellStats()" and "SetGlobalSpellStats()" to create a spell that displays its stats.

Additionally, if you want to make sure your card can NEVER be buffed, you can use "SetNeverBoostStats()" to mark your card as always being ineligible for stat buffing.

Adding a spell through JSON Loader

To add a spell using JSON loader, you simply need to add either the global spell or the targeted spell special ability to the card:

{
  "specialAbilities": [ "zorro.infiniscryption.sigils.Spell (Global)" ]
}

{
  "specialAbilities": [ "zorro.infiniscryption.sigils.Spell (Targeted)" ]
}

Spell cards with health or attack greater than 0 will automatically be set to show their stats during battle; this can be disabled by setting "hideAttackAndHealth" to "true" when creating your card.

To create a spell card that can never be buffed at the campfire, you need to add this mod's special Trait:

{
  "traits": [ "zorro.infiniscryption.sigils.NeverBoostStats" ]
}

Don't worry about adding the Stat Icon to your card; the mod will do it for you.

A Personal Message from DivisionByZ0rro (7/18/2022)

It's been a while since you've heard from me. Life changes quickly. I got a bad case of Covid, I had family members get seriously injured, and was just generally unavailable for a while.

Working on this and other Inscryption mods has been an amazing collaborative journey over the past months. Ever since I completed Inscryption for the first time in the fall of 2021, I spent all of my spare time (and then some) working on modding this game and being a part of an incredible community. But unfortunately, things change, and I cannot keep this up moving forward. I simply don't have the same amount of spare time that I used to, and it's time for me to move on.

I have nothing but gratitude for everyone who supported me and helped me accomplish what I have been able to accomplish. I know I'm leaving work unfinished, but I know that would be true no matter when I called it quits.

If anybody wants to continue any of my work, I hereby grant unrestricted permission for anyone to fork any of projects and make it their own moving forward. This work was always a passion project for the community, and I would be honored if anyone on the community wanted to continue that work. Please feel free to copy anything I've done and use it for yourself.

Thanks for everything, /0

CHANGELOG

PluginGUID: zorro.inscryption.infiniscryption.spells

View changelog

1.2.5 (Aug 11, 2024)

  • Fixed Terrain stat spells being boostable at the campfire
  • Fixed stat spells not colouring their stat values correctly in the hand
  • Added support for negative value stat spell cards
  • Added abstract 'GiveAbility' class
  • Reduced 'Give Stats' ability powerlevel from 4 -> 2
  • Reduced 'Give Sigils' ability powerlevel from 4 --> 3
  • Reduced 'Give Stats and Sigils' ability powerlevel from 8 --> 5
  • 'Give Sigils' and 'Give Stats and Sigils' now only give up to 4 of the spell card's sigils
  • 'Give' abilities are now stackable
  • 'Give' abilities now inherit from the GiveAbility class
  • 'Give' abilities are now marked with the extended property 'Spells:GiveAbility'
  • Opponents now follow the same logic as the player when playing negative 'Give' spells
  • Stat spells in Act 2 now display positive values as green instead of blue

1.2.4 (Jan 16, 2024)

  • Fixed Blood-costing spell cards not being playable even when there are sufficient sacrifices and targets

1.2.3 (Dec 24, 2023)

  • Queued spell cards can now be prevented from being played by patching Opponent.QueuedCardIsBlocked
  • Made UpdateStatsSpellDisplay and UpdatePlayableStatsSpellDisplay public

1.2.2 (Dec 3, 2023)

  • Fixed stat spell cards' health not being coloured correctly during battle
  • Opponent stat spell cards now reveal their stats when played
  • Queued stat spell cards now reveal their stats when moused over
  • Adjusted when the target icons created by opponent target spells disappear

1.2.1 (Nov 29, 2023)

  • Mousing over a stat spell card will reveal the card's stats

1.2.0 (Nov 16, 2023)

  • Rewrote stat spell logic to -hopefully- be quicker/less laggy
  • Added Instant Global Spells, which replicate the original global spell behaviour (played immediately on selection)
  • Added SetInstaGlobalSpell() and SetInstaGlobalSpellStats()
  • Tweaked Spell stat icon descriptions to differentiate between instant and regular Global Spells

1.1.3 (Sept 9, 2023)

  • Fixed a few typos
  • Fixed example sigils activating incorrectly when attached to non-Spell cards
  • Added helper extension AbilityInfo.SetCanMerge() for controlling whether sigils should be transferrable or not - true by default
  • Added new config AllowCardMerge for controlling whether spell cards can gain or transfer sigils - true by default
  • Tweaked Act 2 descriptions for Targeted and Global Spells.

1.1.2 (June 1, 2023)

  • Fixed Spells not working correctly in Act 2

1.1.1 (May 20, 2023)

  • Fixed Give Stats giving the wrong stats

1.1.0 (Feb 4, 2023)

  • Added opponent support for spell cards and all built-in sigils
  • Added Global Spell support for ability 'Gain Control'
  • Fixed Targeted Spells always being playable if they have the ability Brittle
  • Fixed Targeted Spells double targeting the left adjacent slot while possessing Split Strike
  • Fixed Targeted Spells that cost Blood softlocking due to no valid targets existing after sacrifices
  • Reduced how long 'Gain Control' takes to finish moving a card
  • 'Attack Down' can no longer be used on cards with 0 Power

1.0.0 (Jan 28, 2023)

  • Added 3 new sigils: Give Stats, Give Sigils, Give Stats and Sigils
  • Added 4 new cards: Soul Without a Body, Body Without a Soul, Desire, Hope
  • Added new compatibility to some sigils so they work with regular cards and global spell cards
  • Changed artwork for spell card backgrounds
  • Changed artwork for Direct Heal
  • Fixed artwork appearing blurry in-game
  • Spell cards no longer force the player to play them if selected
  • Minor code optimisations
  • Minor changes to some dialogue

Original version's changelog

2.0.1

  • A final message from DivisionByZorro

2.0.0

  • Updated documentation for Kaycee's Mod API and required that API as a dependency.

1.2.7

  • Added pixel icons for compatibility with GBC mode

1.2.6

  • Prevented the game from soft locking if you back out of casting a spell partway through sacrificing creatures.

1.2.5

  • Fixed texture loading defect to prevent crashes when spell cards appear in certain situations for the first time.
  • Updated mod to have a dependency on the unofficial patch as opposed to the standalone visually stackable sigils mod.

1.2.4

  • Added the fishhook sigil

1.2.3

  • Bad manifest.json. My bad. :(

1.2.2

  • Updated to be dependent on the Stackable Sigils mod. This makes spell creation with modular sigils far more user friendly.

1.2.1

  • Fixed defect with Attack Up and Attack Down where they were not properly attaching to cards.
  • Fixed defect where sometimes creatures could not be played after casting targeted spells.
  • Added more example cards to the pool.

1.2.0

  • Added targeting logic for targeting spells. They will now only allow you to select valid targets.
  • Added support for split strike, tri strike, and all strike
  • Added modular, stackable sigils for spell creation.

1.1.0

  • Added support for targeted spells.
  • Fixed card animations

1.0.0

  • Initial version. Adds global spells.