Exemple #1
0
        public void SpawnDragon(Mobile target)
        {
            int drag = 0;

            foreach (Mobile m in this.GetMobilesInRange(20))
            {
                if (m is Dragon)
                {
                    ++drag;
                }
            }

            if (drag < 5)
            {
                BaseCreature dragon = new Dragon();

                Map map = target.Map;

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

                for (int j = 0; !validLocation && j < 10; ++j)
                {
                    int x = this.X + 5;
                    int y = this.Y + 5;
                    int z = map.GetAverageZ(x, y);
                }

                dragon.MoveToWorld(loc, map);
            }
        }
		public void SpawnDragon( Mobile target )
		{
			int drag = 0;

			foreach ( Mobile m in this.GetMobilesInRange( 20 ) )
			{
				if ( m is Dragon )
					++drag;
			}

			if ( drag < 5 )
			{
			BaseCreature dragon = new Dragon();

			Map map = target.Map;

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

			for ( int j = 0; !validLocation && j < 10; ++j )
			{
				int x = this.X + 5;
				int y = this.Y + 5;
				int z = map.GetAverageZ( x, y );
			}

			dragon.MoveToWorld( loc, map );
		}
		}
        public int Move(PlayerMobile from)
        {
            if (drag == null || drag.Deleted)
            {
                drag = new Dragon();
                drag.Frozen = true;
                drag.Blessed = true;
                drag.Direction = from.Direction;
                drag.MoveToWorld(from.Location, from.Map);
            }
            drag.Direction = from.Direction;
            switch (from.Direction)
            {
                case Direction.North:
                    drag.X = from.X - 1;
                    drag.Y = from.Y - 1;
                    return drag.Z + NorthZ;
                    break;
                case Direction.Right:
                    drag.X = from.X;
                    drag.Y = from.Y - 1;
                    return drag.Z + RightZ;
                    break;
                case Direction.East:
                    drag.X = from.X;
                    drag.Y = from.Y;
                    return drag.Z + EastZ;
                    break;
                case Direction.Down:
                    drag.X = from.X;
                    drag.Y = from.Y;
                    return drag.Z + DownZ;
                    break;
                case Direction.South:
                    drag.X = from.X;
                    drag.Y = from.Y;
                    return drag.Z + SouthZ;
                    break;
                case Direction.Left:
                    drag.X = from.X - 1;
                    drag.Y = from.Y;
                    return drag.Z + LeftZ;
                    break;
                case Direction.West:
                    drag.X = from.X - 1;
                    drag.Y = from.Y - 1;
                    return drag.Z + WestZ;
                    break;
                case Direction.Up:
                    drag.X = from.X - 1;
                    drag.Y = from.Y - 1;
                    return drag.Z + EastZ;
                    break;
                default:
                    return 0;
                    break;
            }

        }
Exemple #4
0
        public void SpawnDragons( Mobile target )
        {
            Map map = this.Map;
            if( map == null )
                return;

            int newDragons = Utility.RandomMinMax( 1, 2 );

            for( int i = 0; i < newDragons; ++i )
            {
                switch( Utility.Random( 3 ) )
                {
                    default:
                    case 0:
                        {
                            Dragon dragon = new Dragon();

                            dragon.Team = this.Team;
                            dragon.FightMode = this.FightMode;

                            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 );
                            }

                            dragon.MoveToWorld( loc, map );
                            dragon.Combatant = target;

                            break;
                        }
                    case 1:
                        {
                            IronDragon idragon = new IronDragon();

                            idragon.Team = this.Team;
                            idragon.FightMode = this.FightMode;

                            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 );
                            }

                            idragon.MoveToWorld( loc, map );
                            idragon.Combatant = target;

                            break;
                        }
                    case 2:
                        {
                            GreenDiamondDragon gdragon = new GreenDiamondDragon();

                            gdragon.Team = this.Team;
                            gdragon.FightMode = this.FightMode;

                            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 );
                            }

                            gdragon.MoveToWorld( loc, map );
                            gdragon.Combatant = target;

                            break;
                        }
                }
            }
        }
        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 #6
