Ejemplo n.º 1
0
        private async void button1_ClickAsync(object sender, EventArgs e)
        {
            HeroSteve steve = new HeroSteve();

            FightGoesOnScreenConfiguration();
            bool steveStatus = steve.GetFightingStatus();

            await ShowPictureBox(this.pictureBox1, steve.GetImage());

            while (steveStatus)
            {
                richTextBox1.AppendText("\r\n" + "ROUND" + roundCounter + "\r\n");

                Monster opponent = SelectOpponent();
                while (opponent.GetFightingStatus() && steveStatus)
                {
                    //but : appuyer sur espace pour lancer l'action
                    await RoundStart(steve, opponent);
                }
                roundCounter++;
                label7.Text = "Maccabés 'made by' Steve :  " + killCount;
            }
            EndOfFightOnScreenConfiguration();
            this.button1.Show();
        }
Ejemplo n.º 2
0
        public new void Attack(HeroSteve steve, System.Windows.Forms.RichTextBox richTextBox, System.Windows.Forms.Label lHero, System.Windows.Forms.Label lMonster)
        {
            steve.SetHeroDamages(this.attackPoints, richTextBox, lHero);
            int diceScore = this.FateDice.GetFateDiceResult();

            lMonster.Text = diceScore.ToString();
            if (diceScore < 6)
            {
                richTextBox.AppendText("MUDA MUDA MUDA MUDA MUDA MUDA MUDA (attaque magique)" + "\r\n");
                MagicAttack(steve, diceScore, richTextBox, lHero);
            }
        }
Ejemplo n.º 3
0
        private async Task RoundStart(HeroSteve steve, Monster monster)
        {
            FateDice dice = new FateDice();

            label8.Hide();

            steve.SetFateDiceNumber(dice.GetFateDiceResult());
            label5.Text = "Score du dé : " + steve.GetFateDiceNumber().ToString();
            monster.SetFateDiceNumber(dice.GetFateDiceResult());
            label6.Text = "Score du dé : " + monster.GetFateDiceNumber().ToString();


            await ShowPictureBox(this.pictureBox2, monster.GetImage());

            this.label2.Text = monster.GetName();
            await Task.Delay(3000);

            if (steve.GetFateDiceNumber() >= monster.GetFateDiceNumber())
            {
                steve.TearApart(monster);
                await ShowPictureBox(this.pictureBox2, deadImgPath);

                richTextBox1.AppendText("Steve Austin a tué " + monster.GetName() + "\r\n");
                pointCount += monster.GetKillPoints();
                killCount++;
                RandomTalk();
            }
            else
            {
                richTextBox1.AppendText("Aille ! Steve austin a raté son attaque !!" + "\r\n");
                monster.Attack(steve, this.richTextBox1, this.label5, this.label6);
            }

            this.label3.Text = steve.getHP().ToString() + " HP";
            this.label4.Text = pointCount + " points";
        }
Ejemplo n.º 4
0
 private void MagicAttack(HeroSteve livingBeeing, int diceNumber, System.Windows.Forms.RichTextBox richTextBox, System.Windows.Forms.Label lHero)
 {
     livingBeeing.SetHeroDamages(this.attackPoints * diceNumber, richTextBox, lHero);
 }
Ejemplo n.º 5
0
 public void Attack(HeroSteve steve, System.Windows.Forms.RichTextBox richTextBox, System.Windows.Forms.Label hero, System.Windows.Forms.Label badguy)
 {
     steve.SetHeroDamages(this.attackPoints, richTextBox, hero);
 }