diff --git a/src/lib.ts b/src/lib.ts index 89c5c9b..26a780b 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -717,12 +717,6 @@ export function saveLeafyBoys(): boolean { return false; } -export function shouldFeelLost(): boolean { - if (have($familiar`Machine Elf`)) return false; - if (!have($skill`Feel Lost`)) return false; - return true; -} - export function checkTurnSave(test: string, ef: Effect): number { switch (test) { case "BoozeDrop": diff --git a/src/main.ts b/src/main.ts index b872195..59c8345 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,11 +12,12 @@ import { } from "kolmafia"; import { compareTestCompletion, + computeCombatFrequency, convertMilliseconds, logTestCompletion, simpleDateDiff, } from "./lib"; -import { $item, $stat, CommunityService, get, have, set, sinceKolmafiaRevision } from "libram"; +import { $item, $stat, get, have, set, sinceKolmafiaRevision } from "libram"; import { Engine } from "./engine/engine"; import { Args, getTasks } from "grimoire-kolmafia"; import { Task } from "./engine/task"; @@ -70,7 +71,7 @@ export function main(command?: string): void { const swapMainStatTest = have($item`Deck of Every Card`) && myPrimestat === $stat`Muscle`; - const nonComSwapOrder = CommunityService.FamiliarWeight.prediction >= 14; + const swapFamAndNCTests = computeCombatFrequency() <= -95; const tasks: Task[] = getTasks([ RunStartQuest, @@ -82,11 +83,11 @@ export function main(command?: string): void { swapMainStatTest ? MuscleQuest : MysticalityQuest, swapMainStatTest ? HPQuest : MoxieQuest, HotResQuest, - nonComSwapOrder ? FamiliarWeightQuest : NoncombatQuest, - nonComSwapOrder ? NoncombatQuest : FamiliarWeightQuest, - BoozeDropQuest, WeaponDamageQuest, SpellDamageQuest, + swapFamAndNCTests ? FamiliarWeightQuest : NoncombatQuest, + swapFamAndNCTests ? NoncombatQuest : FamiliarWeightQuest, + BoozeDropQuest, DonateQuest, ]); const engine = new Engine(tasks); diff --git a/src/tasks/boozedrop.ts b/src/tasks/boozedrop.ts index e28de4c..e1d0a4d 100644 --- a/src/tasks/boozedrop.ts +++ b/src/tasks/boozedrop.ts @@ -8,11 +8,9 @@ import { drink, Effect, equip, - faxbot, hermit, inebrietyLimit, itemAmount, - myClass, myInebriety, myMaxhp, myMeat, @@ -34,30 +32,24 @@ import { $familiar, $item, $location, - $monster, $skill, $slot, clamp, - CombatLoversLocket, CommunityService, - DaylightShavings, get, have, uneffect, withChoice, } from "libram"; import { - checkLocketAvailable, checkTurnSave, checkValue, forbiddenEffects, fuelUp, logTestSetup, - shouldFeelLost, tryAcquiringEffect, wishFor, } from "../lib"; -import { chooseFamiliar, sugarItemsAboutToBreak } from "../engine/outfit"; import { CombatStrategy } from "grimoire-kolmafia"; import Macro, { haveFreeBanish } from "../combat"; import { drive } from "libram/dist/resources/2017/AsdonMartin"; @@ -130,25 +122,19 @@ export const BoozeDropQuest: Quest = { limit: { tries: 1 }, }, { - name: "Item Buff if Feeling Lost", - ready: () => shouldFeelLost(), + name: "Item Buff", prepare: (): void => { restoreHp(clamp(1000, myMaxhp() / 2, myMaxhp())); restoreMp(50); }, completed: () => - (!have($familiar`Ghost of Crimbo Carols`) && - !have($item`cosmic bowling ball`) && - !have($item`vampyric cloake`)) || + (!have($item`cosmic bowling ball`) && !have($item`vampyric cloake`)) || !haveFreeBanish() || - $effects`Cosmic Ball in the Air, Do You Crush What I Crush?, Bat-Adjacent Form`.some((ef) => - have(ef) - ), + $effects`Cosmic Ball in the Air, Bat-Adjacent Form`.some((ef) => have(ef)), do: $location`The Dire Warren`, combat: new CombatStrategy().macro( Macro.trySkill($skill`Bowl Straight Up`) .trySkill($skill`Become a Bat`) - .trySkill($skill`Use the Force`) .banish() .abort() ), @@ -156,62 +142,9 @@ export const BoozeDropQuest: Quest = { offhand: $item`latte lovers member's mug`, acc1: $item`Kremlin's Greatest Briefcase`, acc2: $item`Lil' Doctorâ„¢ bag`, - familiar: $familiar`Ghost of Crimbo Carols`, - famequip: $item.none, }, limit: { tries: 5 }, }, - { - name: "Fax Ungulith", - completed: () => - have($item`corrupted marrow`) || have($effect`Cowrruption`) || shouldFeelLost(), - do: (): void => { - const monsterCow = - myClass().toString() === "Seal Clubber" && - CombatLoversLocket.unlockedLocketMonsters().includes($monster`furious cow`) - ? $monster`furious cow` - : $monster`ungulith`; - if (checkLocketAvailable() >= 2) { - CombatLoversLocket.reminisce(monsterCow); - } else { - cliExecute("chat"); - if (have($item`photocopied monster`) && get("photocopyMonster") !== monsterCow) { - cliExecute("fax send"); - } - if ( - (have($item`photocopied monster`) || faxbot(monsterCow)) && - get("photocopyMonster") === monsterCow - ) { - use($item`photocopied monster`); - } - } - }, - outfit: () => ({ - hat: - DaylightShavings.nextBuff() === $effect`Musician's Musician's Moustache` && - !DaylightShavings.hasBuff() && - have($item`Daylight Shavings Helmet`) - ? $item`Daylight Shavings Helmet` - : undefined, - back: $item`vampyric cloake`, - weapon: $item`Fourth of May Cosplay Saber`, - offhand: have($skill`Double-Fisted Skull Smashing`) - ? $item`industrial fire extinguisher` - : undefined, - familiar: chooseFamiliar(false), - modifier: "myst", - avoid: sugarItemsAboutToBreak(), - }), - choices: { 1387: 3 }, - combat: new CombatStrategy().macro( - Macro.trySkill($skill`Bowl Straight Up`) - .trySkill($skill`Become a Bat`) - .trySkill($skill`Fire Extinguisher: Polar Vortex`) - .trySkill($skill`Use the Force`) - .default() - ), - limit: { tries: 5 }, - }, { name: "Drink Sacramento Wine", completed: () => @@ -300,8 +233,7 @@ export const BoozeDropQuest: Quest = { }, { name: "Feeling Lost", - ready: () => shouldFeelLost(), - completed: () => have($effect`Feeling Lost`), + completed: () => have($effect`Feeling Lost`) || !have($skill`Feel Lost`), do: () => useSkill($skill`Feel Lost`), limit: { tries: 1 }, }, @@ -354,21 +286,11 @@ export const BoozeDropQuest: Quest = { sweetSynthesis($item`sugar shank`, $item`sugar sheet`); } - if ( - checkValue("August Scepter", checkTurnSave("BoozeDrop", $effect`Incredibly Well Lit`)) || - (CommunityService.WeaponDamage.isDone() && - checkTurnSave("BoozeDrop", $effect`Incredibly Well Lit`) > 1) - ) + if (checkTurnSave("BoozeDrop", $effect`Incredibly Well Lit`) > 1) tryAcquiringEffect($effect`Incredibly Well Lit`); if ( - checkValue( - $item`battery (lantern)`, - checkTurnSave("BoozeDrop", $effect`Lantern-Charged`) + - (!CommunityService.SpellDamage.isDone() - ? checkTurnSave("SpellDamage", $effect`Lantern-Charged`) - : 0) - ) + checkValue($item`battery (lantern)`, checkTurnSave("BoozeDrop", $effect`Lantern-Charged`)) ) { if (itemAmount($item`battery (AAA)`) >= 5) create($item`battery (lantern)`, 1); use($item`battery (lantern)`, 1); diff --git a/src/tasks/spelldamage.ts b/src/tasks/spelldamage.ts index c34798c..8a5ab34 100644 --- a/src/tasks/spelldamage.ts +++ b/src/tasks/spelldamage.ts @@ -42,7 +42,6 @@ import { checkValue, forbiddenEffects, logTestSetup, - shouldFeelLost, shrugAT, startingClan, tryAcquiringEffect, @@ -53,8 +52,6 @@ import { args } from "../args"; let triedDeepDark = false; -const barrels: string[] = [`00`, `01`, `02`, `10`, `11`, `12`, `20`, `21`, `22`]; - export const SpellDamageQuest: Quest = { name: "Spell Damage", completed: () => CommunityService.SpellDamage.isDone(), @@ -89,7 +86,6 @@ export const SpellDamageQuest: Quest = { }, { name: "Stand-Alone Carol Ghost Buff", - ready: () => !shouldFeelLost(), prepare: (): void => { restoreHp(clamp(1000, myMaxhp() / 2, myMaxhp())); restoreMp(50); @@ -142,7 +138,6 @@ export const SpellDamageQuest: Quest = { }, { name: "Meteor Shower", - ready: () => !shouldFeelLost(), completed: () => have($effect`Meteor Showered`) || !have($item`Fourth of May Cosplay Saber`) || @@ -170,41 +165,6 @@ export const SpellDamageQuest: Quest = { choices: { 1387: 3 }, limit: { tries: 1 }, }, - { - name: "Meteor Shower Feeling Lost", - ready: () => shouldFeelLost(), - completed: () => - have($effect`Meteor Showered`) || - !have($item`Fourth of May Cosplay Saber`) || - !have($skill`Meteor Lore`) || - get("_saberForceUses") >= 5, - do: (): void => { - for (const barrel of barrels) { - visitUrl("barrel.php"); - visitUrl(`choice.php?whichchoice=1099&pwd&option=1&slot=${barrel}`); - } - }, - combat: new CombatStrategy().macro( - Macro.trySkill($skill`Meteor Shower`) - .trySkill($skill`%fn, spit on me!`) - .trySkill($skill`Use the Force`) - .abort() - ), - outfit: () => ({ - weapon: $item`Fourth of May Cosplay Saber`, - familiar: - get("camelSpit") >= 100 - ? $familiar`Melodramedary` - : $effects`Do You Crush What I Crush?, Holiday Yoked, Let It Snow/Boil/Stink/Frighten/Grease, All I Want For Crimbo Is Stuff, Crimbo Wrapping`.some( - (ef) => have(ef) - ) - ? $familiar`Ghost of Crimbo Carols` - : chooseFamiliar(false), - avoid: sugarItemsAboutToBreak(), - }), - choices: { 1387: 3 }, - limit: { tries: 10 }, - }, { name: "Deep Dark Visions", completed: () => diff --git a/src/tasks/weapondamage.ts b/src/tasks/weapondamage.ts index 059d78a..e7790a8 100644 --- a/src/tasks/weapondamage.ts +++ b/src/tasks/weapondamage.ts @@ -39,7 +39,6 @@ import { checkValue, forbiddenEffects, logTestSetup, - shouldFeelLost, startingClan, tryAcquiringEffect, wishFor, @@ -61,7 +60,6 @@ export const WeaponDamageQuest: Quest = { }, { name: "Stand-Alone Carol Ghost Buff", - ready: () => !shouldFeelLost(), prepare: (): void => { restoreHp(clamp(1000, myMaxhp() / 2, myMaxhp())); restoreMp(50); @@ -123,8 +121,7 @@ export const WeaponDamageQuest: Quest = { limit: { tries: 1 }, }, { - name: "Fax Ungulith", - ready: () => shouldFeelLost(), + name: "Ungulith Shower", completed: () => have($item`corrupted marrow`) || have($effect`Cowrruption`), do: (): void => { const monsterCow = @@ -164,40 +161,11 @@ export const WeaponDamageQuest: Quest = { Macro.trySkill($skill`Meteor Shower`) .trySkill($skill`%fn, spit on me!`) .trySkill($skill`Use the Force`) + .trySkill($skill`Feel Envy`) .default() ), limit: { tries: 5 }, }, - { - name: "Meteor Shower", - ready: () => !shouldFeelLost(), - completed: () => - have($effect`Meteor Showered`) || - !have($item`Fourth of May Cosplay Saber`) || - !have($skill`Meteor Lore`) || - get("_saberForceUses") >= 5, - do: $location`The Dire Warren`, - combat: new CombatStrategy().macro( - Macro.trySkill($skill`Meteor Shower`) - .trySkill($skill`%fn, spit on me!`) - .trySkill($skill`Use the Force`) - .abort() - ), - outfit: () => ({ - weapon: $item`Fourth of May Cosplay Saber`, - familiar: - get("camelSpit") >= 100 - ? $familiar`Melodramedary` - : $effects`Do You Crush What I Crush?, Holiday Yoked, Let It Snow/Boil/Stink/Frighten/Grease, All I Want For Crimbo Is Stuff, Crimbo Wrapping`.some( - (ef) => have(ef) - ) - ? $familiar`Ghost of Crimbo Carols` - : chooseFamiliar(false), - avoid: sugarItemsAboutToBreak(), - }), - choices: { 1387: 3 }, - limit: { tries: 1 }, - }, { name: "Test", prepare: (): void => {