Creating Custom Deck

54 views
Skip to first unread message

Ravi Theja

unread,
Jun 25, 2018, 10:22:19 AM6/25/18
to The Hearthstone-AI Competition
Hi,

To create a custom Deck, I did the following things : 
  • Add a List in SabberStoneCoreAi.Meta.Decks
  • Add the the Deck name to the enum CardClass in SabberStoneCore.Enums.CardClass
Could someone please let me know if this is the right way to do ?

 I get the exception when I run the game : 


System.NotImplementedException
  HResult=0x80004001
  Message=The method or operation is not implemented.
  Source=SabberStoneCore
  StackTrace:
   at SabberStoneCore.Model.Cards.HeroCard(CardClass cardClass)
   at SabberStoneCore.Model.Game..ctor(GameConfig gameConfig, Boolean setupHeroes)
   at SabberStoneCoreAi.POGame.POGameHandler.PlayGame(Boolean addToGameStats) in D:\CIG\Hearthstone\CIG_Competition\SabberStone\core-extensions\SabberStoneCoreAi\src\POGame\POGameHandler.cs:line 42
   at SabberStoneCoreAi.POGame.POGameHandler.PlayGames(Int32 nr_of_games, Boolean addToGameStats) in D:\CIG\Hearthstone\CIG_Competition\SabberStone\core-extensions\SabberStoneCoreAi\src\POGame\POGameHandler.cs:line 105
   at SabberStoneCoreAi.Program.Main(String[] args) in D:\CIG\Hearthstone\CIG_Competition\SabberStone\core-extensions\SabberStoneCoreAi\src\Program.cs:line 35



CustomDeck.JPG

dockhorn....@gmail.com

unread,
Jun 25, 2018, 10:27:16 AM6/25/18
to The Hearthstone-AI Competition
Hi,
adding a decklist as you have done it in the Meta Class should suffice.
You should not change the CardClass Enum. This is for assigning a cardclass to a specific card.
Cards can either be neutral or belong to one of the 9 hero classes.
When building a deck the usual deck restrictions do apply.

You can test the deck using the following gameConfig:

GameConfig gameConfig = new GameConfig
            {
                StartPlayer = 1,
                Player1HeroClass = CardClass.WARRIOR, // <- put your hero class here
                Player2HeroClass = CardClass.WARRIOR,
                Player1Deck = Decks.AggroPirateWarrior, // <- put your new deck here
                Player2Deck = Decks.AggroPirateWarrior,
                FillDecks = true,
                Logging = false
            };
Reply all
Reply to author
Forward
0 new messages