Skip to content

Commit

Permalink
Fix various palindome issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
phulin committed Aug 26, 2024
1 parent caf50e2 commit 356cbf7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 45 deletions.
1 change: 1 addition & 0 deletions client/src/prefs/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"questL11Curses",
"questL11Desert",
"questL11MacGuffin",
"questL11Palindome",
"questL11Ron",
"questL11Shen",
"questL11Worship",
Expand Down
2 changes: 2 additions & 0 deletions client/src/sections/quests/Level11.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { questFinished } from "../../util/quest";
import BlackForest from "./level11/BlackForest";
import Copperhead from "./level11/Copperhead";
import HiddenCity from "./level11/HiddenCity";
import Palindome from "./level11/Palindome";
import Zeppelin from "./level11/Zeppelin";

const Level11 = () => {
Expand All @@ -15,6 +16,7 @@ const Level11 = () => {
<HiddenCity />
<Copperhead />
<Zeppelin />
<Palindome />
</>
);
};
Expand Down
64 changes: 19 additions & 45 deletions client/src/sections/quests/level11/Palindome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { commaAnd, plural, pluralize } from "../../../util/text";

const PALINDOME_URL = "/place.php?whichplace=palindome";
const WHITEYS_GROVE_URL = "/place.php?whichplace=woods";
// const HAUNTED_BEDROOM_URL =
// "/place.php?whichplace=hauntedhouse&action=hh_bedroom";

const Level11Palindome: React.FC = () => {
const step = questStep("questL11Palindome");
Expand All @@ -21,24 +19,24 @@ const Level11Palindome: React.FC = () => {
const canStart =
have(talisman) ||
(have($item`Copperhead Charm`) && have($item`Copperhead Charm (rampant)`));
const talismanEquipped = have($item`Talisman o' Namsilat`);
const talismanEquipped = haveEquipped($item`Talisman o' Namsilat`);

const neededNcPhotos = ["red nugget", "ostrich egg", "god"].filter(
(item) => !have($item`photograph of a ${item}`)
const neededNcPhotos = ["a red nugget", "an ostrich egg", "god"].filter(
(item) => !have($item`photograph of ${item}`)
);
const needInstantCamera =
!have($item`photograph of a dog`) &&
!have($item`disposable instant camera`) &&
step < 3 &&
step <= Step.STARTED &&
!have($item`"2 Love Me, Vol. 2"`);

const drAwkwardOfficeUnlocked =
step > 2 || get("palindomeDudesDefeated", 0) >= 5;
step > Step.STARTED || get("palindomeDudesDefeated", 0) >= 5;

return (
<QuestTile
header="Palindome Quest"
imageUrl="/images/otherimages/palindome.gif"
imageUrl="/images/adventureimages/drawkward.gif"
minLevel={11}
hide={!canStart || step === Step.FINISHED}
>
Expand Down Expand Up @@ -78,8 +76,8 @@ const Level11Palindome: React.FC = () => {
<Line href={PALINDOME_URL}>
Find {pluralize(neededNcPhotos.length, "photograph")} of a{" "}
{commaAnd(
["red nugget", "ostrich egg", "god"].filter(
(item) => !have($item`photograph of a ${item}`)
["a red nugget", "an ostrich egg", "god"].filter(
(item) => !have($item`photograph of ${item}`)
)
)}{" "}
from non-combats.
Expand All @@ -88,12 +86,8 @@ const Level11Palindome: React.FC = () => {
{!drAwkwardOfficeUnlocked && (
<Line href={PALINDOME_URL}>
Defeat{" "}
{plural(
5 - get("palindomeDudesDefeated", 0),
"more dude",
"more dudes"
)}{" "}
in the palindome.
{plural(5 - get("palindomeDudesDefeated", 0), "more dude")} in
the palindome.
</Line>
)}
</>,
Expand All @@ -111,10 +105,13 @@ const Level11Palindome: React.FC = () => {
],
[
2,
<Line href={inventoryLink($item`"2 Love Me, Vol. 2"`)}>
Use 2 Love Me, Vol. 2, then talk to Mr. Alarm in his office.
</Line>,
],
[
3,
<>
<Line href={inventoryLink($item`"2 Love Me, Vol. 2"`)}>
Use 2 Love Me, Vol. 2, then talk to Mr. Alarm in his office.
</Line>
<Line href={WHITEYS_GROVE_URL}>
Acquire and make wet stunt nut stew:
</Line>
Expand Down Expand Up @@ -147,32 +144,9 @@ const Level11Palindome: React.FC = () => {
],
[
4,
!have($item`wet stunt nut stew`) ? (
<>
<Line href={WHITEYS_GROVE_URL}>
Acquire and make wet stunt nut stew:
</Line>
{!have($item`stunt nuts`) && (
<Line href={PALINDOME_URL}>
Acquire stunt nuts from Bob Racecar or Racecar Bob in
Palindome. (30% drop)
</Line>
)}
{!have($item`wet stew`) && (
<Line href={WHITEYS_GROVE_URL}>
Adventure in Whitey's Grove to acquire bird rib and lion oil.
{numericModifier("Food Drop") < 300 && (
<> Need +{300 - numericModifier("Food Drop")}% food drop.</>
)}
</Line>
)}
<Line href="craft.php?mode=cook">Cook wet stunt nut stew.</Line>
</>
) : (
<Line href={PALINDOME_URL}>
Talk to Mr. Alarm with the wet stunt nut stew.
</Line>
),
<Line href={PALINDOME_URL}>
Talk to Mr. Alarm with the wet stunt nut stew.
</Line>,
],
[
5,
Expand Down

0 comments on commit 356cbf7

Please sign in to comment.