Example #1
0
        private void pictureBox5_Click(object sender, EventArgs e)
        {
            int    gold = personagem.gold();
            double att  = personagem.atk();

            gold = 100 + (Convert.ToInt32(att) * 2);
            personagem.ComprarATK(gold);
            label2.Text = personagem.atk().ToString();
        }
Example #2
0
        public Monster(Personagem personagem)
        {
            int a = random.Next(1, 3);

            //1 = tank, 2 = mage, 3 = warrior
            if (personagem.lvl() == 1)
            {
                this.Def  = 2;
                this.Atk  = 1;
                this.Vida = 50;
            }
            else if (a == 1)
            {
                this.Def  = personagem.atk() * 0.5 + personagem.def() * 0.5;
                this.Vida = personagem.vidamaxima() * 1.5;
                this.Atk  = personagem.atk() * 0.2 + personagem.def() * 0.2;
            }
            else if (a == 2)
            {
                this.Def  = personagem.atk() * 0.3 + personagem.def() * 0.3;
                this.Vida = personagem.vidamaxima();
                this.Atk  = personagem.atk() * 0.1 + personagem.def() * 0.1;
            }
            else
            {
                this.Def  = personagem.atk() * 0.1 + personagem.def() * 0.1;
                this.Vida = personagem.vidamaxima() * 2.0;
                this.Atk  = personagem.atk() * 1.2 + personagem.def() * 0.5;
            }
            xp1 = personagem.lvl() * 100 + (Def * 300 + Atk * 100 + VidaMaxima * 20);
        }
Example #3
0
        public Form2(Personagem personagem)
        {
            DoubleBuffered  = true;
            player          = new WindowsMediaPlayer();
            this.personagem = personagem;
            InitializeComponent();
            tempo = new System.Windows.Forms.Timer();
            tempo.Start();
            tempo.Tick     += GainGold;
            label3.Text     = personagem.def().ToString();
            label2.Text     = personagem.atk().ToString();
            label4.Text     = personagem.vida().ToString();
            this.KeyPreview = true;
            KeyDown        += Form2_KeyPress;

            player.URL = @"C:\Users\mateu\Desktop\jenni\Vindsvept-TheFae.mp3";
            player.controls.play();
        }