New Content - Implemented Cursed Monkey Paw

It's an accessory! But we dont' really care about that

packaged form descid: 144539345
unpackaged descid: 617234158

main.php?action=cmonk&pwd brings us to choice adventure 1501, which lets us "wish" for something--that something can be any genie-wishable effect, or an item. The rules for what items you can and can't wish for are as follows:
- The item must be a monster drop from a monster whose native zone you can currently adventure in. This uses a very strict definition of "can currently adventure in"--if you don't have any underwater breathing equipped, no underwater items for you, and if you don't have the transfunctioner equipped, no 8-bit items.
- The monster, with a few exceptions, must be a regular queue-entering encounter in the zone (we do appear to be able to get the opera mask and the cube of billiards chalk, though, because this game is very old and weird)
- The item must not be a quest item (it doesn't need to be pvpable, though)
- The monster the item drops from must be copyable (tested with snifter of thoroughly aged brandy)
- We can get conditional drops even without meeting the necessary conditions (e.g., battery-powered drill without the right CI settings). We cannot get drops that involve a random roll (like spice melange)
- We don't actually need to be able to encounter the monster in question; I can get a shadow brick even when my ingress is set to a slab-free zone, and I can get asbestos ore from itznotyerzitz mine even when I'm not in Boris
- When we get a collision between an item and an effect, the item takes precedence
- If we're told our wish is impossible, it's an invalid item; if we're told our wish is quite impossible, it's a valid item we can't currently access but theoretically could in some other circumstance
- Unlike the autumn-aton, we don't need to have adventured in the location yet this ascension.

We get 5 wishes per day, each representing a finger on the monkey's paw. Making a wish grants 7n (where n is the number of wishes you've made today) turns of "Cursed by a Monkey", an effect with no bluetext that may or may not do anything. Descid: 9038c5de7acbe308ec962059bac040ab

Wishing for an effect grants 30 turns of it.

When wielding the accessory, there are 6 skills. Skill availability varies by the number of currently-raised fingers; with all 5 fingers raised (that is, no wishes used), all 5 skills are available; with 0 fingers remaining, only 1 skill is available. More details here. That sheet also reiterates the item-finding rules above.

If you've used the banish or the pseudosniff, you can examine the accessory to check which monsters are currently targeted:
image.png




The wish encounter ("Make a Wish") is escapable, and has a "back to inventory" link. Submitting a choice is option number 1, and it only submits one extra parameter, wish, which is pretty much what you expect.

We appear to be having trouble wishing for effects with anything that isn't alphanumeric or whitespace. We've tried wrapping them in quotes or directly submitting them with a visitUrl after url encoding them (e.g., visitUrl("choice.php?whichchoice=1501&pwd&option=1&wish=Let%27s+Go+Shopping%21")) to no avail; this is probably getting an in-game bug report, and may or may not be resolved
 
Last edited:
As an update, it looks like the "quite impossible" thing isn't quite what we once thought--basically all otherwise-qualifying semirare drops are showing up as "quite impossible" regardless of zone access or whether we have Lucky!--but cube of billiards chalk and opera mask are both available, presumably(?) because they come from NCs that lead to fights.

I've also whipped up a quick-and-extremely-dirty list of effects that we can't wish for because we have trouble with certain characters:

Code:
> js const names = Effect.all().filter((e) =>    !e.attributes.includes("nohookah")).map((e) =>    toString(e).toLowerCase()).map((n) => ({ name: n, splitName:    n.split(RegExp("[.,']", "g")) })); names.filter(({ name, splitName }) =>    splitName.every((s) => names.some((n) => n.name !== name &&    n.splitName.some((x) => x.includes(s))))).map(({ name }) =>    toEffect(name)).filter((e) =>    e.toString().toLowerCase().match(RegExp("[,.']")));

Returned:    aggregate effect [20]
0 => Rushin' Hands
1 => Bubble, Bubble
2    => Livin' Large
3 => Moon'd
4 => Tin, Man
5 => Weather,    Man
6 => Smokin'
7 => Hustlin'
8 => Sharin' Stone
9    => Thick, Sick
10 => meat.enh
11 => items.enh
12 =>    init.enh
13 => critical.enh
14 => familiar.enq
15 =>    protect.enq
16 => stats.enq
17 => Quiet 'n' Good
18 =>    Buttery, Boy
19 => Speakin' Easy
 
Last edited:

Veracity

Developer
Staff member
Revision 27320:

1) Track wishes used in _monkeyPawWishesUsed, which starts at 0 and goes up to 5 as you ask for wishes.
We recognize/adjust the property when you visit the paw and we see how many fingers it shows.
We also deduce it from how many turns of Cursed by a Monkey you get from casting a wish, although that is redundant.
2) I created MonkeyPawRequest which will accept a wish string and use the paw and select the choice.
This will be useful if we add a "paw" or "monkeypaw" command, a la the "genie" command.
Or, say, if we create
Code:
monkey_paw(ITEM)
monkey_paw(EFFECT)
ASH functions.

I will leave those ideas for somebody else; I'll be pretty busy with Real Life for the next month or so, including a three week vacation. ;)
 
I'm just coming back from a week-long vacation myself! (By "just" I mean "in a few days"). Have a great trip.

For the monkey_paw function, I have a few thoughts:
- It would be very nice if support for Effect looked at substrings for effects with commas and apostrophes in the name. As far as I'm aware this in-game bug hasn't been fixed, and if it isn't fixed in another week or so I'd expect it's in it for the long-haul. Many effects with commas and apostrophes can still be wished for--Let's Go Shopping! can be done via s go shopping, but not via lets go shopping or let's go shopping.
- It might be helpful to track the different failure-states for item support separately. We can log on the console when we fail to wish for an effect that's not currently flagged as nohookah, but also any time we expect to be able to get an item (that is, it's a drop from a copyable monster in a location we can adventure in) is worth internally tracking as well, because it could help provide insight into any misalignment between kolmafia's understanding of can_adventure, get_monsters, etc, and KoL's understanding of the same
- It may long-term be useful to separate conditional drops that are a random roll (e.g., spice melange) from conditional drops that are an actual condition (e.g., shirts that only drop when you have torso). Changing the results of item_drops_array could be breaking for older scripts, though, so there would have to be some other way of accessing that information (maybe an "is_random" field on the objects returned in item_drops_array, or even just a monkey items function: monkey_items(Location), monkey_items(Monster), monkey_items())

EDIT:
@Ryo_Sangnoir has added a `monkey_paw` ash function and a `monkeypaw` command as of r27321 and it does appropriately handle effects with inappropriate characters in the name!
 
Last edited:

Malibu Stacey

Active member
autoscend found a bug in the implementation of monkey_paw().

Code:
boolean success = monkey_paw(wish);

This will cause the script to abort if you are out of wishes. Previously the prevailing stance from KoLMafia developers has been that if return values are captured, ASH functions will not cause aborts on failure (since if you are capturing the failure, you presumably intend to handle said failure).

It's an easy workaround for us as we can simply check if _monkeyPawWishesUsed is less than 5 but this is unexpected behaviour nonetheless.
 
Top