Skip to content

Commit

Permalink
Preserve more free kills
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignose committed Oct 20, 2023
1 parent f1d54ac commit a8f4bdb
Showing 1 changed file with 31 additions and 33 deletions.
64 changes: 31 additions & 33 deletions src/tasks/leveling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ import {
wishFor,
xpWishEffect,
} from "../lib";
import { baseOutfit, docBag, garbageShirt, unbreakableUmbrella } from "../engine/outfit";
import {
baseOutfit,
chooseFamiliar,
docBag,
garbageShirt,
unbreakableUmbrella,
} from "../engine/outfit";
import Macro, { haveFreeBanish } from "../combat";
import { forbiddenEffects } from "../resources";
import { mapMonster } from "libram/dist/resources/2020/Cartography";
Expand Down Expand Up @@ -330,12 +336,23 @@ export const LevelingQuest: Quest = {
limit: { tries: 1 },
},
{
name: "Inscrutable Gaze",
name: "Mainstat Gaze",
completed: () =>
have($effect`Inscrutable Gaze`) ||
!have($skill`Inscrutable Gaze`) ||
!myPrimestat() === $stat`Mysticality`,
do: (): void => ensureEffect($effect`Inscrutable Gaze`),
((have($effect`Inscrutable Gaze`) || !have($skill`Inscrutable Gaze`)) &&
myPrimestat() === $stat`Mysticality`) ||
((have($effect`Patient Smile`) || !have($skill`Patient Smile`)) &&
myPrimestat() !== $stat`Muscle`) ||
((have($effect`Knowing Smile`) || !have($skill`Knowing Smile`)) &&
myPrimestat() !== $stat`Moxie`),
do: (): void => {
const mainStatGainEffect: Effect = {
Muscle: $effect`Patient Smile`,
Mysticality: $effect`Inscrutable Gaze`,
Moxie: $effect`Knowing Smile`,
}[mainStatStr];
ensureEffect(mainStatGainEffect);
},
limit: { tries: 1 },
},
{
name: "Hot in Herre",
Expand Down Expand Up @@ -1039,7 +1056,7 @@ export const LevelingQuest: Quest = {
),
outfit: () => ({
...baseOutfit,
familiar: !have($effect`Citizen of a Zone`) ? $familiar`Patriotic Eagle` : undefined,
familiar: !have($effect`Citizen of a Zone`) ? $familiar`Patriotic Eagle` : chooseFamiliar(),
}),
limit: { tries: 10 },
post: (): void => {
Expand All @@ -1048,29 +1065,6 @@ export const LevelingQuest: Quest = {
sellMiscellaneousItems();
},
},
{
name: "Snokebomb",
prepare: (): void => {
restoreHp(clamp(1000, myMaxhp() / 2, myMaxhp()));
unbreakableUmbrella();
restoreMp(50);
},
completed: () => get("_snokebombUsed") >= 3 - get("instant_saveSBForInnerElf", 0),
do: powerlevelingLocation(),
combat: new CombatStrategy().macro(Macro.trySkill($skill`Snokebomb`).abort()),
outfit: baseOutfit,
choices: {
1094: 5,
1115: 6,
1322: 2,
1324: 5,
},
post: (): void => {
sendAutumnaton();
sellMiscellaneousItems();
},
limit: { tries: 4 },
},
{
name: "Get Totem and Saucepan",
completed: () => have($item`turtle totem`) && have($item`saucepan`),
Expand Down Expand Up @@ -1165,6 +1159,10 @@ export const LevelingQuest: Quest = {
`!mpbelow ${mpCost($skill`Toynado`)} && hasskill ${toInt($skill`Toynado`)}`,
Macro.skill($skill`Toynado`)
)
.while_(
`!mpbelow ${mpCost($skill`Saucegeyser`)} && hasskill ${toInt($skill`Saucegeyser`)}`,
Macro.skill($skill`Saucegeyser`)
)
.while_(
`!mpbelow ${mpCost($skill`Saucestorm`)} && hasskill ${toInt($skill`Saucestorm`)}`,
Macro.skill($skill`Saucestorm`)
Expand Down Expand Up @@ -1754,9 +1752,9 @@ export const LevelingQuest: Quest = {
};
},
completed: () =>
myBasestat(myPrimestat()) >= targetBaseMyst &&
(get("_shatteringPunchUsed") >= 3 || !have($skill`Shattering Punch`)) &&
(get("_gingerbreadMobHitUsed") || !have($skill`Gingerbread Mob Hit`)) &&
myBasestat(myPrimestat()) >= targetBaseMyst ||
((get("_shatteringPunchUsed") >= 3 || !have($skill`Shattering Punch`)) &&
(get("_gingerbreadMobHitUsed") || !have($skill`Gingerbread Mob Hit`))) ||
overlevelled(),
do: powerlevelingLocation(),
combat: new CombatStrategy().macro(
Expand Down

0 comments on commit a8f4bdb

Please sign in to comment.