Esempio n. 1
0
 private void DamageTimer_Tick(object sender, EventArgs e)
 {
     if (gameover == true)
     {
         DamageTimer.Stop();
         DamageTimer.Enabled = false;
         return;
     }
     foreach (Control x in this.Controls)
     {
         if (boss1.Hp > 0)
         {
             if (x is PictureBox && x.Tag == "bullet")
             {
                 if (((PictureBox)x).Bounds.IntersectsWith(this.boss1.boss.Bounds) && this.boss1.Hp > 0)
                 {
                     this.Bhit.Text     = "-10";
                     this.Bhit.Location = new Point(this.boss1.boss.Location.X - 30, this.boss1.boss.Location.Y - 50);
                     this.Controls.Add(Bhit);
                     this.Bhit.Visible = true;
                     this.Bhit.BringToFront();
                     this.boss1.Hp -= 10;
                     this.Controls.Remove(x);
                     x.Dispose();
                 }
             }
         }
         if (boss1.Hp == 0)
         {
             boss1.boss.Image = bossdeath;
             gameover         = true;
         }
     }
     VillainHPbar.Value = this.boss1.Hp;
 }
Esempio n. 2
0
        public void DoDamage(Mobile to)
        {
            to.Send(new AsciiMessage(Serial, ItemID, MessageType.Regular, 0x3B2, 3, "", "The generator shoots an arc of electricity at you!"));
            //to.Send(new UnicodeMessage(Serial, ItemID, MessageType.Regular, 0x3B2, 3, "", "", "The generator shoots an arc of electricity at you!"));
            to.BoltEffect(0);
            to.LocalOverheadMessage(MessageType.Regular, 0xC9, true, "* Your body convulses from electric shock *");
            to.NonlocalOverheadMessage(MessageType.Regular, 0xC9, true, string.Format("* {0} spasms from electric shock *", to.Name));

            AOS.Damage(to, to, 60, 0, 0, 0, 0, 100);

            if (!to.Alive)
            {
                return;
            }

            if (m_DamageTable[to] == null)
            {
                to.Frozen = true;

                DamageTimer timer = new DamageTimer(this, to);
                m_DamageTable[to] = timer;

                timer.Start();
            }
        }
Esempio n. 3
0
        public static void Unregister(DamageTimer timer)
        {
            var master = timer.Master;

            if (m_Table.ContainsKey(master))
            {
                var list = m_Table[master];

                if (timer.Running)
                {
                    timer.Stop();
                }

                list.Remove(timer);

                if (list.Count == 0)
                {
                    m_Table.Remove(master);
                }
            }
        }
Esempio n. 4
0
        public void DoDamage(Mobile to)
        {
            to.SendLocalizedMessage(1152372);                                                       // The Nexus shoots an arc of energy at you!
            to.BoltEffect(0);
            to.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x21, 1114443);             // * Your body convulses from electric shock *
            to.NonlocalOverheadMessage(Server.Network.MessageType.Regular, 0x21, 1114443, to.Name); //  * ~1_NAME~ spasms from electric shock *

            AOS.Damage(to, to, 60, 0, 0, 0, 0, 100);

            if (!to.Alive)
            {
                return;
            }

            if (!DamageTable.ContainsKey(to))
            {
                DamageTimer timer = new DamageTimer(this, to);

                to.Frozen       = true;
                DamageTable[to] = timer;
                timer.Start();
            }
        }
Esempio n. 5
0
        public void DoDamage( Mobile to )
        {
            to.Send( new UnicodeMessage( Serial, ItemID, MessageType.Regular, 0x3B2, 3, "", "", "The generator shoots an arc of electricity at you!" ) );
            to.BoltEffect( 0 );
            to.LocalOverheadMessage( MessageType.Regular, 0xC9, true, "* Your body convulses from electric shock *" );
            to.NonlocalOverheadMessage( MessageType.Regular, 0xC9, true, string.Format( "* {0} spasms from electric shock *", to.Name ) );

            AOS.Damage( to, to, 60, 0, 0, 0, 0, 100, 0, 0, 0 );

            if ( !to.Alive )
                return;

            if ( m_DamageTable[to] == null )
            {
                to.Frozen = true;

                DamageTimer timer = new DamageTimer( this, to );
                m_DamageTable[to] = timer;

                timer.Start();
            }
        }
Esempio n. 6
0
 public override void OnDamage(int amount, Mobile from, bool willKill)
 {
     m_DamageTimer = new DamageTimer(this);
     m_DamageTimer.Start();
 }
Esempio n. 7
0
 public override void OnDamage(int amount, Mobile from, bool willKill)
 {
     m_DamageTimer = new DamageTimer(this);
     m_DamageTimer.Start();
 }