forked from public/foundryvtt-reve-de-dragon
Nouvelle fenêtre de jets de dés
This commit is contained in:
19
module/roll/roll-mode-meditation.mjs
Normal file
19
module/roll/roll-mode-meditation.mjs
Normal file
@@ -0,0 +1,19 @@
|
||||
import { DIFF_MODE, ROLL_MODE_MEDITATION } from "./roll-constants.mjs"
|
||||
import { PART_MEDITATION } from "./roll-part-meditation.mjs"
|
||||
import { RollMode } from "./roll-mode.mjs"
|
||||
|
||||
export class RollModeMeditation extends RollMode {
|
||||
get code() { return ROLL_MODE_MEDITATION }
|
||||
get name() { return `Méditation draconique` }
|
||||
|
||||
visible(rollData) { return rollData.active.actor.isHautRevant() }
|
||||
title(rollData) {
|
||||
const current = rollData.current[PART_MEDITATION]
|
||||
const theme = current?.meditation.system.theme
|
||||
return theme ? 'médite sur ' + theme : 'médite'
|
||||
}
|
||||
|
||||
onSelect(rollData) {
|
||||
this.setDiffMode(rollData, DIFF_MODE.AUCUN)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user