private void RollRunes(Random rand)
        {
            Runes firstPath = Runes.runePaths.Values.ToList()[rand.Next(0, Runes.runePaths.Values.Count)];

            firstTree[0] = firstPath.keystones[rand.Next(0, firstPath.keystones.Count)];
            firstTree[1] = firstPath.firstRow[rand.Next(0, firstPath.firstRow.Count)];
            firstTree[2] = firstPath.secondRow[rand.Next(0, firstPath.secondRow.Count)];
            firstTree[3] = firstPath.thirdRow[rand.Next(0, firstPath.thirdRow.Count)];

            Runes secondPath = Runes.runePaths.Values.ToList()[rand.Next(0, Runes.runePaths.Values.Count)];

            while (secondPath.name.Equals(firstPath.name))
            {
                secondPath = Runes.runePaths.Values.ToList()[rand.Next(0, Runes.runePaths.Values.Count)];
            }

            int firstRow = rand.Next(0, 3);

            switch (firstRow)
            {
            case 0:
                secondTree[0] = secondPath.firstRow[rand.Next(0, secondPath.firstRow.Count)];
                break;

            case 1:
                secondTree[0] = secondPath.secondRow[rand.Next(0, secondPath.secondRow.Count)];
                break;

            case 2:
                secondTree[0] = secondPath.thirdRow[rand.Next(0, secondPath.thirdRow.Count)];
                break;
            }

            int secondRow = rand.Next(0, 3);

            while (firstRow == secondRow)
            {
                secondRow = rand.Next(0, 3);
            }

            switch (secondRow)
            {
            case 0:
                secondTree[1] = secondPath.firstRow[rand.Next(0, secondPath.firstRow.Count)];
                break;

            case 1:
                secondTree[1] = secondPath.secondRow[rand.Next(0, secondPath.secondRow.Count)];
                break;

            case 2:
                secondTree[1] = secondPath.thirdRow[rand.Next(0, secondPath.thirdRow.Count)];
                break;
            }

            shards[0] = Shard.GetFirstRow()[rand.Next(0, Shard.GetFirstRow().Length)];
            shards[1] = Shard.GetSecondRow()[rand.Next(0, Shard.GetSecondRow().Length)];
            shards[2] = Shard.GetThirdRow()[rand.Next(0, Shard.GetThirdRow().Length)];
        }
        /// <summary>
        /// Initializes a new Ultimate Bravery Form
        /// </summary>
        public UltimateBraveryForm()
        {
            InitializeComponent();

            // Init the items and champions
            Item.InitItemList();
            Champion.InitChampionList();
            Summoner.InitSummonerSpellList();
            Runes.InitRunes();

            // Clear the champion combo box
            championComboBox.Items.Clear();
            championComboBox.Items.Add("Any");

            // Get the list of every champion's name and put them in the combo box
            championComboBox.Items.AddRange(Champion.championList.Values.ToList().ConvertAll(champ => champ.name).ToArray());
            championComboBox.SelectedIndex = 0;
        }
