// Rôle : affiche les hitzones d'un monstre sous forme de tableau compact. import { assetPath } from "../utils.js"; const PHYSICAL_COLUMNS = ["cut", "blunt", "ammo"]; const ELEMENTAL_COLUMNS = ["fire", "water", "thunder", "ice", "dragon"]; const COLUMNS = ["name", ...PHYSICAL_COLUMNS, ...ELEMENTAL_COLUMNS]; function hitzoneValue(row, column) { if (column === "name") return row.name; return row.physical?.[column] ?? row.elemental?.[column]; } export function DamageTable({ rows, t }) { if (!rows.length) return null; return (
|
{column === "name" ? "" : |
))}
|
|---|---|
| {t(row.name, { capitalize: true })} | ) : (