Rune_PRC8/_removed/nw_s3_herb.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

58 lines
2.1 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 "f_vampire_h"
void main()
{
int nID = GetSpellId();
// * Belladonna
if (nID == 409)
{
object oTarget = GetSpellTargetObject();
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
// Altered: as a vampire garlic will make you lose all your bonuses for a minute! (ow)
if (nID == 410)
{
object oTarget = GetSpellTargetObject();
effect eAttackBonus = VersusRacialTypeEffect(EffectAttackIncrease(2), RACIAL_TYPE_UNDEAD);
effect eCharisma = EffectAbilityDecrease(ABILITY_CHARISMA, 1);
effect eVisual = EffectVisualEffect(VFX_IMP_AC_BONUS);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVisual, oTarget);
if(GetIsVampire(oTarget))
{
eVisual = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVisual, oTarget, 60.0);
Vampire_Remove_Stats(oTarget);
Vampire_Equipment_Removal(oTarget);
FloatingTextStringOnCreature("The garlic hides your vampiric abilities for a time.", oTarget);
DelayCommand(60.0, Vampire_Apply_Stats(oTarget));
DelayCommand(60.0, Vampire_Equipment_Creation(oTarget));
}
else
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAttackBonus, oTarget, 60.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCharisma, oTarget, 60.0);
}
}
}