Skip to content

Commit

Permalink
fetch artifact items
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisinajar committed Feb 2, 2024
1 parent 677afe5 commit 3473a93
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
30 changes: 30 additions & 0 deletions src/admin/account.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 8 additions & 4 deletions src/game/locations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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() {
Expand Down Expand Up @@ -221,9 +224,10 @@ export function Locations(): JSX.Element | null {
shouldDisable
}
>
Teleport
<br />
{teleportCost > 0 &&
`Teleport for ${teleportCost.toLocaleString()} intelligence`}
{teleportCost <= 0 && "Teleport"}
`${teleportCost.toLocaleString()} minimum intelligence`}
</Button>
</Grid>
)}
Expand Down

0 comments on commit 3473a93

Please sign in to comment.