diff --git a/src/lang/en.json b/src/lang/en.json index d7ec9b6..f263a8f 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -103,6 +103,8 @@ "ACKS.HealthShort": "HP", "ACKS.HitDice": "Hit Dice", "ACKS.HitDiceShort": "HD", + "ACKS.BHR": "Base Healing Rate", + "ACKS.BHRShort": "BHR", "ACKS.movement.base": "Movement Rate", "ACKS.movement.short": "MV", @@ -137,8 +139,6 @@ "ACKS.AttacksShort": "ATT", "ACKS.Damage": "Damage", "ACKS.Spellcaster": "Spellcaster", - "ACKS.BHR": "Base Healing Rate", - "ACKS.BHRShort": "BHR", "ACKS.Language": "Language", "ACKS.SpokenLanguages": "Spoken Languages", @@ -188,6 +188,10 @@ "ACKS.Setting.MovementAuto": "Calculate Movement", "ACKS.Setting.SignificantTreasure": "Significant Treasure Weight", "ACKS.Setting.SignificantTreasureHint": "Weight at which treasure will reduce the movement, only useful for basic encumbrance", + "ACKS.Setting.Explode20": "HFH: Exploding attack throws", + "ACKS.Setting.Explode20Hint": "Heroic Fantasy Option: Attack throws explode on 20 - Critical if exceed target AC by 10", + "ACKS.Setting.BHR": "HFH: Base Healing Rate", + "ACKS.Setting.BHRHint": "Heroic Fantasy Option: Base Healing Rate per day varies by Max HP", "ACKS.items.Equip": "Equip", "ACKS.items.Unequip": "Unequip", diff --git a/src/module/actor/character-sheet.js b/src/module/actor/character-sheet.js index 2201c23..006af01 100644 --- a/src/module/actor/character-sheet.js +++ b/src/module/actor/character-sheet.js @@ -51,6 +51,7 @@ export class AcksActorSheetCharacter extends AcksActorSheet { data.config.ascendingAC = game.settings.get("acks", "ascendingAC"); data.config.initiative = game.settings.get("acks", "initiative") != "group"; data.config.encumbrance = game.settings.get("acks", "encumbranceOption"); + data.config.BHR = game.settings.get("acks", "bhr"); data.isNew = this.actor.isNew(); return data; diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index 965a332..8a2be22 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -451,7 +451,12 @@ export class AcksActor extends Actor { rollAttack(attData, options = {}) { const data = this.data.data; - const rollParts = ["1d20x="]; + let rollParts = ["1d20"]; + + if (game.settings.get("acks", "exploding20s")) { + rollParts = ["1d20x="]; + } + const dmgParts = []; let label = game.i18n.format("ACKS.roll.attacks", { name: this.data.name, diff --git a/src/module/settings.js b/src/module/settings.js index bf69788..2ec5b61 100644 --- a/src/module/settings.js +++ b/src/module/settings.js @@ -20,7 +20,21 @@ export const registerSettings = function () { default: true, scope: "world", type: Boolean, + config: false, + onChange: _ => window.location.reload() + }); + + game.settings.register("acks", "encumbranceOption", { + name: game.i18n.localize("ACKS.Setting.Encumbrance"), + hint: game.i18n.localize("ACKS.Setting.EncumbranceHint"), + default: "detailed", + scope: "world", + type: String, config: true, + choices: { + detailed: "ACKS.Setting.EncumbranceDetailed", + complete: "ACKS.Setting.EncumbranceComplete", + }, onChange: _ => window.location.reload() }); @@ -33,29 +47,23 @@ export const registerSettings = function () { config: true, }); - game.settings.register("acks", "encumbranceOption", { - name: game.i18n.localize("ACKS.Setting.Encumbrance"), - hint: game.i18n.localize("ACKS.Setting.EncumbranceHint"), - default: "detailed", + game.settings.register("acks", "exploding20s", { + name: game.i18n.localize("ACKS.Setting.Explode20"), + hint: game.i18n.localize("ACKS.Setting.Explode20Hint"), + default: false, scope: "world", - type: String, + type: Boolean, config: true, - choices: { -// disabled: "ACKS.Setting.EncumbranceDisabled", -// basic: "ACKS.Setting.EncumbranceBasic", - detailed: "ACKS.Setting.EncumbranceDetailed", - complete: "ACKS.Setting.EncumbranceComplete", - }, onChange: _ => window.location.reload() }); -// game.settings.register("acks", "significantTreasure", { -// name: game.i18n.localize("ACKS.Setting.SignificantTreasure"), -// hint: game.i18n.localize("ACKS.Setting.SignificantTreasureHint"), -// default: 800, -// scope: "world", -// type: Number, -// config: true, -// onChange: _ => window.location.reload() -// }); -}; + game.settings.register("acks", "bhr", { + name: game.i18n.localize("ACKS.Setting.BHR"), + hint: game.i18n.localize("ACKS.Setting.BHRHint"), + default: false, + scope: "world", + type: Boolean, + config: true, + onChange: _ => window.location.reload() + }); +} \ No newline at end of file diff --git a/src/templates/actors/partials/character-attributes-tab.html b/src/templates/actors/partials/character-attributes-tab.html index e6d8174..e08e233 100644 --- a/src/templates/actors/partials/character-attributes-tab.html +++ b/src/templates/actors/partials/character-attributes-tab.html @@ -108,6 +108,7 @@ data-dtype="String" /> + {{#if config.BHR}}
  • {{ localize "ACKS.BHRShort" }} @@ -117,6 +118,7 @@ {{data.hp.bhr}}

  • + {{/if}} {{#if config.initiative}}