DotP 2014: Characteristics Functions
This mod allows the coding of cards that would normally require the granting of abilities to be granted by another ability such as granting Undying or Persist to cards other than the originating card.
Requirements
Installation
Just drop the wad into the DotP 2014 game directory and you're done.
Items Included
Cards
- RSN_TOKEN_CHARACTERISTIC_MANAGER
Constants - RSN_FAKE_CHARACTERISTICS.LOL
- RSN_CHARACTERISTIC_PERSIST = 8192000
- RSN_CHARACTERISTIC_UNDYING = 8192001
- RSN_REGISTER_CHARACTERISTIC_CHEST = 8192007
Functions - RSN_FAKE_CHARACTERISTICS.LOL
- RSN_Characteristics_Clear()
- RSN_Characteristics_CreateManagers( ... )
- RSN_Characteristics_Get( oCard, nCharacteristic )
- RSN_Characteristics_GetInt( oCard, nCharacteristic )
- RSN_Characteristics_Set( oCard, nCharacteristic, bSet )
RSN_Characteristics_Clear
This function is used by the Characteristics Manager to clear all the fake characteristics on all cards in all zones. There should be no need for this function to be used by anything else (even the Ability Managers don't need this function).
Parameters: None.
Returns: None.
Usage Example:
<STATIC_ABILITY> <CONTINUOUS_ACTION layer="0"> RSN_Characteristics_Clear() </CONTINUOUS_ACTION> </STATIC_ABILITY>
RSN_Characteristics_CreateManagers
This function is used to create the characteristic and ability managers to handle the characteristic functions.
Parameters:
- ... - This is a comma delimited list of token strings to create.
Returns: None.
Usage Examples:
<TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_LIBRARY"> <TRIGGER value="BEGINNING_OF_STEP"> return ((MTG():GetStep() == STEP_UPKEEP) and (MTG():GetTurnNumber() == 0)) </TRIGGER> <RESOLUTION_TIME_ACTION> RSN_Characteristics_CreateManagers() </RESOLUTION_TIME_ACTION> </TRIGGERED_ABILITY>
RSN_Characteristics_CreateManagers( "TOKEN_MY_ABILITY_MANAGER" )
RSN_Characteristics_CreateManagers( "TOKEN_MY_ABILITY_MANAGER", "TOKEN_ANOTHER_MANAGER", "TOKEN_YET_ANOTHER_MANAGER" )
RSN_Characteristics_Get
This function returns true or false as to whether the characteristic is set or not.
Parameters:
- oCard - Card object to check the characteristic on.
- nCharacteristic - The fake characteristic to check (numeric).
Returns:
- true - Characteristic is set on card.
- false - All other cases.
Usage Example:
if (RSN_Characteristics_Get( TriggerObject(), RSN_CHARACTERISTIC_UNDYING )) then -- Do something end
RSN_Characteristics_GetInt
This function will return the actual integer used to set a characteristic.
Parameters:
- oCard - Card Object to check for the characteristic value.
- nCharacteristic - The fake characteristic to check (numeric).
Returns:
- 0 - Default return in case characteristic is not set or was set as 0 or false.
- 1 - Characteristic was set to 1 or true.
- Integer - Characteristic was set to this value.
Usage Example:
local nUndying = RSN_Characteristics_GetInt( EffectSource(), RSN_CHARACTERISTIC_UNDYING )
RSN_Characteristics_Set
This function is used to set a fake characteristic onto a card.
Parameters:
- oCard - Card Object to set the fake characteristic on.
- nCharacteristic - The fake characteristic to set (numeric).
- bSet - Either a boolean (true/false) or an integer (0 or greater) as to whether the characteristic should be set (false or 0 clears).
Returns: None.
Usage Example:
<STATIC_ABILITY resource_id="1"> <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Undying]]></LOCALISED_TEXT> <CONTINUOUS_ACTION layer="6"> RSN_Characteristics_Set( EffectSource(), RSN_CHARACTERISTIC_UNDYING, 1 ) </CONTINUOUS_ACTION> </STATIC_ABILITY>