GetSpellCastSpontaneously()

From NWN Lexicon
Jump to navigationJump to search
Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.

Returns TRUE if the last spell was cast spontaneously.

int GetSpellCastSpontaneously();

Description

Returns TRUE if the last spell was cast spontaneously. eg; a Cleric casting SPELL_CURE_LIGHT_WOUNDS when it is not prepared, using another level 1 slot.


Remarks

You can apply bonuses or penalties when a spell is cast spontaneously, alternatively you can replenish the a spell slot that was used with this information (it'll be the first unreadied slot of the given spell level).


Version

This function was added in 1.87.8193.35 of NWN:EE.

This function was updated in 1.89.8193.37 of NWN:EE. VM: GetMetaMagicFeat, GetLastSpellCastClass, GetSpellCastSpontaneously and GetSpellFeatId are no longer set erroneously with bad data if the AOE was generated in a spell script when using an item.

This function was updated in 1.89.8193.37 of NWN:EE. VM: GetSpellFeatId() and GetSpellCastSpontaneously() now work in Area of Effect scripts.


Example

This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.


See Also



 author: Shadguy