Skip to content

Commit

Permalink
tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
phulin committed Nov 18, 2024
1 parent 0864fdc commit 1409197
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 75 deletions.
140 changes: 70 additions & 70 deletions src/sections/resources/2023/AGuideToBurningLeaves.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FC } from "react";

import AdviceTooltip from "../../../components/AdviceTooltip";
import Line from "../../../components/Line";
import LinkBlock from "../../../components/LinkBlock";
import Tile from "../../../components/Tile";
import { NagPriority } from "../../../contexts/NagContext";
import useNag from "../../../hooks/useNag";
Expand Down Expand Up @@ -182,8 +183,9 @@ const AGuideToBurningLeaves: FC = () => {
href={
haveResin
? inventoryLink($item`distilled resin`)
: "/campground.php?preaction=burningleaves"
: "/campground.php?preaction=leaves"
}
linkEntireTile
>
<Line>
Use distilled resin{!haveResin && " (50 leaves)"} to collect more
Expand All @@ -201,81 +203,79 @@ const AGuideToBurningLeaves: FC = () => {
<Tile
header="Burning Leaves"
imageUrl="/images/itemimages/al_book.gif"
href="/campground.php?preaction=burningleaves"
href="/campground.php?preaction=leaves"
>
<Line fontWeight="bold" href="/campground.php?preaction=burningleaves">
Item Summons:
</Line>
<UnorderedList>
{LEAFY_SUMMONS.map((summon) => {
if (
((canUseShorty || canUseCrab) && summon.leafCost === 37) ||
(myLevel() > 11 && [42, 43].includes(summon.leafCost)) ||
(hasTaoOfTheTerrapin && summon.leafCost === 66) ||
(have($item`${summon.summonedItem}`) &&
[42, 43, 44, 66, 74].includes(summon.leafCost)) ||
(hasForestCanopyBed && summon.leafCost === 74) ||
(inRun && [99, 222, 1111, 6666, 11111].includes(summon.leafCost)) ||
(!inRun && [42, 43, 44, 66].includes(summon.leafCost))
) {
return null;
}
<LinkBlock href="/campground.php?preaction=leaves">
<Line fontWeight="bold">Item Summons:</Line>
<UnorderedList>
{LEAFY_SUMMONS.map((summon) => {
if (
((canUseShorty || canUseCrab) && summon.leafCost === 37) ||
(myLevel() > 11 && [42, 43].includes(summon.leafCost)) ||
(hasTaoOfTheTerrapin && summon.leafCost === 66) ||
(have($item`${summon.summonedItem}`) &&
[42, 43, 44, 66, 74].includes(summon.leafCost)) ||
(hasForestCanopyBed && summon.leafCost === 74) ||
(inRun &&
[99, 222, 1111, 6666, 11111].includes(summon.leafCost)) ||
(!inRun && [42, 43, 44, 66].includes(summon.leafCost))
) {
return null;
}

const hasEnoughLeaves = leafCount >= summon.leafCost;
return (
<ListItem
key={summon.summonedItem}
color={hasEnoughLeaves ? "black" : "gray.500"}
>
{summon.leafCost} leaves: {summon.summonedItem} -{" "}
{summon.description}
{summon.meltingStatus && (
<Text as="span" fontSize="xs" color="gray.500">
{" "}
(melting)
</Text>
)}
</ListItem>
);
})}
</UnorderedList>
const hasEnoughLeaves = leafCount >= summon.leafCost;
return (
<ListItem
key={summon.summonedItem}
color={hasEnoughLeaves ? "black" : "gray.500"}
>
{summon.leafCost} leaves: {summon.summonedItem} -{" "}
{summon.description}
{summon.meltingStatus && (
<Text as="span" fontSize="xs" color="gray.500">
{" "}
(melting)
</Text>
)}
</ListItem>
);
})}
</UnorderedList>
</LinkBlock>

{fightsRemaining > 0 && (
<>
<Line
fontWeight="bold"
href="/campground.php?preaction=burningleaves"
>
Fight Summons:
</Line>
<UnorderedList>
{LEAFY_FIGHTS.map((fight) => {
if (
inRun &&
have($item`flaming leaf crown`) &&
fight.summonedMonster === "Leaviathan"
) {
return null;
}
<LinkBlock href="/campground.php?preaction=leaves">
<Line fontWeight="bold">Fight Summons:</Line>
<UnorderedList>
{LEAFY_FIGHTS.map((fight) => {
if (
inRun &&
have($item`flaming leaf crown`) &&
fight.summonedMonster === "Leaviathan"
) {
return null;
}

const hasEnoughLeaves = leafCount >= fight.leafCost;
return (
<ListItem
key={fight.summonedMonster}
color={hasEnoughLeaves ? "black" : "gray.500"}
>
{fight.leafCost} leaves: {fight.summonedMonster} -{" "}
{fight.scaling}; ~{fight.leavesDropped} leaves dropped
{fight.extraDrops && (
<Text as="span" fontSize="xs" color="gray.500">
{" "}
(also, drops {fight.extraDrops})
</Text>
)}
</ListItem>
);
})}
</UnorderedList>
const hasEnoughLeaves = leafCount >= fight.leafCost;
return (
<ListItem
key={fight.summonedMonster}
color={hasEnoughLeaves ? "black" : "gray.500"}
>
{fight.leafCost} leaves: {fight.summonedMonster} -{" "}
{fight.scaling}; ~{fight.leavesDropped} leaves dropped
{fight.extraDrops && (
<Text as="span" fontSize="xs" color="gray.500">
{" "}
(also, drops {fight.extraDrops})
</Text>
)}
</ListItem>
);
})}
</UnorderedList>
</LinkBlock>
<Line>
{leafCount >= 111 * fightsRemaining ? (
<AdviceTooltip
Expand Down
10 changes: 5 additions & 5 deletions src/sections/resources/2024/AprilingBandHelmet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Tile from "../../../components/Tile";
import { NagPriority } from "../../../contexts/NagContext";
import useNag from "../../../hooks/useNag";
import { haveUnrestricted } from "../../../util/available";
import { inventoryActionLink } from "../../../util/links";
import { inventoryActionLink, inventoryLink } from "../../../util/links";
import { plural } from "../../../util/text";

const NONCOMBAT_ZONES = [
Expand Down Expand Up @@ -102,31 +102,31 @@ const AprilingBandHelmet = () => {
)}

{saxUsesLeft > 0 && have($item`Apriling band saxophone`) && (
<Line>
<Line href={inventoryLink($item`Apriling band saxophone`)}>
Can play the Sax {plural(saxUsesLeft, "more time")}.{" "}
<Text as="span" color="green">
LUCKY!
</Text>
</Line>
)}
{quadTomUsesLeft > 0 && have($item`Apriling band quad tom`) && (
<Line>
<Line href={inventoryLink($item`Apriling band quad tom`)}>
Can play the Quad Toms {plural(quadTomUsesLeft, "more time")}.{" "}
<Text as="span" color="orange">
Sandworm!
</Text>
</Line>
)}
{tubaUsesLeft > 0 && have($item`Apriling band tuba`) && (
<Line>
<Line href={inventoryLink($item`Apriling band tuba`)}>
Can play the Tuba {plural(tubaUsesLeft, "more time")}.{" "}
<Text as="span" color="gray">
SNEAK!
</Text>
</Line>
)}
{piccoloUsesLeft > 0 && have($item`Apriling band piccolo`) && (
<Line>
<Line href={inventoryLink($item`Apriling band piccolo`)}>
Can play the Piccolo {plural(piccoloUsesLeft, "more time")}.{" "}
<Text as="span" color="purple">
+40 fxp
Expand Down

0 comments on commit 1409197

Please sign in to comment.