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-malusarmure.mjs
Normal file
16
module/roll/roll-part-malusarmure.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
import { RdDCarac } from "../rdd-carac.js"
|
||||
import { RollPartCheckbox } from "./roll-part-checkbox.mjs"
|
||||
|
||||
const MALUSARMURE = "malusarmure"
|
||||
|
||||
export class RollPartMalusArmure extends RollPartCheckbox {
|
||||
|
||||
get code() { return MALUSARMURE }
|
||||
|
||||
visible(rollData) {
|
||||
return RdDCarac.isAgiliteOuDerobee(rollData.current.carac.key) && this.getCheckboxValue(rollData) != 0
|
||||
}
|
||||
|
||||
getCheckboxLabel(rollData) { return "Malus armure" }
|
||||
getCheckboxValue(rollData) { return rollData.active.actor.getMalusArmure() }
|
||||
}
|
Reference in New Issue
Block a user