Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Tavern Brawl - Json files to mulligan and only play that card?
Knight8
#1 Posted : Thursday, June 29, 2017 6:10:54 AM(UTC)
Rank: Member

Groups: Registered
Posts: 12

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hi everyone, so I'm fairly new to hearthranger, this weeks tavern brawl lets you choose a card and then you get 22 copies of it with 8 class cards.
I've taken a look at some Json files I had for other configs and attempted to edit them to mulligan for and just spam that one card but can't get it to work.

The scenario is I've picked priest with mind blast so I want the AI to just coin and mind blast turn one (if I have the coin) and then each turn just play as many mind blasts as possible before ending the turn. I've found doing this usually ends the game at around turn 4-5, making it easy to grind out the maximum gold for wins each day.

I feel like this would be very simple but as I said I attempted and failed, if anyone could write a quick file on this I would be very grateful!

EDIT: I've got the bot to use the correct config folder, it's just the json files that don't seem to work.
JoyAdmin
#2 Posted : Thursday, June 29, 2017 7:26:07 AM(UTC)
Rank: Administration

Groups: Administrators
Posts: 4,845

Thanks: 805 times
Was thanked: 4538 time(s) in 1636 post(s)
Here is how to:

1. create a directory named [my_brawl_config] under [CustomConfig] dir.

2. create a text file named [Mulligan.json] under [my_brawl_config], it controls bot to only hold mind blast.

{
"GameCardId":"Mulligan",
"ConfigComment":"This is mulligan rules file.",

"Mulligan":
{
"values":
[
{
"comment": "hold mind blast",
"mulligan":"DS1_233",
"condition": "*",
"value":"hold",
},
{
"comment": "discard all cards not listed as hold",
"mulligan":"*",
"condition": "*",
"value":"discard",
}
],


},

}

3. in [deck_config.ini] under [CustomConfig], add the following text under [CONFIGS] section

[CONFIGS]
Brawl Deck=my_brawl_config
Knight8
#3 Posted : Thursday, June 29, 2017 7:35:26 AM(UTC)
Rank: Member

Groups: Registered
Posts: 12

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
JoyAdmin;50289 wrote:
Here is how to:

1. create a directory named [my_brawl_config] under [CustomConfig] dir.

2. create a text file named [Mulligan.json] under [my_brawl_config], it controls bot to only hold mind blast.

{
"GameCardId":"Mulligan",
"ConfigComment":"This is mulligan rules file.",

"Mulligan":
{
"values":
[
{
"comment": "hold mind blast",
"mulligan":"DS1_233",
"condition": "*",
"value":"hold",
},
{
"comment": "discard all cards not listed as hold",
"mulligan":"*",
"condition": "*",
"value":"discard",
}
],


},

}

3. in [deck_config.ini] under [CustomConfig], add the following text under [CONFIGS] section

[CONFIGS]
Brawl Deck=my_brawl_config


Thats great for the mulligan file but the bot still seems to play the class cards if it can, is there a way to have it ignore the class cards/only play mind blast?
Bot_User_4
#4 Posted : Thursday, June 29, 2017 7:56:14 AM(UTC)
Rank: Newbie

Groups: Registered
Posts: 9

Thanks: 2 times
Add this as DS1_233.json , this will make the bot play Mindblast whenever it can



{
"GameCardId":"DS1_233",
"ConfigComment":"Mindblast: Always Play",

"InHandPlayPriority":

{

"values":

[

{

"condition": "*",

"value":"100000",

}

],

},

}





Add this file as Combo.json, it gives positive value to coining Mindblast



{
"GameCardId":"Combo",
"ConfigComment":"Aggro Paladin Combos",

"ComboList":
{
"values":
[
{
"comment":"Coin --> Mindblast",
"condition": "*",
"combo":"GAME_005 >> DS1_233",
"value":"100 >> 100",
}

],
},

}
Knight8
#5 Posted : Thursday, June 29, 2017 8:27:15 AM(UTC)
Rank: Member

Groups: Registered
Posts: 12

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Bot_User_4;50291 wrote:
Add this as DS1_233.json , this will make the bot play Mindblast whenever it can



