Well, I wanted my script to let KoLmafia make intelligent choices for it, so revision 17644 has the following:
GUI:
There is now an Automatic button which will select an appropriate pair of candies to get the desired effect.
If you are in-run, it will use only "available" candy and will prefer candies that you have more of.
If you are post-run, it will consider all candies and will choose the pair with the lowest total mall price.
If you want to force "available" candies post-run, check the "available" checkbox.
ASH:
item [int] sweet_synthesis_pair( effect )
item [int] sweet_synthesis_pair( effect, flags )
For the desired effect, pick a suitable pair of candies.
If you are in-run, it will use only "available" candy and will prefer candies that you have more of.
If you are post-run, it will consider all candies and will choose the pair with the lowest total mall price.
If you want to force "available" candies post-run, use flags = 1.
boolean sweet_synthesis( effect )
boolean sweet_synthesis( effect, flags )
The same, but it will actually perform Sweet Synthesis to get the effect.
Note that although you can specify flags when actually requesting the effect, it will always use at least the flags imposed by your run; you can be more restrictive post-run, but you cannot be less restrictive in-run.
Code:
[color=green]> ash sweet_synthesis_pair( $effect[ Synthesis: Greed ] )[/color]
Returned: aggregate item [2]
0 => box of Dweebs
1 => PEEZ dispenser
[color=green]> ash sweet_synthesis( $effect[ Synthesis: Greed ] )[/color]
Encounter: Sweet Synthesis
You acquire an effect: Synthesis: Greed (30)
Returned: true
[color=green]> ash sweet_synthesis_pair( $effect[ Synthesis: Greed ], 1 )[/color]
Returned: aggregate item [2]
0 => Crimbo fudge
1 => sugar sheet
[color=green]> ash sweet_synthesis( $effect[ Synthesis: Greed ], 1 )[/color]
Encounter: Sweet Synthesis
You acquire an effect: Synthesis: Greed (30)
Returned: true
session log:
Code:
cast 1 Sweet Synthesis
Encounter: Sweet Synthesis
synthesize box of Dweebs, PEEZ dispenser
You acquire an effect: Synthesis: Greed (30)
cast 1 Sweet Synthesis
Encounter: Sweet Synthesis
synthesize Crimbo fudge, sugar sheet
You acquire an effect: Synthesis: Greed (30)
Still need to add the "synthesize EFFECT" and "synthesize? EFFECT" CLI commands, and play more games with the GUI.
Later.