Пример #1
0
        private void BuildButton(object sender, EventArgs e)
        {
            //Setup for next roll
            this.GeneralTextBox.Visible    = false;
            this.CurrentItemNameLabel.Text = "";
            RerollAmount = 0;
            CredsFlag    = false;
            WelcomeFlag  = false;
            DetailsFlag  = false;

            //Making input easier
            GodNameInterpreter();

            //Some dankness


            #region Background
            if (this.TextInput.Text.ToLower().Equals("splatt>klopper"))
            {
                this.BackgroundImage       = (Image)Resources.ResourceManager.GetObject("SplattGreaterThanKlopper");
                this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            }
            else if (this.TextInput.Text.ToLower().Equals("klopper is shit"))
            {
                this.BackgroundImage       = (Image)Resources.ResourceManager.GetObject("KlopperIsShit");
                this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            }
            else if (this.TextInput.Text.ToLower().Equals("ares sucks"))
            {
                this.BackgroundImage       = (Image)Resources.ResourceManager.GetObject("AresSucks");
                this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            }
            else if (this.TextInput.Text.ToLower().Equals("bellona is bae"))
            {
                this.BackgroundImage       = (Image)Resources.ResourceManager.GetObject("BellonaIsBae");
                this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            }
            else if (this.TextInput.Text.ToLower().Equals("ymir is the best"))
            {
                this.BackgroundImage       = (Image)Resources.ResourceManager.GetObject("YmirIsTheBest");
                this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            }
            else if (this.TextInput.Text.ToLower().Equals("standard"))
            {
                this.BackgroundImage       = (Image)Resources.ResourceManager.GetObject("NewDankSmiteBrackground");
                this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            }
            #endregion


            #region Dank
            if (this.TextInput.Text == "op")
            {
                _god = new God("Ymir", "g");
                for (int i = 0; i < 6; i++)
                {
                    Build[i] = new Item("Deathbringer", "dmg", false, true, false);
                }
                Build[6] = new Item("Blink_Rune", "dmg", true, true, false);
                Build[7] = new Item("Blink_Rune", "dmg", true, true, false);
                Build[8] = new Item("Deathbringer", "dmg", false, true, false);

                legalBoots    = itemCol.retrieveLegalBoots(true, true, true, God.type);
                legalItems    = itemCol.retrieveLegalItems(true, true, true, God.type);
                legalRelics   = itemCol.retrieveLegalRelics(true, true, true, God.type);
                legalStarters = itemCol.retrieveLegalStarters(true, true, true, God.type);
            }
            else if (this.TextInput.Text.ToLower() == "trickermand")
            {
                _god = new God("Ymir", "g");

                Build[0] = new Item("Shoes_of_the_Magi", "dmg", true, false, false);
                Build[1] = new Item("Dynasty_Plate_Helm", "hyb", true, false, false);
                Build[2] = new Item("BreastPlate_of_Valor", "def", true, true, false);
                Build[3] = new Item("Hide_of_the_Urchin", "def", true, true, false);
                Build[5] = new Item("Shogun's_Kusari", "dmg", true, false, false);
                Build[4] = new Item("Obsidian_Shard", "dmg", true, false, false);

                Build[6] = new Item("Blink_Rune", "dmg", true, true, false);
                Build[7] = new Item("Magic_Shell", "dmg", true, true, false);
                Build[8] = new Item("Mark_of_the_Vanguard", "dmg", false, true, false);

                legalBoots    = itemCol.retrieveLegalBoots(true, true, true, God.type);
                legalItems    = itemCol.retrieveLegalItems(true, true, true, God.type);
                legalRelics   = itemCol.retrieveLegalRelics(true, true, true, God.type);
                legalStarters = itemCol.retrieveLegalStarters(true, true, true, God.type);
            }
            else if (this.TextInput.Text.ToLower() == "nazzyc")
            {
                _god = new God("Medusa", "h");
                for (int i = 0; i < 6; i++)
                {
                    Build[i] = new Item("Odysseus'_Bow", "dmg", false, true, false);
                }
                Build[6] = new Item("Bracer_of_Undoing", "def", true, true, false);
                Build[7] = new Item("Bracer_of_Undoing", "def", true, true, false);
                Build[8] = new Item("Odysseus'_Bow", "dmg", false, true, false);

                legalBoots    = itemCol.retrieveLegalBoots(true, true, true, God.type);
                legalItems    = itemCol.retrieveLegalItems(true, true, true, God.type);
                legalRelics   = itemCol.retrieveLegalRelics(true, true, true, God.type);
                legalStarters = itemCol.retrieveLegalStarters(true, true, true, God.type);
            }
            else if (this.TextInput.Text.ToLower() == "kloppermand")
            {
                _god = new God("Ares", "g");

                Build[0] = new Item("Shoes_of_the_Magi", "dmg", true, false, false);
                Build[1] = new Item("Void_Stone", "hyb", true, false, false);
                Build[2] = new Item("Mystical_Mail", "def", true, true, false);
                Build[3] = new Item("Hide_of_the_Urchin", "def", true, true, false);
                Build[4] = new Item("Obsidian_Shard", "dmg", true, false, false);
                Build[5] = new Item("Rod_of_Tahuti", "dmg", true, false, false);

                Build[6] = new Item("Blink_Rune", "hyb", true, true, false);
                Build[7] = new Item("Shield_of_Thorns", "def", true, true, false);
                Build[8] = new Item("Mark_of_the_Vanguard", "def", true, true, false);

                legalBoots    = itemCol.retrieveLegalBoots(true, true, true, God.type);
                legalItems    = itemCol.retrieveLegalItems(true, true, true, God.type);
                legalRelics   = itemCol.retrieveLegalRelics(true, true, true, God.type);
                legalStarters = itemCol.retrieveLegalStarters(true, true, true, God.type);
            }
            #endregion
            //Validation of proper input
            else if (!((this.AssassinCheckBox.Checked == false &&
                        this.GuardianCheckBox.Checked == false &&
                        this.HunterCheckBox.Checked == false &&
                        this.MageCheckBox.Checked == false &&
                        this.WarriorCheckBox.Checked == false) ||
                       (this.DamageCheckBox.Checked == false &&
                        this.DefenseCheckBox.Checked == false &&
                        this.HybridCheckBox.Checked == false)))
            {
                if (string.IsNullOrEmpty(this.TextInput.Text))
                {
                    fullRebuild(
                        this.GuardianCheckBox.Checked,
                        this.MageCheckBox.Checked,
                        this.HunterCheckBox.Checked,
                        this.AssassinCheckBox.Checked,
                        this.WarriorCheckBox.Checked,
                        this.DamageCheckBox.Checked,
                        this.HybridCheckBox.Checked,
                        this.DefenseCheckBox.Checked
                        );
                }
                else
                {
                    fullRebuild(
                        this.TextInput.Text,
                        this.DamageCheckBox.Checked,
                        this.HybridCheckBox.Checked,
                        this.DefenseCheckBox.Checked
                        );
                }
            }
            else
            {
                _god = new God("Ymir", "g");
                for (int i = 0; i < 6; i++)
                {
                    Build[i] = new Item("Deathbringer", "dmg", false, true, false);
                }
                Build[6] = new Item("Blink_Rune", "dmg", true, true, false);
                Build[7] = new Item("Blink_Rune", "dmg", true, true, false);
                Build[8] = new Item("Deathbringer", "dmg", false, true, false);

                legalBoots    = itemCol.retrieveLegalBoots(true, true, true, God.type);
                legalItems    = itemCol.retrieveLegalItems(true, true, true, God.type);
                legalRelics   = itemCol.retrieveLegalRelics(true, true, true, God.type);
                legalStarters = itemCol.retrieveLegalStarters(true, true, true, God.type);
            }

            //Sets labels
            this.StarterItemLabel.Visible = true;
            this.RelicLabel1.Visible      = true;
            this.RelicLabel2.Visible      = true;
            this.ItemLabel1.Visible       = true;
            this.ItemLabel2.Visible       = true;
            this.ItemLabel3.Visible       = true;
            this.ItemLabel4.Visible       = true;
            this.ItemLabel5.Visible       = true;
            this.ItemLabel6.Visible       = true;
            clickedRebuild = true;

            Draw();
        }