Пример #1
0
        private void btnContinue_Click(object sender, EventArgs e)
        {
            #region Arrivée Du Boss /  Monstre aléatoire
            m_NbrestantMonstreBoss--;

            if (m_NbrestantMonstreBoss == 0)
            {
                m_NumeroMonstre = 4;
                InitialisteurDeVieMechant(m_NumeroMonstre);
            }

            //Rotation des monstres
            else
            {
                m_NumeroMonstre = ChoisirHasardMechant();
            }
            #endregion

            btnAttack.Enabled = true;
            if (Soin <= 0)
            {
                btnSoin.Enabled = true;
            }

            //remettre attack et action comme debut
            #region lbdommage remis a neuf des 2 personnages
            lbActionMechant.Text = "";
            lbDomMechant.Text    = "Dommage";
            lbDomPerso.Text      = "Dommage";
            #endregion

            m_monstreChoisi = ((cMonstre)TabMonstre[m_NumeroMonstre]);

            //actions initialisateur
            #region ActionMechantInitialisateur
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion

            #region Compteur pour paralysie(si Rune 2 acquise)
            if (Rune2 == 1)
            {
                Paralysie--;
                if (Paralysie == 0)
                {
                    cMonstre[] TabCMonstre = new cMonstre[1];
                    TabCMonstre[0] = m_monstreChoisi;
                    dChoixEnnemiAParalyser ChoixEnnemi = new dChoixEnnemiAParalyser(TabCMonstre);
                    ChoixEnnemi.ShowDialog();
                    lbDomMechant.Text = "ENNEMI \n PARALYSÉ";
                }
            }
            #endregion

            btnContinue.Enabled = false;
        }
Пример #2
0
 static public cMonstre [] RetourneTabMonstre1()
 {
     cMonstre [] TabMonstre = new cMonstre[5];
     TabMonstre[0] = new cMonstre("Alastor", 30, 40, 5, 40, Image.FromFile("Mechant.Marchand\\Mechant1.jpg"));
     TabMonstre[1] = new cMonstre("Scorn", 50, 20, 5, 30, Image.FromFile("Mechant.Marchand\\Mechant2.jpg"));
     TabMonstre[2] = new cMonstre("Kragoth", 60, 15, 10, 20, Image.FromFile("Mechant.Marchand\\Mechant3.jpg"));
     TabMonstre[3] = new cMonstre("Nasir", 40, 15, 5, 10, Image.FromFile("Mechant.Marchand\\Mechant4.jpg"));         // Vie Attack defense- xp-
     TabMonstre[4] = new cMonstre("Ashnard (BOSS)", 100, 50, 10, 70, Image.FromFile("Mechant.Marchand\\Boss1.jpg")); //BOSS
     return(TabMonstre);
 }
Пример #3
0
 static public cMonstre[] RetourneTabMonstre2()
 {
     cMonstre[] TabMonstre = new cMonstre[5];
     TabMonstre[0] = new cMonstre("Akasha", 35, 45, 10, 40, Image.FromFile("Mechant.Marchand\\P2Mechant1.jpg"));
     TabMonstre[1] = new cMonstre("Malakai", 55, 25, 10, 30, Image.FromFile("Mechant.Marchand\\P2Mechant2.jpg"));
     TabMonstre[2] = new cMonstre("Scythe", 65, 20, 15, 20, Image.FromFile("Mechant.Marchand\\P2Mechant3.jpg"));
     TabMonstre[3] = new cMonstre("Nergal", 45, 20, 10, 10, Image.FromFile("Mechant.Marchand\\P2Mechant4.jpg"));
     TabMonstre[4] = new cMonstre("Devdan (BOSS)", 105, 55, 15, 70, Image.FromFile("Mechant.Marchand\\MagieVendeur.jpg"));
     return(TabMonstre);
 }
Пример #4
0
 static public cMonstre[] RetourneTabMonstre3()
 {
     cMonstre[] TabMonstre = new cMonstre[6];
     TabMonstre[0] = new cMonstre("Tibarn", 40, 50, 15, 40, Image.FromFile("Mechant.Marchand\\P3Mechant1.jpg"));
     TabMonstre[1] = new cMonstre("Tormod", 60, 30, 15, 30, Image.FromFile("Mechant.Marchand\\P3Mechant2.jpg"));
     TabMonstre[2] = new cMonstre("Zihark", 70, 25, 20, 20, Image.FromFile("Mechant.Marchand\\P3Mechant3.jpg"));
     TabMonstre[3] = new cMonstre("Haar", 50, 25, 15, 10, Image.FromFile("Mechant.Marchand\\P3Mechant4.jpg"));
     TabMonstre[4] = new cMonstre("Reyson", 80, 45, 20, 20, Image.FromFile("Mechant.Marchand\\P3Mechant5.jpg"));
     TabMonstre[5] = new cMonstre("Letharshnor (BOSS)", 110, 60, 20, 70, Image.FromFile("Mechant.Marchand\\P3MechantBoss.jpg"));//BOSS
     return(TabMonstre);
 }
Пример #5
0
        private void btnContinue_Click(object sender, EventArgs e)
        {
            #region Arrivée Du Boss /  Monstre aléatoire
            m_NbrestantMonstreBoss--;
            lbBoss.Text = "BOSS DANS " + m_NbrestantMonstreBoss + " MONSTRE";

            if (m_NbrestantMonstreBoss == 0)
            {
                m_NumeroMonstre = 4;
                pbMechant.Image = global::Jeu.Properties.Resources.Boss1;
                InitialisteurDeVieMechant(m_NumeroMonstre);
            }

            //Rotation des monstres
            else
            {
                m_NumeroMonstre = ChoisirHasardMechant();
            }
            #endregion

            btnAttack.Enabled = true;

            //remettre attack et action comme debut
            #region lbdommage remis a neuf des 2 personnages
            lbActionMechant.Text = "";
            lbDomMechant.Text    = "Dommage";
            lbDomPerso.Text      = "Dommage";
            #endregion

            m_monstreChoisi = ((cMonstre)TabMonstre[m_NumeroMonstre]);

            //actions initialisateur
            #region ActionMechantInitialisateur
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion

            #region Compteur pour paralysie(si Rune 2 acquise)
            if (Rune2 == 1)
            {
                Paralysie--;
                if (Paralysie == 0)
                {
                    lbDomMechant.Text = "ENNEMI \n PARALYSÉ";
                }
            }
            #endregion

            btnContinue.Enabled = false;
        }
