Beispiel #1
0
        public static void DDCharmMonster(Mobile from, Mobile target)
        {
            if (target == null)
            {
                return;
            }
            else if (BlueSpell.SavingThrow(target, DDSave.Will, 20))
            {
                target.SendMessage("You makes a successful save against a spell");
                return;
            }

            target.SendMessage("You failed your save verses Charm!");

            LichLord clone = new LichLord();

            Ability.MimicThem(clone, target, true, true);
            clone.Hidden = true;
            clone.MoveToWorld(target.Location, target.Map);

            if (target is PlayerMobile)
            {
                target.Kill();

                if (!AutoLifeSpell.HasAutoLife((PlayerMobile)target) && from.Map == Map.Ilshenar)
                {
                    target.MoveToWorld(new Point3D(1704, 591, 9), Map.Ilshenar);
                    target.SendMessage(33, "You have been charmed, a clone of you has taken your place and you have been moved to outside the cave.");

                    if (target.Corpse != null && target.Backpack != null)
                    {
                        List <Item> items = new List <Item>(target.Corpse.Items);

                        for (int i = 0; i < items.Count; ++i)
                        {
                            Item item = items[i];

                            if (item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Movable)
                            {
                                target.Backpack.DropItem(item);
                            }
                        }
                    }
                }
            }
            else if (target is BaseCreature && ((BaseCreature)target).Controlled)
            {
                target.Kill();

                if (target == null)
                {
                    return;
                }

                target.Freeze(TimeSpan.FromSeconds(180));
                ((BaseCreature)target).ControlOrder = OrderType.Stop;
                target.Hidden = true;
            }
        }
Beispiel #2
0
        public static void DDTelekinesis(Mobile from, Mobile target)
        {
            if (target == null)
            {
                return;
            }
            else if (BlueSpell.SavingThrow(target, DDSave.Fort, 30))
            {
                target.SendMessage("You makes a successful save against a spell");
                return;
            }

            target.SendMessage("You failed your save verses Telekinesis!");
            Ability.SlideAway(target, from.Location, Utility.RandomMinMax(6, 12));
        }
Beispiel #3
0
        public static void DDSlow(Mobile from, Mobile target)
        {
            if (target == null)
            {
                return;
            }
            else if (BlueSpell.SavingThrow(target, DDSave.Fort, 30))
            {
                target.SendMessage("You makes a successful save against a spell");
                return;
            }

            target.SendMessage("You failed your save verses Slow!");
            Slow.SlowWalk(target, 60);
        }
Beispiel #4
0
        public static void DDFleshToStone(Mobile from, Mobile target)
        {
            if (target == null)
            {
                return;
            }
            else if (BlueSpell.SavingThrow(target, DDSave.Fort, 30))
            {
                target.SendMessage("You makes a successful save against a spell");
                return;
            }

            target.SendMessage("You failed your save verses Flesh to Stone!");
            target.SendMessage("[And nothing happens, till I finish this. ~Peo]");
        }
Beispiel #5
0
        public static void DDFingerOfDeath(Mobile from, Mobile target)
        {
            if (target == null)
            {
                return;
            }
            else if (BlueSpell.SavingThrow(target, DDSave.Fort, 30))
            {
                target.SendMessage("You makes a successful save against a spell");
                return;
            }

            target.SendMessage("You failed your save verses Finger Of Death!");
            target.Kill();
        }
Beispiel #6
0
        public static void DDFear(Mobile from, Mobile target)
        {
            if (target == null)
            {
                return;
            }
            else if (BlueSpell.SavingThrow(target, DDSave.Will, 30))
            {
                target.SendMessage("You makes a successful save against a spell");
                return;
            }

            target.SendMessage("You are too afraid to move!");
            target.Freeze(TimeSpan.FromSeconds(30));
        }
Beispiel #7
0
        public static void DDSleep(Mobile from, Mobile target)
        {
            if (target == null)
            {
                return;
            }
            else if (BlueSpell.SavingThrow(target, DDSave.Fort, 30))
            {
                target.SendMessage("You makes a successful save against a spell");
                return;
            }

            target.SendMessage("You failed your save verses Sleep!");
            // TODO use the new SA method of sleep (prevents spellcasting).
            target.Paralyze(TimeSpan.FromSeconds(30));
        }
Beispiel #8
0
        public static void DDInflictModerateWounds(Mobile from, Mobile target)
        {
            if (target == null)
            {
                return;
            }

            int damage = Utility.Dice(2, 8, 10);

            if (BlueSpell.SavingThrow(target, DDSave.Will, 30))
            {
                damage /= 2;
            }

            AOS.Damage(target, from, damage, 0, 0, 0, 0, 100);
        }
Beispiel #9
0
 public static void DDDisintegrate(Mobile from, Mobile target)
 {
     if (target == null)
     {
         return;
     }
     else if (BlueSpell.SavingThrow(target, DDSave.Fort, 30))
     {
         target.SendMessage("You makes a successful save against a spell");
         AOS.Damage(target, from, Utility.Dice(5, 6, 0), 20, 20, 20, 20, 20);
     }
     else
     {
         target.SendMessage("You failed your save verses Disintegrate!");
         AOS.Damage(target, from, Utility.Dice(40, 6, 0), 20, 20, 20, 20, 20);
     }
 }
        // List<Mobile> list = BlueMonster.GetNearbyMobiles( this, 3, true );
        public static List <Mobile> GetNearbyMobiles(Mobile from, int range, bool harm)
        {
            List <Mobile> list = new List <Mobile>();

            foreach (Mobile m in from.GetMobilesInRange(range))
            {
                if (harm && from == m)
                {
                    continue;
                }
                else if (m != null && BlueSpell.CanTarget(from, m, true))
                {
                    list.Add(m);
                }
            }

            return(list);
        }
Beispiel #11
0
        public static void MustardBomb(Mobile from, Mobile to)
        {
            if (!Ability.CanUse(to, from, true))
            {
                return;
            }

            Point3D point = to.Location;

            for (int i = -3; i < 4; i++)
            {
                for (int j = -3; j < 4; j++)
                {
                    point = new Point3D(to.X + i, to.Y + j, to.Z);

                    if (BlueSpell.GetDist(point, to.Location) < 3.1)
                    {
                        Effects.SendLocationEffect(point, to.Map, 0x3728, 13, 1283 /*Hue*/, 4);
                    }
                }
            }

            ResistanceMod[] mods = new ResistanceMod[] { new ResistanceMod(ResistanceType.Fire, -300),
                                                         new ResistanceMod(ResistanceType.Cold, -300) };

            for (int i = 0; i < mods.Length; ++i)
            {
                to.AddResistanceMod(mods[i]);
            }

            TimedResistanceMod.AddMod(
                to,
                "Mustard Bomb",
                mods,
                TimeSpan.FromSeconds(60)
                );

            to.AddSkillMod(new TimedSkillMod(SkillName.MagicResist, true, -120.0, TimeSpan.FromSeconds(60)));

            to.SendMessage("The intense heat scalds your elemental resistance.");
        }