What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How good is the bot drafter?

youroriginal

New Member
Joined
Dec 20, 2014
Messages
7
has anyone test the arena draft to see if its good? i saw an option that says " must draft arena"
 
The current ArenaValues system was used from the previous version just to have something in place. We plan an entirely new system, as well as the ability for users to develop their own systems, but there's no time to get into that just yet.

I'll be making a few new threads soon for community collaboration as to what people want vs what we've been able to provide to resolve that issue. If you check out the file: "Routines\DefaultRoutine\DefaultRoutine.cs" and look at the ArenaDraftLogic coroutine, you'll see this code:
Code:
public async Task ArenaDraftLogic(ArenaDraftData data)
        {
            Log.InfoFormat("[ArenaDraft]");

            // We don't have a hero yet, so choose one.
            if (data.Hero == null)
            {
                Log.InfoFormat("[ArenaDraft] Hero: [{0} ({3}) | {1} ({4}) | {2} ({5})].",
                    data.Choices[0].EntityDef.CardId, data.Choices[1].EntityDef.CardId, data.Choices[2].EntityDef.CardId,
                    data.Choices[0].EntityDef.Name, data.Choices[1].EntityDef.Name, data.Choices[2].EntityDef.Name);

                // TODO: Quest support logic. Localization is an issue, but we'll manage...
                foreach (var quest in TritonHs.CurrentQuests)
                {
                    try
                    {
                        var parts = quest.Name.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);
                        if (parts.Length == 4)
                        {
                            if (parts[1].ToLowerInvariant().Equals("or") &&
                                parts[3].ToLowerInvariant().Equals("victory"))
                            {
                                var class1 = (TAG_CLASS) Enum.Parse(typeof (TAG_CLASS), parts[0].ToUpperInvariant());
                                var class2 = (TAG_CLASS) Enum.Parse(typeof (TAG_CLASS), parts[2].ToUpperInvariant());

                                foreach (var choice in data.Choices)
                                {
                                    if ((TAG_CLASS)choice.EntityDef.Class == class1 || (TAG_CLASS)choice.EntityDef.Class == class2)
                                    {
                                        data.Selection = choice;
                                        Log.InfoFormat(
                                            "[ArenaDraft] Choosing hero \"{0}\" because it matches a current quest.",
                                            data.Selection.EntityDef.Name);
                                        return;
                                    }
                                }
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Log.ErrorFormat(
                            "[ArenaDraft] An Exception occurred when trying to process current quests: {0}.", ex);
                    }

                }

                // TODO: I'm sure there's a better way to do this, but w/e, no time to waste right now.

                // #1
                foreach (var choice in data.Choices)
                {
                    if ((TAG_CLASS)choice.EntityDef.Class == DefaultRoutineSettings.Instance.ArenaPreferredClass1)
                    {
                        data.Selection = choice;
                        Log.InfoFormat(
                            "[ArenaDraft] Choosing hero \"{0}\" because it matches the first preferred arena class.",
                            data.Selection.EntityDef.Name);
                        return;
                    }
                }

                // #2
                foreach (var choice in data.Choices)
                {
                    if ((TAG_CLASS)choice.EntityDef.Class == DefaultRoutineSettings.Instance.ArenaPreferredClass2)
                    {
                        data.Selection = choice;
                        Log.InfoFormat(
                            "[ArenaDraft] Choosing hero \"{0}\" because it matches the second preferred arena class.",
                            data.Selection.EntityDef.Name);
                        return;
                    }
                }

                // #3
                foreach (var choice in data.Choices)
                {
                    if ((TAG_CLASS)choice.EntityDef.Class == DefaultRoutineSettings.Instance.ArenaPreferredClass3)
                    {
                        data.Selection = choice;
                        Log.InfoFormat(
                            "[ArenaDraft] Choosing hero \"{0}\" because it matches the third preferred arena class.",
                            data.Selection.EntityDef.Name);
                        return;
                    }
                }

                // #4
                foreach (var choice in data.Choices)
                {
                    if ((TAG_CLASS)choice.EntityDef.Class == DefaultRoutineSettings.Instance.ArenaPreferredClass4)
                    {
                        data.Selection = choice;
                        Log.InfoFormat(
                            "[ArenaDraft] Choosing hero \"{0}\" because it matches the fourth preferred arena class.",
                            data.Selection.EntityDef.Name);
                        return;
                    }
                }

                // #5
                foreach (var choice in data.Choices)
                {
                    if ((TAG_CLASS)choice.EntityDef.Class == DefaultRoutineSettings.Instance.ArenaPreferredClass5)
                    {
                        data.Selection = choice;
                        Log.InfoFormat(
                            "[ArenaDraft] Choosing hero \"{0}\" because it matches the fifth preferred arena class.",
                            data.Selection.EntityDef.Name);
                        return;
                    }
                }

                // Choose a random hero.
                data.RandomSelection();

                Log.InfoFormat(
                    "[ArenaDraft] Choosing hero \"{0}\" because no other preferred arena classes were available.",
                    data.Selection.EntityDef.Name);

                return;
            }

            // Normal card choices.
            Log.InfoFormat("[ArenaDraft] Hero: [{0} ({3}) | {1} ({4}) | {2} ({5})].", data.Choices[0].EntityDef.CardId,
                data.Choices[1].EntityDef.CardId, data.Choices[2].EntityDef.CardId, data.Choices[0].EntityDef.Name,
                data.Choices[1].EntityDef.Name, data.Choices[2].EntityDef.Name);

            /*Log.InfoFormat("[ArenaDraft] Current Deck:");
            foreach (var entry in data.Deck)
            {
                Log.InfoFormat("[ArenaDraft] {0} ({1})", entry.CardId, entry.Name);
            }*/

            var actor =
                data.Choices.Where(c => ArenavaluesReader.Get.ArenaValues.ContainsKey(c.EntityDef.CardId))
                    .OrderBy(c => ArenavaluesReader.Get.ArenaValues[c.EntityDef.CardId]).FirstOrDefault();
            if (actor != null)
            {
                data.Selection = actor;
            }
            else
            {
                data.RandomSelection();
            }
        }

I just realized something though, and that the arena value selection is inversed. it should be picking cards with higher value, but it sorts them by lower value, so that's why the card selections are terrible. The ".OrderBy" should be "OrderByDescending" I believe. This was just a porting mistake on my part, and we'll try to get it fixed in the next version.

In the bottom part, you'll see you have access to the current deck, as well as the current choices. You have to use the EntityDef object to get things like CardId and the mana cost, and any other exposed data, but users will be able to developer their own routines that have full customizable systems. What I want to do is use the Python setup so people can just give it a bunch of rules, but once again, just not enough time to fully develop those systems.

Was just updated recently, and is only going to get better!
 
Ehh it was alright, pick some bad cards over clearly easy picks. Went 3-2 with 5 legendary's so if that says anything haha
 
Same draft system as before, don't except 12 wins. But it will get better and better
 
Back
Top