diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index bd1357c..eb30cf3 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -185,6 +185,9 @@ export class BoLActorSheet extends ActorSheet { case "aptitude" : BoLRoll.aptitudeCheck(this.actor, actorData, dataset, event); break; + case "weapon": + console.log("ROLL WEAPON !!!"); // TODO + break; default : break; } } diff --git a/module/system/settings.js b/module/system/settings.js index b0c530d..1e061c9 100644 --- a/module/system/settings.js +++ b/module/system/settings.js @@ -9,5 +9,15 @@ export const registerSystemSettings = function() { type: Boolean, onChange: lang => window.location.reload() }); + + game.settings.register("bol", "rollArmor", { + name: "Effectuer des jets pour les armures", + hint: "Effectue un jet de dés pour les armures (valeur fixe si désactivé)", + scope: "world", + config: true, + default: true, + type: Boolean, + onChange: lang => window.location.reload() + }); }; diff --git a/templates/actor/parts/tabs/actor-actions.hbs b/templates/actor/parts/tabs/actor-actions.hbs index b612857..ec968ba 100644 --- a/templates/actor/parts/tabs/actor-actions.hbs +++ b/templates/actor/parts/tabs/actor-actions.hbs @@ -5,3 +5,24 @@
  • Attaque à mains nues

  • +{{#each combat as |combatType id|}} +
      +
    1. +
      {{localize combatType.label}}
      + {{#if protection}}
      {{localize "BOL.ui.protection"}}
      {{/if}} + {{#if blocking}}
      {{localize "BOL.ui.blocking"}}
      {{/if}} + {{#if weapon}}
      {{localize "BOL.ui.damages"}}
      {{/if}} + {{#if ranged}}
      {{localize "BOL.ui.range"}}
      {{else}}
      {{/if}} +
    2. + {{#each combatType.items as |item id|}} +
    3. +
      +

      {{#if ../weapon}}{{/if}}{{item.name}}{{#if ../weapon}}{{/if}}

      + {{#if ../protection}}
      {{item.data.properties.soak.value}}
      {{/if}} + {{#if ../blocking}}
      {{item.data.properties.blocking.malus}}
      {{/if}} + {{#if ../weapon}}
      {{item.data.properties.damage}}
      {{/if}} + {{#if ../ranged}}
      {{item.data.properties.range}}
      {{else}}
      {{/if}} +
    4. + {{/each}} +
    +{{/each}} diff --git a/templates/actor/parts/tabs/actor-combat.hbs b/templates/actor/parts/tabs/actor-combat.hbs index 95a423e..bb71031 100644 --- a/templates/actor/parts/tabs/actor-combat.hbs +++ b/templates/actor/parts/tabs/actor-combat.hbs @@ -8,17 +8,16 @@ -{{#each data.combat as | combat id|}} - {{#if (gt (count combat.items) 0)}} +{{#each combat as |combatType id|}}
    1. -
      {{localize combat.label}}
      +
      {{localize combatType.label}}
      {{#if protection}}
      {{localize "BOL.ui.protection"}}
      {{/if}} {{#if blocking}}
      {{localize "BOL.ui.blocking"}}
      {{/if}} {{#if weapon}}
      {{localize "BOL.ui.damages"}}
      {{/if}} {{#if ranged}}
      {{localize "BOL.ui.range"}}
      {{else}}
      {{/if}}
    2. - {{#each combat.items as |item id|}} + {{#each combatType.items as |item id|}}
    3. {{item.name}}

      @@ -29,5 +28,4 @@
    4. {{/each}}
    - {{/if}} {{/each}}