Files
PRC8/nwn/nwnprc/trunk/spells/sp_scrmngfl.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

37 lines
1.5 KiB
Plaintext

/////////////////////////////////////////////////////////////////
// Screaming Flask
// sp_scrmngfl.nss
/////////////////////////////////////////////////////////////////
/*
Screaming Flask: This container is made from thick
leather with a cap sewn on tight and fitted with a ripcord.
Pulling the cord rips open the flask and activates the alchemical
substance within. The flask emits a high-pitched shriek
in a 15-foot cone. Anything in the cone takes ld8 points of
sonic damage and is deafened for 1 minute (Fortitude DC
15 negates). */
#include "prc_inc_spells"
void main()
{
object oPC = OBJECT_SELF;
effect eDeaf = EffectDeaf();
location lLoc = PRCGetSpellTargetLocation();
int nDam;
object oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
while(GetIsObjectValid(oTarget))
{
nDam = d8(1);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_SONIC), oTarget);
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 15, SAVING_THROW_TYPE_SONIC))
{
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, TurnsToSeconds(1));
}
oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 11.0, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
}
}