This function has specific usefulness within a BlobbieScript used to implement a spell. The function makes particular use of variables pre-defined for spell BlobbieScripts and is provided to mimic behaviour present in the MUD's C source code as provided via #defined MACROS.
This function should only exist within the loop over the spell's @targets. It will use the value of @spellId defined in the calling script to determine if the spell being invoked is an offensive spell. If the spell is offensive then it will verify that the spell is allowed to be cast by @actor upon @target. If the spell is NOT allowed, then this function will output the standard disallowed message and jump to the next iteration of the @targets loop.
Example:
protect { foreach( @targets as @target ) { %spellRoutineCheckAllowedTarget( @actor, @target )
// Spell does something if target is allowed. } endforeach } endprotect |