Skip to content

Commit

Permalink
Pledge at Snojo, better resource usage experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignose committed Oct 19, 2023
1 parent cf134f1 commit 27bed72
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 15 deletions.
29 changes: 17 additions & 12 deletions src/tasks/boozedrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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: () =>
Expand Down Expand Up @@ -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 => {
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/earlyleveling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`))),
Expand Down
42 changes: 40 additions & 2 deletions src/tasks/leveling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit 27bed72

Please sign in to comment.