Skip to content

Commit

Permalink
Locket Ungulith if >2 free lockets
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignose committed Oct 18, 2023
1 parent 253160f commit a6a3e98
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions src/tasks/boozedrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
$skill,
$slot,
clamp,
CombatLoversLocket,
CommunityService,
DaylightShavings,
get,
Expand All @@ -59,6 +60,19 @@ import Macro from "../combat";
import { forbiddenEffects } from "../resources";
import { drive } from "libram/dist/resources/2017/AsdonMartin";

function checkLocketAvailable(): boolean {
const locketAvailable =
(get("instant_saveLocketRedSkeleton", false) ? 1 : 0) +
(get("instant_saveLocketWitchessKing", false) ? 1 : 0) +
(get("instant_saveLocketFactoryWorker", false) ? 1 : 0);

if (locketAvailable >= 2) {
return true;
} else {
return false;
}
}

export const BoozeDropQuest: Quest = {
name: "Booze Drop",
completed: () => CommunityService.BoozeDrop.isDone(),
Expand Down Expand Up @@ -136,17 +150,21 @@ export const BoozeDropQuest: Quest = {
},
{
name: "Fax Ungulith",
completed: () => get("_photocopyUsed"),
completed: () => have($item`corrupted marrow`) || have($effect`Cowrruption`),
do: (): void => {
cliExecute("chat");
if (have($item`photocopied monster`) && get("photocopyMonster") !== $monster`ungulith`) {
cliExecute("fax send");
}
if (
(have($item`photocopied monster`) || faxbot($monster`ungulith`)) &&
get("photocopyMonster") === $monster`ungulith`
) {
use($item`photocopied monster`);
if (checkLocketAvailable()) {
CombatLoversLocket.reminisce($monster`ungulith`);
} else {
cliExecute("chat");
if (have($item`photocopied monster`) && get("photocopyMonster") !== $monster`ungulith`) {
cliExecute("fax send");
}
if (
(have($item`photocopied monster`) || faxbot($monster`ungulith`)) &&
get("photocopyMonster") === $monster`ungulith`
) {
use($item`photocopied monster`);
}
}
},
outfit: () => ({
Expand Down

0 comments on commit a6a3e98

Please sign in to comment.