Exemplo n.º 1
0
 public override void OnAfterStart()
 {
     base.OnAfterStart();
     foreach (Mobile player in Players)
     {
         BombermanBombPlacer placer = new BombermanBombPlacer(player, this);
         player.AddToBackpack(placer);
     }
 }
Exemplo n.º 2
0
		public BombermanBomb( BombermanBombPlacer placer, BombermanGame game ) : base( 0x2256 )
		{
            m_Game = game;
			Movable = false;
			Weight = 1.0;
			Name = "Bomberman bomb";
			Hue = 1;
			
			m_Placer = placer;
			BombTimer m_Timer = new BombTimer( this );
			m_Timer.Start();
		}
Exemplo n.º 3
0
        public BombermanBomb(BombermanBombPlacer placer, BombermanGame game) : base(0x2256)
        {
            m_Game  = game;
            Movable = false;
            Weight  = 1.0;
            Name    = "Bomberman bomb";
            Hue     = 1;

            m_Placer = placer;
            BombTimer m_Timer = new BombTimer(this);

            m_Timer.Start();
        }
Exemplo n.º 4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
                m_Game = reader.ReadItem() as BombermanGame;
                goto case 0;

            case 0:
            {
                m_Placer = reader.ReadItem() as BombermanBombPlacer;

                break;
            }
            }
            BombTimer m_Timer = new BombTimer(this);

            m_Timer.Start();
        }
Exemplo n.º 5
0
        public override bool OnMoveOver(Mobile m)
        {
            if (m_Game != null)
            {
                m_Game.RemoveItemFromGameArea(this);
            }
            Container pack = m.Backpack;

            Item[] placers = pack.FindItemsByType(typeof(BombermanBombPlacer));
            foreach (Item placer in placers)
            {
                if (placer is BombermanBombPlacer)
                {
                    BombermanBombPlacer realPlacer = (BombermanBombPlacer)placer;
                    if (placer != null)
                    {
                        if (Type == BombermanUpgradeType.Strength)
                        {
                            realPlacer.Strength = realPlacer.Strength + 1;
                            m.SendAsciiMessage("Your bombs are now more powerful.");
                        }
                        else if (Type == BombermanUpgradeType.BombAmount)
                        {
                            realPlacer.MaxBombs = realPlacer.MaxBombs + 1;
                            m.SendAsciiMessage("You can now place more bombs at the same time.");
                        }
                        else if (Type == BombermanUpgradeType.SpreadSpeed)
                        {
                            realPlacer.SpreadSpeed -= 0.001f;
                            m.SendAsciiMessage("Your bombs will spread faster.");
                        }
                        else if (Type == BombermanUpgradeType.KickBombPlacer)
                        {
                            BombermanKickBombPlacer kplacer = (BombermanKickBombPlacer)pack.FindItemByType(typeof(BombermanKickBombPlacer));
                            if (kplacer == null)
                            {
                                BombermanKickBombPlacer kickplacer = new BombermanKickBombPlacer(m, m_Game);
                                kickplacer.EventItem   = true;
                                kickplacer.LootType    = LootType.Newbied;
                                kickplacer.Strength    = realPlacer.Strength;
                                kickplacer.MaxBombs    = realPlacer.MaxBombs;
                                kickplacer.SpreadSpeed = realPlacer.SpreadSpeed;

                                m.AddToBackpack(kickplacer);
                                m.SendAsciiMessage("You have received a kickbombplacer. You can now kick bombs over stones.");
                            }
                            else
                            {
                                kplacer.Range += 1;
                                m.SendAsciiMessage("The range of your kickbombplacer has increased.");
                            }
                        }
                    }
                    else
                    {
                        m.SendAsciiMessage("You do not have a Bomberman Bomb Placer in your backpack");
                    }
                }
            }

            Delete();
            return(true);
        }
Exemplo n.º 6
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch ( version )
			{
                case 1:
                    m_Game = reader.ReadItem() as BombermanGame;
                    goto case 0;
				case 0:
				{
					m_Placer = reader.ReadItem() as BombermanBombPlacer;

					break;
				}
            }
            BombTimer m_Timer = new BombTimer(this);
            m_Timer.Start();
		}
Exemplo n.º 7
0
 public override void OnAfterStart()
 {
     base.OnAfterStart();
     foreach (Mobile player in Players)
     {
         BombermanBombPlacer placer = new BombermanBombPlacer(player, this);
         player.AddToBackpack(placer);
     }
 }