Пример #6
0
        public dChoixEnnemiAParalyser(cMonstre[] TabMonstreAucombat)
        {
            InitializeComponent();
            if (TabMonstreAucombat.Length == 1)
            {
                UnSeulMonstre = true;
            }

            //initialisation des monstre
            #region intitialisation du tableau de monstre
            m_Monstre1 = TabMonstreAucombat[0];

            if (!UnSeulMonstre)
            {
                m_Monstre2 = TabMonstreAucombat[1];
                m_Monstre3 = TabMonstreAucombat[2];
            }
            #endregion
            #region Initialisation graphique
            if (!UnSeulMonstre)
            {
                lbDommMechant1.Text = m_Monstre1.m_Dommage.ToString();
                lbVieMechant1.Text  = m_Monstre1.m_Vie.ToString();
                //////
                lbDommMechant2.Text = m_Monstre2.m_Dommage.ToString();
                lbVieMechant2.Text  = m_Monstre2.m_Vie.ToString();
                /////
                lbDommMechant3.Text = m_Monstre3.m_Dommage.ToString();
                lbVieMechant3.Text  = m_Monstre3.m_Vie.ToString();

                pbMechant1.BackgroundImage = m_Monstre1.m_ImageMonstre;
                pbMechant2.BackgroundImage = m_Monstre2.m_ImageMonstre;
                pbMechant3.BackgroundImage = m_Monstre3.m_ImageMonstre;
            }
            else
            {
                lbDommMechant2.Text        = m_Monstre1.m_Dommage.ToString();
                lbVieMechant2.Text         = m_Monstre1.m_Vie.ToString();
                pbMechant2.BackgroundImage = m_Monstre1.m_ImageMonstre;
                lbDommMechant1.Visible     = false;
                lbVieMechant1.Visible      = false;
                lbVieMechant3.Visible      = false;
                lbDommMechant3.Visible     = false;
                panMechant1.Visible        = false;
                panMechant3.Visible        = false;
                lbText.Text = m_Monstre1.m_nom + " est paralysé grâce à votre rune";
                pbMechant2_MouseClick(sender, e);
            }
            #endregion
        }
Пример #7
0
        public void EnnemiChoisiPourParalyser()
        {
            //Donne la possibilité au joueur de décider quel monstre il veut paralyse
            cMonstre[] TabMonstreAuCombat = new cMonstre[3]
            {
                m_monstreChoisi,
                m_monstreChoisi2,
                m_monstreChoisi3,
            };

            dChoixEnnemiAParalyser ChoixEnnemi = new dChoixEnnemiAParalyser(TabMonstreAuCombat);

            ChoixEnnemi.ShowDialog();
            TextePourChoixEnnemiParalysé(ChoixEnnemi.retourneMonstreChoisi());
        }
