SUpression bonus degats, gestion armes à 2mains
This commit is contained in:
@@ -202,16 +202,18 @@ export class DonjonEtCieRollDialog {
|
||||
|
||||
static async createDamage(actor, item) {
|
||||
const damageContext = DonjonEtCieUtility.getMartialDamageContext(actor, item);
|
||||
const isMeleeTwoHanded = item.type === "arme" && item.system.categorie === "melee" && Number(item.system.mains ?? 1) > 1;
|
||||
const defaultMode = isMeleeTwoHanded ? "avantage" : "normal";
|
||||
const content = await foundry.applications.handlebars.renderTemplate(
|
||||
"systems/fvtt-donjon-et-cie/templates/dialogs/damage-roll.hbs",
|
||||
{
|
||||
actorName: actor?.name ?? item.actor?.name ?? "",
|
||||
item,
|
||||
actorBonus: actor?.system?.combat?.degatsBonus ?? 0,
|
||||
damageFormula: damageContext.effectiveFormula || item.system.degats,
|
||||
damageBase: damageContext.baseFormula || item.system.degats,
|
||||
damageCapped: damageContext.capped,
|
||||
martialDvLabel: damageContext.martialDvSides ? `d${damageContext.martialDvSides}` : damageContext.martialDvFormula
|
||||
martialDvLabel: damageContext.martialDvSides ? `d${damageContext.martialDvSides}` : damageContext.martialDvFormula,
|
||||
defaultMode
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user