public void Target(Mobile from, Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                // Seems like this should be responsibility of the targetting system.  --daleron
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
                goto Return;
            }

            if (!CheckSequence())
            {
                goto Return;
            }

            var c = m as BaseCreature;

            if (c == null)
            {
                Caster.SendMessage("You cannot sacrifice that.");
                goto Return;
            }

            if (c.ControlMaster != Caster)
            {
                Caster.SendMessage("You cannot sacrifice a creature that does not obey you.");
                goto Return;
            }

            if (c.Summoned)
            {
                Caster.SendMessage("There is not enough life there to sacrifice.");
            }


            Caster.BoltEffect(0);
            Caster.PlaySound(0x207);

            var dmg = c.Hits * SpellHelper.GetEffectiveness(Caster);

            dmg = ZuluUtil.RandomGaussian(dmg, dmg / 4);

            foreach (var target in Caster.Map.GetMobilesInRange(Caster.Location, 4))
            {
                if (!Caster.CanSee(target))
                {
                    continue;
                }

                Caster.DoHarmful(target);
                target.Damage((int)dmg, Caster /*, ElementalType.Necro*/);
            }

Return:
            FinishSequence();
        }
Beispiel #2
0
        public static bool Run(Mobile Attacker, Mobile Defender, BaseWeapon Weapon, ref int BaseDamage)
        {
            Effects.SendLocationParticles(EffectItem.Create(Defender.Location, Defender.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042);
            Effects.PlaySound(Defender, Defender.Map, 0x201);

            bool Summoned = false;

            if (Defender is BaseCreature)
            {
                BaseCreature Creature = Defender as BaseCreature;
                Summoned = Creature.Summoned;
                if (Summoned)
                {
                    if (Attacker.NetState != null)
                    {
                        Attacker.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x03B2, true,
                                                        "Your weapon causes the creature to dissipate on impact!", Attacker.NetState);
                    }

                    Creature.Delete();
                    return(true);
                }
            }

            ZuluUtil.WipeMods(Defender);

            Defender.Mana = 0;

            if (Weapon.DamageLevel == WeaponDamageLevel.Regular)
            {
                BaseDamage += ZuluCombat.GetDamageLevel(WeaponDamageLevel.Devastation);
            }



            return(true);
        }