From 6a37e6090a5126dcc5a21d41d89877ffcca5588b Mon Sep 17 00:00:00 2001 From: wesbaker Date: Mon, 16 Nov 2020 20:23:55 -0500 Subject: [PATCH 1/5] Fix a bug where the spell level input was wider than the space in the grid Closes wesbaker/roll20-character-sheets#51 --- Old School Essentials - AAC/CHANGELOG.md | 6 ++++++ Old School Essentials - AAC/OSE-AAC.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Old School Essentials - AAC/CHANGELOG.md b/Old School Essentials - AAC/CHANGELOG.md index 5722504214..c8ee5a21e8 100644 --- a/Old School Essentials - AAC/CHANGELOG.md +++ b/Old School Essentials - AAC/CHANGELOG.md @@ -2,6 +2,12 @@ [GitHub Project Status board](https://github.com/wesbaker/roll20-character-sheets/projects/1) +## 1.6.3 + +### Fixed + +- Fix a bug where the spell level input was wider than the space in the grid + ## 1.6.2 ### Fixed diff --git a/Old School Essentials - AAC/OSE-AAC.html b/Old School Essentials - AAC/OSE-AAC.html index 0b48c4fd5c..437163c827 100644 --- a/Old School Essentials - AAC/OSE-AAC.html +++ b/Old School Essentials - AAC/OSE-AAC.html @@ -561,7 +561,7 @@ value="0" /> - + From 6730661795c59ffe5c31d87224515e66988605fa Mon Sep 17 00:00:00 2001 From: wesbaker Date: Mon, 16 Nov 2020 20:24:46 -0500 Subject: [PATCH 2/5] Fix a bug where setting the default sheet to DAC wouldn't create DAC characters Closes wesbaker/roll20-character-sheets#54 --- Old School Essentials - AAC/CHANGELOG.md | 1 + Old School Essentials - AAC/OSE-AAC.html | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Old School Essentials - AAC/CHANGELOG.md b/Old School Essentials - AAC/CHANGELOG.md index c8ee5a21e8..1fe621b170 100644 --- a/Old School Essentials - AAC/CHANGELOG.md +++ b/Old School Essentials - AAC/CHANGELOG.md @@ -7,6 +7,7 @@ ### 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 diff --git a/Old School Essentials - AAC/OSE-AAC.html b/Old School Essentials - AAC/OSE-AAC.html index 437163c827..54de1830aa 100644 --- a/Old School Essentials - AAC/OSE-AAC.html +++ b/Old School Essentials - AAC/OSE-AAC.html @@ -302,7 +302,7 @@ - +
- +

Attack Value Matrix

@@ -450,7 +450,7 @@ +Damage Weight
- +
@@ -787,7 +787,7 @@ - +
- +

Attack Value Matrix

@@ -885,7 +885,7 @@ Damage Description
- +
@@ -1021,7 +1021,7 @@ From 8b45a5d8e5c494ca338a1e46eac51ac343435844 Mon Sep 17 00:00:00 2001 From: wesbaker Date: Mon, 16 Nov 2020 20:38:15 -0500 Subject: [PATCH 3/5] Fix whitespace issues --- Old School Essentials - AAC/OSE-AAC.html | 42 +++++++++++++----------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/Old School Essentials - AAC/OSE-AAC.html b/Old School Essentials - AAC/OSE-AAC.html index 54de1830aa..e38a263aa3 100644 --- a/Old School Essentials - AAC/OSE-AAC.html +++ b/Old School Essentials - AAC/OSE-AAC.html @@ -1491,15 +1491,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 +1520,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 +1603,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 +1624,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); From 958c3288ec3533343178351e7824c40dd48afcf7 Mon Sep 17 00:00:00 2001 From: wesbaker Date: Mon, 16 Nov 2020 20:50:09 -0500 Subject: [PATCH 4/5] Add retainers tab for basic modifiers Closes wesbaker/roll20-character-sheets#14 --- Old School Essentials - AAC/CHANGELOG.md | 6 +++- Old School Essentials - AAC/OSE-AAC.css | 6 ++++ Old School Essentials - AAC/OSE-AAC.html | 37 +++++++++++++++++++- Old School Essentials - AAC/translation.json | 7 +++- 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/Old School Essentials - AAC/CHANGELOG.md b/Old School Essentials - AAC/CHANGELOG.md index 1fe621b170..f8b578f711 100644 --- a/Old School Essentials - AAC/CHANGELOG.md +++ b/Old School Essentials - AAC/CHANGELOG.md @@ -2,7 +2,11 @@ [GitHub Project Status board](https://github.com/wesbaker/roll20-character-sheets/projects/1) -## 1.6.3 +## 1.7.0 + +### Added + +- Add retainers tab for charisma based retainer modifiers ### 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 e38a263aa3..ea30e80808 100644 --- a/Old School Essentials - AAC/OSE-AAC.html +++ b/Old School Essentials - AAC/OSE-AAC.html @@ -14,6 +14,7 @@ +
+
+
+

Retainer Modifiers

+
+ + + +
+
+
+
@@ -1380,7 +1401,7 @@ }); // 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 }); @@ -1440,6 +1461,20 @@ setAttrs({ wisMod: getModifiers(values.wis) }); }); }); + 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 diff --git a/Old School Essentials - AAC/translation.json b/Old School Essentials - AAC/translation.json index 48e14e7536..cf059d5d0e 100644 --- a/Old School Essentials - AAC/translation.json +++ b/Old School Essentials - AAC/translation.json @@ -170,5 +170,10 @@ "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" } From 72d6783cb5db3c80210caad05697df8981e251ec Mon Sep 17 00:00:00 2001 From: wesbaker Date: Mon, 16 Nov 2020 21:36:42 -0500 Subject: [PATCH 5/5] Add prompt for Wisdom bonus on saving throws Closes wesbaker/roll20-character-sheets#53 --- Old School Essentials - AAC/CHANGELOG.md | 1 + Old School Essentials - AAC/OSE-AAC.html | 28 +++++++++++++++----- Old School Essentials - AAC/translation.json | 5 +++- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Old School Essentials - AAC/CHANGELOG.md b/Old School Essentials - AAC/CHANGELOG.md index f8b578f711..314d4d5fc0 100644 --- a/Old School Essentials - AAC/CHANGELOG.md +++ b/Old School Essentials - AAC/CHANGELOG.md @@ -7,6 +7,7 @@ ### Added - Add retainers tab for charisma based retainer modifiers +- Add prompt for Wisdom bonus on saving throws ### Fixed diff --git a/Old School Essentials - AAC/OSE-AAC.html b/Old School Essentials - AAC/OSE-AAC.html index ea30e80808..2190d80c14 100644 --- a/Old School Essentials - AAC/OSE-AAC.html +++ b/Old School Essentials - AAC/OSE-AAC.html @@ -215,7 +215,7 @@