Esempio n. 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;
        }
Esempio n. 2
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;
        }
Esempio n. 3
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
        }
Esempio n. 4
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;
        }
Esempio n. 5
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
        }
Esempio n. 6
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;
        }
Esempio n. 7
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);
        }
Esempio n. 8
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
        }
Esempio n. 9
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
        }
Esempio n. 10
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
        }
Esempio n. 11
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);
        }