From 3473a93f099b43acc161e6b6aaebcf005442591d Mon Sep 17 00:00:00 2001 From: Chris Vickery Date: Thu, 1 Feb 2024 16:36:59 -0800 Subject: [PATCH] fetch artifact items --- src/admin/account.graphql | 30 ++++++++++++++++++++++++++++++ src/game/locations/index.tsx | 12 ++++++++---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/admin/account.graphql b/src/admin/account.graphql index ad9ee9d..312f38d 100644 --- a/src/admin/account.graphql +++ b/src/admin/account.graphql @@ -185,6 +185,36 @@ query AdminAccount($id: ID!) { level enchantment } + artifact { + id + owner + name + level + + attributes { + namePrefix { + type + magnitude + } + namePostfix { + type + magnitude + } + titlePrefix { + type + magnitude + } + titlePostfix { + type + magnitude + } + + bonusAffixes { + type + magnitude + } + } + } } combat { diff --git a/src/game/locations/index.tsx b/src/game/locations/index.tsx index 92070c9..758df50 100644 --- a/src/game/locations/index.tsx +++ b/src/game/locations/index.tsx @@ -91,7 +91,7 @@ export function Locations(): JSX.Element | null { function handleTeleportChange( xInput: string | number, - yInput: string | number + yInput: string | number, ) { let x = Number(xInput); let y = Number(yInput); @@ -112,7 +112,10 @@ export function Locations(): JSX.Element | null { } const teleportCost = Math.round( - Math.pow(distance2d(hero.location, { x: teleportX, y: teleportY }) * 5, 1.3) + Math.pow( + distance2d(hero.location, { x: teleportX, y: teleportY }) * 5, + 1.3, + ), ); function handleShowSettlement() { @@ -221,9 +224,10 @@ export function Locations(): JSX.Element | null { shouldDisable } > + Teleport +
{teleportCost > 0 && - `Teleport for ${teleportCost.toLocaleString()} intelligence`} - {teleportCost <= 0 && "Teleport"} + `${teleportCost.toLocaleString()} minimum intelligence`} )}