forked from public/foundryvtt-reve-de-dragon
Nouvelle fenêtre de jets de dés
This commit is contained in:
16
module/roll/roll-part-surenc.mjs
Normal file
16
module/roll/roll-part-surenc.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
import { RdDCarac } from "../rdd-carac.js"
|
||||
import { RollPartCheckbox } from "./roll-part-checkbox.mjs"
|
||||
|
||||
const SURENC = "surenc"
|
||||
|
||||
export class RollPartSurEnc extends RollPartCheckbox {
|
||||
|
||||
get code() { return SURENC }
|
||||
|
||||
visible(rollData) {
|
||||
return RdDCarac.isActionPhysique(rollData.current.carac.key) && rollData.active.actor.isSurenc()
|
||||
}
|
||||
getCheckboxIcon(rollData) { return '<i class="fa-solid fa-weight-hanging"></i>' }
|
||||
getCheckboxLabel(rollData) { return "Sur-enc." }
|
||||
getCheckboxValue(rollData) { return rollData.active.actor.computeMalusSurEncombrement() }
|
||||
}
|
Reference in New Issue
Block a user