Fix competencecreatures/competences

This commit is contained in:
2025-09-28 21:59:10 +02:00
parent 17e10d3be9
commit 3480b64d75
15 changed files with 86 additions and 62 deletions

View File

@@ -1,6 +1,7 @@
import { Grammar } from "./grammar.js";
import { RdDItem } from "./item.js";
import { SANS_COMPETENCE } from "./item/base-items.js";
import { CATEGORIES_COMPETENCES, SANS_COMPETENCE } from "./item/base-items.js";
import { Misc } from "./misc.js";
const competenceTroncs = [["Esquive", "Dague", "Corps à corps"],
@@ -25,16 +26,6 @@ const limitesArchetypes = [
];
/* -------------------------------------------- */
export const CATEGORIES_COMPETENCES = {
"generale": { base: -4, label: "Générales" },
"particuliere": { base: -8, label: "Particulières" },
"specialisee": { base: -11, label: "Spécialisées" },
"connaissance": { base: -11, label: "Connaissances" },
"draconic": { base: -11, label: "Draconic" },
"melee": { base: -6, label: "Mêlée" },
"tir": { base: -8, label: "Tir" },
"lancer": { base: -8, label: "Lancer" }
}
function _buildCumulXP() {
let cumulXP = { "-11": 0 };
@@ -49,7 +40,12 @@ function _buildCumulXP() {
const competence_xp_cumul = _buildCumulXP();
export class RdDItemCompetence extends Item {
export class RdDItemCompetence extends RdDItem {
static get ITEM_TYPE() { return ITEM_TYPES.competence }
static get defaultIcon() { return "systems/foundryvtt-reve-de-dragon/icons/competence_defaut.webp" }
/* -------------------------------------------- */
static getLabelCategorie(category) {
return CATEGORIES_COMPETENCES[category].label;