0
        public void SpawnDragons(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int newDragons = Utility.RandomMinMax(1, 2);

            for (int i = 0; i < newDragons; ++i)
            {
                switch (Utility.Random(3))
                {
                default:
                case 0:
                {
                    Dragon dragon = new Dragon();

                    dragon.Team      = this.Team;
                    dragon.FightMode = this.FightMode;

                    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);
                        }
                    }

                    dragon.MoveToWorld(loc, map);
                    dragon.Combatant = target;

                    break;
                }

                case 1:
                {
                    IronDragon idragon = new IronDragon();

                    idragon.Team      = this.Team;
                    idragon.FightMode = this.FightMode;

                    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);
                        }
                    }

                    idragon.MoveToWorld(loc, map);
                    idragon.Combatant = target;

                    break;
                }

                case 2:
                {
                    GreenDiamondDragon gdragon = new GreenDiamondDragon();

                    gdragon.Team      = this.Team;
                    gdragon.FightMode = this.FightMode;

                    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);
                        }
                    }

                    gdragon.MoveToWorld(loc, map);
                    gdragon.Combatant = target;

                    break;
                }
                }
            }
        }
        public override void OnTrigger(object activator, Mobile m)
        {
            if(m == null || Word == null || (RequireIdentification && !m_Identified)) return;

            if(DateTime.Now < m_EndTime) return;

            string msgstr = "Activating the power of " + Word;

            // assign powers to certain words
            switch ( Word )
            {
                case "Shoda":
                    m.AddStatMod( new StatMod( StatType.Int, "Shoda", 20, Duration ) );
                    m.SendMessage("Your mind expands!");
                    break;
                case "Malik":
                    m.AddStatMod( new StatMod( StatType.Str, "Malik", 20, Duration ) );
                    m.SendMessage("Your strength surges!");
                    break;
                case "Lepto":
                    m.AddStatMod( new StatMod( StatType.Dex, "Lepto", 20, Duration ) );
                    m.SendMessage("You are more nimble!");
                    break;
                case "Velas":
                    Timer.DelayCall( TimeSpan.Zero, new TimerStateCallback( Hide_Callback ), new object[]{ m } );
                    m.SendMessage("You disappear!");
                    break;
                case "Tarda":
                    m.AddSkillMod( new TimedSkillMod( SkillName.Tactics, true, 20, Duration ) );
                    m.SendMessage("You are more skillful warrior!");
                    break;
                case "Marda":
                    m.AddSkillMod( new TimedSkillMod( SkillName.Magery, true, 20, Duration ) );
                    m.SendMessage("You are more skillful mage!");
                    break;
                case "Vas Malik":
                    m.AddStatMod( new StatMod( StatType.Str, "Vas Malik", 40, Duration ) );
                    m.SendMessage("You are exceptionally strong!");
                    break;
                case "Nartor":
                    BaseCreature b = new Dragon();
                    b.MoveToWorld(m.Location, m.Map);
                    b.Owners.Add( m );
                    b.SetControlMaster( m );
                    if(b.Controlled)
                        m.SendMessage("You master the beast!");
                    break;
                case "Santor":
                    b = new Horse();
                    b.MoveToWorld(m.Location, m.Map);
                    b.Owners.Add( m );
                    b.SetControlMaster( m );
                    if(b.Controlled)
                        m.SendMessage("You master the beast!");
                    break;
                default:
                    m.SendMessage("There is no effect.");
                    break;
            }

            // display activation effects
            Effects.SendLocationParticles( EffectItem.Create( m.Location, m.Map, EffectItem.DefaultDuration ), 0x3728, 8, 20, 5042 );
            Effects.PlaySound( m, m.Map, 0x201 );

            // display a message over the item it was attached to
            if(AttachedTo is Item )
            {
                ((Item)AttachedTo).PublicOverheadMessage( MessageType.Regular, 0x3B2, true, msgstr );
            }

            Charges--;

            // remove the attachment after the charges run out
            if(Charges == 0)
            {
                Delete();
            }
            else
            {
                m_EndTime = DateTime.Now + Refractory;
            }
        }
 public override void OnDoubleClick(Mobile from)
 {
     base.OnDoubleClick(from);
     drag = new Dragon();
     drag.Frozen = true;
     drag.Blessed = true;
     drag.Direction = from.Direction;
     drag.MoveToWorld(from.Location, from.Map);
 }