Skip to content

Instantly share code, notes, and snippets.

@DamianDominoDavis
DamianDominoDavis / incomplete_outfits.ash
Created July 28, 2026 03:08
kolmafia snippet to identify incomplete outfits
boolean[string] zero,some,all;
foreach _,o in all_normal_outfits() {
int i = 0;
foreach _,k in outfit_pieces(o)
if (available_amount(k) > 0) i++;
int lim = outfit_pieces(o).count();
switch (i) {
case (0): zero[o] = true; break;
case (lim): all[o] = true; break;
default: some[o] = true;
// configuration
boolean[location,monster] chase_after = {
$location[dreadsylvanian woods]: $monsters[cold bugbear, hot bugbear, sleaze bugbear, spooky bugbear, stench bugbear],
$location[dreadsylvanian village]: $monsters[cold ghost, hot ghost, sleaze ghost, spooky ghost, stench ghost],
$location[dreadsylvanian castle]: $monsters[cold skeleton, hot skeleton, sleaze skeleton, spooky skeleton, stench skeleton]
};
boolean[location,monster] flee_from = {
$location[dreadsylvanian woods]: $monsters[cold werewolf, hot werewolf, sleaze werewolf, spooky werewolf, stench werewolf],
@DamianDominoDavis
DamianDominoDavis / takestspace.ash
Created September 28, 2025 21:33
make the most of your takerspace
record Recipe {
item result;
int[string] cost; // key = takerSpace property name
};
int[item,string] recipes = {
$item[sleeping profane parrot] : {"Spice": 15, "Rum": 3, "Silk": 2, "Gold": 1},
$item[pirrrate\'s currrse]: {"Spice": 2, "Rum": 2},
$item[tankard of spiced rum]: {"Spice": 1, "Rum": 2},
$item[tankard of spiced Goldschlepper]: {"Rum": 2, "Gold": 1},
foreach it in get_inventory() if (
it.reusable
&& it.string_modifier('Skill') != ''
&& !it.string_modifier('Skill').to_skill().have_skill()
) use(it);
@DamianDominoDavis
DamianDominoDavis / so_you_wanna_be_a_pirate.txt
Last active May 14, 2025 23:51
piraterealm unlocks and fun farming
First Trip:
Choose any crewmate, the ancient skull key curio, and the Rigged Frigate ship.
Island 1: any of Dessert, Crab, or Glass Islands, for cocoa of youth or one of two meh shop unlocks.
Island 2: Prison Island permanently unlocks a third choice of crewmate, for greater flexibility on all future visits.
Island 3: anything.
Signal Island has a meh shop unlock,
and Tiki Island has one too if you bring a Mixologist mate.
Storm Island permanently unlocks a curio which is required to visit Trash Island (and makes outrunning storms more likely).
At the end of your first sailing trip, open the shop and buy a PirateRealm party hat for +1 Fun from all PirateRealm adventures.
"So tell me," said Reg, after they had both had a couple
of spoonsful and arrived independently at the same conclusion,
that it was not a taste explosion, "what you've been up to, my
dear chap. Something to do with computers, I understand, and
also to do with music. I thought you read English when you were
here-though only, I realise, in your spare time." He looked at
Richard significantly over the rim of his soup spoon. "Now
wait," he interrupted before Richard even had a chance to
start, "don't I vaguely remember that you had some sort of
computer when you were here? When was it? 1977?"
// display big tradeable items, and big piles of tradeable items
int hmny(item it) {
static int[item] memory;
if (!(memory contains it))
memory[it] = it.available_amount() + it.shop_amount() + it.display_amount();
return memory[it];
}
void main(int show_this_many_treasures) {
// play Dungeon Fist
// requires: 5*X adventures, X Game Grid token, having ever played a perfect game
// yields: 30*X Gamde Grid tickets
void main(int games) {
if (games < 1) {
print("how do you fist that many?", "red");
return;
}
int adv = my_adventures();
// identify tradeable, unused skillbooks in inventory for which you already know the skill
foreach it in $items[]
if (it.available_amount() > 0
&& it.string_modifier('Skill').to_skill() != $skill[none]
&& it.tradeable
&& it.string_modifier('Skill').to_skill().have_skill())
print(`{it.available_amount()} {it}; `);
// identify skillbooks in inventory for which you DO NOT already know the skill
foreach it in $items[]
if (it.available_amount() + it.storage_amount() + it.display_amount() > 0
&& it.string_modifier('Skill') != ''
&& !it.string_modifier('Skill').to_skill().have_skill())
print(`{it}`);