Beispiel #1
0
        public override void MoveToWorld(Point3D newLocation, Map map)
        {
            base.MoveToWorld(newLocation, map);

            /* Create the rabbits */
            Point3D pt            = newLocation,
                    jackrabbitpos = new Point3D();

            int i;

            for (i = 0; i < 5; i++)
            {
                jackrabbitpos.X = pt.X + Utility.Random(6) - 3;
                jackrabbitpos.Y = pt.Y + Utility.Random(6) - 3;
                jackrabbitpos.Z = pt.Z;

                BriansJackRabbit bjr = new BriansJackRabbit();
                bjr.Home      = pt;
                bjr.RangeHome = 4;
                bjr.MoveToWorld(jackrabbitpos, Map.Trammel);
            }
        }
Beispiel #2
0
        public override void OnDeath(Container c)
        {
            Mobile       m  = this.FindMostRecentDamager(false);
            PlayerMobile pm = null;

            if (m is PlayerMobile)
            {
                pm = m as PlayerMobile;
            }
            else if (m is BaseCreature)
            {
                BaseCreature bc = m as BaseCreature;

                if (bc.Controlled == true)
                {
                    pm = bc.ControlMaster as PlayerMobile;
                }
            }

            if (pm != null)
            {
                BriansJackRabbit newJackRabbit = new BriansJackRabbit();

                Point3D nrpos = this.Home;
                newJackRabbit.Home      = this.Home;
                newJackRabbit.RangeHome = this.RangeHome;

                nrpos.X += Utility.Random(this.RangeHome) - 2 * this.RangeHome;
                nrpos.Y += Utility.Random(this.RangeHome) - 2 * this.RangeHome;


                newJackRabbit.MoveToWorld(nrpos, Map.Trammel);

                pm.Say("You can't believe, another JackRabbit just appeared");
            }

            base.OnDeath(c);
        }