Add crew member option with pilot rolls integrated
All checks were successful
Release Creation / build (release) Successful in 48s
All checks were successful
Release Creation / build (release) Successful in 48s
This commit is contained in:
@@ -67,9 +67,12 @@ export default class FTLNomadRoll extends Roll {
|
||||
} else {
|
||||
let mod = options.rollItem?.value || 0
|
||||
fullFormula = `${options.formula} + ${options.skillModifier}D + ${mod} + ${options.rangeModifier}D + ${options.numericModifier}D + ${options.numericModifierSelect}`
|
||||
if (options.vehicleBonus) {
|
||||
fullFormula += ` + ${options.vehicleBonus}`
|
||||
}
|
||||
}
|
||||
// Replace all the "+ -" with "-"
|
||||
fullFormula = fullFormula.replace(/\+\s*\-/g, "- ")
|
||||
fullFormula = fullFormula.replace(/\+\s*-/g, "- ")
|
||||
$('#roll-dialog-full-formula').text(fullFormula)
|
||||
options.fullFormula = fullFormula
|
||||
}
|
||||
@@ -136,10 +139,14 @@ export default class FTLNomadRoll extends Roll {
|
||||
options.numericModifierSelect = 0
|
||||
options.rangeModifier = rangeModifier
|
||||
options.damageModifier = damageModifier
|
||||
options.vehicleBonus = options.vehicleBonus || 0
|
||||
let fullFormula = `${formula} + ${options.rollItem.value}`
|
||||
if (options.isEncumbered) {
|
||||
fullFormula += ` - 1D`
|
||||
}
|
||||
if (options.vehicleBonus) {
|
||||
fullFormula += ` + ${options.vehicleBonus}`
|
||||
}
|
||||
options.fullFormula = fullFormula
|
||||
options.formula = formula
|
||||
|
||||
@@ -164,6 +171,7 @@ export default class FTLNomadRoll extends Roll {
|
||||
hasTarget: options.hasTarget,
|
||||
modifier,
|
||||
numericModifierSelect,
|
||||
vehicleBonus: options.vehicleBonus,
|
||||
}
|
||||
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-ftl-nomad/templates/roll-dialog.hbs", dialogContext)
|
||||
|
||||
@@ -236,6 +244,7 @@ export default class FTLNomadRoll extends Roll {
|
||||
options.finalModifier = options.numericModifier + options.skillModifier + options.rangeModifier
|
||||
let mod = options.rollItem?.value || 0
|
||||
mod += options.numericModifierSelect
|
||||
mod += options.vehicleBonus || 0
|
||||
|
||||
// Build the dice formula
|
||||
let diceFormula = "2d6"
|
||||
|
||||
Reference in New Issue
Block a user