Fix starship agility
All checks were successful
Release Creation / build (release) Successful in 51s
All checks were successful
Release Creation / build (release) Successful in 51s
This commit is contained in:
@@ -199,7 +199,10 @@ export default class FTLNomadRoll extends Roll {
|
||||
label: label,
|
||||
callback: (event, button, dialog) => {
|
||||
const output = Array.from(button.form.elements).reduce((obj, input) => {
|
||||
if (input.name) obj[input.name] = input.value
|
||||
if (input.name) {
|
||||
// For checkboxes, use checked property instead of value
|
||||
obj[input.name] = input.type === 'checkbox' ? input.checked : input.value
|
||||
}
|
||||
return obj
|
||||
}, {})
|
||||
return output
|
||||
@@ -271,7 +274,7 @@ export default class FTLNomadRoll extends Roll {
|
||||
options.skillModifier = Number(rollData.skillModifier) || 0
|
||||
options.rangeModifier = Number(rollData.rangeModifier) || 0
|
||||
options.numericModifierSelect = Number(rollData.numericModifierSelect) || 0
|
||||
options.useVehicleBonus = rollData.useVehicleBonus !== "off" && rollData.useVehicleBonus !== false
|
||||
options.useVehicleBonus = rollData.useVehicleBonus === true
|
||||
options.finalModifier = options.numericModifier + options.skillModifier + options.rangeModifier
|
||||
let mod = options.rollItem?.value || 0
|
||||
mod += options.numericModifierSelect
|
||||
|
||||
Reference in New Issue
Block a user