diff --git a/lang/en.json b/lang/en.json index 24f9236b..0addf880 100755 --- a/lang/en.json +++ b/lang/en.json @@ -748,6 +748,8 @@ "TakeLevelUp": "Finish Level Up", "notifications": { "info": { + "tierAdvancementInfo": "Advancements from a higher tier can always be used to select advancements in a lower tier.", + "remainingAdvancementInfo": "Remaining Choices: {choices}", "insufficentAdvancements": "You don't have enough advancements left.", "insufficientTierAdvancements": "You have no available advancements for this tier." } diff --git a/module/data/levelup.mjs b/module/data/levelup.mjs index 56e1a516..0ff522d6 100644 --- a/module/data/levelup.mjs +++ b/module/data/levelup.mjs @@ -45,6 +45,7 @@ export class DhLevelup extends foundry.abstract.DataModel { acc.total += tier.selections.total; for (var key in tier.selections.available) { const availableSelections = tier.selections.available[key]; + acc.totalAvailable += availableSelections; if (acc.available[key]) acc.available[key] += availableSelections; else acc.available[key] = availableSelections; @@ -52,7 +53,7 @@ export class DhLevelup extends foundry.abstract.DataModel { return acc; }, - { total: 0, available: {} } + { total: 0, available: {}, totalAvailable: 0 } ); } @@ -128,16 +129,20 @@ class DhLevelupTier extends foundry.abstract.DataModel { const allSelections = Object.keys(this.levels).reduce( (acc, key) => { const { selections, available } = this.levels[key].nrSelections; + if (acc.available[key]) acc.available[key] += available; else acc.available[key] = available; + + acc.totalAvailable += available; acc.total += selections; return acc; }, - { available: {}, total: 0 } + { available: {}, totalAvailable: 0, total: 0 } ); return { available: allSelections.available, + totalAvailable: allSelections.totalAvailable, total: allSelections.total }; } diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index 20504976..7a0743f0 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -1,4 +1,4 @@ -import { diceSoNicePresets, getDiceSoNicePresets } from '../config/generalConfig.mjs'; +import { getDiceSoNicePresets } from '../config/generalConfig.mjs'; export const loadCompendiumOptions = async compendiums => { const compendiumValues = []; diff --git a/styles/daggerheart.css b/styles/daggerheart.css index 1234b3ad..bd3284b2 100755 --- a/styles/daggerheart.css +++ b/styles/daggerheart.css @@ -2786,7 +2786,7 @@ div.daggerheart.views.multiclass { .theme-light { /* Add specifics*/ } -.daggerheart.levelup div[data-application-part="form"] { +.daggerheart.levelup div[data-application-part='form'] { display: flex; flex-direction: column; gap: 8px; @@ -3269,6 +3269,7 @@ div.daggerheart.views.multiclass { width: 100%; object-fit: cover; mask-image: linear-gradient(0deg, transparent 0%, black 10%); + cursor: pointer; } .application.sheet.daggerheart.dh-style .item-card-header .item-icons-list { position: absolute; @@ -3398,12 +3399,6 @@ div.daggerheart.views.multiclass { /* Flex */ /****/ } -.daggerheart .vertical-separator { - border-left: 2px solid black; - height: 56px; - flex: 0; - align-self: center; -} .daggerheart .flex-centered { display: flex; align-items: center; diff --git a/styles/levelup.less b/styles/levelup.less index 1e84c270..6c9d4935 100644 --- a/styles/levelup.less +++ b/styles/levelup.less @@ -75,5 +75,26 @@ .levelup-footer { display: flex; + + .advancement-information-container { + display: flex; + gap: 8px; + border: 1px solid; + border-radius: 4px; + margin-left: 8px; + align-items: center; + padding: 0 8px; + border-color: rgb(159, 132, 117); + + .advancement-tier-stats { + border: 1px solid; + padding: 0 2px; + border-radius: 6px; + } + + .advancement-tier-info { + font-size: 14px; + } + } } } diff --git a/templates/views/levelup.hbs b/templates/views/levelup.hbs index 8caea9f0..49c9c0fd 100644 --- a/templates/views/levelup.hbs +++ b/templates/views/levelup.hbs @@ -30,23 +30,13 @@ - +