This action causes the active creature to cast the specified spell at the target object. The spell is applied instantly; no casting animation is played. The spell cannot be interrupted. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. Both actions apply the spell at the lowest casting level (they will even use a level 0 ability if the spell has one, which other actions cannot do) and ignore its projectile (i.e. they use projectile #1|None) - the casting level of the originating creature is ignored. Note that for normal spellcasting the probability dice values for effects are rolled for each spell, whereas spells applied in the same scripting block by ApplySpell use a single dice value. The example script is used to mimic a contingency from "mage18y.bcs".
IF
See(NearestEnemyOf(Myself))
Global("Prep","LOCALS",0)
THEN
RESPONSE #100
ApplySpell(Myself,WIZARD_STONE_SKIN)
ApplySpell(Myself,WIZARD_SPELL_TRAP)
ApplySpell(Myself,WIZARD_MIRROR_IMAGE)
ApplySpell(Myself,WIZARD_SPELL_TURNING)
ApplySpell(Myself,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
ApplySpell(SixthNearestEnemyOf(Myself),WIZARD_MONSTER_SUMMONING_4)
SetGlobal("Prep","LOCALS",1)
END
{% capture note %}
Scripts can handle RES filenames with +, Dialogs and the console cannot. Same with the ~, `, ', @, $, ^, and & characters, maybe some more.
BG2 barrel re-exports.
Generated by ts-update. Do not edit manually.
Uses named re-exports (not export *) so esbuild can statically resolve each binding without falling back to runtime __reExport helpers for externalized .d.ts modules.