{
"GameCardId":"DS1_233",
"ConfigComment":"Mindblast: Always Play",

"InHandPlayPriority":

{

"values":

[

{

"condition": "*",

"value":"100000",

}

],

},

}





Add this file as Combo.json, it gives positive value to coining Mindblast



{
"GameCardId":"Combo",
"ConfigComment":"Aggro Paladin Combos",

"ComboList":
{
"values":
[
{
"comment":"Coin --> Mindblast",
"condition": "*",
"combo":"GAME_005 >> DS1_233",
"value":"100 >> 100",
}

],
},

}


Thanks for the reply but that doesn't seem to have worked, on turn 4 the bot played Dark cultist and a mind blast when another mind blast was in hand :/
Bot_User_4
#6 Posted : Thursday, June 29, 2017 8:29:28 AM(UTC)
Rank: Newbie

Groups: Registered
Posts: 9

Thanks: 2 times
Alright, I would check to see if there was anything wrong, but did the bot coin out mindblast on turn 1?
Bot_User_4
#7 Posted : Thursday, June 29, 2017 8:33:31 AM(UTC)
Rank: Newbie

Groups: Registered
Posts: 9

Thanks: 2 times
Ok, I changed it a bit, It should work now

{
"GameCardId":"DS1_233",
"ConfigComment":"Mindblast: Always Play",

"BeforePlayCardBonus":
{
"values":
[
{
"comment":"always play this",
"condition": "my_hero(count(),priest)>0",
"value":"1000",
},

],
},

}
Knight8
#8 Posted : Thursday, June 29, 2017 8:36:36 AM(UTC)
Rank: Member

Groups: Registered
Posts: 12

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Bot_User_4;50295 wrote:
Ok, I changed it a bit, It should work now

{
"GameCardId":"DS1_233",
"ConfigComment":"Mindblast: Always Play",

"BeforePlayCardBonus":
{
"values":
[
{
"comment":"always play this",
"condition": "my_hero(count(),priest)>0",
"value":"1000",
},

],
},

}

I added:

"GameCardId":"*",
"ConfigComment":"Never Play",

"InHandPlayPriority":

{"values":
[
{
"condition": "*",
"value":"0.01",
}
],
},

to the end of the json file and it seems to be working now, only other thing is it uses the hero power to heal myself, how do i set this value to 0.1 aswell?

EDIT: yes the bot seems to coin mind blast on turn one :)
Bot_User_4
#9 Posted : Thursday, June 29, 2017 8:45:40 AM(UTC)
Rank: Newbie

Groups: Registered
Posts: 9

Thanks: 2 times
It doesn't actually use the hero power for me, but try this file, as usual, save it as CS1h_001.json
In case you also want to know where to get the card ID, you can view "Edit Task" > "View Cards", and then search for the card you want.

{
"GameCardId":"CS1h_001",
"ConfigComment":"Lesser Heal: Never Play",

"BeforePlayCardBonus":
{
"values":
[
{
"comment":"never play this",
"condition": "my_hero(count(),priest)>0",
"value":"-1000",
},

],
},

}
Knight8
#10 Posted : Thursday, June 29, 2017 8:52:17 AM(UTC)
Rank: Member

Groups: Registered
Posts: 12

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Bot_User_4;50297 wrote:
It doesn't actually use the hero power for me, but try this file, as usual, save it as CS1h_001.json
In case you also want to know where to get the card ID, you can view "Edit Task" > "View Cards", and then search for the card you want.

{
"GameCardId":"CS1h_001",
"ConfigComment":"Lesser Heal: Never Play",

"BeforePlayCardBonus":
{
"values":
[
{
"comment":"never play this",
"condition": "my_hero(count(),priest)>0",
"value":"-1000",
},

],
},

}

it was only when id dropped below 20 health it'd start to use the hero power but it was rare. Ive added that code so not ill let it run and test it :) thanks for your help! been great to learn a little about the coding, might even give writing one a go :) I didn't know about the card id section, i was using hearthstoneapi.com to find it haha

EDIT: Seems to be working great :) thanks for your help, im up to 18 wins so far :) my only regret is not choosing druid with jade idol, its the only deck thats out damaging the mind blasts haha
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.138 seconds.