Пример #8
0
        public dNiveauFinale(object [] Pcomplet, int WeaponSelected, int R1, int R2) : this()
        {
            sp.PlayLooping();
            PersonnageComplet = Pcomplet;
            #region Initialisation Arme choix perso + Argent
            m_Argent      = (int)Pcomplet[6];
            lbArgent.Text = m_Argent.ToString();
            ArmeChoisi    = WeaponSelected;
            #endregion
            #region Experience et Planete + Rune
            m_Experience      = (int)Pcomplet[7];
            lbExperience.Text = m_Experience.ToString();
            Rune1             = R1;
            Rune2             = R2;
            #endregion
            #region Soin
            Soin = (int)PersonnageComplet[8];
            #endregion
            #region Initialisation globale Premier combat en ouvrant la forme
            //Choix du personnage;
            #region choixPerso
            pbPerso.Image = (Image)Pcomplet[2];
            #endregion

            //Choix darmes (avec l'arme Choisi)
            #region ChoixArme
            switch (ArmeChoisi)
            {
            case 0:
                pbArme1.Image             = Image.FromFile("Arme\\Zat.jpg");
                lbArmeEncours.Text        = "ZAT";
                lbDommageArmeEncours.Text = (cArme.Tabarme[0]).DommageMax.ToString();
                break;

            case 1:
                pbArme1.Image             = Image.FromFile("Arme\\PlasmaGun.jpg");
                lbArmeEncours.Text        = "PLASMA GUN";
                lbDommageArmeEncours.Text = (cArme.Tabarme[1]).DommageMax.ToString();
                break;

            case 2:
                pbArme1.Image             = Image.FromFile("Arme\\Klarix.jpg");
                lbArmeEncours.Text        = "Klarix";
                lbDommageArmeEncours.Text = (cArme.Tabarme[2]).DommageMax.ToString();

                break;

            case 3:
                pbArme1.Image             = Image.FromFile("Arme\\Catagan.jpg");
                lbArmeEncours.Text        = "Catagan";
                lbDommageArmeEncours.Text = (cArme.Tabarme[3]).DommageMax.ToString();
                break;

            case 4:
                pbArme1.Image             = Image.FromFile("Arme\\TwisterGun.jpg");
                lbArmeEncours.Text        = "Twister Gun";
                lbDommageArmeEncours.Text = (cArme.Tabarme[4]).DommageMax.ToString();
                break;

            case 5:
                pbArme1.Image             = Image.FromFile("Arme\\Desintegrateur.jpg");
                lbArmeEncours.Text        = "Désintégrateur";
                lbDommageArmeEncours.Text = (cArme.Tabarme[5]).DommageMax.ToString();
                break;

            case 6:
                pbArme1.Image             = Image.FromFile("Arme\\NUKE.jpg");
                lbArmeEncours.Text        = "Bombe";
                lbDommageArmeEncours.Text = (cArme.Tabarme[6]).DommageMax.ToString();
                break;
            }

            #endregion

            //rune en main et bouton magie
            #region Rune/Initialisation Bouton Magie
            if (Rune1 == 1)
            {
                pbRune1.Image   = Image.FromFile("Runes\\Rune4.jpg");
                pbRune1.Visible = true;
                btnSoin.Visible = true;
            }
            if (Rune2 == 1)
            {
                pbRune2.Image   = Image.FromFile("Runes\\Rune1.jpg");
                pbRune2.Visible = true;
            }
            #endregion

            //initialisateur de vie perso
            #region InitialisateurviePerso
            m_ViePerso       = (int)Pcomplet[4];
            BarreVie.Step    = m_ViePerso;
            BarreVie.Maximum = m_ViePerso;
            BarreVie.PerformStep();
            lbViePerso.Text = ((int)Pcomplet[4]).ToString() + "/" + ((int)Pcomplet[4]).ToString();
            #endregion

            ///Choix mechant
            ///initialisateur
            #region ChoixMechant + InitialisateurvieMechant

            for (int i = 0; i < 5; i++)
            {
                TabMonstre[i]      = dMonde_1.RetourneTabMonstre1()[i];
                TabMonstre[i + 5]  = Monde_2.RetourneTabMonstre2()[i];
                TabMonstre[i + 10] = dMonde_3.RetourneTabMonstre3()[i];
            }

            TabMonstre[15]  = dMonde_3.RetourneTabMonstre3()[5];
            TabMonstre[16]  = new cMonstre("Blutbad BOSS FINAL", 200, 20, 5, 80, Image.FromFile("Mechant.Marchand\\P4MechantBoss.jpg"));//BOSS
            m_NumeroMonstre = TabOrdreDesMonstre[IndiceTabMonstre];
            InitialisteurDeVieMechant(m_NumeroMonstre, 1);
            m_monstreChoisi = ((cMonstre)TabMonstre[m_NumeroMonstre]);

            #endregion

            #region NextEnnemi
            pbNextEnnemi.Image = (Image)(TabMonstre[TabOrdreDesMonstre[IndiceTabMonstre + 1]].m_ImageMonstre);
            #endregion

            //actions initialisateur
            #region ActionMechantInitialisateur
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion

            #region ActionMechantInitialisateur2
            /*ATTACK*/
            TabActionsMechant2[0] = new cActionMechant(((cMonstre)TabMonstre[16]).m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant2[1] = new cActionMechant(0, ((cMonstre)TabMonstre[16]).m_defense);
            #endregion

            #region ActionMechantInitialisateur3
            /*ATTACK*/
            TabActionsMechant3[0] = new cActionMechant(((cMonstre)TabMonstre[16]).m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant3[1] = new cActionMechant(0, ((cMonstre)TabMonstre[16]).m_defense);
            #endregion
            #endregion
        }
Пример #9
0
        private void btnContinue_Click(object sender, EventArgs e)
        {
            IndiceTabMonstre++;
            m_NumeroMonstre = TabOrdreDesMonstre[IndiceTabMonstre];

            btnAttack.Enabled = true;
            if (Soin <= 0)
            {
                btnSoin.Enabled = true;
            }

            //remettre attack et action comme debut
            #region lbdommage remis a neuf des 2 personnages
            lbActionMechant.Text = "";
            lbDomMechant.Text    = "Dommage";
            lbDomPerso.Text      = "Dommage";
            #endregion

            m_monstreChoisi = ((cMonstre)TabMonstre[m_NumeroMonstre]);
            InitialisteurDeVieMechant(m_NumeroMonstre, 1);
            MechantMort          = false;
            pbMechant.Enabled    = true;
            LbVieMechant.Enabled = true;

            #region NextEnnemi
            if (IndiceTabMonstre + 1 < TabMonstre.Length)
            {
                pbNextEnnemi.Image = (Image)(TabMonstre[TabOrdreDesMonstre[IndiceTabMonstre + 1]].m_ImageMonstre);
            }
            else
            {
                #region Si BOSS ACTIVATE (form)
                BossActivate             = true;
                BarreVieMechant2.Visible = true;
                BarreVieMechant3.Visible = true;
                lbDomMechant2.Visible    = true;
                lbDomMechant3.Visible    = true;
                lbViemechant2.Visible    = true;
                lbVieMechant3.Visible    = true;
                lbMiniboss3.Visible      = true;
                pbMiniBoss3.Visible      = true;
                #endregion

                m_monstreChoisi = ((cMonstre)TabMonstre[16]);
                InitialisteurDeVieMechant(m_NumeroMonstre, 2);
                InitialisteurDeVieMechant(m_NumeroMonstre, 3);
            }
            #endregion

            //actions initialisateur
            #region ActionMechantInitialisateur
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion

            #region Compteur pour paralysie(si Rune 2 acquise)
            if (Rune2 == 1)
            {
                if (Paralysie == 2)
                {
                    MonstreParalysé = false;
                }

                if (Paralysie == 0)
                {
                    MonstreParalysé = true;
                    Paralysie       = 3;
                    cMonstre[] TabCMonstre = new cMonstre[1];
                    TabCMonstre[0] = m_monstreChoisi;
                    dChoixEnnemiAParalyser ChoixEnnemi = new dChoixEnnemiAParalyser(TabCMonstre);
                    ChoixEnnemi.ShowDialog();
                    lbDomMechant.Text = "ENNEMI \n PARALYSÉ";
                }
            }
            #endregion

            btnContinue.Enabled = false;
        }
Пример #10
0
        public Monde_1(int ChoixPerso)
        {
            InitializeComponent();
            sp.PlayLooping();
            m_choix  = ChoixPerso;
            TabArmes = (object[])a.TableauDarme();
            switch (m_choix)
            {
            case 0: pbPerso.Image = global::Jeu.Properties.Resources.AlienArmurelegerte;
                pbArme1.Image     = global::Jeu.Properties.Resources.Zat;
                m_persoChoisi     = new cPersonnage("Alien Armure legerte", 120);

                break;

            case 1: pbPerso.Image = global::Jeu.Properties.Resources.AlienHeavyWarrior;
                pbArme1.Image     = global::Jeu.Properties.Resources.PlasmaGun;
                m_persoChoisi     = new cPersonnage("Alien Armure lourde", 140);

                break;

            case 2: pbPerso.Image = global::Jeu.Properties.Resources.AlienIngenieur;
                pbArme1.Image     = global::Jeu.Properties.Resources.PlasmaGun;
                m_persoChoisi     = new cPersonnage("Alien Ingenieur", 130);

                break;

            case 3: pbPerso.Image = global::Jeu.Properties.Resources.AlienMedic;
                pbArme1.Image     = global::Jeu.Properties.Resources.Zat;
                m_persoChoisi     = new cPersonnage("Alien Medic", 120);

                break;

            case 4: pbPerso.Image = global::Jeu.Properties.Resources.AlienÉclaireur;
                pbArme1.Image     = global::Jeu.Properties.Resources.Zat;
                m_persoChoisi     = new cPersonnage("Alien eclaireur", 100);

                break;

            case 5: pbPerso.Image = global::Jeu.Properties.Resources.AlienSamourai;
                pbArme1.Image     = global::Jeu.Properties.Resources.Zat;
                m_persoChoisi     = new cPersonnage("Alien Samourai", 110);

                break;
            }

            //initialisateur de vie perso
            m_ViePerso       = m_persoChoisi.Vie;
            BarreVie.Step    = m_ViePerso;
            BarreVie.Maximum = m_ViePerso;
            BarreVie.PerformStep();
            lbViePerso.Text = m_persoChoisi.Vie.ToString() + "/" + m_persoChoisi.Vie.ToString();
            ///Choix mechant
            ///initialisateur
            TabMonstre[0] = new cMonstre("Alastor", 30, 40, 5, 40);  //Vie- Attack++ defense- xp++
            TabMonstre[1] = new cMonstre("Scorn", 50, 20, 5, 30);    //Vie+ Attack+ defense- xp+
            TabMonstre[2] = new cMonstre("Kragoth", 60, 15, 10, 20); //Vie++ Attack defense xp
            TabMonstre[3] = new cMonstre("Nasir", 40, 15, 5, 10);    // Vie Attack defense- xp-
            //Sinon ^^ , Scythe, Scorn, Malakai, Akasha,
            //Ashnard; Nergal; Tibarn; Tormod; Devdan; Zihark; Haar; Lethe; Reyson; ; Caineghis; Kurthnaga ...

            m_NumeroMonstre = ChoisirHasardMechant();
            m_monstreChoisi = ((cMonstre)TabMonstre[m_NumeroMonstre]);
            //initialisateur de vie mechant
            m_VieMechant            = m_monstreChoisi.m_Vie;
            BarreVieMechant.Step    = m_VieMechant;
            BarreVieMechant.Maximum = m_VieMechant;
            BarreVieMechant.PerformStep();
            LbVieMechant.Text = m_VieMechant.ToString() + "/" + m_VieMechant.ToString();
            //actions initialisateur
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
        }
Пример #11
0
        public dMonde_1(object [] Pcomplet, int WeaponSelected, bool P2, int R1, int R2) : this()
        {
            sp.PlayLooping();
            PersonnageComplet = Pcomplet;
            #region Initialisation Arme choix perso + Argent
            m_Argent      = (int)Pcomplet[6];
            lbArgent.Text = m_Argent.ToString();
            ArmeChoisi    = WeaponSelected;
            #endregion
            #region Experience et Planete + Rune
            m_Experience      = (int)Pcomplet[7];
            lbExperience.Text = m_Experience.ToString();
            PLanete2Permise   = P2;
            Rune1             = R1;
            Rune2             = R2;
            #endregion
            #region Soin
            Soin = (int)PersonnageComplet[8];
            #endregion
            #region Initialisation globale Premier combat en ouvrant la forme
            //Choix du personnage;
            #region choixPerso
            pbPerso.Image = (Image)Pcomplet[2];
            #endregion

            //Choix darmes (avec l'arme Choisi)
            #region ChoixArme
            switch (ArmeChoisi)
            {
            case 0:
                pbArme1.Image             = Image.FromFile("Arme\\Zat.jpg");
                lbArmeEncours.Text        = "ZAT";
                lbDommageArmeEncours.Text = (cArme.Tabarme[0]).DommageMax.ToString();
                break;

            case 1:
                pbArme1.Image             = Image.FromFile("Arme\\PlasmaGun.jpg");
                lbArmeEncours.Text        = "PLASMA GUN";
                lbDommageArmeEncours.Text = (cArme.Tabarme[1]).DommageMax.ToString();
                break;

            case 2:
                pbArme1.Image             = Image.FromFile("Arme\\Klarix.jpg");
                lbArmeEncours.Text        = "Klarix";
                lbDommageArmeEncours.Text = (cArme.Tabarme[2]).DommageMax.ToString();

                break;

            case 3:
                pbArme1.Image             = Image.FromFile("Arme\\Catagan.jpg");
                lbArmeEncours.Text        = "Catagan";
                lbDommageArmeEncours.Text = (cArme.Tabarme[3]).DommageMax.ToString();
                break;

            case 4:
                pbArme1.Image             = Image.FromFile("Arme\\TwisterGun.jpg");
                lbArmeEncours.Text        = "Twister Gun";
                lbDommageArmeEncours.Text = (cArme.Tabarme[4]).DommageMax.ToString();
                break;

            case 5:
                pbArme1.Image             = Image.FromFile("Arme\\Desintegrateur.jpg");
                lbArmeEncours.Text        = "Désintégrateur";
                lbDommageArmeEncours.Text = (cArme.Tabarme[5]).DommageMax.ToString();
                break;

            case 6:
                pbArme1.Image             = Image.FromFile("Arme\\NUKE.jpg");
                lbArmeEncours.Text        = "Bombe";
                lbDommageArmeEncours.Text = (cArme.Tabarme[6]).DommageMax.ToString();
                break;
            }

            #endregion

            //rune en main et bouton magie
            #region Rune/Initialisation Bouton Magie
            if (Rune1 == 1)
            {
                pbRune1.Image   = Image.FromFile("Runes\\Rune4.jpg");
                pbRune1.Visible = true;
                btnSoin.Visible = true;
            }
            if (Rune2 == 1)
            {
                pbRune2.Image   = Image.FromFile("Runes\\Rune1.jpg");
                pbRune2.Visible = true;
            }
            #endregion

            //initialisateur de vie perso
            #region InitialisateurviePerso
            m_ViePerso       = (int)Pcomplet[4];
            BarreVie.Step    = m_ViePerso;
            BarreVie.Maximum = m_ViePerso;
            BarreVie.PerformStep();
            lbViePerso.Text = ((int)Pcomplet[4]).ToString() + "/" + ((int)Pcomplet[4]).ToString();
            #endregion

            ///Choix mechant
            ///initialisateur
            #region ChoixMechant + InitialisateurvieMechant
            TabMonstre[0] = new cMonstre("Alastor", 30, 40, 5, 40, Image.FromFile("Mechant.Marchand\\Mechant1.jpg"));
            TabMonstre[1] = new cMonstre("Scorn", 50, 20, 5, 30, Image.FromFile("Mechant.Marchand\\Mechant2.jpg"));
            TabMonstre[2] = new cMonstre("Kragoth", 60, 15, 10, 20, Image.FromFile("Mechant.Marchand\\Mechant3.jpg"));
            TabMonstre[3] = new cMonstre("Nasir", 40, 15, 5, 10, Image.FromFile("Mechant.Marchand\\Mechant4.jpg"));         // Vie Attack defense- xp-
            TabMonstre[4] = new cMonstre("Ashnard (BOSS)", 100, 50, 10, 70, Image.FromFile("Mechant.Marchand\\Boss1.jpg")); //BOSS

            m_NumeroMonstre = ChoisirHasardMechant();
            m_monstreChoisi = ((cMonstre)TabMonstre[m_NumeroMonstre]);

            #endregion

            //actions initialisateur
            #region ActionMechantInitialisateur
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion
            #endregion
        }
Пример #12
0
        private void btnAttack_Click(object sender, EventArgs e)
        {
            //decrementation variable Soin
            #region Rune de soin - Utilisation
            Soin--;
            if (Soin <= 0)
            {
                btnSoin.Enabled = true;
            }
            if (!SoinActif)
            {
                lbSoin.Visible = false;
            }
            #endregion

            //Action aleatoire mechant si NON PARALYSÉ
            #region Action Choisi par les 2 monstre
            #region si monstre 1 est pas paralysée et pas mort
            if (Monstre1paralyser == false)
            {
                if (!MechantMort)
                {
                    NumAction = ActionMechatHasard();
                }
                else
                {
                    NumAction = -1;
                }
            }
            #endregion
            #region si monstre 2 est pas paralysé et pas mort
            if (Monstre2Paralyser == false)
            {
                if (!MechantMort2)
                {
                    NumActionMechant2 = ActionMechatHasard();
                }
                else
                {
                    NumActionMechant2 = -1;
                }
            }
            #endregion
            #endregion

            //Selon lactionchoisi si NON PARALYSÉ ET VIVANT
            #region Point dattack et de defense 2 monstre
            if (Monstre1paralyser == false)
            {
                if (!MechantMort)
                {
                    ActionAttackmechant  = ((cActionMechant)TabActions[NumAction]).Domm;
                    ActionDefensemechant = ((cActionMechant)TabActions[NumAction]).Protection;
                }
            }
            if (Monstre2Paralyser == false)
            {
                if (!MechantMort2)
                {
                    ActionAttackmechant2  = ((cActionMechant)TabActionsMechant2[NumActionMechant2]).Domm;
                    ActionDefensemechant2 = ((cActionMechant)TabActionsMechant2[NumActionMechant2]).Protection;
                }
            }
            #endregion

            //texte selon choix de ladversaire Si NON PARALYSÉ
            #region texte
            Thread.Sleep(500);
            #region Mechant1
            if (Monstre1paralyser == false)
            {
                if (NumAction == 0)
                {
                    lbActionMechant.Text      = "Attack";
                    lbActionMechant.ForeColor = Color.Red;
                    lbActionMechant.Visible   = true;
                }
                else
                if (NumAction == 1)
                {
                    lbActionMechant.Text      = "Defense";
                    lbActionMechant.ForeColor = Color.Cyan;
                    lbActionMechant.Visible   = true;
                }
            }
            #endregion
            #region Mechant2
            if (Monstre2Paralyser == false)
            {
                if (NumActionMechant2 == 0)
                {
                    lbActionMechant2.Text      = "Attack";
                    lbActionMechant2.ForeColor = Color.Red;
                    lbActionMechant2.Visible   = true;
                }
                else
                if (NumActionMechant2 == 1)
                {
                    lbActionMechant2.Text      = "Defense";
                    lbActionMechant2.ForeColor = Color.Cyan;
                    lbActionMechant2.Visible   = true;
                }
            }

            #endregion
            #endregion

            //selon larme choisi
            #region Attack si nest pas en mode Soin
            if (!SoinActif)
            {
                Attack = (cArme.Tabarme[ArmeChoisi]).DommageMax;
            }
            else
            {
                Attack = 0;
            }
            #endregion

            //Calcul ds letat de vie (mechant)
            #region Calcul etat de vie mechant
            if (!MechantMort)
            {
                #region Monstre 1
                if (m_MonstreaAttaquer == 1)
                {
                    if (!SoinActif)
                    {
                        BarreVieMechant.Step = -Attack + ActionDefensemechant;
                        m_VieMechant        += BarreVieMechant.Step;
                    }
                    else
                    {
                        BarreVieMechant.Step = 0;
                    }
                }
                #endregion
            }
            if (!MechantMort2)
            {
                #region Monstre 2
                if (m_MonstreaAttaquer == 2)
                {
                    if (!SoinActif)
                    {
                        BarreVieMechant2.Step = -Attack + ActionDefensemechant2;
                        m_VieMechant2        += BarreVieMechant2.Step;
                    }
                    else
                    {
                        BarreVieMechant2.Step = 0;
                    }
                }
                #endregion
            }
            Thread.Sleep(500);
            #endregion

            //changement graphique apres attack contre mechant
            #region changementGraphMechant
            #region Monstre 1
            if (m_MonstreaAttaquer == 1)
            {
                BarreVieMechant.PerformStep();
                if (Monstre1paralyser == false)
                {
                    lbDomMechant.Text = BarreVieMechant.Step.ToString();
                }
            }
            #endregion
            #region Monstre 2
            else
            {
                BarreVieMechant2.PerformStep();
                if (Monstre2Paralyser == false)
                {
                    lbDomMechant2.Text = BarreVieMechant2.Step.ToString();
                }
            }
            #endregion

            //texte vie mechant
            lbVieMechant.Text  = m_VieMechant + "/" + m_monstreChoisi.m_Vie.ToString();
            lbVieMechant2.Text = m_VieMechant2 + "/" + m_monstreChoisi2.m_Vie.ToString();
            #endregion

            //Si la vie du montre tombe a zero(et celle du boss)
            #region SI Monstre 0 HP + desactivation de lattack pour continuer
            string cs = "";


            #region si Monstre 1 battu (boss inclus dedans)
            if (m_VieMechant <= 0 && MechantMort == false)
            {
                MechantMort = true;
                #region Compteur pour paralysie(si Rune 2 acquise)
                if (Rune2 == 1)
                {
                    Paralysie--;
                    if (Paralysie == 0)
                    {
                        lbDomMechant2.Text    = "ENNEMI \n PARALYSÉ";
                        lbActionMechant2.Text = "";
                        ActionDefensemechant2 = 0;
                        Monstre2Paralyser     = true;
                    }
                    else
                    {
                        Monstre2Paralyser = false;
                    }
                }
                #endregion
                #region Mise a zero du monstre 1
                m_VieMechant         = 0;
                lbVieMechant.Text    = m_VieMechant + "/" + ((cMonstre)TabMonstre[m_NumeroMonstre]).m_Vie.ToString();
                lbDomMechant.Text    = "0";
                lbActionMechant.Text = "";
                pbMechant.Enabled    = false;
                lbMechant.Enabled    = false;
                pbMechant.Image      = null;
                #endregion
                #region passe a lennemi 2
                if (!MechantMort2)
                {
                    pbMechant2_Click(sender, e);
                }
                #endregion
                m_Argent += m_monstreChoisi.m_ArgentRecu;
                m_Experience++;
                //AFFICHAGE DE Largent ACQUISE

                #region si Boss Vaincu
                if (m_NbrestantMonstreBoss == 0)    //SI BOSS VAINCU
                {
                    PLanete3Permise = true;
                    m_Experience   += 2;
                    cs = String.Format("VOUS AVEZ VAINCU LE BOSS {0} \n \n {1}\n\n ARGENT RECU {2}\n\n Experience en main {3} \n ***Magasin artefact débloqué***", m_monstreChoisi.m_nom, PersonnageComplet[1], m_monstreChoisi.m_ArgentRecu, m_Experience);
                    MessageBox.Show(cs);
                    this.Close();
                }

                #endregion

                else
                {
                    cs = String.Format("{0}\n\n ARGENT RECU {1}\n\n Experience en main {2}", PersonnageComplet[1], m_monstreChoisi.m_ArgentRecu, m_Experience);
                    MessageBox.Show(cs);
                }

                if (Paralysie == 0)
                {
                    cMonstre[] TabCMonstre = new cMonstre[1];
                    TabCMonstre[0] = m_monstreChoisi2;
                    dChoixEnnemiAParalyser ChoixEnnemi = new dChoixEnnemiAParalyser(TabCMonstre);
                    ChoixEnnemi.ShowDialog();
                }
            }
            #endregion
            #region si Monstre 2 battu
            if (m_VieMechant2 <= 0 && MechantMort2 == false)
            {
                MechantMort2 = true;
                #region Compteur pour paralysie(si Rune 2 acquise)
                if (Rune2 == 1)
                {
                    Paralysie--;
                    if (Paralysie == 0)
                    {
                        lbDomMechant.Text    = "ENNEMI \n PARALYSÉ";
                        Monstre1paralyser    = true;
                        lbActionMechant.Text = "";
                        ActionDefensemechant = 0;
                    }
                    else
                    {
                        Monstre1paralyser = false;
                    }
                }
                #endregion
                #region mise a zero du monstre 2
                pbMechant2.Enabled    = false;
                pbMechant2.Image      = null;
                lbMechant2.Enabled    = false;
                m_VieMechant2         = 0;
                lbVieMechant2.Text    = m_VieMechant2 + "/" + ((cMonstre)TabMonstre[m_NumeroMonstre2]).m_Vie.ToString();
                lbDomMechant2.Text    = "0";
                lbActionMechant2.Text = "";
                #endregion
                #region passe a l'ennemi 1
                if (!MechantMort)
                {
                    pbMechant_Click(sender, e);
                }
                #endregion
                m_Argent += m_monstreChoisi2.m_ArgentRecu;
                m_Experience++;
                //AFFICHAGE DE Largent ACQUISE
                cs = String.Format("{0}\n\n ARGENT RECU {1}\n\n Experience en main {2}", PersonnageComplet[1], m_monstreChoisi2.m_ArgentRecu, m_Experience);
                MessageBox.Show(cs);
                if (Paralysie == 0)
                {
                    cMonstre[] TabCMonstre = new cMonstre[1];
                    TabCMonstre[0] = m_monstreChoisi;
                    dChoixEnnemiAParalyser ChoixEnnemi = new dChoixEnnemiAParalyser(TabCMonstre);
                    ChoixEnnemi.ShowDialog();
                }
            }
            #endregion

            lbArgent.Text     = m_Argent.ToString();
            lbExperience.Text = m_Experience.ToString();
            #region Si les 2 monstres sont battus
            if (m_VieMechant <= 0 && m_VieMechant2 <= 0)
            {
                //desactivation du bouton dattack
                btnAttack.Enabled     = false;
                btnSoin.Enabled       = false;
                btnContinue.Enabled   = true;
                panMechant1.BackColor = Color.DarkRed;
                panMechant2.BackColor = Color.DarkRed;
                return;
            }
            #endregion


            #endregion

            //calcul de vie perso (attack des 2 monstre)
            #region calcul vie perso
            #region Si mechant 1 ou 2 mort
            if (MechantMort == true)
            {
                ActionAttackmechant = 0;
            }
            if (MechantMort2 == true)
            {
                ActionAttackmechant2 = 0;
            }
            #endregion
            #region Si Monstre 1 paralyse ou monstre 2 ou aucun

            if (Monstre1paralyser == true)
            {
                BarreVie.Step = -ActionAttackmechant2;
            }
            else
            if (Monstre2Paralyser == true)
            {
                BarreVie.Step = -ActionAttackmechant;
            }
            else
            if (Monstre1paralyser == false && Monstre2Paralyser == false)
            {
                BarreVie.Step = -(ActionAttackmechant + ActionAttackmechant2);
            }
            #endregion
            m_ViePerso += BarreVie.Step;
            #endregion


            //Si la vie du perso tombe a zero
            #region SI Perso 0 HP+desactivation de lattack
            if (m_ViePerso <= 0)
            {
                m_ViePerso      = 0;
                lbViePerso.Text = m_ViePerso + "/" + PersonnageComplet[4].ToString();
                lbDomPerso.Text = "0";
                BarreVie.Step   = -400;
                BarreVie.PerformStep();

                //AFFICHAGE Du MESSAGE DE LA MORT
                cs = "";
                cs = String.Format("{0}\n\n VOUS ETES MORT ", PersonnageComplet[1]);
                this.Close();
                MessageBox.Show(cs);

                //desactivation du bouton dattack
                btnAttack.Enabled = false;
                return;
            }
            #endregion


            //Changement graphique vie perso
            #region changementGraphPerso
            BarreVie.PerformStep();

            if (ActionAttackmechant == 0 && ActionAttackmechant2 == 0)
            {
                lbDomPerso.Text = "0";
            }
            else
            {
                lbDomPerso.Text = BarreVie.Step.ToString();
            }

            lbViePerso.Text = m_ViePerso + "/" + PersonnageComplet[4].ToString();
            #endregion
        }
Пример #13
0
        public dMonde_3(object[] pComplet, int WeaponSelected, bool P4, int R1, int R2)
        {
            InitializeComponent();
            sp.PlayLooping();

            PersonnageComplet = pComplet;
            #region Initialisation Arme choix perso + Argent
            m_Argent      = (int)pComplet[6];
            lbArgent.Text = m_Argent.ToString();
            #endregion
            #region Experience et Planete + Rune
            m_Experience      = (int)pComplet[7];
            lbExperience.Text = m_Experience.ToString();
            PLanete4Permise   = P4;
            Rune1             = R1;
            Rune2             = R2;
            #endregion
            #region Soin
            Soin = (int)PersonnageComplet[8];
            #endregion
            #region Initialisation globale Premier combat en ouvrant la forme
            //Choix du personnage;
            #region choixPerso
            pbPerso.Image = (Image)pComplet[2];
            ArmeChoisi    = WeaponSelected;
            #endregion

            //Choix darmes (initialiser ak les armes acquises)
            #region ChoixArme
            switch (ArmeChoisi)
            {
            case 0:
                pbArme1.Image             = Image.FromFile("Arme\\Zat.jpg");
                lbArmeEncours.Text        = "ZAT";
                lbDommageArmeEncours.Text = (cArme.Tabarme[0]).DommageMax.ToString();
                break;

            case 1:
                pbArme1.Image             = Image.FromFile("Arme\\PlasmaGun.jpg");
                lbArmeEncours.Text        = "PLASMA GUN";
                lbDommageArmeEncours.Text = (cArme.Tabarme[1]).DommageMax.ToString();
                break;

            case 2:
                pbArme1.Image             = Image.FromFile("Arme\\Klarix.jpg");
                lbArmeEncours.Text        = "Klarix";
                lbDommageArmeEncours.Text = (cArme.Tabarme[2]).DommageMax.ToString();

                break;

            case 3:
                pbArme1.Image             = Image.FromFile("Arme\\Catagan.jpg");
                lbArmeEncours.Text        = "Catagan";
                lbDommageArmeEncours.Text = (cArme.Tabarme[3]).DommageMax.ToString();
                break;

            case 4:
                pbArme1.Image             = Image.FromFile("Arme\\TwisterGun.jpg");
                lbArmeEncours.Text        = "Twister Gun";
                lbDommageArmeEncours.Text = (cArme.Tabarme[4]).DommageMax.ToString();
                break;

            case 5:
                pbArme1.Image             = Image.FromFile("Arme\\Desintegrateur.jpg");
                lbArmeEncours.Text        = "Désintégrateur";
                lbDommageArmeEncours.Text = (cArme.Tabarme[5]).DommageMax.ToString();
                break;

            case 6:
                pbArme1.Image             = Image.FromFile("Arme\\NUKE.jpg");
                lbArmeEncours.Text        = "Bombe";
                lbDommageArmeEncours.Text = (cArme.Tabarme[6]).DommageMax.ToString();
                break;
            }

            #endregion

            //rune en main et bouton magie
            #region Rune/Initialisation Bouton Magie
            if (Rune1 == 1)
            {
                pbRune1.Image   = Image.FromFile("Runes\\Rune4.jpg");
                pbRune1.Visible = true;
                btnSoin.Visible = true;
            }
            if (Rune2 == 1)
            {
                pbRune2.Image   = Image.FromFile("Runes\\Rune1.jpg");
                pbRune2.Visible = true;
            }
            #endregion

            //initialisateur de vie perso
            #region InitialisateurviePerso
            m_ViePerso       = (int)pComplet[4];
            BarreVie.Step    = m_ViePerso;
            BarreVie.Maximum = m_ViePerso;
            BarreVie.PerformStep();
            lbViePerso.Text = pComplet[4].ToString() + "/" + pComplet[4].ToString();
            #endregion

            ///Choix mechant
            ///initialisateur
            #region ChoixMechant + InitialisateurvieMechant
            TabMonstre[0] = new cMonstre("Tibarn", 30, 40, 5, 40, Image.FromFile("Mechant.Marchand\\P3Mechant1.jpg"));
            TabMonstre[1] = new cMonstre("Tormod", 50, 20, 5, 30, Image.FromFile("Mechant.Marchand\\P3Mechant2.jpg"));
            TabMonstre[2] = new cMonstre("Zihark", 60, 15, 10, 20, Image.FromFile("Mechant.Marchand\\P3Mechant3.jpg"));
            TabMonstre[3] = new cMonstre("Haar", 40, 15, 5, 10, Image.FromFile("Mechant.Marchand\\P3Mechant4.jpg"));
            TabMonstre[4] = new cMonstre("Reyson", 70, 35, 10, 20, Image.FromFile("Mechant.Marchand\\P3Mechant5.jpg"));
            TabMonstre[5] = new cMonstre("Letharshnor (BOSS)", 100, 50, 10, 70, Image.FromFile("Mechant.Marchand\\P3MechantBoss.jpg")); //BOSS
            TabMonstre[6] = Image.FromFile("Mechant.Marchand\\P3BossSuprise.jpg");                                                      //BOSS
            //; Caineghis; Kurtnaga ...

            m_NumeroMonstre  = ChoisirHasardMechant(1);
            m_NumeroMonstre2 = ChoisirHasardMechant(2);
            m_NumeroMonstre3 = ChoisirHasardMechant(3);

            m_monstreChoisi  = ((cMonstre)TabMonstre[m_NumeroMonstre]);
            m_monstreChoisi2 = ((cMonstre)TabMonstre[m_NumeroMonstre2]);
            m_monstreChoisi3 = ((cMonstre)TabMonstre[m_NumeroMonstre3]);
            #endregion

            //actions initialisateur
            #region ActionMechantInitialisateur
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion

            #region ActionMechantInitialisateur2
            /*ATTACK*/
            TabActionsMechant2[0] = new cActionMechant(m_monstreChoisi2.m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant2[1] = new cActionMechant(0, m_monstreChoisi2.m_defense);
            #endregion

            #region ActionMechantInitialisateur3
            /*ATTACK*/
            TabActionsMechant3[0] = new cActionMechant(m_monstreChoisi3.m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant3[1] = new cActionMechant(0, m_monstreChoisi3.m_defense);
            #endregion
            #endregion
        }
Пример #14
0
        private void btnContinue_Click(object sender, EventArgs e)
        {
            #region form remise a neuf
            btnAttack.Enabled  = true;
            lbMechant.Enabled  = true;
            lbMechant2.Enabled = true;
            lbMechant3.Enabled = true;
            pbMechant.Enabled  = true;
            pbMechant2.Enabled = true;
            pbMechant3.Enabled = true;
            #endregion

            //remettre attack et action comme debut
            #region lbdommage remis a neuf des 4 personnages + mort=false +Paralysie=false
            lbActionMechant.Text  = "";
            lbActionMechant2.Text = "";
            lbActionMechant3.Text = "";
            lbVieMechant.Text     = "0/0";
            lbVieMechant2.Text    = "0/0";
            lbVieMechant3.Text    = "0/0";
            lbDomMechant.Text     = "Dommage";
            lbDomMechant2.Text    = "Dommage";
            lbDomMechant3.Text    = "Dommage";
            lbDomPerso.Text       = "Dommage";
            MechantMort           = false;
            MechantMort2          = false;
            MechantMort3          = false;
            Monstre1paralyser     = false;
            Monstre2Paralyser     = false;
            Monstre3Paralyser     = false;
            #endregion

            #region Arrivée Du Boss /  Monstre aléatoire
            pbMechant_Click(sender, e);
            m_NbrestantMonstreBoss--;
            if (m_NbrestantMonstreBoss == 0)
            {
                #region operation faite pour le boss
                Monstre1paralyser = false;
                m_NumeroMonstre   = 5;
                InitialisteurDeVieMechant(m_NumeroMonstre, 1);
                GoodSelection         = 1;
                lbMechant.Enabled     = false;
                lbMechant2.Enabled    = false;
                lbMechant3.Enabled    = false;
                lbVieMechant.Visible  = false;
                lbVieMechant2.Visible = false;
                lbVieMechant3.Visible = false;
                MechantMort2          = true;
                MechantMort3          = true;
                BossActivate          = true;
                lbBOSSTEXTE.Visible   = true;
                lbBossLife.Visible    = true;
                lbActionBoss.Visible  = true;
                lbBossLife.Text       = (((cMonstre)TabMonstre[5]).m_Vie + "/" + ((cMonstre)TabMonstre[5]).m_Vie).ToString();
                pbMechant2.Image      = (Image)TabMonstre[6];
                pbMechant3.Image      = (Image)TabMonstre[6];

                #endregion
            }

            //Rotation des monstres
            else
            {
                m_NumeroMonstre  = ChoisirHasardMechant(1);
                m_NumeroMonstre2 = ChoisirHasardMechant(2);
                m_NumeroMonstre3 = ChoisirHasardMechant(3);
            }

            #endregion

            m_monstreChoisi = ((cMonstre)TabMonstre[m_NumeroMonstre]);
            if (!BossActivate)
            {
                m_monstreChoisi2 = ((cMonstre)TabMonstre[m_NumeroMonstre2]);
                m_monstreChoisi3 = ((cMonstre)TabMonstre[m_NumeroMonstre3]);
            }

            //actions initialisateur attack et defense
            #region ActionsInitialisateur
            #region Monstre 1
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion
            #region Monstre 2
            /*ATTACK*/
            TabActionsMechant2[0] = new cActionMechant(m_monstreChoisi2.m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant2[1] = new cActionMechant(0, m_monstreChoisi2.m_defense);
            #endregion
            #region Monstre 3
            /*ATTACK*/
            TabActionsMechant3[0] = new cActionMechant(m_monstreChoisi3.m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant3[1] = new cActionMechant(0, m_monstreChoisi3.m_defense);
            #endregion
            #endregion

            btnAttack.Enabled   = true;
            btnContinue.Enabled = false;
            #region traitement Soin et paralysie
            if (Soin <= 0)
            {
                btnSoin.Enabled = true;
            }

            if (Paralysie == 0)
            {
                EnnemiChoisiPourParalyser();
            }
            else
            {
                Monstre2Paralyser = false;
                Monstre3Paralyser = false;
                Monstre3Paralyser = false;
            }
            #endregion
        }
Пример #15
0
        private void btnContinue_Click(object sender, EventArgs e)
        {
            #region Arrivée Du Boss /  Monstre aléatoire
            m_NbrestantMonstreBoss--;
            lbBoss.Text = "BOSS DANS " + m_NbrestantMonstreBoss + " VAGUES";

            if (m_NbrestantMonstreBoss == 0)
            {
                m_NumeroMonstre = 4;
                pbMechant.Image = global::Jeu.Properties.Resources.MagieVendeur;
                InitialisteurDeVieMechant(m_NumeroMonstre, 1);
                pbMechant2.Image = null;
            }

            //Rotation des monstres
            else
            {
                m_NumeroMonstre  = ChoisirHasardMechant(1);
                m_NumeroMonstre2 = ChoisirHasardMechant(2);
            }

            #endregion

            #region form remise a neuf
            btnAttack.Enabled  = true;
            lbMechant.Enabled  = true;
            lbMechant2.Enabled = true;
            pbMechant.Enabled  = true;
            pbMechant2.Enabled = true;
            #endregion

            //remettre attack et action comme debut
            #region lbdommage remis a neuf des 3 personnages + mort=false
            lbActionMechant.Text  = "";
            lbActionMechant2.Text = "";
            lbDomMechant.Text     = "Dommage";
            lbDomMechant2.Text    = "Dommage";
            lbDomPerso.Text       = "Dommage";
            MechantMort           = false;
            MechantMort2          = false;
            #endregion

            m_monstreChoisi  = ((cMonstre)TabMonstre[m_NumeroMonstre]);
            m_monstreChoisi2 = ((cMonstre)TabMonstre[m_NumeroMonstre2]);


            //actions initialisateur attack et defense
            #region ActionsInitialisateur
            #region Monstre 1
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion
            #region Monstre 2
            /*ATTACK*/
            TabActionsMechant2[0] = new cActionMechant(m_monstreChoisi2.m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant2[1] = new cActionMechant(0, m_monstreChoisi2.m_defense);
            #endregion
            #endregion

            btnContinue.Enabled = false;
        }
Пример #16
0
        public Monde_2(int ChoixPerso, int Money, int[] ArmeenMain)
        {
            InitializeComponent();
            sp.PlayLooping();

            #region Initialisation Arme choix perso + Argent
            m_Argent      = Money;
            lbArgent.Text = m_Argent.ToString();
            m_choix       = ChoixPerso;
            TabArmeenMain = ArmeenMain;
            TabArmes      = (object[])a.TableauDarme();
            lbBoss.Text   = "BOSS DANS " + m_NbrestantMonstreBoss + " VAGUES";
            #endregion
            #region Initialisation globale Premier combat en ouvrant la forme
            //Choix du personnage;
            #region choixPerso

            switch (m_choix)
            {
            case 0: pbPerso.Image = global::Jeu.Properties.Resources.AlienArmurelegerte;
                pbArme1.Image     = global::Jeu.Properties.Resources.Zat;
                m_persoChoisi     = new cPersonnage("Alien Armure legerte", 120);
                choixArme         = 0;

                break;

            case 1: pbPerso.Image = global::Jeu.Properties.Resources.AlienHeavyWarrior;
                pbArme1.Image     = global::Jeu.Properties.Resources.PlasmaGun;
                m_persoChoisi     = new cPersonnage("Alien Armure lourde", 140);
                choixArme         = 1;

                break;

            case 2: pbPerso.Image = global::Jeu.Properties.Resources.AlienIngenieur;
                pbArme1.Image     = global::Jeu.Properties.Resources.PlasmaGun;
                m_persoChoisi     = new cPersonnage("Alien Ingenieur", 130);
                choixArme         = 1;

                break;

            case 3: pbPerso.Image = global::Jeu.Properties.Resources.AlienMedic;
                pbArme1.Image     = global::Jeu.Properties.Resources.Zat;
                m_persoChoisi     = new cPersonnage("Alien Medic", 120);
                choixArme         = 0;

                break;

            case 4: pbPerso.Image = global::Jeu.Properties.Resources.AlienÉclaireur;
                pbArme1.Image     = global::Jeu.Properties.Resources.Zat;
                m_persoChoisi     = new cPersonnage("Alien eclaireur", 100);
                choixArme         = 0;

                break;

            case 5: pbPerso.Image = global::Jeu.Properties.Resources.AlienSamourai;
                pbArme1.Image     = global::Jeu.Properties.Resources.Zat;
                m_persoChoisi     = new cPersonnage("Alien Samourai", 110);
                choixArme         = 0;
                break;
            }
            #endregion

            //Choix darmes (initialiser ak les armes acquises)
            #region ChoixArme
            if (TabArmeenMain[2] == 1)
            {
                pbArme2.Image = global::Jeu.Properties.Resources.klarix;
            }
            if (TabArmeenMain[3] == 1)
            {
                pbArme3.Image = global::Jeu.Properties.Resources.Catagan;
            }
            if (TabArmeenMain[4] == 1)
            {
                pbArme4.Image = global::Jeu.Properties.Resources.TwisterGun;
            }
            if (TabArmeenMain[5] == 1)
            {
                pbArme5.Image = global::Jeu.Properties.Resources.Desintregrateur;
            }
            #endregion

            //initialisateur de vie perso
            #region InitialisateurviePerso
            m_ViePerso       = m_persoChoisi.Vie;
            BarreVie.Step    = m_ViePerso;
            BarreVie.Maximum = m_ViePerso;
            BarreVie.PerformStep();
            lbViePerso.Text = m_persoChoisi.Vie.ToString() + "/" + m_persoChoisi.Vie.ToString();
            #endregion

            ///Choix mechant
            ///initialisateur
            #region ChoixMechant + InitialisateurvieMechant
            TabMonstre[0] = new cMonstre("Akasha", 30, 40, 5, 40);   //Vie- Attack++ defense- xp++
            TabMonstre[1] = new cMonstre("Malakai", 50, 20, 5, 30);  //Vie+ Attack+ defense- xp+
            TabMonstre[2] = new cMonstre("Scythe", 60, 15, 10, 20);  //Vie++ Attack defense xp
            TabMonstre[3] = new cMonstre("Nergal", 40, 15, 5, 10);   // Vie Attack defense- xp-
            TabMonstre[4] = new cMonstre("Devdan", 100, 50, 10, 70); //BOSS


            //; Tibarn; Tormod;  Zihark; Haar; Lethe; Reyson; ; Caineghis; Kurthnaga ...

            m_NumeroMonstre  = ChoisirHasardMechant(1);
            m_NumeroMonstre2 = ChoisirHasardMechant(2);

            m_monstreChoisi  = ((cMonstre)TabMonstre[m_NumeroMonstre]);
            m_monstreChoisi2 = ((cMonstre)TabMonstre[m_NumeroMonstre2]);

            #endregion

            //actions initialisateur
            #region ActionMechantInitialisateur
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion

            #region ActionMechantInitialisateur2
            /*ATTACK*/
            TabActionsMechant2[0] = new cActionMechant(m_monstreChoisi2.m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant2[1] = new cActionMechant(0, m_monstreChoisi2.m_defense);
            #endregion

            #endregion
        }
Пример #17
0
        private void btnContinue_Click(object sender, EventArgs e)
        {
            #region form remise a neuf
            btnAttack.Enabled  = true;
            lbMechant.Enabled  = true;
            lbMechant2.Enabled = true;
            pbMechant.Enabled  = true;
            pbMechant2.Enabled = true;
            #endregion

            //remettre attack et action comme debut
            #region lbdommage remis a neuf des 3 personnages + mort=false
            lbActionMechant.Text  = "";
            lbActionMechant2.Text = "";
            lbDomMechant.Text     = "Dommage";
            lbDomMechant2.Text    = "Dommage";
            lbDomPerso.Text       = "Dommage";
            MechantMort           = false;
            MechantMort2          = false;
            #endregion

            #region Arrivée Du Boss /  Monstre aléatoire
            m_NbrestantMonstreBoss--;
            if (m_NbrestantMonstreBoss == 0)
            {
                Monstre1paralyser = false;
                m_NumeroMonstre   = 4;
                InitialisteurDeVieMechant(m_NumeroMonstre, 1);
                pbMechant_Click(sender, e);
                lbMechant2.Enabled = false;
                pbMechant.Enabled  = false;
                pbMechant2.Enabled = false;
                MechantMort2       = true;
            }

            //Rotation des monstres
            else
            {
                m_NumeroMonstre  = ChoisirHasardMechant(1);
                m_NumeroMonstre2 = ChoisirHasardMechant(2);
            }

            #endregion

            m_monstreChoisi  = ((cMonstre)TabMonstre[m_NumeroMonstre]);
            m_monstreChoisi2 = ((cMonstre)TabMonstre[m_NumeroMonstre2]);

            //actions initialisateur attack et defense
            #region ActionsInitialisateur
            #region Monstre 1
            /*ATTACK*/
            TabActions[0] = new cActionMechant(m_monstreChoisi.m_Dommage, 0);
            /*DEFENSE*/
            TabActions[1] = new cActionMechant(0, m_monstreChoisi.m_defense);
            #endregion
            #region Monstre 2
            /*ATTACK*/
            TabActionsMechant2[0] = new cActionMechant(m_monstreChoisi2.m_Dommage, 0);
            /*DEFENSE*/
            TabActionsMechant2[1] = new cActionMechant(0, m_monstreChoisi2.m_defense);
            #endregion
            #endregion

            btnAttack.Enabled   = true;
            btnContinue.Enabled = false;
            if (Soin <= 0)
            {
                btnSoin.Enabled = true;
            }
            //ennemi un Mis de base
            pbMechant_Click(sender, e);
        }