Exemple #1
0
        public void SpawnDireWolves(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
                return;

            int newDireWolves = Utility.RandomMinMax(3, 5);

            for (int i = 0; i < newDireWolves; ++i)
            {
                DireWolf DireWolf = new DireWolf();

                DireWolf.Team = this.Team;
                DireWolf.FightMode = FightMode.Closest;

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

                for (int j = 0; !validLocation && j < 10; ++j)
                {
                    int x = X + Utility.Random(3) - 1;
                    int y = Y + Utility.Random(3) - 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);
                }

                DireWolf.MoveToWorld(loc, map);
                DireWolf.Combatant = target;
            }
        }
Exemple #2
0
        public override void OnGotMeleeAttack(Mobile attacker)
        {
            if (this.Map != null && this.Alive && ((recoverDelay < DateTime.Now && Utility.RandomMinMax(1, 4) == 1) || firstSummoned))
            {
                Map map = this.Map;
                if (map == null)
                {
                    return;
                }
                if (firstSummoned)
                {
                    firstSummoned = false;
                }
                int summonAmount = Utility.RandomMinMax(1, 2);
                for (int k = 0; k < summonAmount; ++k)
                {
                    BaseCreature spawn = new DireWolf();
                    spawn.Team    = this.Team;
                    spawn.Name    = "Dire Wolf";
                    spawn.Tamable = false;
                    bool    validLocation = false;
                    Point3D loc           = this.Location;
                    for (int j = 0; !validLocation && j < 10; ++j)
                    {
                        int x = X + Utility.Random(3) - 1;
                        int y = Y + Utility.Random(3) - 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, 14170, 16);
                    spawn.Combatant = this.Combatant;
                }
                recoverDelay = DateTime.Now + TimeSpan.FromSeconds(30);
            }
        }
Exemple #3
0
        public void SpawnDireWolves(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int newDireWolves = Utility.RandomMinMax(3, 5);

            for (int i = 0; i < newDireWolves; ++i)
            {
                DireWolf DireWolf = new DireWolf();

                DireWolf.Team      = this.Team;
                DireWolf.FightMode = FightMode.Closest;

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

                for (int j = 0; !validLocation && j < 10; ++j)
                {
                    int x = X + Utility.Random(3) - 1;
                    int y = Y + Utility.Random(3) - 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);
                    }
                }

                DireWolf.MoveToWorld(loc, map);
                DireWolf.Combatant = target;
            }
        }
        public override void IncreaseTier()
        {
            base.IncreaseTier();

            List<object> list = new List<object>();
            BaseCreature c;

            // haven't got a clue if levels are OSI
            switch ( this.Tier )
            {
                case 1:
                    c = new Crane();
                    c.MoveToWorld(new Point3D(4500, 1382, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 2:
                    c = new DireWolf();
                    c.MoveToWorld(new Point3D(4494, 1370, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    c = new DireWolf();
                    c.MoveToWorld(new Point3D(4494, 1360, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    c = new WhiteWolf();
                    c.MoveToWorld(new Point3D(4491, 1366, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    c = new WhiteWolf();
                    c.MoveToWorld(new Point3D(4497, 1366, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    c = new GreyWolf();
                    c.MoveToWorld(new Point3D(4497, 1366, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 3:
                    c = new Quagmire();
                    c.MoveToWorld(new Point3D(4483, 1392, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    c = new BogThing();
                    c.MoveToWorld(new Point3D(4486, 1385, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    c = new PlagueBeast();
                    c.MoveToWorld(new Point3D(4486, 1379, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 4:
                    c = new PolarBear();
                    c.MoveToWorld(new Point3D(4513, 1395, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    c = new PolarBear();
                    c.MoveToWorld(new Point3D(4508, 1393, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 5:
                    c = new Yamandon();
                    c.MoveToWorld(new Point3D(4498, 1393, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 6:
                    c = new Changeling();
                    c.MoveToWorld(new Point3D(4518, 1358, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 7:
                    c = new Wyvern();
                    c.MoveToWorld(new Point3D(4512, 1381, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 8:
                    c = new Dragon();
                    c.MoveToWorld(new Point3D(4511, 1372, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    c = new Drake();
                    c.MoveToWorld(new Point3D(4516, 1371, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 9:
                    c = new Reptalon();
                    c.MoveToWorld(new Point3D(4530, 1387, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    break;
                case 10:
                    c = new SilverSteed();
                    c.MoveToWorld(new Point3D(4506, 1358, 23), this.Map);
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add(c);

                    /*
                    c = new Sphynx();
                    c.MoveToWorld( new Point3D( 4506, 1358, 23 ), Map );
                    c.Blessed = true;
                    c.Tamable = false;
                    list.Add( c );*/

                    break;
            }

            if (list.Count > 0)
                this.Tiers.Add(list);
        }
Exemple #5
0
        public override void OnDamagedBySpell(Mobile attacker)
        {
            if (this.Map != null && this.Alive && ((recoverDelay < DateTime.Now && Utility.RandomMinMax(1, 4) == 1) || firstSummoned))
            {
                Map map = this.Map;
                if (map == null)
                    return;
                if (firstSummoned)
                    firstSummoned = false;
                int summonAmount = Utility.RandomMinMax(1, 2);
                for (int k = 0; k < summonAmount; ++k)
                {
                    BaseCreature spawn = new DireWolf();
                    spawn.Team = this.Team;
                    spawn.Name = "Dire Wolf";
                    spawn.Tamable = false;
                    bool validLocation = false;
                    Point3D loc = this.Location;
                    for (int j = 0; !validLocation && j < 10; ++j)
                    {
                        int x = X + Utility.Random(3) - 1;
                        int y = Y + Utility.Random(3) - 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, 14170, 16);
                    spawn.Combatant = this.Combatant;
                }
                recoverDelay = DateTime.Now + TimeSpan.FromSeconds(30);
            }
        }