diff --git a/.yarn/cache/kolmafia-npm-5.28064.0-9d57c95fce-619b5b862c.zip b/.yarn/cache/kolmafia-npm-5.28064.0-9d57c95fce-619b5b862c.zip deleted file mode 100644 index 23243c3c4..000000000 Binary files a/.yarn/cache/kolmafia-npm-5.28064.0-9d57c95fce-619b5b862c.zip and /dev/null differ diff --git a/.yarn/cache/kolmafia-npm-5.28069.0-52bb1f37de-67c53aae0b.zip b/.yarn/cache/kolmafia-npm-5.28069.0-52bb1f37de-67c53aae0b.zip new file mode 100644 index 000000000..ddeead009 Binary files /dev/null and b/.yarn/cache/kolmafia-npm-5.28069.0-52bb1f37de-67c53aae0b.zip differ diff --git a/packages/garbo-lib/package.json b/packages/garbo-lib/package.json index e6459a2dc..67c8bf07a 100644 --- a/packages/garbo-lib/package.json +++ b/packages/garbo-lib/package.json @@ -23,13 +23,13 @@ ] }, "peerDependencies": { - "kolmafia": "^5.28064.0", + "kolmafia": "^5.28067.0", "libram": "^0.9.10" }, "devDependencies": { "eslint": "^9.9.0", "eslint-config-garbo": "^0.0.1", - "kolmafia": "^5.28064.0", + "kolmafia": "^5.28067.0", "libram": "^0.9.10", "lint-staged": "^15.2.9", "madge": "^8.0.0", diff --git a/packages/garbo/package.json b/packages/garbo/package.json index 6a8186a46..974b313de 100644 --- a/packages/garbo/package.json +++ b/packages/garbo/package.json @@ -28,7 +28,7 @@ "dependencies": { "garbo-lib": "*", "grimoire-kolmafia": "^0.3.26", - "kolmafia": "^5.28064.0", + "kolmafia": "^5.28067.0", "libram": "^0.9.10" }, "devDependencies": { diff --git a/packages/garbo/src/index.ts b/packages/garbo/src/index.ts index 910a808fd..6a07eb919 100644 --- a/packages/garbo/src/index.ts +++ b/packages/garbo/src/index.ts @@ -117,7 +117,7 @@ function defaultTarget() { } export function main(argString = ""): void { - sinceKolmafiaRevision(28063); // Update for new BALLS predicates + sinceKolmafiaRevision(28067); // yes, can haz is like o hai checkGithubVersion(); // Hit up main.php to get out of easily escapable choices diff --git a/packages/garbo/src/mood.ts b/packages/garbo/src/mood.ts index 86ebcbf18..6fcff7ae3 100644 --- a/packages/garbo/src/mood.ts +++ b/packages/garbo/src/mood.ts @@ -1,4 +1,5 @@ import { + booleanModifier, cliExecute, Effect, getWorkshed, @@ -227,23 +228,27 @@ export function useBuffExtenders(): void { } } -const stings = [ - ...$effects`Apoplectic with Rage, Barfpits, Berry Thorny, Biologically Shocked, Bone Homie, Boner Battalion, Coal-Powered, Curse of the Black Pearl Onion, Dizzy with Rage, Drenched With Filth, EVISCERATE!, Fangs and Pangs, Frigidalmatian, Gummi Badass, Haiku State of Mind, It's Electric!, Jabañero Saucesphere, Jalapeño Saucesphere, Little Mouse Skull Buddy, Long Live GORF, Mayeaugh, Permanent Halloween, Psalm of Pointiness, Pygmy Drinking Buddy, Quivering with Rage, Scarysauce, Skeletal Cleric, Skeletal Rogue, Skeletal Warrior, Skeletal Wizard, Smokin', Soul Funk, Spiky Frozen Hair, Stinkybeard, Stuck-Up Hair, Can Has Cyborger, Feeling Nervous`, - $effect`Burning, Man`, - $effect`Yes, Can Haz`, -]; -const textAlteringEffects = $effects`Can Has Cyborger, Dis Abled, Haiku State of Mind, Just the Best Anapests, O Hai!, Robocamo`; -export const teleportEffects = $effects`Teleportitis, Feeling Lost, Funday!`; -const otherwiseBadEffects = $effects`Temporary Blindness`; +const damageEffects = Effect.all().filter((x) => + ["Thorns", "Sporadic Thorns", "Damage Aura", "Sporadic Damage Aura"].some( + (modifier) => numericModifier(x, modifier) > 0, + ), +); +const textAlteringEffects = Effect.all().filter((x) => + booleanModifier(x, "Alters Page Text"), +); +export const teleportEffects = Effect.all().filter((x) => + booleanModifier(x, "Adventure Randomly"), +); +const otherBadEffects = Effect.all().filter( + (x) => booleanModifier(x, "Blind") || booleanModifier(x, "Always Fumble"), +); export function shrugBadEffects(...exclude: Effect[]): void { [ - ...stings, + ...damageEffects, ...textAlteringEffects, ...teleportEffects, - ...otherwiseBadEffects, - ].forEach((effect) => { - if (have(effect) && !exclude.includes(effect)) { - uneffect(effect); - } - }); + ...otherBadEffects, + ] + .filter((effect) => have(effect) && !exclude.includes(effect)) + .forEach((effect) => uneffect(effect)); } diff --git a/yarn.lock b/yarn.lock index 977fb3c99..dd6b14f94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4334,14 +4334,14 @@ __metadata: dependencies: eslint: ^9.9.0 eslint-config-garbo: ^0.0.1 - kolmafia: ^5.28064.0 + kolmafia: ^5.28067.0 libram: ^0.9.10 lint-staged: ^15.2.9 madge: ^8.0.0 prettier: ^3.3.3 typescript: ^5.5.4 peerDependencies: - kolmafia: ^5.28064.0 + kolmafia: ^5.28067.0 libram: ^0.9.10 languageName: unknown linkType: soft @@ -4389,7 +4389,7 @@ __metadata: eslint-config-garbo: ^0.0.1 garbo-lib: "*" grimoire-kolmafia: ^0.3.26 - kolmafia: ^5.28064.0 + kolmafia: ^5.28067.0 libram: ^0.9.10 lint-staged: ^15.2.9 madge: ^8.0.0 @@ -5037,10 +5037,10 @@ __metadata: languageName: node linkType: hard -"kolmafia@npm:^5.28064.0": - version: 5.28064.0 - resolution: "kolmafia@npm:5.28064.0" - checksum: 619b5b862c93307b7238ecff6352a3391d67972ef138ebe343faa7419d63a2d649cdf931bbab92a320bbf4f6aa647ef38a0f8a2b1201f647907d2eef63cec098 +"kolmafia@npm:^5.28067.0": + version: 5.28069.0 + resolution: "kolmafia@npm:5.28069.0" + checksum: 67c53aae0b5e4b7986ece0ec90567bf2a2182d7096792f0058aa5a788c0c3f14a78327b20509f8a63e466d9bf6685a26dcb738e75621f3886333c4bfb0f356a1 languageName: node linkType: hard