Files
foundryvtt-reve-de-dragon/module/roll/roll-part-malusarmure.mjs

17 lines
507 B
JavaScript

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() }
}