Beispiel #1
0
        private void ApplySanctuaryEffects(NWPlayer oPC)
        {
            if (!oPC.IsPlayer)
            {
                return;
            }
            if (oPC.CurrentHP <= 0)
            {
                return;
            }
            if (oPC.Area.Tag == "ooc_area")
            {
                return;
            }

            Effect sanctuary = _.EffectSanctuary(99);
            Effect dr        = _.EffectDamageReduction(50, DAMAGE_POWER_PLUS_TWENTY);

            sanctuary = _.TagEffect(sanctuary, "AREA_ENTRY_SANCTUARY");
            dr        = _.TagEffect(dr, "AREA_ENTRY_DAMAGE_REDUCTION");

            _.ApplyEffectToObject(DURATION_TYPE_PERMANENT, sanctuary, oPC.Object);
            _.ApplyEffectToObject(DURATION_TYPE_PERMANENT, dr, oPC.Object);
            Location location = oPC.Location;

            oPC.DelayCommand(() =>
            {
                CheckForMovement(oPC, location);
            }, 3.5f);
        }