Files
PRC8/nwn/nwnprc/trunk/spells/nw_s1_bltdisese.nss
Jaysyn904 68ca3a56ca 2026/01/22 Update 2
Mechanatrixes always fail saves vs elecricity.
Incorporated most creature ability scripts into the PRC8 & updated them to use PRCEffect(), SPApplyEffectToObject(), etc.
Updated prc_inc_breath to use PRCEffectDamage()
Updated several spell scripts to use PRCEffectDamage().
2026-01-23 00:03:47 -05:00

69 lines
2.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Bolt: Disease
//:: NW_S1_BltDisease
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creature must make a ranged touch attack to infect
the target with a disease. The disease used
is chosen based upon the racial type of the
caster.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 11 , 2001
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
//:://////////////////////////////////////////////
#include "prc_inc_spells"
#include "prc_inc_sp_tch"
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
object oTarget = PRCGetSpellTargetObject();
int nRacial = GetRacialType(OBJECT_SELF);
int nDisease;
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_DISEASE));
//Here we use the racial type of the attacker to select an
//appropriate disease.
switch (nRacial)
{
case RACIAL_TYPE_VERMIN:
nDisease = DISEASE_VERMIN_MADNESS;
break;
case RACIAL_TYPE_UNDEAD:
nDisease = DISEASE_FILTH_FEVER;
break;
case RACIAL_TYPE_OUTSIDER:
if(GetTag(OBJECT_SELF) == "NW_SLAADRED")
{
nDisease = DISEASE_RED_SLAAD_EGGS;
}
else
{
nDisease = DISEASE_DEMON_FEVER;
}
break;
case RACIAL_TYPE_MAGICAL_BEAST:
nDisease = DISEASE_SOLDIER_SHAKES;
break;
case RACIAL_TYPE_ABERRATION:
nDisease = DISEASE_BLINDING_SICKNESS;
break;
default:
nDisease = DISEASE_SOLDIER_SHAKES;
break;
}
//Assign effect and chosen disease
effect eBolt = EffectDisease(nDisease);
//Make the ranged touch attack.
if (PRCDoRangedTouchAttack(oTarget))
{
//Apply the VFX impact and effects
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget);
}
}