diff --git a/src/acks.css b/src/acks.css index d699d6f..6af50b1 100644 --- a/src/acks.css +++ b/src/acks.css @@ -821,11 +821,11 @@ line-height: 30px; } .acks.sheet.actor.character .sheet-body .exploration .attribute { - margin: 4px; + margin: 1px; } .acks.sheet.actor.character .sheet-body .exploration .attribute .attribute-name { - text-align: left; - flex: 1 0 60px; + text-align: center; + flex: 1 0 45px; line-height: 25px; font-size: 12px; } diff --git a/src/lang/en.json b/src/lang/en.json index b48faab..97a6e02 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -38,7 +38,7 @@ "ACKS.roll.attribute": "{attribute} check", "ACKS.roll.details.attribute": "Roll 1d20 <= {score} for success", "ACKS.roll.exploration": "{exploration} test", - "ACKS.roll.details.exploration": "Roll 1d6 <= {expl} for success", + "ACKS.roll.details.exploration": "Roll 1d20 >= {expl} for success", "ACKS.roll.reaction": "Reaction roll", "ACKS.roll.initiative": "Group {group} rolls for Initiative!", "ACKS.roll.individualInit": "{name} rolls for Initiative!", @@ -68,8 +68,8 @@ "ACKS.Retainer": "Retainer", "ACKS.RetainerWage": "Wage", "ACKS.RetainerUpkeep": "Upkeep", - "ACKS.Loyalty": "Loyalty Rating", - "ACKS.LoyaltyShort": "LR", + "ACKS.Loyalty": "Henchmen Morale", + "ACKS.LoyaltyShort": "MOR", "ACKS.scores.str.long": "Strength", "ACKS.scores.str.short": "STR", @@ -95,7 +95,7 @@ "ACKS.saves.spell.short": "S", "ACKS.saves.spell.long": "Spells", "ACKS.saves.magic.long": "Bonus vs Magic", - "ACKS.saves.magic.short": "vs Magic", + "ACKS.saves.magic.short": "vs Magic", "ACKS.Health": "Hit Points", "ACKS.HealthMax": "Maximum Hit Points", @@ -116,11 +116,11 @@ "ACKS.ArmorClassNaked": "Naked Armor Class", "ACKS.ArmorClass": "Armor Class", "ACKS.ArmorClassShort": "AC", - "ACKS.AscArmorClassShort": "AAC", + "ACKS.AscArmorClassShort": "AC", "ACKS.ArmorClassBonus": "Armor Class Bonus", "ACKS.Thac0": "THAC0", - "ACKS.ABShort": "AB", - "ACKS.AB": "Attack Bonus", + "ACKS.ABShort": "Throw", + "ACKS.AB": "Throw", "ACKS.MeleeShort": "MEL", "ACKS.Melee": "Melee", "ACKS.MeleeBonus": "Melee Bonus", @@ -163,6 +163,8 @@ "ACKS.Setting.Initiative": "Initiative", "ACKS.Setting.InitiativeHint": "Grouped or individual initiative.", "ACKS.Setting.InitiativeIndividual": "Individual initiative", + + "ACKS.Setting.InitiativeGroup": "Grouped Initiative", "ACKS.Setting.RerollInitiative": "Initiative persistence", "ACKS.Setting.RerollInitiativeHint": "Keeps, resets or rerolls initiative each round", @@ -185,9 +187,9 @@ "ACKS.items.Equip": "Equip", "ACKS.items.Unequip": "Unequip", - "ACKS.items.Misc": "Misc", + "ACKS.items.Misc": "Items", "ACKS.items.Weapons": "Weapons", - "ACKS.items.Treasure": "Treasure", + "ACKS.items.Treasure": "Heavy Items", "ACKS.items.Armors": "Armors", "ACKS.items.Weight": "Wgt.", "ACKS.items.Qualities": "Qualities", @@ -200,7 +202,7 @@ "ACKS.items.RollType": "Type", "ACKS.items.Damage": "Damage", "ACKS.items.ArmorAC": "AC", - "ACKS.items.ArmorAAC": "AAC", + "ACKS.items.ArmorAAC": "AC", "ACKS.items.Bonus": "Bonus", "ACKS.items.AtkBonus": "Attack Bonus", "ACKS.items.roundAttacks": "Attacks Spent this Round", @@ -241,9 +243,9 @@ "ACKS.abilities.Requirements": "Requirements", - "ACKS.exploration.ld.long": "Listen at Door", - "ACKS.exploration.ld.short": "Listen Door", - "ACKS.exploration.ld.abrev": "LD", + "ACKS.exploration.ld.long": "Listen for noises", + "ACKS.exploration.ld.short": "Hear Noise", + "ACKS.exploration.ld.abrev": "HN", "ACKS.exploration.od.long": "Open Stuck Door", "ACKS.exploration.od.short": "Open Door", "ACKS.exploration.od.abrev": "OD", @@ -272,9 +274,9 @@ "ACKS.colors.white": "White", "ACKS.reaction.check": "Reaction Check", - "ACKS.reaction.Hostile": "{name} is Hostile", - "ACKS.reaction.Unfriendly": "{name} is Unfriendly", - "ACKS.reaction.Neutral": "{name} is Neutral", - "ACKS.reaction.Indifferent": "{name} is Indifferent", - "ACKS.reaction.Friendly": "{name} is Friendly" + "ACKS.reaction.Hostile": "{name} is Hostile and attacks", + "ACKS.reaction.Unfriendly": "{name} is Unfriendly and may attack", + "ACKS.reaction.Neutral": "{name} is Neutral and uncertain", + "ACKS.reaction.Indifferent": "{name} is Indifferent and uninterested", + "ACKS.reaction.Friendly": "{name} is Friendly and helpful" } diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index f5df6df..639784e 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -333,12 +333,12 @@ export class AcksActor extends Actor { rollExploration(expl, options = {}) { const label = game.i18n.localize(`ACKS.exploration.${expl}.long`); - const rollParts = ["1d6"]; + const rollParts = ["1d20"]; const data = { actor: this.data, roll: { - type: "below", + type: "above", target: this.data.data.exploration[expl], }, details: game.i18n.format("ACKS.roll.details.exploration", { @@ -519,8 +519,9 @@ export class AcksActor extends Actor { let hasItems = false; Object.values(this.data.items).forEach((item) => { if (item.type == "item" && !item.data.treasure) { + if (option === "detailed") totalWeight += 166.6; - hasItems = true; +// hasItems = true; } if ( item.type == "item" && @@ -531,7 +532,7 @@ export class AcksActor extends Actor { totalWeight += item.data.weight; } }); - if (option === "detailed" && hasItems) totalWeight += 80; +// if (option === "detailed" && hasItems) totalWeight += 166.6; data.encumbrance = { pct: Math.clamped( @@ -541,7 +542,7 @@ export class AcksActor extends Actor { ), max: data.encumbrance.max, encumbered: totalWeight > data.encumbrance.max, - value: totalWeight, + value: Math.round(totalWeight), }; if (data.config.movementAuto && option != "disabled") { @@ -553,15 +554,15 @@ export class AcksActor extends Actor { const data = this.data.data; let option = game.settings.get("acks", "encumbranceOption"); let weight = data.encumbrance.value; - let delta = data.encumbrance.max - 1600; + let delta = data.encumbrance.max - 20000; if (["detailed", "complete"].includes(option)) { if (weight > data.encumbrance.max) { data.movement.base = 0; - } else if (weight > 800 + delta) { + } else if (weight > 10000 + delta) { data.movement.base = 30; - } else if (weight > 600 + delta) { + } else if (weight > 7000 + delta) { data.movement.base = 60; - } else if (weight > 400 + delta) { + } else if (weight > 5000 + delta) { data.movement.base = 90; } else { data.movement.base = 120; @@ -606,7 +607,7 @@ export class AcksActor extends Actor { (i) => i.type == "item" && i.data.treasure ); treasure.forEach((item) => { - total += item.data.quantity.value * item.data.cost; + total += item.data.quantity.value * item.data.cost }); data.treasure = total; } @@ -703,11 +704,13 @@ export class AcksActor extends Actor { const od = { 0: 0, - 3: 1, - 9: 2, - 13: 3, - 16: 4, - 18: 5, + 3: 30, + 4: 26, + 6: 22, + 9: 18, + 13: 14, + 16: 10, + 18: 6, }; data.exploration.odMod = AcksActor._valueFromTable( od, diff --git a/src/module/config.js b/src/module/config.js index 6a6ad7e..a21ef94 100644 --- a/src/module/config.js +++ b/src/module/config.js @@ -106,75 +106,91 @@ export const ACKS = { monster_saves: { 0: { label: "Normal Human", - d: 14, - w: 15, + d: 15, + w: 17, p: 16, b: 17, s: 18 }, 1: { - label: "1-3", - d: 12, - w: 13, + label: "1", + d: 14, + w: 16, + p: 15, + b: 16, + s: 17 + }, + 2: { + label: "2-3", + d: 13, + w: 15, p: 14, b: 15, s: 16 }, 4: { - label: "4-6", - d: 10, - w: 11, + label: "4", + d: 12, + w: 14, + p: 13, + b: 14, + s: 15 + }, + 5: { + label: "5-6", + d: 11, + w: 13, p: 12, b: 13, s: 14 }, 7: { - label: "7-9", - d: 8, - w: 9, + label: "7", + d: 10, + w: 12, + p: 11, + b: 12, + s: 13 + }, + 8: { + label: "8-9", + d: 9, + w: 11, p: 10, - b: 10, + b: 11, s: 12 }, 10: { - label: "10-12", - d: 6, - w: 7, + label: "10", + d: 8, + w: 10, + p: 9, + b: 10, + s: 11 + }, + 11: { + label: "11-12", + d: 7, + w: 9, p: 8, - b: 8, + b: 9, s: 10 }, 13: { - label: "13-15", - d: 4, - w: 5, + label: "13", + d: 6, + w: 8, + p: 7, + b: 8, + s: 9 + }, + 14: { + label: "14+", + d: 5, + w: 7, p: 6, - b: 5, + b: 7, s: 8 }, - 16: { - label: "16-18", - d: 2, - w: 3, - p: 4, - b: 3, - s: 6 - }, - 19: { - label: "19-21", - d: 2, - w: 2, - p: 2, - b: 2, - s: 4 - }, - 22: { - label: "22+", - d: 2, - w: 2, - p: 2, - b: 2, - s: 2 - }, - } + }, }; \ No newline at end of file diff --git a/src/module/dice.js b/src/module/dice.js index 98eb53f..1a46437 100644 --- a/src/module/dice.js +++ b/src/module/dice.js @@ -16,14 +16,14 @@ export class AcksDice { result.isFailure = true; } } else if (data.roll.type == "below") { - // MORALE, EXPLORATION + // MORALE if (roll.total <= result.target) { result.isSuccess = true; } else { result.isFailure = true; } } else if (data.roll.type == "check") { - // SCORE CHECKS (1s and 20s) + // SCORE CHECKS (1s and 20s), EXPLORATION if (die == 1 || (roll.total <= result.target && die < 20)) { result.isSuccess = true; } else { diff --git a/src/module/helpers.js b/src/module/helpers.js index 6b8f88d..073919f 100644 --- a/src/module/helpers.js +++ b/src/module/helpers.js @@ -33,6 +33,10 @@ export const registerHelpers = async function () { Handlebars.registerHelper("mult", function (lh, rh) { return parseFloat(lh) * parseFloat(rh); }); + + Handlebars.registerHelper("multround", function (lh, rh) { + return Math.round((parseFloat(lh) * parseFloat(rh)) * 100) / 100; + }) Handlebars.registerHelper("roundWeight", function (weight) { return Math.round(parseFloat(weight) / 100) / 10; diff --git a/src/system.json b/src/system.json index d65631d..165f3b5 100644 --- a/src/system.json +++ b/src/system.json @@ -2,7 +2,7 @@ "name": "acks", "title": "Adventurer Conqueror Kings System", "description": "Play B/X OSR modules with ACKS on Foundry VTT", - "version": "0.1.0", + "version": "0.2.0", "minimumCoreVersion": "0.6.2", "compatibleCoreVersion": "0.6.6", "templateVersion": 2, diff --git a/src/template.json b/src/template.json index fecb02c..e42fbb3 100644 --- a/src/template.json +++ b/src/template.json @@ -10,8 +10,8 @@ }, "hp": { "hd": "1d8", - "value": 20, - "max": 20 + "value": 4, + "max": 4 }, "ac": { "value": 0, @@ -31,19 +31,19 @@ }, "saves": { "death": { - "value": 0 + "value": 15 }, "wand": { - "value": 0 + "value": 17 }, "paralysis": { - "value": 0 + "value": 16 }, "breath": { - "value": 0 + "value": 17 }, "spell": { - "value": 0 + "value": 18 } }, "movement": { @@ -98,10 +98,10 @@ } }, "exploration": { - "ld": 1, - "od": 2, - "sd": 1, - "ft": 1 + "ld": 18, + "od": 18, + "sd": 18, + "ft": 18 }, "scores": { "str": { @@ -130,7 +130,7 @@ } }, "encumbrance": { - "max": 1600 + "max": 20000 }, "languages": { "value": [] @@ -140,7 +140,7 @@ "templates": ["common", "spellcaster"], "details": { "biography": "", - "alignment": "", + "alignment": "Neutral", "xp": 0, "treasure": { "table": "", @@ -150,7 +150,7 @@ "d": 0, "w": 0 }, - "morale": 0 + "morale": 7 }, "attacks": "" } @@ -165,7 +165,7 @@ }, "treasure": false, "cost": 0, - "weight": 0 + "weight": 166.6 }, "weapon": { "range": { @@ -184,7 +184,7 @@ "melee": true, "cost": 0, "equipped": false, - "weight": 0, + "weight": 167, "counter": { "value": 0, "max": 0 @@ -193,11 +193,11 @@ "armor": { "description": "", "ac": 9, - "aac": 10, + "aac": 0, "type": "light", "cost": 0, "equipped": false, - "weight": 0 + "weight": 2000 }, "spell": { "lvl": 1, diff --git a/src/templates/actors/dialogs/modifiers-dialog.html b/src/templates/actors/dialogs/modifiers-dialog.html index 5f5060c..c01ea67 100644 --- a/src/templates/actors/dialogs/modifiers-dialog.html +++ b/src/templates/actors/dialogs/modifiers-dialog.html @@ -6,7 +6,7 @@ {{localize 'ACKS.Melee'}} ({{mod data.scores.str.mod}})
  • - {{localize 'ACKS.exploration.od.long'}} ({{data.exploration.odMod}} in 6) + {{localize 'ACKS.exploration.od.long'}} ({{data.exploration.odMod}}+)
  • diff --git a/src/templates/actors/partials/character-abilities-tab.html b/src/templates/actors/partials/character-abilities-tab.html index cb4f30f..d36d9ea 100644 --- a/src/templates/actors/partials/character-abilities-tab.html +++ b/src/templates/actors/partials/character-abilities-tab.html @@ -2,28 +2,28 @@
  • {{ localize "ACKS.exploration.ld.short" }}

    - +
  • {{ localize "ACKS.exploration.od.short" }}

    - +
  • {{ localize "ACKS.exploration.sd.short" }}

    - +
  • {{ localize "ACKS.exploration.ft.short" }}

    - +
  • diff --git a/src/templates/actors/partials/character-inventory-tab.html b/src/templates/actors/partials/character-inventory-tab.html index 44ef401..01a0f29 100644 --- a/src/templates/actors/partials/character-inventory-tab.html +++ b/src/templates/actors/partials/character-inventory-tab.html @@ -176,7 +176,7 @@ -
    {{mult item.data.quantity.value item.data.cost}}
    +
    {{multround item.data.quantity.value item.data.cost}}
    {{#if item.data.quantity.max}}/{{item.data.quantity.max}}{{/if}}