Example #3
0
        public static void InitRunes()
        {
            #region Precision
            Runes Precision = new Runes("Precision");

            Precision.keystones.Add(new Rune("Press the Attack", Resources.Press_The_Attack));
            Precision.keystones.Add(new Rune("Lethal Tempo", Resources.Lethal_Tempo));
            Precision.keystones.Add(new Rune("Fleet Footwork", Resources.Fleet_Footwork));
            Precision.keystones.Add(new Rune("Conqueror", Resources.Conquerer));

            Precision.firstRow.Add(new Rune("Overheal", Resources.Overheal));
            Precision.firstRow.Add(new Rune("Triumph", Resources.Triumph));
            Precision.firstRow.Add(new Rune("Presence of Mind", Resources.Presence_of_Mind));

            Precision.secondRow.Add(new Rune("Legend: Alacrity", Resources.Legend_Alacrity));
            Precision.secondRow.Add(new Rune("Legend: Tenacity", Resources.Legend_Tenacity));
            Precision.secondRow.Add(new Rune("Legend: Bloodline", Resources.Legend_Bloodline));

            Precision.thirdRow.Add(new Rune("Coup de Grace", Resources.Coup_de_Grace));
            Precision.thirdRow.Add(new Rune("Cut Down", Resources.Cut_Down));
            Precision.thirdRow.Add(new Rune("Last Stand", Resources.Last_Stand));

            Precision.Register();
            #endregion
            #region Domination
            Runes Domination = new Runes("Domination");

            Domination.keystones.Add(new Rune("Electrocute", Resources.Electrocute));
            Domination.keystones.Add(new Rune("Predator", Resources.Predator));
            Domination.keystones.Add(new Rune("Dark Harvest", Resources.Dark_Harvest));
            Domination.keystones.Add(new Rune("Hail of Blades", Resources.Hail_of_Blades));

            Domination.firstRow.Add(new Rune("Cheap Shot", Resources.Cheap_Shot));
            Domination.firstRow.Add(new Rune("Taste of Blood", Resources.Taste_of_Blood));
            Domination.firstRow.Add(new Rune("Sudden Impact", Resources.Sudden_Impact));

            Domination.secondRow.Add(new Rune("Zombie Ward", Resources.Zombie_Ward));
            Domination.secondRow.Add(new Rune("Ghost Poro", Resources.Ghost_Poro));
            Domination.secondRow.Add(new Rune("Eyeball Collection", Resources.Eyeball_Collection));

            Domination.thirdRow.Add(new Rune("Ravenous Hunter", Resources.Ravenous_Hunter));
            Domination.thirdRow.Add(new Rune("Ingenious Hunter", Resources.Ingenious_Hunter));
            Domination.thirdRow.Add(new Rune("Relentless Hunter", Resources.Relentless_Hunter));
            Domination.thirdRow.Add(new Rune("Ultimate Hunter", Resources.Ultimate_Hunter));

            Domination.Register();
            #endregion
            #region Sorcery
            Runes Sorcery = new Runes("Sorcery");

            Sorcery.keystones.Add(new Rune("Summon Aery", Resources.Summon_Aery));
            Sorcery.keystones.Add(new Rune("Arcane Comet", Resources.Arcane_Comet));
            Sorcery.keystones.Add(new Rune("Phase Rush", Resources.Phase_Rush));

            Sorcery.firstRow.Add(new Rune("Nullifying Orb", Resources.Nullifying_Orb));
            Sorcery.firstRow.Add(new Rune("Manaflow Band", Resources.Manaflow_Band));
            Sorcery.firstRow.Add(new Rune("Nimbus Cloak", Resources.Nimbus_Cloak));

            Sorcery.secondRow.Add(new Rune("Transcendence", Resources.Transcendence));
            Sorcery.secondRow.Add(new Rune("Celerity", Resources.Celerity));
            Sorcery.secondRow.Add(new Rune("Absolute Focus", Resources.Absolute_Focus));

            Sorcery.thirdRow.Add(new Rune("Scorch", Resources.Scorch));
            Sorcery.thirdRow.Add(new Rune("Waterwalking", Resources.Waterwalking));
            Sorcery.thirdRow.Add(new Rune("Gathering Storm", Resources.Gathering_Storm));

            Sorcery.Register();
            #endregion
            #region Resolve
            Runes Resolve = new Runes("Resolve");

            Resolve.keystones.Add(new Rune("Grasp of the Undying", Resources.Grasp_of_the_Undying));
            Resolve.keystones.Add(new Rune("Aftershock", Resources.Aftershock));
            Resolve.keystones.Add(new Rune("Guardian", Resources.Guardian));

            Resolve.firstRow.Add(new Rune("Demolish", Resources.Demolish));
            Resolve.firstRow.Add(new Rune("Font of Life", Resources.Font_of_Life));
            Resolve.firstRow.Add(new Rune("Shield Bash", Resources.Shield_Bash));

            Resolve.secondRow.Add(new Rune("Conditioning", Resources.Conditioning));
            Resolve.secondRow.Add(new Rune("Second Wind", Resources.Second_Wind));
            Resolve.secondRow.Add(new Rune("Bone Plating", Resources.Bone_Plating));

            Resolve.thirdRow.Add(new Rune("Overgrowth", Resources.Overgrowth));
            Resolve.thirdRow.Add(new Rune("Revitalize", Resources.Revitalize));
            Resolve.thirdRow.Add(new Rune("Unflinching", Resources.Unflinching));

            Resolve.Register();
            #endregion
            #region Inspiration
            Runes Inspiration = new Runes("Inspiration");

            Inspiration.keystones.Add(new Rune("Glacial Augment", Resources.Glacial_Augment_Alt));
            Inspiration.keystones.Add(new Rune("Kleptomancy", Resources.Kleptomancy));
            Inspiration.keystones.Add(new Rune("Unsealed Spellbook", Resources.Unsealed_Spellbook));

            Inspiration.firstRow.Add(new Rune("Hextech Flashtraption", Resources.Hextech_Flashtraption));
            Inspiration.firstRow.Add(new Rune("Magical Footwear", Resources.Magical_Footwear));
            Inspiration.firstRow.Add(new Rune("Perfect Timing", Resources.Perfect_Timing));

            Inspiration.secondRow.Add(new Rune("Future's Market", Resources.Future_s_Market));
            Inspiration.secondRow.Add(new Rune("Minion Dematerializer", Resources.Minion_Dematerializer));
            Inspiration.secondRow.Add(new Rune("Biscuit Delivery", Resources.Biscuit_Delivery));

            Inspiration.thirdRow.Add(new Rune("Cosmic Insight", Resources.Cosmic_Insight));
            Inspiration.thirdRow.Add(new Rune("Approach Velocity", Resources.Approach_Velocity));
            Inspiration.thirdRow.Add(new Rune("Time Warp Tonic", Resources.Time_Warp_Tonic));

            Inspiration.Register();
            #endregion
            #region Shards
            Shard Adaptive_Forge = new Shard("Adaptive Force", Resources.Adaptive_Force);
            Adaptive_Forge.Register();

            Shard Attack_Speed = new Shard("Attack Speed", Resources.Attack_Speed);
            Attack_Speed.Register();

            Shard Cooldown_Reduction = new Shard("Cooldown Reduction", Resources.Cooldown_Reduction);
            Cooldown_Reduction.Register();

            Shard Armor = new Shard("Armor", Resources.Armor);
            Armor.Register();

            Shard Magic_Resist = new Shard("Magic Resist", Resources.Magic_Resistance);
            Magic_Resist.Register();

            Shard Health = new Shard("Health", Resources.Health);
            Health.Register();
            #endregion
        }