Fix weapon sheet
This commit is contained in:
@@ -54,6 +54,20 @@ export default class OathHammerItemSheet extends HandlebarsApplicationMixin(foun
|
||||
if (this.document.system.description !== undefined) {
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description ?? "", { async: true })
|
||||
}
|
||||
// Armor-specific numeric selects
|
||||
context.armorValueChoices = Object.fromEntries(
|
||||
Array.from({ length: 13 }, (_, i) => [i, String(i)])
|
||||
)
|
||||
context.penaltyChoices = Object.fromEntries(
|
||||
Array.from({ length: 6 }, (_, i) => [-i, String(-i)])
|
||||
)
|
||||
// Weapon-specific numeric selects
|
||||
context.damageModChoices = Object.fromEntries(
|
||||
Array.from({ length: 10 }, (_, i) => [i - 4, i - 4 >= 0 ? `+${i - 4}` : String(i - 4)])
|
||||
)
|
||||
context.apChoices = Object.fromEntries(
|
||||
Array.from({ length: 7 }, (_, i) => [i, String(i)])
|
||||
)
|
||||
return context
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user