import { DIFF, ROLL_TYPE_TACHE } from "./roll-constants.mjs" import { PART_TACHE } from "./roll-part-tache.mjs" import { RollType } from "./roll-type.mjs" export class RollTypeTache extends RollType { get code() { return ROLL_TYPE_TACHE } get name() { return `Travailler à une tâche` } visible(rollData) { return rollData.active.actor.isPersonnage() } title(rollData) { const current = rollData.current[PART_TACHE] const tache = current?.tache return `travaille à sa tâche: ${tache.name ?? ''}` } onSelect(rollData) { this.setDiffType(rollData, DIFF.AUCUN) } }