PRC8_fork/trunk/spells/x0_s1_petrbreath.nss
Jaysyn904 6a6a8d56ac Update for PRC 4.1.10a 2023/02/20
Update for PRC 4.1.10a 2023/02/20

+ Jaysyn's latest PnP changes.
2023-02-20 19:23:13 -05:00

51 lines
1.5 KiB
Plaintext

//::///////////////////////////////////////////////////
//:: X0_S1_PETRBREATH
//:: Petrification breath monster ability.
//:: Fortitude save (DC 17) or be turned to stone permanently.
//:: This will be changed to a temporary effect.
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 11/14/2002
//::///////////////////////////////////////////////////
#include "prc_inc_spells"
void main()
{
object oTarget = PRCGetSpellTargetObject();
int nHitDice = GetHitDice(OBJECT_SELF);
effect eImmune = EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE);
location lTargetLocation = PRCGetSpellTargetLocation();
//Get first target in spell area
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE);
while(GetIsObjectValid(oTarget))
{
float fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
int nSpellID = GetSpellId();
//:: Check for Immunity to Petrification
int bImmune = GetHasFeat(FEAT_IMMUNE_PETRIFICATION, oTarget);
object oSelf = OBJECT_SELF;
if (bImmune)
{
SendMessageToPC(OBJECT_SELF, "This creatrure is immune to petrification");
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImmune, oTarget);
return;
}
else
{
DelayCommand(fDelay, PRCDoPetrification(nHitDice, oSelf, oTarget, nSpellID, 17));
}
//Get next target in spell area
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE);
}
}