Corrections sur degats - again
Release Creation / build (release) Successful in 1m7s

This commit is contained in:
2026-06-09 23:05:00 +02:00
parent 066e3bbaf5
commit 188717c925
65 changed files with 208 additions and 232 deletions
+9 -3
View File
@@ -999,9 +999,11 @@ var WeaponDataModel = class extends foundry.abstract.TypeDataModel {
const stringField = (initial = "") => new fields.StringField({ required: true, nullable: false, initial });
const htmlField = (initial = "") => new fields.HTMLField({ required: true, nullable: false, initial, textSearch: true });
const intField = (initial = 0, opts = {}) => new fields.NumberField({ required: true, nullable: false, integer: true, initial, ...opts });
const boolField = (initial = false) => new fields.BooleanField({ required: true, initial });
return {
reference: stringField(""),
description: htmlField(""),
hasSpeciality: boolField(false),
weaponType: stringField("melee"),
material: stringField(""),
damageAspect: stringField("metal"),
@@ -1758,7 +1760,8 @@ async function rollForActor(actor, rollKey) {
const wpBonusAusp = Number(wParams.bonusauspiciousdice ?? 0);
const wpThrowMode = Number(wParams.typeofthrow ?? 0);
const wpDamageBase = wpItem.system.damageBase ?? 0;
const wpTotalDice = wpSkillDice + wpAspectDice + wpRangeMalus + wpBonusMalus - wpWoundMalus;
const wpSpecialtyBonus = wpItem.system.hasSpeciality ? 1 : 0;
const wpTotalDice = wpSkillDice + wpAspectDice + wpRangeMalus + wpBonusMalus - wpWoundMalus + wpSpecialtyBonus;
if (wpTotalDice <= 0) {
ui.notifications.warn(game.i18n.localize("CDE.Error0"));
return;
@@ -1774,8 +1777,11 @@ async function rollForActor(actor, rollKey) {
if (wpBonusMalus !== 0) wpModParts.push(`${wpBonusMalus > 0 ? "+" : ""}${wpBonusMalus} ${game.i18n.localize("CDE.BonusMalus")}`);
if (wpWoundMalus !== 0) wpModParts.push(`-${wpWoundMalus} ${game.i18n.localize("CDE.WoundMalus")}`);
if (wpBonusAusp !== 0) wpModParts.push(`+${wpBonusAusp} ${game.i18n.localize("CDE.BonusAuspiciousDice")}`);
const wpDamageAspectValue = sys.aspect?.[ASPECT_NAMES[wpAspFinal]]?.value ?? 0;
const wpDamageAspectLabel = game.i18n.localize(ASPECT_LABELS[ASPECT_NAMES[wpAspFinal]] ?? "");
const wpDamageAspectRaw = wpItem.system.damageAspect ?? "metal";
const wpDamageAspectIdx = WEAPON_ASPECT_INDEX[wpDamageAspectRaw] ?? 0;
const wpDamageAspectName = ASPECT_NAMES[wpDamageAspectIdx];
const wpDamageAspectValue = sys.aspect?.[wpDamageAspectName]?.value ?? 0;
const wpDamageAspectLabel = game.i18n.localize(ASPECT_LABELS[wpDamageAspectName] ?? "");
const wpMsg = await sendResultMessage(actor, {
rollLabel: `${wpItem.name}`,
aspectName: wpAspectName,
+2 -2
View File
File diff suppressed because one or more lines are too long