2021-03-16 04:40:28 +01:00
|
|
|
import { Sleeve } from "../Sleeve";
|
|
|
|
import { numeralWrapper } from "../../../ui/numeralFormat";
|
2021-09-27 02:55:38 +02:00
|
|
|
import React from "react";
|
|
|
|
|
|
|
|
import { StatsTable } from "../../../ui/React/StatsTable";
|
2021-03-16 04:40:28 +01:00
|
|
|
|
2021-09-10 03:38:05 +02:00
|
|
|
interface IProps {
|
|
|
|
sleeve: Sleeve;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function StatsElement(props: IProps): React.ReactElement {
|
2021-09-27 02:55:38 +02:00
|
|
|
const rows = [
|
|
|
|
[
|
|
|
|
"HP: ",
|
|
|
|
<>
|
|
|
|
{numeralWrapper.formatHp(props.sleeve.hp)} / {numeralWrapper.formatHp(props.sleeve.max_hp)}
|
|
|
|
</>,
|
|
|
|
],
|
|
|
|
["City: ", <>{props.sleeve.city}</>],
|
2021-11-05 22:12:52 +01:00
|
|
|
["Hacking: ", <>{numeralWrapper.formatSkill(props.sleeve.hacking)}</>],
|
2021-09-27 02:55:38 +02:00
|
|
|
["Strength: ", <>{numeralWrapper.formatSkill(props.sleeve.strength)}</>],
|
|
|
|
["Defense: ", <>{numeralWrapper.formatSkill(props.sleeve.defense)}</>],
|
|
|
|
["Dexterity: ", <>{numeralWrapper.formatSkill(props.sleeve.dexterity)}</>],
|
|
|
|
["Agility: ", <>{numeralWrapper.formatSkill(props.sleeve.agility)}</>],
|
|
|
|
["Charisma: ", <>{numeralWrapper.formatSkill(props.sleeve.charisma)}</>],
|
|
|
|
["Shock: ", <>{numeralWrapper.formatSleeveShock(100 - props.sleeve.shock)}</>],
|
|
|
|
["Sync: ", <>{numeralWrapper.formatSleeveSynchro(props.sleeve.sync)}</>],
|
|
|
|
["Memory: ", <>{numeralWrapper.formatSleeveMemory(props.sleeve.memory)}</>],
|
|
|
|
];
|
|
|
|
return <StatsTable rows={rows} />;
|
2021-03-16 04:40:28 +01:00
|
|
|
}
|