Aschbourne_PRC8/_module/nss/shrine_defile.nss
Jaysyn904 f5ffe7d0b9 Module commit
Module commit.
2024-06-14 10:48:20 -04:00

27 lines
906 B
Plaintext

void main()
{
// Get the stored target
object oShrine = OBJECT_SELF;
object oPC = GetLastUsedBy();
if (!GetIsObjectValid(oPC))
return;
// curse the player
effect eCurse = EffectSpellFailure(33,SPELL_SCHOOL_GENERAL);
effect eCurse2 = EffectAbilityDecrease(ABILITY_STRENGTH,4);
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
//Link the visual and the damage reduction effect
//delayed to ensure praying has finished
effect eLink = EffectLinkEffects(eCurse, eVis);
effect eLink2 = EffectLinkEffects(eLink, eCurse2);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink2, oPC);
//Visual effect of the blessing being received
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_IMPLOSION),oPC);
//Remove the plot flag from the altar so it can now
//be destroyed
SetPlotFlag(oShrine,FALSE);
}