import { DIFF_MODE, ROLL_MODE_TACHE } from "./roll-constants.mjs" import { PART_TACHE } from "./roll-part-tache.mjs" import { RollMode } from "./roll-mode.mjs" export class RollModeTache extends RollMode { get code() { return ROLL_MODE_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.setDiffMode(rollData, DIFF_MODE.AUCUN) } }