Skip to content

Commit

Permalink
v3/7/4
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed Dec 30, 2023
1 parent baff111 commit 9394786
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 3.7.4

- Some v10 compatibility improvements.

# 3.7.3

- Some small improvements to the campaign fallback UI to ensure that its obvious a campaign is still selected if the campaign list fails.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ddb-importer",
"version": "3.7.3",
"version": "3.7.4",
"author": "MrPrimate",
"description": "Foundry VTT module for integrating D&D Beyond content",
"private": true,
Expand Down
6 changes: 3 additions & 3 deletions src/parser/advancements/AdvancementHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ export default class AdvancementHelper {
}


getSkillChoicesFromOptions(feature, level) {
getSkillChoicesFromOptions(feature, level, proficiencyFeatures = []) {
const skillsChosen = new Set();
const skillChoices = new Set();

const choiceDefinitions = this.ddbData.character.choices.choiceDefinitions;

this.ddbData.character.choices[this.type].filter((choice) =>
// check all features
((feature === null && this._proficiencyFeatures.some((f) => f.id === choice.componentId && f.requiredLevel === level))
((feature === null && proficiencyFeatures.some((f) => f.id === choice.componentId && f.requiredLevel === level))
// check specific feature
|| (feature.id === choice.componentId && feature.requiredLevel === level))
|| (feature && feature.id === choice.componentId && feature.requiredLevel === level))
&& choice.subType === 1
&& choice.type === 2
).forEach((choice) => {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/classes/DDBClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ export default class DDBClass {
_setLegacySkills() {
if (!this.legacyMode) return;

const skills = this.advancementHelper.getSkillChoicesFromOptions(null, 1);
const skills = this.advancementHelper.getSkillChoicesFromOptions(null, 1, this._proficiencyFeatures);

this.data.system.skills = {
value: skills.chosen,
Expand Down
1 change: 1 addition & 0 deletions src/parser/race/DDBRace.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ export default class DDBRace {


linkFeatures(ddbCharacter) {
if (this.legacyMode) return;
logger.debug("Linking Advancements to Feats for Race", {
DDBRace: this,
ddbCharacter,
Expand Down

0 comments on commit 9394786

Please sign in to comment.