Hello everyone I will try to explain how to set the mulligan.txt file with SilverFish. For people who don't know what mean the term mulligan here is a quick explanation : It's at the very start when it gives you the option of returning some of your cards for new ones. Mulliganing refers to swapping the cards. If HearthStone gives you 6 cost cards at the beginning, those are not good to play at beginning. So you swap and hope for more useable cards (less mana). That would be a mulligan.
__________________________________________________________
24-09-2015: Updated for last changes mulligan rules from botmaker (
here)
__________________________________________________________
First of all I want to thank
botmaker for his excellent work (A.I.) and also
JoyAdmin for its fabulous bot !! Thank you guys this great tools !!
Well, let's start the explanations :STEP 1First we need to create the file "
_mulligant.txt" that will be in the same directory as the file "
_carddb.txt", you can find it in the following directory "
HearthRanger-Folder\ExternBot\silverfish"
STEP 2Then open this created "
_mulligan.txt" file with an
txt-editor of your choice, and you are ready to start creating your own mulligan rules.
A typical line of a mulligan file will look like this:
hold;mage;all;Card_A:1,Card_B,Card_C;coin;3 or
discard;all;druid;Card_A,Card_B,Card_C;nocoin;4EXPLANATIONLet's take this line as an example ==>
hold;mage;all;Card_A,Card_B:1,Card_C;always;3The first word can be "
hold" or "
discard" which tells to the A.I., whether you want to hold the following cards or discards them. After this keyword (hold or discard) you have to write a ";" (very important and without quote of course) !
The second item is the own class you will be using for the following rule. In our case, the rule in this line will be only used, whether you are using a
mage.
Here is the list, which word you can use (instead of mage) :
all, hunter, priest, druid, warlock, thief, pala, warrior, shaman or mage.
If you use the word "
all" instead of a class-name, the own selected hero doesn't matter, the rule will be used for every class !
The third item (which stands right behind an "
;") is the name of the enemy-class, which you are facing.
You can use this words again :
all, hunter, priest, druid, warlock, thief, pala, warrior, shaman or mage.
If you use the word "
all" instead of a class-name, the class of the enemy hero doesn't matter, the rule will be used against every class !
So the fourth "item" which is seperated by "
;" is the list of the cards-id's, we want to
hold/discard, in our case :
Card_A,Card_B:1,Card_CNOTE : you find the card-id in the "
_carddb.txt" file! (search for the name and and a few lines above it you will find such a line : <Entity version="2" CardID="XXX-XXXX"> the XXX-XXXX is the cardid you are looking for !
The fifth "item" wich is seperated by "
;" is the "
coin" rule, use the
hold/discard rule only if you holding the coin or not (or in both cases) :
hold;mage;all;Card_A,Card_B:1,Card_C;coin;3 ==> will use this rule only if you are holding the coin, your enemy has first turn
hold;mage;all;Card_A,Card_B:1,Card_C;nocoin;3 ==> will use this rule only if you are starting first
hold;mage;all;Card_A,Card_B:1,Card_C;always;3 OR
hold;mage;all;Card_A,Card_B:1,Card_C;;3 ==> will use this rule in both cases (you can use every word except "coin" & "nocoin")
To create such a list, you have to follow this rules :
- consider upper and lower case!
- each card you want to
hold/discard is seperated by a
comma ! (like this :
Card_A,Card_B,Card_C)
- for HOLD-rules, (a line which starts with the word "hold"), you are able to specific how mutch cards should be holded, by adding "
:1" (if you want to hold just one card of this specific card) or "
:2" (if you want to hold two cards of this specific card) right after the card-id ! (if you dont write
:1 or
:2 after the card id, the A.I. will hold 2 cards in the start-hand !)
So this line : hold;all;all;Card_A:1Will discard one card ex: Elven Archer (
Card_A), whether you got two of them in your starting hand !
- Also for HOLD-rules: you are able to add "condition-cards" for holding the specific card, by adding "
:" and the cardid(s) you want in starting-hand, for keeping the selected card !
Example : hold;all;all;Card_A:1:Card_BWill hold the card
Card_A (one time), only if you also got a
Card_B in the starting-hand. So if you don't hold a
Card_B, "
hold;all;all;Card_A:1:Card_B" will discard all
Card_A !
Attention : this option requires the declaration of the number of cards you want to hold ! So
Card_A:Card_B this is forbidden !!! Write
Card_A:2:Card_B instead !!!
If you want to hold the card
Card_A whether you also hold a
Card_B OR a
Card_C just separate them (condition-cards) with a "
/".
Example : hold;all;all;Card_A:1:Card_B/Card_C (you can add as many "condition-cards" as you want, like
Card_A:1:Card_B/Card_C/Card_D/...)
If you want to hold the card
Card_A whether you also hold a
Card_B AND a
Card_C just separate them (condition-cards) with a "
+".
Example : hold;all;all;Card_A:1:Card_B+Card_C (you can add as many "condition-cards" as you want, like
Card_A:1:Card_B+Card_C+Card_D+...)
Example : hold;all;all;Card_A:1:Card_B+Card_C/Card_D/Card_E+Card_F+Card_G (will holds
Card_A if you are holding
Card_B AND
Card_C OR just
Card_D OR
Card_E AND
Card_F AND
Card_G)
This allows to add rules like "hold
Card_A and
Card_B ONLY if you have all two of them, elsewise discard the card you are holding"
Card_A:1:Card_B,Card_B:1:Card_A,... will hold
Card_B only if you also have the
Card_A on starting hand, and reverse. so you need both cards to hold them.
Tips : It will hold automatically 1 one card of every "case-card" that is fulfilling the holding-rule so if you are using this rule :
hold;all;all;Card_A:1:Card_B+Card_C/Card_D and you have
Card_A,
Card_B, 2 x
Card_C and
Card_G in your hand, it will automatically
hold Card_A,
Card_B and one
Card_C (and it will throw a
Card_C and
Card_G away, if you don't have other rules). But if you are holding
Card_A,
Card_B,
Card_C,
Card_D and
Card_G it will only throw
Card_G away !!
And the last "item" separated by a "
;" is just a number (in our example a
3) : this adds the ability for HOLD-rules, to hold cards with
LESS OR EQUAL mana costs, or discard them (for DISCARD-rules) whether they have
HIGHER OR EQUAL mana costs !
Example : hold;all;all;CS2_222:1,EX1_019;;2This line will hold all cards with mana <=
;2 AND the one stormwind-champion and 2 shattered sun cleric's (if you have them in the starting-hand), this mana-border is OPTIONAL, you don't have to add this if you don't need it !
So just use : hold;mage;all;CS2_106,CS2_189:1,CS2_222 instead of
hold;mage;all;CS2_106,CS2_189:1,CS2_222;;3 (whether you don't want to use this mana-border)
BUT if you want to add only a mana-border, (example
3 mana) you have to write :
hold;all;all;;;3 (it needs 5 "
;" before the mana-border)
Note : after you create a rule for Class_A, but you are boting with Class_B, but you don't made any rule for that hero, the Silver A.I. will use a simple default rule for mulligan.
I hope that the explanations are enough clear and i add colors in that way it's easier to understand, if you have any doubts or questions don't hesitate to comment this thread !!
__________________________________________________________
If this tuto help you please click the THANKS BUTTON :)
Source : From botmaker and HB.