Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/eslint-config-garbo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"@eslint/js": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-libram": "^0.4.31",
"eslint-plugin-libram": "^0.4.32",
"typescript-eslint": "^8.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/garbo-choice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"garbo-lib": "*",
"grimoire-kolmafia": "^0.3.29",
"kolmafia": "^5.28673.0",
"kolmafia": "^5.28703.0",
"libram": "^0.11.9"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/garbo-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"devDependencies": {
"eslint": "^9.9.0",
"eslint-config-garbo": "^0.0.1",
"kolmafia": "^5.28673.0",
"kolmafia": "^5.28703.0",
"libram": "^0.11.9",
"lint-staged": "^15.2.9",
"madge": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/garbo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"garbo-lib": "*",
"grimoire-kolmafia": "^0.3.29",
"kolmafia": "^5.28673.0",
"kolmafia": "^5.28703.0",
"libram": "^0.11.9"
},
"devDependencies": {
Expand Down
7 changes: 7 additions & 0 deletions packages/garbo/src/combat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
setCcs,
Skill,
toInt,
toLocation,
visitUrl,
writeCcs,
} from "kolmafia";
Expand Down Expand Up @@ -64,6 +65,7 @@ import {
isStrongScaler,
maxPassiveDamage,
monsterManuelAvailable,
redTaffyDelta,
targetingMeat,
ULTRA_RARE_MONSTERS,
} from "./lib";
Expand Down Expand Up @@ -373,6 +375,11 @@ export class Macro extends StrictMacro {
),
)
.externalIf(opsSetup, Macro.trySkill($skill`Throw Shield`))
.externalIf(
toLocation(get("_seadentWaveZone")) === $location`Barf Mountain` &&
redTaffyDelta > 0,
Macro.tryItem($item`pulled red taffy`),
)
.meatStasis(willCrit)
.externalIf(
shouldAffirmationHate(),
Expand Down
2 changes: 1 addition & 1 deletion packages/garbo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function defaultTarget() {
}

export function main(argString = ""): void {
sinceKolmafiaRevision(28603); // time cop
sinceKolmafiaRevision(28703); // summon a wave
checkGithubVersion();

Args.fill(globalOptions, argString);
Expand Down
58 changes: 58 additions & 0 deletions packages/garbo/src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
itemDropsArray,
lastMonster,
Location,
mallPrice,
meatDrop,
meatDropModifier,
Monster,
Expand Down Expand Up @@ -1190,3 +1191,60 @@ export function marginalFamWeightValue(): number {
Math.sqrt(220 * familiarMultiplier) / (2 * Math.sqrt(assumedBaseWeight))
);
}

const redTaffyItems = [$item`Alewife™ Ale`,
$item`bazookafish bubble gum`,
$item`beefy fish meat`,
$item`dull fish scale`,
$item`eel battery`,
$item`eel sauce`,
$item`glistening fish meat`,
$item`high-pressure seltzer bottle`,
$item`imitation crab crate`,
$item`ink bladder`,
$item`live nautical mine`,
$item`Mer-kin healscroll`,
$item`Mer-kin lunchbox`,
$item`Mer-kin thingpouch`,
$item`pufferfish spine`,
$item`rough fish scale`,
$item`salinated mint julep`,
$item`sand dollar`,
$item`sea lace`,
$item`seaweed`,
$item`shark cartilage`,
$item`slick fish meat`,
$item`slug of rum`,
$item`slug of shochu`,
$item`slug of vodka`,
$item`soggy seed packet`];

const redTaffyAvg = garboAverageValue(...redTaffyItems);
const redTaffyPrice = mallPrice($item`pulled red taffy`);
export const redTaffyDelta = redTaffyPrice - redTaffyAvg;

export function seadentZone(weaponROI = 150): Location {

function roiIfCheaper(item: Item, value: number): number {
const price = mallPrice(item);
return price < value ? value - price : 0;
}

const seadentMeatBonus = 0.3; // Negative Pressure Bonus

function seaBuffROI(): number {
const famValue = marginalFamWeightValue() * baseMeat();
return (
roiIfCheaper($item`sea grease`, famValue * 5) + // 5 familiar weight
roiIfCheaper($item`temporary teardrop tattoo`, famValue * 10) // 10 familiar weight
);
}

const totalWaveBonus = (baseMeat() * seadentMeatBonus) + seaBuffROI() + (redTaffyDelta > 0 ? redTaffyDelta : 0);

const seadentZone =
totalWaveBonus > weaponROI // weapon opportunity cost goes here
? $location`Barf Mountain`
: Location.none;
return seadentZone
}
7 changes: 7 additions & 0 deletions packages/garbo/src/mood.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
$effect,
$effects,
$item,
$location,
$skill,
AsdonMartin,
get,
Expand All @@ -28,6 +29,7 @@ import {
import {
baseMeat as baseMeatFunc,
safeRestoreMpTarget,
seadentZone,
setChoice,
} from "./lib";
import { usingPurse } from "./outfit";
Expand All @@ -53,6 +55,11 @@ export function meatMood(
// Reserve the amount of MP we try to restore before each fight.
const mood = new Mood({ reserveMp: safeRestoreMpTarget() });

if (seadentZone() === $location`Barf Mountain`) {
mood.potion($item`temporary teardrop tattoo`, 0.4 * baseMeat);
mood.potion($item`sea grease`, 0.2 * baseMeat);
}

mood.potion($item`How to Avoid Scams`, 3 * baseMeat);
mood.potion($item`resolution: be wealthier`, 0.3 * baseMeat);
mood.potion($item`resolution: be happier`, 0.15 * 0.45 * 0.8 * 200);
Expand Down
43 changes: 38 additions & 5 deletions packages/garbo/src/tasks/barfTurn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {
canEquip,
cliExecute,
eat,
equip,
equippedItem,
getWorkshed,
haveEquipped,
inebrietyLimit,
Expand All @@ -24,6 +26,7 @@ import {
outfitPieces,
retrieveItem,
runChoice,
toLocation,
totalTurnsPlayed,
use,
useSkill,
Expand All @@ -37,6 +40,7 @@ import {
$location,
$monster,
$skill,
$slot,
AprilingBandHelmet,
ChestMimic,
clamp,
Expand Down Expand Up @@ -80,7 +84,9 @@ import {
howManySausagesCouldIEat,
kramcoGuaranteed,
MEAT_TARGET_MULTIPLIER,
redTaffyDelta,
romanticMonsterImpossible,
seadentZone,
sober,
targetingMeat,
willDrunkAdventure,
Expand Down Expand Up @@ -1301,9 +1307,16 @@ export const BarfTurnQuest: Quest<GarboTask> = {
outfit: () => {
const lubing =
get("dinseyRollercoasterNext") && have($item`lube-shoes`);
return barfOutfit(lubing ? { equip: $items`lube-shoes` } : {});
const wave =
toLocation(get("_seadentWaveZone")) === $location`Barf Mountain`;
const equips: Item[] = [];
if (lubing) equips.push($item`lube-shoes`);
if (wave) equips.push($item`Monodent of the Sea`);

return barfOutfit({ equip: equips });
},
do: $location`Barf Mountain`,
choices: { 1566: 1 },
combat: new GarboStrategy(
() => Macro.meatKill(),
() =>
Expand All @@ -1312,11 +1325,31 @@ export const BarfTurnQuest: Quest<GarboTask> = {
Macro.meatKill(),
).abort(),
),
prepare: () =>
!get("dinseyRollercoasterNext") &&
!(totalTurnsPlayed() % 11) &&
meatMood().execute(estimatedGarboTurns()),
prepare: () => {
if (
redTaffyDelta &&
toLocation(get("_seadentWaveZone")) === $location`Barf Mountain`
) {
acquire(5, $item`pulled red taffy`, 10_000);
}
return (
!get("dinseyRollercoasterNext") &&
!(totalTurnsPlayed() % 11) &&
meatMood().execute(estimatedGarboTurns())
);
},
post: () => {
if (
!get("_seadentWaveUsed") &&
have($item`Monodent of the Sea`) &&
seadentZone() === $location`Barf Mountain`
) {
const mainhand = equippedItem($slot`weapon`);
equip($item`Monodent of the Sea`);
useSkill($skill`Sea *dent: Summon a Wave`);
runChoice(1);
equip(mainhand);
}
completeBarfQuest();
trackMarginalMpa();
},
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3888,7 +3888,7 @@ __metadata:
"@types/eslint__js": ^8.42.3
eslint: ^9.9.0
eslint-config-prettier: ^9.1.0
eslint-plugin-libram: ^0.4.31
eslint-plugin-libram: ^0.4.32
lint-staged: ^15.2.9
madge: ^8.0.0
prettier: ^3.3.3
Expand All @@ -3912,13 +3912,13 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-libram@npm:^0.4.31":
version: 0.4.31
resolution: "eslint-plugin-libram@npm:0.4.31"
"eslint-plugin-libram@npm:^0.4.32":
version: 0.4.32
resolution: "eslint-plugin-libram@npm:0.4.32"
dependencies:
html-entities: ^2.5.2
requireindex: ~1.2.0
checksum: 3d5b63883899bbcd46e7d0414ee1d98d4a394b215bc1e55a29705005bcd5e66b550c07bfd8ac0409d39a2f9d694bfdeed9bd1f8ca1e00db413cbf7d10c74d26b
checksum: 0e56f095231c9ccdd232e961e02296c8fdc404222b74ae973a148ffb2a90c9c0af9c285592710f1ac9a415791aa92af90e80b78a3e97051cda2fe646aee1b07d
languageName: node
linkType: hard

Expand Down Expand Up @@ -4346,7 +4346,7 @@ __metadata:
eslint-config-garbo: ^0.0.1
garbo-lib: "*"
grimoire-kolmafia: ^0.3.29
kolmafia: ^5.28673.0
kolmafia: ^5.28703.0
libram: ^0.11.9
lint-staged: ^15.2.9
madge: ^8.0.0
Expand All @@ -4362,7 +4362,7 @@ __metadata:
dependencies:
eslint: ^9.9.0
eslint-config-garbo: ^0.0.1
kolmafia: ^5.28673.0
kolmafia: ^5.28703.0
libram: ^0.11.9
lint-staged: ^15.2.9
madge: ^8.0.0
Expand Down Expand Up @@ -4417,7 +4417,7 @@ __metadata:
eslint-config-garbo: ^0.0.1
garbo-lib: "*"
grimoire-kolmafia: ^0.3.29
kolmafia: ^5.28673.0
kolmafia: ^5.28703.0
libram: ^0.11.9
lint-staged: ^15.2.9
madge: ^8.0.0
Expand Down Expand Up @@ -5065,10 +5065,10 @@ __metadata:
languageName: node
linkType: hard

"kolmafia@npm:^5.28673.0":
version: 5.28677.0
resolution: "kolmafia@npm:5.28677.0"
checksum: 22fb5889ccadd50b26334d2c7a21307b0c827239939c3c6b2154252db5d6d224a6b3f719513c69eb91f54391426769b871d0dae2e46ac527aeed1b435160c89d
"kolmafia@npm:^5.28703.0":
version: 5.28703.0
resolution: "kolmafia@npm:5.28703.0"
checksum: 142424d27bed97d037e5c4fb2bac85eb95f69a675fd43880af8435137075795330a539724dfca29da6e6d83a5468f786600e6eaae81bdfb6629b56d18c143714
languageName: node
linkType: hard

Expand Down
Loading