GetSpallCastSpontaneously()

From NWN Lexicon
Jump to navigationJump to search
Nwnee logo.jpg 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 GetSpallCastSpontaneously();

Description

Returns TRUE if the last spell was cast spontaneously. This function is only used in the Spell Script, using it elsewhere may provide odd results.

eg; a Cleric casting SPELL_CURE_LIGHT_WOUNDS when it is not prepared, using another level 1 slot

Remarks

With this you can more accurately return spell uses back to a caster if they've erroneously cast a spell which needs cancelling. You could also deal with spontaneously cast spells differently, for instance blocking certain ones or making them weaker.


Version

This function was added in 1.86.8193.35 of NWN:EE.


Example

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


See Also

functions:

GetSpellId GetLastSpellCastClass