From 27bed721e62276564beea3b0045946de1184f541 Mon Sep 17 00:00:00 2001 From: Ignose Date: Thu, 19 Oct 2023 13:47:21 -0400 Subject: [PATCH] Pledge at Snojo, better resource usage experiment --- src/tasks/boozedrop.ts | 29 +++++++++++++++----------- src/tasks/earlyleveling.ts | 2 +- src/tasks/leveling.ts | 42 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 58 insertions(+), 15 deletions(-) diff --git a/src/tasks/boozedrop.ts b/src/tasks/boozedrop.ts index c567ba3..a55b720 100644 --- a/src/tasks/boozedrop.ts +++ b/src/tasks/boozedrop.ts @@ -61,6 +61,21 @@ import Macro from "../combat"; import { forbiddenEffects } from "../resources"; import { drive } from "libram/dist/resources/2017/AsdonMartin"; +function checkWheelOfFortune(): void { + if ( + !( + get("_deckCardsDrawn") > 10 || + have($effect`Fortune of the Wheel`) || + !have($item`Deck of Every Card`) || + get("instant_saveDeck", false) || + (get("instant_maximizeProfit", false) && + getSaleValue($item`blue mana`) > get("valueOfAdventure") * 4) + ) + ) { + cliExecute("cheat fortune"); + } +} + export const BoozeDropQuest: Quest = { name: "Booze Drop", completed: () => CommunityService.BoozeDrop.isDone(), @@ -221,18 +236,6 @@ export const BoozeDropQuest: Quest = { }, limit: { tries: 1 }, }, - { - name: "Deck Wheel of Fortune", - completed: () => - get("_deckCardsDrawn") > 10 || - have($effect`Fortune of the Wheel`) || - !have($item`Deck of Every Card`) || - get("instant_saveDeck", false), - do: (): void => { - cliExecute("cheat fortune"); - }, - limit: { tries: 1 }, - }, { name: "Power Seed", completed: () => @@ -329,6 +332,8 @@ export const BoozeDropQuest: Quest = { // If it saves us >= 6 turns, try using a wish if (CommunityService.BoozeDrop.actualCost() >= 7) wishFor($effect`Infernal Thirst`); + // Check for wheel of fortune + if (CommunityService.BoozeDrop.actualCost() >= 5) checkWheelOfFortune(); }, completed: () => CommunityService.BoozeDrop.isDone(), do: (): void => { diff --git a/src/tasks/earlyleveling.ts b/src/tasks/earlyleveling.ts index 5d1affb..b2e717b 100644 --- a/src/tasks/earlyleveling.ts +++ b/src/tasks/earlyleveling.ts @@ -331,8 +331,8 @@ export const earlyLevelingQuest: Quest = { docBag(); restoreMp(50); }, + ready: () => !have($effect`Citizen of a Zone`) && !get("snojoAvailable"), completed: () => - !have($effect`Citizen of a Zone`) || !have($familiar`Patriotic Eagle`) || ((get("_shatteringPunchUsed") >= 3 || !have($skill`Shattering Punch`)) && (get("_gingerbreadMobHitUsed") || !have($skill`Gingerbread Mob Hit`))), diff --git a/src/tasks/leveling.ts b/src/tasks/leveling.ts index fd6d45d..9916efb 100644 --- a/src/tasks/leveling.ts +++ b/src/tasks/leveling.ts @@ -1030,9 +1030,17 @@ export const LevelingQuest: Quest = { completed: () => get("_snojoFreeFights") >= 10 || !get("snojoAvailable"), do: $location`The X-32-F Combat Training Snowman`, combat: new CombatStrategy().macro( - Macro.trySkill($skill`Recall Facts: %phylum Circadian Rhythms`).default() + Macro.if_( + "!haseffect Citizen of a Zone", + Macro.trySkill($skill`%fn, let's pledge allegiance to a Zone`) + ) + .trySkill($skill`Recall Facts: %phylum Circadian Rhythms`) + .default() ), - outfit: baseOutfit, + outfit: () => ({ + ...baseOutfit, + familiar: !have($effect`Citizen of a Zone`) ? $familiar`Patriotic Eagle` : undefined, + }), limit: { tries: 10 }, post: (): void => { if (get("_snojoFreeFights") >= 10) cliExecute("hottub"); @@ -1103,6 +1111,36 @@ export const LevelingQuest: Quest = { }, limit: { tries: 1 }, }, + { + name: "Bakery Pledge", + prepare: (): void => { + restoreHp(clamp(1000, myMaxhp() / 2, myMaxhp())); + restoreMp(50); + docBag(); + restoreMp(50); + }, + ready: () => !have($effect`Citizen of a Zone`) && !get("snojoAvailable"), + completed: () => + !have($familiar`Patriotic Eagle`) || + ((get("_shatteringPunchUsed") >= 3 || !have($skill`Shattering Punch`)) && + (get("_gingerbreadMobHitUsed") || !have($skill`Gingerbread Mob Hit`))), + do: $location`Madness Bakery`, + combat: new CombatStrategy().macro( + Macro.tryItem($item`blue rocket`) + .tryItem($item`red rocket`) + .trySkill($skill`%fn, let's pledge allegiance to a Zone`) + .trySkill($skill`Chest X-Ray`) + .trySkill($skill`Gingerbread Mob Hit`) + .trySkill($skill`Shattering Punch`) + .default() + ), + outfit: () => ({ + ...baseOutfit, + familiar: $familiar`Patriotic Eagle`, + }), + post: () => sellMiscellaneousItems(), + limit: { tries: 1 }, + }, { name: "LOV Tunnel", prepare: (): void => {