diff --git a/Old School Essentials - AAC/CHANGELOG.md b/Old School Essentials - AAC/CHANGELOG.md index 5722504214..314d4d5fc0 100644 --- a/Old School Essentials - AAC/CHANGELOG.md +++ b/Old School Essentials - AAC/CHANGELOG.md @@ -2,6 +2,18 @@ [GitHub Project Status board](https://github.com/wesbaker/roll20-character-sheets/projects/1) +## 1.7.0 + +### Added + +- Add retainers tab for charisma based retainer modifiers +- Add prompt for Wisdom bonus on saving throws + +### Fixed + +- Fix a bug where the spell level input was wider than the space in the grid +- Fix a bug where setting the default sheet to DAC wouldn't create DAC characters + ## 1.6.2 ### Fixed diff --git a/Old School Essentials - AAC/OSE-AAC.css b/Old School Essentials - AAC/OSE-AAC.css index f4c29a4bd7..f39b00d33e 100644 --- a/Old School Essentials - AAC/OSE-AAC.css +++ b/Old School Essentials - AAC/OSE-AAC.css @@ -208,6 +208,7 @@ div.sheet-flex > .sheet-shrink { } .charsheet .sheet-inline-flex-wide-label > *:first-child, +.charsheet .sheet-inline-flex-wide-label > span:first-child, .charsheet .sheet-inline-flex-wide-label > button:first-child { flex-grow: 3; } @@ -657,6 +658,7 @@ input.sheet-expand:checked ~ input.sheet-weapon-description { /* Tabs */ .sheet-character, +.sheet-retainers, .sheet-monster, .sheet-notes, .sheet-settings { @@ -664,6 +666,7 @@ input.sheet-expand:checked ~ input.sheet-weapon-description { } input[name="attr_sheetTab"][value="character"] ~ div.sheet-character, +input[name="attr_sheetTab"][value="retainers"] ~ div.sheet-retainers, input[name="attr_sheetTab"][value="monster"] ~ div.sheet-monster, input[name="attr_sheetTab"][value="notes"] ~ div.sheet-notes, input[name="attr_sheetTab"][value="settings"] ~ div.sheet-settings { @@ -689,6 +692,9 @@ input[name="attr_sheetTab"][value="settings"] ~ div.sheet-settings { input[name="attr_sheetTab"][value="character"] ~ .sheet-button-select button[name="act_character"], +input[name="attr_sheetTab"][value="retainers"] + ~ .sheet-button-select + button[name="act_retainers"], input[name="attr_sheetTab"][value="monster"] ~ .sheet-button-select button[name="act_monster"], diff --git a/Old School Essentials - AAC/OSE-AAC.html b/Old School Essentials - AAC/OSE-AAC.html index 0b48c4fd5c..2190d80c14 100644 --- a/Old School Essentials - AAC/OSE-AAC.html +++ b/Old School Essentials - AAC/OSE-AAC.html @@ -14,6 +14,7 @@ Character + Retainers Monster Notes @@ -214,7 +215,7 @@ Death, Poison @@ -222,7 +223,7 @@ Magic wands @@ -230,7 +231,7 @@ Paralysis, Petrification @@ -238,7 +239,7 @@ Breath attacks @@ -246,7 +247,7 @@ Spells, Rods, Staves @@ -302,7 +303,7 @@ - + AC @@ -391,7 +392,7 @@ - + Attack Value Matrix @@ -450,7 +451,7 @@ +Damage Weight - + @@ -561,7 +562,7 @@ value="0" /> - + @@ -648,6 +649,26 @@ + + + Retainer Modifiers + + + NPC Reaction + + + + Max Retainers + + + + Loyalty + + + + + + @@ -787,7 +808,7 @@ - + BAB @@ -827,7 +848,7 @@ - + Attack Value Matrix @@ -885,7 +906,7 @@ Damage Description - + @@ -1021,7 +1042,7 @@ Armor Class Type - Ascending Armor Class + Ascending Armor Class Descending Armor Class @@ -1375,12 +1396,12 @@ getTranslationByKey("charisma-modifier") + "|0}[" + getTranslationByKey("charisma-abbr") + - "]", + "]" }); }); // Tabs - const buttonlist = ["character", "monster", "notes", "settings"]; + const buttonlist = ["character", "retainers", "monster", "notes", "settings"]; buttonlist.forEach((button) => { on(`clicked:${button}`, function (event) { setAttrs({ sheetTab: button }); @@ -1437,9 +1458,37 @@ }); on("sheet:opened change:wis", function () { getAttrs(["wis"], function (values) { - setAttrs({ wisMod: getModifiers(values.wis) }); + const wisMod = getModifiers(values.wis); + setAttrs({ + wisMod, + wisdomSaveQuery: (wisMod === 0) + ? 0 + : "?{" + + getTranslationByKey("wisdom-save-apply") + + "|" + + getTranslationByKey("no") + + ",0|" + + getTranslationByKey("yes") + + ",@{wisMod}}[" + + getTranslationByKey("wisdom-abbr") + + "]" + }); }); }); + on("sheet:opened change:cha", function () { + getAttrs(["cha"], function (values) { + const [chaMod, retainersMax, retainersLoyalty] = getModifiers(values.cha, [ + [-2, 1, 4], + [-1, 2, 5], + [-1, 3, 6], + [0, 4, 7], + [1, 5, 8], + [1, 6, 9], + [2, 7, 10] + ]); + setAttrs({ chaMod, retainersMax, retainersLoyalty }) + }) + }) /** * Given a value and set of modifiers, return the correct modifiers @@ -1491,15 +1540,15 @@ }); } } else if (attackType.toLowerCase() === 'melee') { - setAttrs({ - [`repeating_weapons_${id}_weaponAttributeBonus`]: values.BonusSTR, - [`repeating_weapons_${id}_weaponAttributeBonusDamage`]: values.BonusSTR, - }); + setAttrs({ + [`repeating_weapons_${id}_weaponAttributeBonus`]: values.BonusSTR, + [`repeating_weapons_${id}_weaponAttributeBonusDamage`]: values.BonusSTR, + }); } else if (attackType.toLowerCase() === 'ranged') { - setAttrs({ - [`repeating_weapons_${id}_weaponAttributeBonus`]: values.BonusDEX, - [`repeating_weapons_${id}_weaponAttributeBonusDamage`]: "0", - }); + setAttrs({ + [`repeating_weapons_${id}_weaponAttributeBonus`]: values.BonusDEX, + [`repeating_weapons_${id}_weaponAttributeBonusDamage`]: "0", + }); } }); }); @@ -1520,15 +1569,19 @@ // Armor Calculation on("sheet:opened change:dex change:repeating_armor remove:repeating_armor", function () { - repeatingSum("ArmorWorn", "armor", "armorWorn", { callback: () => { - repeatingSum("ArmorTotal", "armor", ["armorValue", "armorWorn"], { callback: () => { - getAttrs(["ArmorWorn", "ArmorTotal", "BonusDEX", "aacAcUnarmored", "dacAcUnarmored"], function(values) { - const aacAc = values.ArmorWorn > 0 ? values.ArmorTotal + values.BonusDEX : values.aacAcUnarmored; - const dacAc = values.ArmorWorn > 0 ? values.ArmorTotal - values.BonusDEX : values.dacAcUnarmored; - setAttrs({ aacAc, dacAc }); - }) - }}); - }}); + repeatingSum("ArmorWorn", "armor", "armorWorn", { + callback: () => { + repeatingSum("ArmorTotal", "armor", ["armorValue", "armorWorn"], { + callback: () => { + getAttrs(["ArmorWorn", "ArmorTotal", "BonusDEX", "aacAcUnarmored", "dacAcUnarmored"], function (values) { + const aacAc = values.ArmorWorn > 0 ? values.ArmorTotal + values.BonusDEX : values.aacAcUnarmored; + const dacAc = values.ArmorWorn > 0 ? values.ArmorTotal - values.BonusDEX : values.dacAcUnarmored; + setAttrs({ aacAc, dacAc }); + }) + } + }); + } + }); } ); @@ -1599,7 +1652,7 @@ }); function setAttackMatrix(thac0) { const matrix = {}; - for (let ac = 0; ac < 10; ac++) { + for (let ac = 0; ac < 10; ac++) { matrix[`attackMatrix${ac}`] = Math.min(thac0 - ac, 20); } setAttrs(matrix); @@ -1620,7 +1673,7 @@ }); function setAttackMatrix(thac0, type = 'attackMatrix') { const matrix = {}; - for (let ac = 0; ac < 10; ac++) { + for (let ac = 0; ac < 10; ac++) { matrix[`${type}${ac}`] = Math.min(thac0 - ac, 20); } setAttrs(matrix); diff --git a/Old School Essentials - AAC/translation.json b/Old School Essentials - AAC/translation.json index 48e14e7536..58f97071ec 100644 --- a/Old School Essentials - AAC/translation.json +++ b/Old School Essentials - AAC/translation.json @@ -170,5 +170,13 @@ "gold": "Gold", "electrum": "Electrum", "silver": "Silver", - "copper": "Copper" + "copper": "Copper", + "retainers": "Retainers", + "retainer-modifiers": "Retainer Modifiers", + "npc-reaction": "NPC Reaction", + "max-retainers": "Max Retainers", + "loyalty": "Loyalty", + "wisdom-save-apply": "Does the Wisdom modifier apply? (i.e. versus magical effects that aren't breath weapons)", + "yes": "Yes", + "no": "No" }