Module commit
Module commit.
This commit is contained in:
27
_module/nss/vamp_domination.nss
Normal file
27
_module/nss/vamp_domination.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
// Vampire domination ability
|
||||
void vamp_domination(object oPC, object oTarget)
|
||||
{
|
||||
if (GetIsImmune(oTarget,IMMUNITY_TYPE_DOMINATE)==FALSE)
|
||||
{
|
||||
// Create and link effects.
|
||||
effect eDominated = EffectDominated();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eMind, eDominated);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
// Duration and spell DC
|
||||
int iDuration = 12;
|
||||
int SpellDC = 10 + (GetHitDice(oPC)/2)+GetAbilityModifier(ABILITY_CHARISMA,oPC);
|
||||
|
||||
// Make spell save.
|
||||
int Save = WillSave(oTarget,SpellDC,SAVING_THROW_TYPE_MIND_SPELLS,oPC);
|
||||
// If will save failed.
|
||||
if (Save == 0 )
|
||||
{
|
||||
// Target is dominated.
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget,RoundsToSeconds(iDuration));
|
||||
}
|
||||
}
|
||||
else SendMessageToPC(oPC, "Target is immune to domination.");
|
||||
}
|
||||
Reference in New Issue
Block a user