61 lines
2.2 KiB
Plaintext
61 lines
2.2 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: NW_S3_HERB.nss
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Various herbs to offer bonuses to the player using
|
|
them.
|
|
Belladonna:
|
|
Garlic:
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By:
|
|
//:: Created On:
|
|
//:://////////////////////////////////////////////
|
|
#include "prc_inc_spells"
|
|
|
|
void main()
|
|
{
|
|
int nID = PRCGetSpellId();
|
|
// * Belladonna
|
|
if (nID == 409)
|
|
{
|
|
object oTarget = PRCGetSpellTargetObject();
|
|
effect eVisual = EffectVisualEffect(VFX_IMP_AC_BONUS);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVisual, oTarget);
|
|
effect eACBonus = VersusRacialTypeEffect(EffectACIncrease(5), RACIAL_TYPE_SHAPECHANGER);
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eACBonus, oTarget, 60.0);
|
|
|
|
}
|
|
else
|
|
// * Garlic; protection against Vampires
|
|
// * Lowers charisma
|
|
if (nID == 410)
|
|
{
|
|
object oTarget = PRCGetSpellTargetObject();
|
|
effect eAttackBonus = VersusRacialTypeEffect(EffectAttackIncrease(2), RACIAL_TYPE_UNDEAD);
|
|
effect eCharisma = EffectAbilityDecrease(ABILITY_CHARISMA, 1);
|
|
effect eVisual = EffectVisualEffect(VFX_IMP_AC_BONUS);
|
|
if (!GetLocalInt(oTarget,"nIsVampire"))
|
|
{ // safe to use
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVisual, oTarget);
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAttackBonus, oTarget, 60.0);
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCharisma, oTarget, 60.0);
|
|
} // safe to use
|
|
else
|
|
{ // used on vampire player
|
|
effect eSlow=EffectSlow();
|
|
effect eInt=EffectAbilityDecrease(ABILITY_INTELLIGENCE,2);
|
|
effect eAttack=EffectAttackDecrease(4);
|
|
eVisual=EffectVisualEffect(VFX_IMP_DISEASE_S);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVisual,oTarget,120.0);
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSlow,oTarget,120.0);
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eInt,oTarget,120.0);
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAttack,oTarget,120.0);
|
|
SendMessageToPC(oTarget,"You have been doused with garlic!!");
|
|
} // used on vampire player
|
|
|
|
}
|
|
|
|
}
|