2023-01-19 02:42:25 +01:00
|
|
|
const BASE_TACHE_SOIN_BLESSURE = { type: "tache", img: 'systems/foundryvtt-reve-de-dragon/icons/competence_chirurgie.webp', system: { carac: "dexterite", competence: "Chirurgie", periodicite: "1 round", fatigue: 0, } }
|
|
|
|
const TACHES_SOIN_BLESSURE = {
|
|
|
|
'critique': { name: 'Blessure critique', system: { difficulte: -6, points_de_tache: 6 } },
|
|
|
|
'grave': { name: 'Blessure grave', system: { difficulte: -4, points_de_tache: 4 } },
|
|
|
|
'legere': { name: 'Blessure légère', system: { difficulte: -2, points_de_tache: 2 } },
|
|
|
|
}
|
|
|
|
|
2020-12-15 08:37:52 +01:00
|
|
|
export class RdDItemTache extends Item {
|
|
|
|
|
2023-01-19 02:42:25 +01:00
|
|
|
static prepareTacheSoin(gravite) {
|
|
|
|
const blessure = TACHES_SOIN_BLESSURE[gravite]
|
|
|
|
if (blessure) {
|
|
|
|
return mergeObject(duplicate(BASE_TACHE_SOIN_BLESSURE), blessure)
|
|
|
|
}
|
|
|
|
ui.notifications.warn(`Pas de tâche de soins pour une blessure ${gravite}`)
|
|
|
|
return undefined;
|
|
|
|
}
|
2020-12-15 08:37:52 +01:00
|
|
|
}
|