The GetMetaMagicFeat()
NWScript command returns the type of metamagic that was applied by the caller to the last spell he or she cast.
The auto-metamagic feats (e.g. automatic still spell) are ignored by this command.
Definition[]
int GetMetaMagicFeat (
)
The return value is a METAMAGIC_* constant. Although the METAMAGIC_* constants form a bit field, it is not necessary to treat the return value as a bit field since only one value can ever be returned. (That is, one can test for equality with a specific constant, rather than needing to use a bitwise-and.)
Bugs[]
The return value of GetMetaMagicFeat()
is not reset when a spell is cast from an item. Thus, for example, a spell cast from a scroll can be empowered by casting an empowered spell immediately before using the scroll. A spell script could work around this bug by checking to see if the spell was cast from an item before checking for the use of metamagic.