Ok, there we go. I'm presenting my solution to gain 1144984654515892827802567314832769041691676863703131934603190188997614567578185624581386001307608095799276860334911251291698220220124267149219119259379847134047965330424563783312811937771607123581116388968371135803349729156312659169172550861545293360578603315678770088698740345651496923537838329278268646846918631291238187081449787678296076025654416968734506964357922542056120438195935493686733002703535684515870737600547923211804992822638054047480607618340221073896765506754445939988036352567644956492571362257210164493681791996415538665998509593878443259663136974182438382670373276114935342739800093147793641723534331508332889243431764867853726235461445918410783841767574478283420722697738019398918273507776666078694781664920 silvers on a single turn, and I'll write big numbers like that as 1.14E727 from here on.
First of all, I should say that the forum caught up with all but one of my tricks, and I caught up with most things liopoil included. (I don't quite get the catacombs but I figured they didn't help much - I might not have everything else optimized and I'm sure people will find bigger numbers if they keep looking). We exchanged some ideas left & right, provided some clues, there you go.
For those of you unaware of the plan to reach 630-ish digits, I'll present that as well. After all, I'm supposed to give a full solution.
We put Pathfinding, Seaway and Training on Band of Misfits (use ferry).
We put Inheritance on Horse Traders.
We use some Ambassador/Moat-ing to get 6 Rocks on top of the Catapult/Rocks pile, then use masq to trash that Amb+Moat.
Turn T-3 by opponent:
play crossroads, play 3x councilroom
Turn T-2 by us:
8x golem, play all, finding 2x Necro, crossroads, 13 * Haunted Woods. Buy save (set aside estate).
at the end of this turn you reshuffle and redraw both your necros. Everything else you draw is inherited Estate.
Turn T-1A (Regular) by opponent:
golem into masq + crossroads (give estate, get necropolis)
golem into masq + storeroom (give estate, get necropolis, discard both necropolis)
golem into necro + necro
golem into outpost + councilroom
4x golem into councilroom + councilroom
opponent buys Messenger (getting us rocks, drawing Silver) and Mission.
Turn T-1B (Outpost) by opponent
golem into councilroom + crossroads
golem into necro + necro
6x golem into councilroom + councilroom
Turn T-1C (Mission) by opponent
golem into councilroom + crossroads
golem into councilroom + councilroom
golem into councilroom + swindler
golem into masquerade + masquerade (Sending Necro, getting Silver)
-> Our hand was 2x Necro, 4x Estate at the start of T-1A.
Our Necro's were replaces by estates.
We got 26 more Estates from Councilrooms.
We got 4 Silvers in hand (2 from Messengers on Rocks, 2 from a Swindler replacing Rocks with Rocks)
We set aside all 32 Estates on the Swindler play.
The last two masquerades replaced 2 Silvers with 2 Necro's
-> At the start of our turn we have 2 necropolis and 2 silver.
We return the 32 Esatetes and draw 31 Harems with them and a Golem
We also draw 13*3 = 39 Harems from the Haunted Woods.
This part of the 1E638 and the 1E727 plan are identical. Now it's time for the payload turn, and on this turn we get to play 13 actions with golems. The idea is very much the same as on Turn T-1B(outpost): We play 8 golems: the first finds a Crossroads, the 4th and the 6th find a Necropolis.
In the 1E638 plan we use those 13 "payload slots" on alternating Black martket and Storeroom. There are some details to keep in mind:
1) on the first black market play, we add a Fortune. Doubling the money early is better than doubling it later.
2) we can't just find those Necropolises with our Golem, because they will be in our discard and our drawpile is huge. However, the drawpile is mostly rocks, and we simply skip over all the actions with the last storeroom before the golem that needs to find necro. Skipping over ~100 cards is no problem when our handsize is already having 100 digits.
Here is the output from my computer program alternating Black Markets and Storerooms:
13 duration haunted woods increases Harems by 39 to total of 39
returning horse traders to hand increases EstateHorseTraders by 32 to total of 32
returning horse traders draws increases Harems by 31 to total of 70
from opponent messengers into rocks increases SilversInHand by 2 to total of 2
Playing a Golem
Playing a Crossroads
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
drawing a bank for each harem increases Banks by 70 to total of 71
drawing a bank for each horse traders increases Banks by 32 to total of 103
requiring 1 golems decreases Banks by 1 to total of 102
requiring 1 fortune decreases Banks by 1 to total of 101
crossroads draws it increases Fortunes by 1 to total of 1
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 102
playing black market increases Coins by 2 to total of 4
playing all Harems increases TreasuresInPlay by 70 to total of 70
playing all Harems increases Coins by 140 to total of 144
playing all reset Harems to 0
playing all SilversInHand increases TreasuresInPlay by 2 to total of 72
playing all SilversInHand increases Coins by 4 to total of 148
playing all reset SilversInHand to 0
I'm playing 102 of my 102 banks
Average bank is worth half of 247
playing 102 banks increases Coins by 12597 to total of 12745
playing banks increases TreasuresInPlay by 102 to total of 174
played banks decreases Banks by 102 to total of 0
Playing fortune increases Coins by a factor of 2 to total of 25490
just played it reset Fortunes to 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 25489 to total of 25489
used all money on doctor reset Coins to 0
Playing a Golem
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
discarded all to storeroom reset SilversInHand to 0
discarding all to storeroom reset EstateHorseTraders to 0
drawing with storeroom increases Banks by 25520 to total of 25521
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 25522
playing black market increases Coins by 2 to total of 4
I'm playing 25522 of my 25522 banks
Average bank is worth half of 25871
playing 25522 banks increases Coins by 330139831 to total of 330139835
playing banks increases TreasuresInPlay by 25522 to total of 25696
played banks decreases Banks by 25522 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 330139834 to total of 330139834
used all money on doctor reset Coins to 0
Playing a Golem
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
discarded all to storeroom reset SilversInHand to 0
drawing with storeroom increases Banks by 330139833 to total of 330139834
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 330139835
playing black market increases Coins by 2 to total of 4
I'm playing 330139835 of my 330139835 banks
Average bank is worth half of 330191228
playing 330139835 banks increases Coins by 5.44E17 to total of 5.44E17
playing banks increases TreasuresInPlay by 330139835 to total of 330165531
played banks decreases Banks by 330139835 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 5.44E17 to total of 5.44E17
used all money on doctor reset Coins to 0
Playing a Golem
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
discarded all to storeroom reset SilversInHand to 0
drawing with storeroom increases Banks by 5.44E17 to total of 5.44E17
Playing a Necropolis
Playing a Golem
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 5.44E17
playing black market increases Coins by 2 to total of 4
I'm playing 5.44E17 of my 5.44E17 banks
Average bank is worth half of 5.44E17
playing 5.44E17 banks increases Coins by 1.44E34 to total of 1.44E34
playing banks increases TreasuresInPlay by 5.44E17 to total of 5.44E17
played banks decreases Banks by 5.44E17 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 1.44E34 to total of 1.44E34
used all money on doctor reset Coins to 0
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
discarded all to storeroom reset SilversInHand to 0
drawing with storeroom increases Banks by 1.44E34 to total of 1.44E34
Playing a Golem
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 1.44E34
playing black market increases Coins by 2 to total of 4
I'm playing 1.44E34 of my 1.44E34 banks
Average bank is worth half of 1.44E34
playing 1.44E34 banks increases Coins by 1.11E67 to total of 1.11E67
playing banks increases TreasuresInPlay by 1.44E34 to total of 1.44E34
played banks decreases Banks by 1.44E34 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 1.11E67 to total of 1.11E67
used all money on doctor reset Coins to 0
Playing a Necropolis
Playing a Golem
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
discarded all to storeroom reset SilversInHand to 0
drawing with storeroom increases Banks by 1.11E67 to total of 1.11E67
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 1.11E67
playing black market increases Coins by 2 to total of 4
I'm playing 1.11E67 of my 1.11E67 banks
Average bank is worth half of 1.11E67
playing 1.11E67 banks increases Coins by 6.00E132 to total of 6.00E132
playing banks increases TreasuresInPlay by 1.11E67 to total of 1.11E67
played banks decreases Banks by 1.11E67 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 6.00E132 to total of 6.00E132
used all money on doctor reset Coins to 0
Playing a Golem
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
discarded all to storeroom reset SilversInHand to 0
drawing with storeroom increases Banks by 6.00E132 to total of 6.00E132
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 6.00E132
playing black market increases Coins by 2 to total of 4
I'm playing 6.00E132 of my 6.00E132 banks
Average bank is worth half of 6.00E132
playing 6.00E132 banks increases Coins by 1.88E264 to total of 1.88E264
playing banks increases TreasuresInPlay by 6.00E132 to total of 6.00E132
played banks decreases Banks by 6.00E132 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 1.88E264 to total of 1.88E264
used all money on doctor reset Coins to 0
ran out of actions
playing all SilversInHand increases TreasuresInPlay by 1.88E264 to total of 1.88E264
playing all SilversInHand increases Coins by 3.77E264 to total of 3.77E264
playing all reset SilversInHand to 0
I'm playing 0 of my 0 banks
Average bank is worth half of 3.77E264
Use travelling fair to get 5.22E263 buys
Raid is worth 9.77E526 silvers
Raid is worth 9792714001821727000070107334949971686771078749904813765885453908814580748804177525075179323487691615697973940873964165126139583785005470784439416206017754876198357521361240030641781258784600843630065615714511786325079708202071648458563198365972098015067392607921171333887579103558357285950169478882391212601296212552569126941055145110203744766705831134004787763014441730857259485433594481004383783931943030045532447473863185796087824311361295287040597787912773676267522052313043003362484230907158938492930844176496787623104284 silvers
As you can see I get to 6.00E132 banks, resulting in 9.77E526 gains. Somehow lio got up to 1E150 banks with what should be the same plan, so maybe he has a few more tricks up his sleeve. However, now let's finally get to the improvements for the last 100 digits.
The whole clue of that trick is that it's better to not play all your banks. This might sound strange at first, but let's have a look at what happens on the last black market play.
Suppose of those 6.00E132 banks I play "only" 4.00E132 and keep the other 2.00E132 in my wallet. Now of course I can overpay for the doctor less, so I draw 8.22E263 Silvers instead of the 1.88E264 Silvers I would have drawn had I played all of my banks. But now I go to my buy phase, and after playing those 8.22E263 Silvers I still have the 2.00E132 banks I saved up and now they make much more money!
Using this idea on the last buyphase I get to 1.99E657 gains. Ephesos was using the same idea but got to 1E638, I don't know whats up with that.
But the real beauty is that we can use this trick multiple times throughout our solution. Instead of going
BlackMarket -> Storeroom-> Black Market -> Storeroom-> Black Market -> Storeroom
we will be using
BlackMarket(2/3) -> Black Market (all) -> Storeroom-> Black Market (2/3) -> Black Market(all) -> Storeroom.
This means the average black market play is a bit worse than it was in the original plan, but we do manage to get in 9 Black Market plays instead of just 7. Enough to make up for another 80-ish digits.
after doing a bit of fiddling with the numbers this now is my plan:
Card[][] plan = {
{new Crossroads(1), new BlackMarket(Mode.ALL)},
{new StoreRoom(1), new BlackMarket(Mode.TWO_THIRD)},
{new BlackMarket(Mode.ALL), new StoreRoom(2)},
{new BlackMarket(Mode.TWO_THIRD), new Necropolis()},
{new BlackMarket(Mode.ALL), new StoreRoom(2)},
{new BlackMarket(Mode.TWO_THIRD), new Necropolis()},
{new BlackMarket(Mode.ALL), new StoreRoom(1)},
{new BlackMarket(Mode.TWO_THIRD), new BlackMarket(Mode.MAJORITY)},
};
It results in these numbers:
13 duration haunted woods increases Harems by 39 to total of 39
returning horse traders to hand increases EstateHorseTraders by 32 to total of 32
returning horse traders draws increases Harems by 31 to total of 70
from opponent messengers into rocks increases SilversInHand by 2 to total of 2
Playing a Golem
Playing a Crossroads
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
drawing a bank for each harem increases Banks by 70 to total of 71
drawing a bank for each horse traders increases Banks by 32 to total of 103
requiring 1 golems decreases Banks by 1 to total of 102
requiring 1 fortune decreases Banks by 1 to total of 101
crossroads draws it increases Fortunes by 1 to total of 1
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 102
playing black market increases Coins by 2 to total of 4
playing all Harems increases TreasuresInPlay by 70 to total of 70
playing all Harems increases Coins by 140 to total of 144
playing all reset Harems to 0
playing all SilversInHand increases TreasuresInPlay by 2 to total of 72
playing all SilversInHand increases Coins by 4 to total of 148
playing all reset SilversInHand to 0
I'm playing 102 of my 102 banks
Average bank is worth half of 247
playing 102 banks increases Coins by 12597 to total of 12745
playing banks increases TreasuresInPlay by 102 to total of 174
played banks decreases Banks by 102 to total of 0
Playing fortune increases Coins by a factor of 2 to total of 25490
just played it reset Fortunes to 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 25489 to total of 25489
used all money on doctor reset Coins to 0
Playing a Golem
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
We draw 2 extra banks because we discard 2 necropolis
discarded all to storeroom reset SilversInHand to 0
discarding all to storeroom reset EstateHorseTraders to 0
drawing with storeroom increases Banks by 25522 to total of 25523
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 25524
playing black market increases Coins by 2 to total of 4
I'm playing 16998 of my 25524 banks
Average bank is worth half of 17347
playing 16998 banks increases Coins by 147432153 to total of 147432157
playing banks increases TreasuresInPlay by 16998 to total of 17172
played banks decreases Banks by 16998 to total of 8526
Overpaying Doctor, trashing Rocks increases SilversInHand by 147432156 to total of 147432156
used all money on doctor reset Coins to 0
Playing a Golem
Playing a BlackMarket
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 8527
playing black market increases Coins by 2 to total of 3
playing all SilversInHand increases TreasuresInPlay by 147432156 to total of 147449328
playing all SilversInHand increases Coins by 294864312 to total of 294864315
playing all reset SilversInHand to 0
I'm playing 8527 of my 8527 banks
Average bank is worth half of 294907184
playing 8527 banks increases Coins by 1.22E13 to total of 1.22E13
playing banks increases TreasuresInPlay by 8527 to total of 147457855
played banks decreases Banks by 8527 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 1.22E13 to total of 1.22E13
used all money on doctor reset Coins to 0
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
We draw 100 less banks because we need to skip over some actions
discarded all to storeroom reset SilversInHand to 0
drawing with storeroom increases Banks by 1.22E13 to total of 1.22E13
Playing a Golem
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 1.22E13
playing black market increases Coins by 2 to total of 4
I'm playing 8.33E12 of my 1.22E13 banks
Average bank is worth half of 8.33E12
playing 8.33E12 banks increases Coins by 3.55E24 to total of 3.55E24
playing banks increases TreasuresInPlay by 8.33E12 to total of 8.33E12
played banks decreases Banks by 8.33E12 to total of 4.22E12
Overpaying Doctor, trashing Rocks increases SilversInHand by 3.55E24 to total of 3.55E24
used all money on doctor reset Coins to 0
Playing a Necropolis
Playing a Golem
Playing a BlackMarket
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 4.22E12
playing black market increases Coins by 2 to total of 3
playing all SilversInHand increases TreasuresInPlay by 3.55E24 to total of 3.55E24
playing all SilversInHand increases Coins by 7.00E24 to total of 7.00E24
playing all reset SilversInHand to 0
I'm playing 4.22E12 of my 4.22E12 banks
Average bank is worth half of 7.00E24
playing 4.22E12 banks increases Coins by 1.44E36 to total of 1.44E36
playing banks increases TreasuresInPlay by 4.22E12 to total of 3.55E24
played banks decreases Banks by 4.22E12 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 1.44E36 to total of 1.44E36
used all money on doctor reset Coins to 0
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
discarded all to storeroom reset SilversInHand to 0
drawing with storeroom increases Banks by 1.44E36 to total of 1.44E36
Playing a Golem
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 1.44E36
playing black market increases Coins by 2 to total of 4
I'm playing 9.88E35 of my 1.44E36 banks
Average bank is worth half of 9.88E35
playing 9.88E35 banks increases Coins by 4.88E70 to total of 4.88E70
playing banks increases TreasuresInPlay by 9.88E35 to total of 9.88E35
played banks decreases Banks by 9.88E35 to total of 4.99E35
Overpaying Doctor, trashing Rocks increases SilversInHand by 4.88E70 to total of 4.88E70
used all money on doctor reset Coins to 0
Playing a Necropolis
Playing a Golem
Playing a BlackMarket
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 4.99E35
playing black market increases Coins by 2 to total of 3
playing all SilversInHand increases TreasuresInPlay by 4.88E70 to total of 4.88E70
playing all SilversInHand increases Coins by 9.66E70 to total of 9.66E70
playing all reset SilversInHand to 0
I'm playing 4.99E35 of my 4.99E35 banks
Average bank is worth half of 9.66E70
playing 4.99E35 banks increases Coins by 2.33E105 to total of 2.33E105
playing banks increases TreasuresInPlay by 4.99E35 to total of 4.88E70
played banks decreases Banks by 4.99E35 to total of 0
Overpaying Doctor, trashing Rocks increases SilversInHand by 2.33E105 to total of 2.33E105
used all money on doctor reset Coins to 0
Playing a StoreRoom
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 1
discarded all to storeroom reset SilversInHand to 0
drawing with storeroom increases Banks by 2.33E105 to total of 2.33E105
Playing a Golem
Playing a BlackMarket
training increases Coins by 1 to total of 2
pathfinding increases Banks by 1 to total of 2.33E105
playing black market increases Coins by 2 to total of 4
I'm playing 1.55E105 of my 2.33E105 banks
Average bank is worth half of 1.55E105
playing 1.55E105 banks increases Coins by 1.22E209 to total of 1.22E209
playing banks increases TreasuresInPlay by 1.55E105 to total of 1.55E105
played banks decreases Banks by 1.55E105 to total of 7.99E104
Overpaying Doctor, trashing Rocks increases SilversInHand by 1.22E209 to total of 1.22E209
used all money on doctor reset Coins to 0
Playing a BlackMarket
training increases Coins by 1 to total of 1
pathfinding increases Banks by 1 to total of 7.99E104
playing black market increases Coins by 2 to total of 3
playing all SilversInHand increases TreasuresInPlay by 1.22E209 to total of 1.22E209
playing all SilversInHand increases Coins by 2.44E209 to total of 2.44E209
playing all reset SilversInHand to 0
I'm playing 6.88E104 of my 7.99E104 banks
Average bank is worth half of 2.44E209
playing 6.88E104 banks increases Coins by 8.55E312 to total of 8.55E312
playing banks increases TreasuresInPlay by 6.88E104 to total of 1.22E209
played banks decreases Banks by 6.88E104 to total of 1.11E104
Overpaying Doctor, trashing Rocks increases SilversInHand by 8.55E312 to total of 8.55E312
used all money on doctor reset Coins to 0
ran out of actions
playing all SilversInHand increases TreasuresInPlay by 8.55E312 to total of 8.55E312
playing all SilversInHand increases Coins by 1.77E313 to total of 1.77E313
playing all reset SilversInHand to 0
I'm playing 1.11E104 of my 1.11E104 banks
Average bank is worth half of 1.77E313
playing 1.11E104 banks increases Coins by 9.44E415 to total of 9.44E415
playing banks increases TreasuresInPlay by 1.11E104 to total of 8.55E312
played banks decreases Banks by 1.11E104 to total of 0
Use travelling fair to get 1.33E415 buys
Raid is worth 1.11E727 silvers
Raid is worth 1144984654515892827802567314832769041691676863703131934603190188997614567578185624581386001307608095799276860334911251291698220220124267149219119259379847134047965330424563783312811937771607123581116388968371135803349729156312659169172550861545293360578603315678770088698740345651496923537838329278268646846918631291238187081449787678296076025654416968734506964357922542056120438195935493686733002703535684515870737600547923211804992822638054047480607618340221073896765506754445939988036352567644956492571362257210164493681791996415538665998509593878443259663136974182438382670373276114935342739800093147793641723534331508332889243431764867853726235461445918410783841767574478283420722697738019398918273507776666078694781664920 silvers
And for those of you who like to play around with my program, here is the source:
package dominion.main;
import java.math.BigInteger;
public class Main {
public static final BigInteger MINUS_ONE = BigInteger.valueOf(-1);
public static final BigInteger TWO = BigInteger.valueOf(2);
enum Mode {TWO_THIRD, ALL, MAJORITY}
/*
Setting it up
We put Pathfinding, Seaway and Training on Band of Misfits (use ferry).
We put Inheritance on Horse Traders.
We use some Ambassador/Moat-ing to get 6 Rocks on top of the Catapult/Rocks pile, then use masq to trash that Amb+Moat.
Turn T-3 by opponent:
play crossroads, play 3x councilroom
Turn T-2 by us:
8x golem, play all, finding 2x Necro, crossroads, 13 * Haunted Woods. Buy save (set aside estate).
at the end of this turn you reshuffle and redraw both your necros. Everything else you draw is inherited Estate.
Turn T-1A (Regular) by opponent:
golem into masq + crossroads (give estate, get necropolis)
golem into masq + storeroom (give estate, get necropolis, discard both necropolis)
golem into necro + necro
golem into outpost + councilroom
4x golem into councilroom + councilroom
opponent buys Messenger (getting us rocks, drawing Silver) and Mission.
Turn T-1B (Outpost) by opponent
golem into councilroom + crossroads
golem into necro + necro
6x golem into councilroom + councilroom
Turn T-1C (Mission) by opponent
golem into councilroom + crossroads
golem into councilroom + councilroom
golem into councilroom + swindler
golem into masquerade + masquerade (Sending Necro, getting Silver)
-> Our hand was 2x Necro, 4x Estate at the start of T-1A.
Our Necro's were replaces by estates.
We got 26 more Estates from Councilrooms.
We got 4 Silvers in hand (2 from Messengers, 2 from a Swindler replacing Rocks with Rocks)
We set aside all 32 Estates on the Swindler play.
The last two masquerades replaced 2 Silvers with 2 Necro's
-> At the start of our turn we have 2 necropolis and 2 silver.
We return the 32 Esatetes and draw 31 Harems with them and a Golem
We also draw 13*3 = 39 Harems from the Haunted Woods.
*/
public static void main(String[] args) {
new Main().start();
}
Variable coins = new Variable("Coins");
Variable horseTraders = new Variable("EstateHorseTraders");
Variable harems = new Variable("Harems");
Variable banks = new Variable("Banks");
Variable treasuresInPlay = new Variable("TreasuresInPlay");
Variable silvers = new Variable("SilversInHand", 0);
Variable fortunes = new Variable("Fortunes", 0);
Variable talisman = new Variable("TalismanInHand");
Variable talismanInPlay = new Variable("TalismanInPlay");
/*
Card[][] plan = {
{new Crossroads(1), new BlackMarket(Mode.ALL)},
{new StoreRoom(1), new BlackMarket(Mode.TWO_THIRD)},
{new BlackMarket(Mode.ALL), new StoreRoom(2)},
{new BlackMarket(Mode.TWO_THIRD), new Necropolis()},
{new BlackMarket(Mode.ALL), new StoreRoom(2)},
{new BlackMarket(Mode.TWO_THIRD), new Necropolis()},
{new BlackMarket(Mode.ALL), new StoreRoom(1)},
{new BlackMarket(Mode.TWO_THIRD), new BlackMarket(Mode.MAJORITY)},
};*/
Card[][] plan = {
{new Crossroads(1), new BlackMarket(Mode.ALL)},
{new StoreRoom(1), new BlackMarket(Mode.TWO_THIRD)},
{new BlackMarket(Mode.ALL), new StoreRoom(2)},
{new BlackMarket(Mode.TWO_THIRD), new Necropolis()},
{new BlackMarket(Mode.ALL), new StoreRoom(2)},
{new BlackMarket(Mode.TWO_THIRD), new Necropolis()},
{new BlackMarket(Mode.ALL), new StoreRoom(1)},
{new BlackMarket(Mode.TWO_THIRD), new BlackMarket(Mode.MAJORITY)},
};
Card[][] planB = {
{new Crossroads(1), new BlackMarket(Mode.ALL)},
{new StoreRoom(1), new BlackMarket(Mode.ALL)},
{new StoreRoom(1), new BlackMarket(Mode.ALL)},
{new StoreRoom(1), new Necropolis()},
{new BlackMarket(Mode.ALL), new StoreRoom(2)},
{new BlackMarket(Mode.ALL), new Necropolis()},
{new StoreRoom(1), new BlackMarket(Mode.ALL)},
{new StoreRoom(1), new BlackMarket(Mode.TWO_THIRD)},
};
private void start() {
harems.add(13 * 3, "13 duration haunted woods");
horseTraders.add(32, "returning horse traders to hand");
harems.add(31, "returning horse traders draws");
silvers.add(2, "from opponent messengers into rocks");
System.out.println();
for (Card[] golemPlan : plan) {
System.out.println ("Playing a Golem");
for (Card card : golemPlan) {
card.describeExecute();
}
}
System.out.println("\nran out of actions");
BigInteger silversInPlay = silvers.getValue();
playTwoCoinTreasures(silvers);
playBanks(banks.getValue());
BigInteger buys = coins.getValue().divide(BigInteger.valueOf(7));
System.out.println("Use travelling fair to get " + toE(buys) + " buys");
BigInteger raid = buys.multiply(silversInPlay);
System.out.println("Raid is worth " + toE(raid) + " silvers");
System.out.println("Raid is worth " + raid + " silvers");
}
private void playTwoCoinTreasures(Variable variable) {
if (variable.greaterThan(0)) {
treasuresInPlay.add(variable.getValue(), "playing all " + variable.getName());
coins.add(variable.getValue().multiply(TWO), "playing all " + variable.getName());
variable.reset("playing all");
}
}
private void playBanks(BigInteger playedNumber) {
System.out.println("I'm playing " + toE(playedNumber) + " of my " + toE(banks.getValue()) + " banks");
BigInteger doubleAverageBank = treasuresInPlay.getValue().multiply(TWO).add(playedNumber.add(BigInteger.ONE));
System.out.println("Average bank is worth half of " + toE(doubleAverageBank));
coins.add(playedNumber.multiply(doubleAverageBank).divide(TWO), "playing " + toE(playedNumber) + " banks");
treasuresInPlay.add(playedNumber, "playing banks");
banks.subtract(playedNumber, "played banks");
}
public abstract class Card {
void describeExecute() {
System.out.println("Playing a " + getClass().getSimpleName());
bandOfMisfitsPlay();
System.out.println();
}
void bandOfMisfitsPlay() {
coins.add(BigInteger.ONE, "training");
banks.add(BigInteger.ONE, "pathfinding");
execute();
}
abstract void execute();
}
public class Crossroads extends Card {
private final int golems;
public Crossroads(int golems) {
this.golems = golems;
}
@Override
void execute() {
banks.add(harems.getValue(), "drawing a bank for each harem");
banks.add(horseTraders.getValue(), "drawing a bank for each horse traders");
banks.subtract(golems, "requiring " + golems + " golems");
banks.subtract(1, "requiring 1 fortune");
fortunes.add(1, "crossroads draws it");
}
}
public class Necropolis extends Card {
@Override
void execute() {
}
@Override
void bandOfMisfitsPlay() {
}
}
public class BlackMarket extends Card {
private final Mode mode;
public BlackMarket(Mode mode) {
this.mode = mode;
}
@Override
void execute() {
coins.add(TWO, "playing black market");
playTwoCoinTreasures(harems);
playTwoCoinTreasures(silvers);
talismanInPlay.add(talisman.getValue(), "play all talisman");
treasuresInPlay.add(talisman.getValue(), "played all talisman");
talisman.reset("just played all");
BigInteger playedBanks = banks.getValue();
if (mode == Mode.TWO_THIRD) {
playedBanks = playedBanks.multiply(BigInteger.valueOf(666)).divide(BigInteger.valueOf(1000));
} else if (mode == Mode.MAJORITY) {
playedBanks = playedBanks.multiply(BigInteger.valueOf(86)).divide(BigInteger.valueOf(100));
}
playBanks(playedBanks);
if (fortunes.equalTo(1)) {
coins.multiply(TWO, "Playing fortune");
fortunes.reset("just played it");
}
silvers.add(coins.getValue().subtract(BigInteger.ONE), "Overpaying Doctor, trashing Rocks");
coins.reset("used all money on doctor");
}
}
int storeroomCounter = 0;
public class StoreRoom extends Card {
private final int golems;
private final int storeroomCount;
public StoreRoom(int golems) {
this.golems = golems;
this.storeroomCount = ++storeroomCounter;
}
@Override
void execute() {
BigInteger banksDraw = silvers.getValue().add(horseTraders.getValue().subtract(BigInteger.valueOf(golems)));
if (storeroomCount == 1) {
banksDraw = banksDraw.add(TWO);
System.out.println("We draw 2 extra banks because we discard 2 necropolis");
} else if (storeroomCount == 2) {
System.out.println("We draw 100 less banks because we need to skip over some actions");
banksDraw = banksDraw.subtract(BigInteger.valueOf(100));
}
silvers.reset("discarded all to storeroom");
horseTraders.reset("discarding all to storeroom");
banks.add(banksDraw, "drawing with storeroom");
}
}
public static String toE(BigInteger value) {
if (value.compareTo(BigInteger.valueOf(1000000000)) < 0) return value.toString();
return String.format("%s.%s%sE%d", value.toString().charAt(0), value.toString().charAt(1), value.toString().charAt(1), value.toString().length());
}
}
package dominion.main;
import java.math.BigInteger;
import static dominion.main.Main.toE;
public class Variable {
private BigInteger value;
private String name;
public Variable(String name, BigInteger value) {
this.value = value;
this.name = name;
}
public Variable(String name, int value) {
this(name, BigInteger.valueOf(value));
}
public Variable(String name) {
this(name, BigInteger.ZERO);
}
public void add(BigInteger addition, String reason) {
if (!addition.equals(BigInteger.ZERO)) {
value = value.add(addition);
System.out.printf("%s increases %s by %s to total of %s\n", reason, name, toE(addition), toE(value));
}
}
public void add(int addition, String reason) {
add(BigInteger.valueOf(addition), reason);
}
public void subtract(BigInteger subtraction, String reason) {
if (!subtraction.equals(BigInteger.ZERO)) {
value = value.subtract(subtraction);
System.out.printf("%s decreases %s by %s to total of %s\n", reason, name, toE(subtraction), toE(value));
}
}
public void subtract(int subtraction, String reason) {
subtract(BigInteger.valueOf(subtraction), reason);
}
public void multiply(BigInteger multiplication, String reason) {
value = value.multiply(multiplication);
System.out.printf("%s increases %s by a factor of %s to total of %s\n", reason, name, multiplication, toE(value));
}
public void reset(String reason) {
if (!value.equals(BigInteger.ZERO)) {
value = BigInteger.ZERO;
System.out.println(reason + " reset " + name + " to 0");
}
}
public void multiply(int multiplication, String reason) {
multiply(BigInteger.valueOf(multiplication), reason);
}
public boolean greaterThan(int someValue) {
return value.compareTo(BigInteger.valueOf(someValue)) > 0;
}
public boolean equalTo(int someValue) {
return value.equals(BigInteger.valueOf(someValue));
}
public BigInteger getValue() {
return value;
}
public String getName() {
return name;
}
}