I tried to implement pin, a bot now could get components easily. A first problem is that with kc-masq hand bot refuses kc a masquerade. How could I tell him what to pass and what to trash?
A starting bot is here:
{
name: 'sillyfriend'
requires: ['Militia', 'Masquerade', "Quarry", "King's Court"]
gainPriority: (state, my) -> [
"King's Court" if my.countInDeck("King's Court") < 2
'Militia' if (my.countInDeck("King's Court") >= 2) && (my.countInDeck("Militia") < 1)
"Masquerade" if my.countInDeck("Masquerade") < 2
"Quarry" if my.countInDeck("Quarry") < 3
]
}
Wow, this was actually really close... Kudos! All I did past this, I guess, is I figured out how to tell him what to pass and trash(They're both actually the same priority in the code). And, I bought Chapel. That really helps, especially against things like DoubleMountebank
With quarry chapel will slow you down. With double masq opening and few quarries you quickly hit 7. That is problematic to add to bot (along with things like not trashing copper when you have 7 and so)
With added quarry and skipped chapel unless mountebank, following bot beats ghost ship 70% of times.
#Ruthlessly executes unsuspecting bots with the KC/Goons/Masquerade pin
{
name: 'QuarryPin'
requires: ["Chapel", "King's Court", "Masquerade", "Goons", "Quarry"]
gainPriority: (state, my) -> [
"King's Court" if my.countInDeck("King's Court") < 2
"Goons" if my.countInDeck("Goons") == 0
# If this bot somehow gets rid of its chapel later in the game,
# it won't try to acquire another one.
# "Chapel" if my.coins <= 4 and my.countInDeck("Chapel") == 0 and my.turnsTaken <= 2
# Would be three, if it wasn't for that nasty Baker 4/4 split
"Masquerade" if my.countInDeck("Masquerade") == 0
"Quarry" if my.countInDeck("King's Court") < 2 && my.countInDeck("Quarry") < 4
"Gold" if my.turnsTaken >= 50 #MAKE IT STOP
"Duchy" if my.turnsTaken >= 70
"Estate" if my.turnsTaken >= 90
"Chapel" if my.countInDeck("Curse") > 0 and my.countInDeck("Chapel") < 2 #just to counter that nasty DoubleMountebank. Guess you sometimes do have to buy a second Chapel
]
trashPriority: (state, my) -> [
"Curse"
"Estate"
"Copper"
"Silver" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') == 1
"Chapel"
#kill anything once the pin starts
"Gold" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') == 1
"Province" if my.countInDeck("King's Court") ==2 and my.countInDeck('Goons') == 1
"Duchy" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') == 1
"King's Court" if my.countInDeck("King's Court") > 2 and my.countInDeck('Goons') == 1
"Goons" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') > 1
"Masquerade" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') == 1 and my.countInDeck('Chapel') == 0
#anything else just trash
"Witch"
"Platinum"
"Colony"
"Wharf"
"Monument"
"Library"
"Bank"
"Envoy"
"Smithy"
"Mountebank"
"Young Witch"
"Ambassador"
"Ghost Ship"
"Jack of All Trades"
"Militia"
"Moneylender"
"Adventurer"
"Bazaar"
"Bridge"
"Chancellor"
"Coppersmith"
"Courtyard"
"Hunting Party"
"Nobles"
"Remake"
"Royal Seal"
"Scheme"
"Tournament"
"Baron"
#added these for Andrew's version
"Advisor"
"Beggar"
"Gardens"
"Journeyman"
"Baker"
"Vineyard"
"University"
"Scrying Pool"
"Alchemist"
"Potion"
"Rats"
"Masterpiece"
"Feodum"
"Duke"
"Rebuild"
"Horse Traders"
"Rogue"
"Plaza"
"Quarry"
#huh, new strategies, guess it has been a while
"Oasis"
"Watchtower"
"Develop"
"Festival"
"Talisman"
]
wantsToRebuild: (state, my) ->
return 0
wantsToJM: (state, my) ->
false
multipliedPriority: (state, card, my) -> [
"King's Court"
"Goons"
"Masquerade"
"Chapel"
]
}