20 lines
674 B
Plaintext
20 lines
674 B
Plaintext
// s3_spellreflect - handle reflection of spells...
|
|
#include "prc_inc_spells"
|
|
|
|
void main()
|
|
{
|
|
object oCaster=OBJECT_SELF;
|
|
int nSpell=PRCGetSpellId();
|
|
int bContinue=FALSE;
|
|
object oTarget=PRCGetSpellTargetObject();
|
|
effect eVFX=EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY);
|
|
if (oTarget==oCaster) bContinue=TRUE;
|
|
else
|
|
{ // reflect
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVFX,oTarget,1.5);
|
|
AssignCommand(oTarget,ClearAllActions(TRUE));
|
|
AssignCommand(oTarget,ActionCastSpellAtObject(nSpell,oCaster,METAMAGIC_ANY,TRUE,0,PROJECTILE_PATH_TYPE_DEFAULT,TRUE));
|
|
} // reflect
|
|
SetLocalInt(oCaster,"bWAZOOCONTINUE",bContinue);
|
|
}
|