diff --git a/src/lang/en.json b/src/lang/en.json index 015f470..a18a895 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -59,6 +59,7 @@ "OSE.MovementShort": "MOV", "OSE.ArmorClass": "Armor Class", "OSE.ArmorClassShort": "AC", + "OSE.AscArmorClassShort": "AAC", "OSE.SpellDC": "DC", "OSE.Thac0": "THAC0", "OSE.MeleeShort": "MEL", diff --git a/src/module/actor/actor-sheet.js b/src/module/actor/actor-sheet.js index d9dc311..f05273f 100644 --- a/src/module/actor/actor-sheet.js +++ b/src/module/actor/actor-sheet.js @@ -7,6 +7,16 @@ export class OseActorSheet extends ActorSheet { } /* -------------------------------------------- */ + getData() { + const data = super.getData(); + + data.config = CONFIG.OSE; + // Settings + data.config.ascendingAC = game.settings.get('ose', 'ascendingAC'); + + return data; + } + activateListeners(html) { html.find('.saving-throw .attribute-name a').click(ev => { let actorObject = this.actor; diff --git a/src/module/actor/character-sheet.js b/src/module/actor/character-sheet.js index f60d12d..144e430 100644 --- a/src/module/actor/character-sheet.js +++ b/src/module/actor/character-sheet.js @@ -38,8 +38,6 @@ export class OseActorSheetCharacter extends OseActorSheet { */ getData() { const data = super.getData(); - - data.config = CONFIG.OSE; for (let [a, score] of Object.entries(data.data.scores)) { data.data.scores[a].label = game.i18n.localize(`OSE.scores.${a}`); diff --git a/src/module/actor/monster-sheet.js b/src/module/actor/monster-sheet.js index 87c97ec..e0820ff 100644 --- a/src/module/actor/monster-sheet.js +++ b/src/module/actor/monster-sheet.js @@ -39,8 +39,6 @@ export class OseActorSheetMonster extends OseActorSheet { getData() { const data = super.getData(); - data.config = CONFIG.OSE; - // Prepare owned items this._prepareItems(data); diff --git a/src/template.json b/src/template.json index 1c5a2c2..2dab957 100644 --- a/src/template.json +++ b/src/template.json @@ -16,6 +16,10 @@ "value": 0, "mod": 0 }, + "aac": { + "value": 0, + "mod": 0 + }, "thac0": { "value": 19, "mod": 0 diff --git a/src/templates/actors/partials/character-attributes-tab.html b/src/templates/actors/partials/character-attributes-tab.html index d5df2b6..540842b 100644 --- a/src/templates/actors/partials/character-attributes-tab.html +++ b/src/templates/actors/partials/character-attributes-tab.html @@ -1,7 +1,8 @@
@@ -55,34 +68,46 @@
@@ -92,7 +117,8 @@

{{localize 'OSE.panel.abilities'}}

{{#if owner}} - + {{/if}}
@@ -125,33 +151,39 @@
diff --git a/src/templates/actors/partials/monster-attributes-tab.html b/src/templates/actors/partials/monster-attributes-tab.html index 810aaa4..de5c26c 100644 --- a/src/templates/actors/partials/monster-attributes-tab.html +++ b/src/templates/actors/partials/monster-attributes-tab.html @@ -10,11 +10,21 @@
  • -

    {{ localize "OSE.ArmorClassShort" }}

    + {{#if config.ascendingAC}} +

    + {{ localize "OSE.AscArmorClassShort" }}

    -
    + {{else}} +

    + {{ localize "OSE.ArmorClassShort" }}

    +
    + +
    + {{/if}}
  • {{ localize "OSE.Thac0" }}

    @@ -24,7 +34,8 @@
  • -

    {{ localize "OSE.AttacksShort" }}

    +

    {{ localize "OSE.AttacksShort" }} +

    @@ -32,15 +43,17 @@
  • {{#if data.retainer.enabled}}
  • -

    {{ localize "OSE.LoyaltyShort" }}

    +

    {{ localize "OSE.LoyaltyShort" }} +

    - +
  • {{/if}}
  • -

    {{ localize "OSE.MovementShort" }}

    +

    {{ localize "OSE.MovementShort" }} +

    @@ -54,7 +67,8 @@

    {{localize 'OSE.panel.abilities'}}

    {{#if owner}} - + {{/if}}
    @@ -89,7 +103,8 @@

    {{localize 'OSE.panel.equipment'}}

    {{#if owner}} - + {{/if}}
    @@ -122,33 +137,39 @@