28 lines
945 B
Plaintext
28 lines
945 B
Plaintext
|
void main()
|
||
|
{
|
||
|
object oVamp = GetNearestObjectByTag(GetLocalString(OBJECT_SELF, "NW_L_MYCREATOR"),OBJECT_SELF);
|
||
|
int iVampHealth = GetMaxHitPoints(oVamp);
|
||
|
effect eDamage = EffectDamage((iVampHealth/2),DAMAGE_TYPE_MAGICAL,DAMAGE_POWER_PLUS_TWENTY);
|
||
|
|
||
|
//Remove effects from the "sleeping vamp" and wake him up with 1/2 hit points
|
||
|
effect eLoop=GetFirstEffect(oVamp);
|
||
|
while (GetIsEffectValid(eLoop))
|
||
|
{
|
||
|
if (GetEffectType(eLoop)==EFFECT_TYPE_CUTSCENE_PARALYZE)
|
||
|
RemoveEffect(oVamp, eLoop);
|
||
|
if (GetEffectType(eLoop)==EFFECT_TYPE_DAMAGE_REDUCTION)
|
||
|
RemoveEffect(oVamp, eLoop);
|
||
|
if (GetEffectType(eLoop)==EFFECT_TYPE_IMMUNITY)
|
||
|
RemoveEffect(oVamp, eLoop);
|
||
|
if (GetEffectType(eLoop)==EFFECT_TYPE_VISUALEFFECT)
|
||
|
RemoveEffect(oVamp, eLoop);
|
||
|
if (GetEffectType(eLoop)==EFFECT_TYPE_ETHEREAL)
|
||
|
RemoveEffect(oVamp, eLoop);
|
||
|
|
||
|
eLoop=GetNextEffect(oVamp);
|
||
|
}
|
||
|
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oVamp);
|
||
|
|
||
|
}
|