x0_i0_deckmany
Library for the Deck of Many Things.See the spell script x0_s3_deckmany for an example of combining these functions to create a deck.
To make your own deck, just add a "Do<whatever>DeckCard" function for any custom cards you want, then put those cards into the DoDeckDrawPositive/Negative functions. Then recompile the spell script x0_s3_deckmany inside your module and a deck inside your module will use your cards.
NOTE: This file includes x0_i0_henchman and x0_i0_treasure.
Constants
Name | Value | Brief Description | DECK_DELAY | 8.0 | Controls how long to delay the actual card effects for in order to make the message pop up before it happens. | TOKEN_CARD_NAME | 9324 | TOKEN_NAME | 9323 |
---|
Functions
Name | Brief Description |
---|---|
DoAvatarDeckCard | POSITIVE CARD: The Avatar card. Caster is transformed into an avatar of their alignment. |
DoAvatarDeckCardEffect | Internal function. Create the avatar item on the caster. |
DoAvatarDeckCardTransform | Internal function. Do the avatar transformation effect. |
DoBequestDeckCard | POSITIVE CARD: The Bequest card. Gain a major unique magical item (this will respect the XP1 treasure system if it is used in the module, otherwise random boss-level treasure will be generated). |
DoDeckDrawNegative | Do a negative card draw. |
DoDeckDrawPositive | Do a positive card draw. |
DoDonjonDeckCard | NEGATIVE CARD: The Donjon card. If a donjon area is available, the caster and associates are transported there. The area should be tagged X0_DECK_DONJON1. The starting location should be tagged X0_DECK_START. See the Gauntlet area in module 3 of XP1 as an example. (This is a good model to use if you want to create a "Keep" or "Void" type card for your own module.) |
DoFoolDeckCard | NEGATIVE CARD: The Fool card. Lose 10,000 XP and get 2 extra cards. |
DoFountainDeckCard | POSITIVE CARD: The Fountain card. All of caster's items are recharged and all stacked items are filled up to the maximum possible number. |
DoHatchlingDeckCard | POSITIVE CARD: The Hatchling card. A wyrmling of alignment-appropriate color appears and follows the caster as a summoned creature until damaged, at which point it transforms into an adult dragon and fights on the caster's behalf until all enemies are slain, then vanishes. |
DoHatchlingDeckCardEffect | Internal function. Used to create the hatchling-summoning object. |
DoHatchlingDeckCardRecord | Internal function. Used to record the hatchling object. |
DoHatchlingDeckCardSummon | Internal function. Assigned to the caster as an action to cause them to summon the hatchling. |
DoHoardDeckCard | POSITIVE CARD: The Hoard card. Gain 50-100,000 gold instantly |
DoJokerDeckCard | POSITIVE CARD: The Joker card. Gain 10,000 XP and get 2 extra cards. |
DoKnaveDeckCard | NEGATIVE CARD: The Knave card. All non-plot possessions not currently equipped are destroyed. |
DoLookingGlassDeckCard | NEGATIVE CARD: The Looking Glass card. Caster's henchman is replaced with an evil doppelganger. |
DoLookingGlassDeckCardEffect | Internal function. Run the actual henchman change after a delay. |
DoOracleDeckCard | POSITIVE CARD: The Oracle card. Gain permanent premonition effect for duration of the module |
DoPlagueDeckCard | NEGATIVE CARD: The Plague card. Permanent disease effect applied for duration of the module. |
DoPlagueDeckCardEffect | Internal function. Used to apply the initial plague effect. |
DoSpecialAreaDeckCard | Get a special area and transport the caster (with associates but without party members) to the X0_DECK_START waypoint inside it. |
DoTraitorDeckCard | NEGATIVE CARD: The Traitor card. Change to diametrically-opposed alignment instantly. |
DoWyrmDeckCard | NEGATIVE CARD: The Wyrm card. A hostile ancient dragon is lured to the caster. |
DoWyrmDeckCardEffect | Internal function. Run the actual wyrm summon after a delay. |
GetHasUsedDeck | Check if the deck has been used before by this creature. |
GetNumberDeckDraws | Get the number of draws remaining. |
GetSpecialAreaForDeckCard | Get a special deck-specific area if it exists and is available. This will start by checking for an area with just the given area tag. If that doesn't exist or is taken, it will start looking for areas tagged sAreaTag + number, until it finds one that is available. X0_DECK_DONJON1, X0_DECK_DONJON2, etc. |
SetHasUsedDeck | Mark that the deck has been used by this creature. |
SetNumberDeckDraws | Set the number of draws remaining. |
author: Mistress