Aantioch_Infernum/_module/nss/dead_magic_enter.nss

40 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

2023-08-08 16:22:17 -04:00
void main()
{
object oPC = GetEnteringObject();
effect eFail = SupernaturalEffect(EffectSpellFailure());
effect eVis = EffectVisualEffect(VFX_IMP_KNOCK);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eFail, oPC);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis, oPC);
AssignCommand(oPC, PlaySound("sce_negative"));
effect eEffect = GetFirstEffect(oPC);
while(GetIsEffectValid(eEffect))
{
if (GetEffectType(eEffect)== EFFECT_TYPE_ABILITY_INCREASE ||
GetEffectType(eEffect)== EFFECT_TYPE_AC_INCREASE ||
GetEffectType(eEffect)== EFFECT_TYPE_DAMAGE_REDUCTION ||
GetEffectType(eEffect)== EFFECT_TYPE_DAMAGE_RESISTANCE ||
GetEffectType(eEffect)== EFFECT_TYPE_ELEMENTALSHIELD ||
GetEffectType(eEffect)== EFFECT_TYPE_HASTE ||
GetEffectType(eEffect)== EFFECT_TYPE_SAVING_THROW_INCREASE ||
GetEffectType(eEffect)== EFFECT_TYPE_SEEINVISIBLE ||
GetEffectType(eEffect)== EFFECT_TYPE_SKILL_INCREASE ||
GetEffectType(eEffect)== EFFECT_TYPE_SPELL_IMMUNITY ||
GetEffectType(eEffect)== EFFECT_TYPE_IMPROVEDINVISIBILITY ||
GetEffectType(eEffect)== EFFECT_TYPE_INVISIBILITY ||
GetEffectType(eEffect)== EFFECT_TYPE_SPELL_RESISTANCE_INCREASE ||
GetEffectType(eEffect)== EFFECT_TYPE_SPELLLEVELABSORPTION ||
GetEffectType(eEffect)== EFFECT_TYPE_TEMPORARY_HITPOINTS ||
GetEffectType(eEffect)== EFFECT_TYPE_TRUESEEING ||
GetEffectType(eEffect)== EFFECT_TYPE_POLYMORPH ||
GetEffectType(eEffect)== EFFECT_TYPE_IMMUNITY ||
GetEffectType(eEffect)== EFFECT_TYPE_DAMAGE_IMMUNITY_INCREASE)
{
RemoveEffect(oPC, eEffect);
}
eEffect = GetNextEffect(oPC);
}
}