Exemplo n.º 1
0
        public override void OnDamagedBySpell(Mobile caster)
        {
            if (this.Map != null && caster != this && 0.10 > Utility.RandomDouble())
            {
                Map map = this.Map;

                if (map == null)
                    return;
                BaseCreature spawn = new FlamingMinion(this);

                spawn.Team = this.Team;
                bool validLocation = false;
                Point3D loc = this.Location;

                for (int j = 0; !validLocation && j < 10; ++j)
                {
                    int x = X + Utility.Random(8) - 1;
                    int y = Y + Utility.Random(8) - 1;
                    int z = map.GetAverageZ(x, y);

                    if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                        loc = new Point3D(x, y, Z);
                    else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                        loc = new Point3D(x, y, z);
                }
                spawn.MoveToWorld(loc, map);
                Effects.SendLocationEffect(loc, map, 0x3709, 30);
                spawn.Combatant = caster;
        
                Say("Come to me my Minions!"); // * Come to me my Minions! *
            }

            base.OnDamagedBySpell(caster);
        }
Exemplo n.º 2
0
        public override void OnGotMeleeAttack(Mobile attacker)
        {
            if (Map != null && attacker != this && 0.20 > Utility.RandomDouble())
            {
                Map map = Map;

                if (map == null)
                {
                    return;
                }
                BaseCreature spawn = new FlamingMinion(this);

                spawn.Team = Team;
                bool    validLocation = false;
                Point3D loc           = Location;

                for (int j = 0; !validLocation && j < 10; ++j)
                {
                    int x = X + Utility.Random(8) - 1;
                    int y = Y + Utility.Random(8) - 1;
                    int z = map.GetAverageZ(x, y);

                    if (validLocation = map.CanFit(x, y, Z, 16, false, false))
                    {
                        loc = new Point3D(x, y, Z);
                    }
                    else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                    {
                        loc = new Point3D(x, y, z);
                    }
                }
                spawn.MoveToWorld(loc, map);
                Effects.SendLocationEffect(loc, map, 0x3709, 30);
                spawn.Combatant = attacker;

                Say("Come to me my Minions!");
            }

            base.OnGotMeleeAttack(attacker);
        }