Nouvelle fenêtre de jets de dés
This commit is contained in:
28
module/roll/roll-part-ethylisme.mjs
Normal file
28
module/roll/roll-part-ethylisme.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
import { RdDCarac } from "../rdd-carac.js"
|
||||
import { RdDUtility } from "../rdd-utility.js"
|
||||
import { RollPartCheckbox } from "./roll-part-checkbox.mjs"
|
||||
|
||||
const ETHYLISME = "ethylisme"
|
||||
|
||||
export class RollPartEthylisme extends RollPartCheckbox {
|
||||
|
||||
get code() { return ETHYLISME }
|
||||
|
||||
isValid(rollData) { return rollData.active.actor.isPersonnage()}
|
||||
|
||||
visible(rollData) {
|
||||
return rollData.active.actor.isAlcoolise() && !RdDCarac.isChance(rollData.current.carac.key)
|
||||
}
|
||||
|
||||
getCheckboxIcon(rollData) {
|
||||
return '<i class="fa-solid fa-champagne-glasses"></i>'
|
||||
}
|
||||
|
||||
getCheckboxLabel(rollData) {
|
||||
return `${RdDUtility.getNomEthylisme(rollData.active.actor.ethylisme())}`
|
||||
}
|
||||
|
||||
getCheckboxValue(rollData) {
|
||||
return rollData.active.actor.malusEthylisme()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user