diff --git a/ui/src/app/components/BattleDialog.tsx b/ui/src/app/components/BattleDialog.tsx
deleted file mode 100644
index 56195e755..000000000
--- a/ui/src/app/components/BattleDialog.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import React from "react";
-import useUIStore from "@/app/hooks/useUIStore";
-import { MdClose } from "react-icons/md";
-import { useUiSounds, soundSelector } from "@/app/hooks/useUiSound";
-
-export const BattleDialog = (props: any) => {
- const showBattleDialog = useUIStore((state) => state.showBattleDialog);
- const { play: clickPlay } = useUiSounds(soundSelector.click);
-
- return (
- <>
-
showBattleDialog(false)}
- />
-
-
-
-
Battle Details
-
-
-
- {React.Children.toArray(
- props.events?.map((event: any) => (
- <>
- {event.type === "adventurer_attack" && (
- <>
-
- {`You attack for ${event.totalDamage} ${
- event.isCriticalHit ? "critical hit!" : "damage"
- }`}
-
- >
- )}
-
- {event.type === "beast_attack" && (
- <>
-
- {`Beast attack ${event.location} for ${event.totalDamage} ${
- event.isCriticalHit ? "critical hit!" : "damage"
- }`}
-
- >
- )}
- >
- ))
- )}
-
- >
- );
-};
diff --git a/ui/src/app/components/FleeDialog.tsx b/ui/src/app/components/FleeDialog.tsx
deleted file mode 100644
index affb6f19d..000000000
--- a/ui/src/app/components/FleeDialog.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import React from "react";
-import useUIStore from "@/app/hooks/useUIStore";
-import { MdClose } from "react-icons/md";
-import { useUiSounds, soundSelector } from "@/app/hooks/useUiSound";
-
-export const FleeDialog = (props: any) => {
- const showFleeDialog = useUIStore((state) => state.showFleeDialog);
- const { play: clickPlay } = useUiSounds(soundSelector.click);
-
- return (
- <>
-
showFleeDialog(false)}
- />
-
-
-
-
Flee Details
-
-
-
- {React.Children.toArray(
- props.events?.map((event: any) => (
- <>
- {event.type === "beast_attack" && (
- <>
-
- {`Failed to flee`}
-
-
-
- {`Beast attack ${event.location} for ${event.totalDamage} ${
- event.isCriticalHit ? "critical hit!" : "damage"
- }`}
-
- >
- )}
- >
- ))
- )}
-
- {props.success ? (
-
- {`Flee success!`}
-
- ) : (
-
- {`Killed by beast`}
-
- )}
-
- >
- );
-};
diff --git a/ui/src/app/components/encounters/EncounterTable.tsx b/ui/src/app/components/encounters/EncounterTable.tsx
deleted file mode 100644
index 60b17b21c..000000000
--- a/ui/src/app/components/encounters/EncounterTable.tsx
+++ /dev/null
@@ -1,445 +0,0 @@
-import {
- BladeIcon,
- BludgeonIcon,
- MagicIcon,
- ClothIcon,
- HideIcon,
- MetalIcon,
- HeartVitalityIcon,
- CoinIcon,
-} from "@/app/components/icons/Icons";
-import React, { useEffect, useMemo, useState } from "react";
-import {
- listAllEncounters,
- beastEncounters,
-} from "@/app/lib/utils/processFutures";
-import useAdventurerStore from "@/app/hooks/useAdventurerStore";
-import { useQueriesStore } from "@/app/hooks/useQueryStore";
-import { getItemData, calculateLevel } from "@/app/lib/utils";
-import useUIStore from "@/app/hooks/useUIStore";
-import { MdClose } from "react-icons/md";
-import { Button } from "@/app/components/buttons/Button";
-
-const EncounterTable = () => {
- const [view, setView] = useState
(0);
-
- const [beastTable, setBeastTable] = useState([]);
- const adventurer = useAdventurerStore((state) => state.adventurer);
- const adventurerEntropy = useUIStore((state) => state.adventurerEntropy);
- const showEncounterTable = useUIStore((state) => state.showEncounterTable);
- const hasBeast = useAdventurerStore((state) => state.computed.hasBeast);
-
- const formattedAdventurerEntropy = BigInt(adventurerEntropy);
-
- const { data } = useQueriesStore();
-
- let armoritems =
- data.itemsByAdventurerQuery?.items
- .map((item) => ({ ...item, ...getItemData(item.item ?? "") }))
- .filter((item) => {
- return !["Weapon", "Ring", "Neck"].includes(item.slot!);
- }) || [];
-
- let weaponItems =
- data.itemsByAdventurerQuery?.items
- .map((item) => ({ ...item, ...getItemData(item.item ?? "") }))
- .filter((item) => {
- return item.slot! === "Weapon";
- }) || [];
-
- const encounters = useMemo(
- () =>
- listAllEncounters(
- adventurer?.xp!,
- formattedAdventurerEntropy,
- hasBeast,
- adventurer?.level!
- ),
- [adventurer?.xp, formattedAdventurerEntropy]
- );
-
- useEffect(() => {
- if (view === 1) {
- setBeastTable(
- beastEncounters(
- encounters.map((encounter: any) => encounter.xp),
- formattedAdventurerEntropy
- )
- );
- }
- }, [encounters, formattedAdventurerEntropy, view]);
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
- XP (lvl)
- |
-
- Encounter
- |
-
- Tier
- |
-
- Lvl
- |
-
- HP
- |
-
- Type
- |
-
- Location
- |
-
- Avoid
- |
-
- Crit
- |
-
- Next XP (Lvl)
- |
-
-
- {view === 0 && (
-
- {adventurerEntropy ? (
- React.Children.toArray(
- encounters.map((encounter: any) => {
- let [special2, special3] = encounter.specialName?.split(
- " "
- ) || ["no", "no"];
- let nameMatch =
- encounter.encounter === "Beast" && encounter.level >= 19
- ? armoritems.find(
- (item) =>
- item.special2 === special2 ||
- item.special3 === special3
- )
- : false;
- let weaponMatch =
- encounter.encounter === "Beast" && encounter.level >= 19
- ? weaponItems.find(
- (item) =>
- item.special2 === special2 ||
- item.special3 === special3
- )
- : false;
-
- return (
-
-
-
- {encounter.xp}. ({encounter.adventurerLevel})
-
- |
-
-
- {encounter.encounter}
-
- {encounter.encounter === "Beast" &&
- encounter.level >= 19 && (
-
- {encounter.specialName}
-
- )}
- |
-
-
- {encounter.encounter !== "Discovery" &&
- encounter.tier}
- {encounter.type === "Health" && (
-
- {" "}
- {encounter.tier}{" "}
-
-
- )}
- {encounter.type === "Gold" && (
-
- {" "}
- {encounter.tier}{" "}
-
-
- )}
-
- |
-
-
- {encounter.level}
-
- |
-
-
- {encounter.health}
-
- |
-
-
- {encounter.type === "Blade" && (
-
- )}
- {encounter.type === "Bludgeon" && (
-
- )}
- {encounter.type === "Magic" && (
-
- )}
-
- {encounter.encounter === "Beast" && (
- <>
- /
- {encounter.type === "Blade" && (
-
- )}
- {encounter.type === "Bludgeon" && (
-
- )}
- {encounter.type === "Magic" && (
-
- )}
- >
- )}
-
- |
-
-
- {encounter.location}
-
- |
-
-
-
- {encounter.dodgeRoll &&
- ((encounter.encounter === "Beast"
- ? adventurer?.wisdom!
- : adventurer?.intelligence!) >
- encounter.dodgeRoll
- ? "Yes"
- : "No")}
-
-
- {encounter.dodgeRoll &&
- `(${encounter.dodgeRoll})`}
-
-
- |
- 3
- ? "text-red-500"
- : encounter.criticalMultiplier > 0
- ? "text-terminal-yellow"
- : ""
- }`}
- >
- {encounter.criticalMultiplier >= 0 && (
-
- {encounter.criticalMultiplier > 0
- ? `${encounter.criticalMultiplier * 20}%`
- : "No"}
-
- )}
- |
-
-
- {encounter.nextXp} (
- {calculateLevel(encounter.nextXp)})
-
- |
-
- );
- })
- )
- ) : (
-
-
- Waiting for new entropy... somebody has to rotate it!
-
-
- )}
-
- )}
-
- {view === 1 && (
-
- {adventurerEntropy ? (
- React.Children.toArray(
- beastTable.map((encounter: any) => {
- let [special2, special3] = encounter.specialName?.split(
- " "
- ) || ["no", "no"];
- let nameMatch =
- encounter.encounter === "Beast" && encounter.level >= 19
- ? armoritems.find(
- (item) =>
- item.special2 === special2 ||
- item.special3 === special3
- )
- : false;
- let weaponMatch =
- encounter.encounter === "Beast" && encounter.level >= 19
- ? weaponItems.find(
- (item) =>
- item.special2 === special2 ||
- item.special3 === special3
- )
- : false;
-
- return (
-
-
-
- {encounter.xp}. ({encounter.adventurerLevel})
-
- |
-
- {encounter.encounter}
- {encounter.encounter === "Beast" &&
- encounter.level >= 19 && (
-
- {encounter.specialName}
-
- )}
- |
-
-
- {encounter.encounter !== "Discovery" &&
- encounter.tier}
- {encounter.type === "Health" && (
-
- {" "}
- {encounter.tier}{" "}
-
-
- )}
- {encounter.type === "Gold" && (
-
- {" "}
- {encounter.tier}{" "}
-
-
- )}
-
- |
-
-
- {encounter.level}
-
- |
-
-
- {encounter.health}
-
- |
-
-
- {encounter.type === "Blade" && (
-
- )}
- {encounter.type === "Bludgeon" && (
-
- )}
- {encounter.type === "Magic" && (
-
- )}
-
- {encounter.encounter === "Beast" && (
- <>
- /
- {encounter.type === "Blade" && (
-
- )}
- {encounter.type === "Bludgeon" && (
-
- )}
- {encounter.type === "Magic" && (
-
- )}
- >
- )}
-
- |
-
-
- {encounter.location}
-
- |
-
-
- {encounter.dodgeRoll}
-
- |
- |
-
-
- {encounter.nextXp} (
- {calculateLevel(encounter.nextXp)})
-
- |
-
- );
- })
- )
- ) : (
-
-
- Waiting for randomness from Pragma!
-
-
- )}
-
- )}
-
-
-
- );
-};
-
-export default EncounterTable;
diff --git a/ui/src/app/components/menu/ScreenMenu.tsx b/ui/src/app/components/menu/ScreenMenu.tsx
index c8c026691..9622977c0 100644
--- a/ui/src/app/components/menu/ScreenMenu.tsx
+++ b/ui/src/app/components/menu/ScreenMenu.tsx
@@ -15,21 +15,17 @@ interface HorizontalKeyboardControlProps {
buttonsData: Menu[];
disabled?: boolean[];
onButtonClick: (value: any) => void;
- hideEncounters?: boolean;
}
const HorizontalKeyboardControl: React.FC = ({
buttonsData,
onButtonClick,
disabled,
- hideEncounters,
}) => {
const { play } = useUiSounds(soundSelector.click);
const [selectedIndex, setSelectedIndex] = useState(0);
const buttonRefs = useRef<(HTMLButtonElement | null)[]>([]);
const screen = useUIStore((state) => state.screen);
- const encounterTable = useUIStore((state) => state.encounterTable);
- const showEncounterTable = useUIStore((state) => state.showEncounterTable);
useEffect(() => {
onButtonClick(buttonsData[selectedIndex]?.screen);
@@ -103,14 +99,6 @@ const HorizontalKeyboardControl: React.FC = ({
{buttonData.label}
))}
-
);
};
diff --git a/ui/src/app/components/navigation/Header.tsx b/ui/src/app/components/navigation/Header.tsx
index aaab67943..922647e41 100644
--- a/ui/src/app/components/navigation/Header.tsx
+++ b/ui/src/app/components/navigation/Header.tsx
@@ -136,8 +136,6 @@ export default function Header({
const setUpgrades = useUIStore((state) => state.setUpgrades);
const setUpgradeScreen = useUIStore((state) => state.setUpgradeScreen);
const setSlayAdventurers = useUIStore((state) => state.setSlayAdventurers);
- const encounterTable = useUIStore((state) => state.encounterTable);
- const showEncounterTable = useUIStore((state) => state.showEncounterTable);
const items = data.latestMarketItemsQuery
? data.latestMarketItemsQuery.items
@@ -337,13 +335,6 @@ export default function Header({