Skip to content

Commit

Permalink
Kgar class spell choices
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed Jan 23, 2024
1 parent 9aec297 commit d35716f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Monster: Fathomer spell parsing.
- Monster: Clay Golem Haste feature was parsed incorrectly as a bonus action.
- Monster: Ankheg Acid Spray did not import as a 30ft line.
- Kgar Tidy 5e Sheet: add spells to class spellbook.

# 3.7.14

Expand Down
1 change: 1 addition & 0 deletions src/parser/character/spellCasting.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,5 @@ DDBCharacter.prototype._generateMaxPreparedSpells = function _generateMaxPrepare

this.raw.character.system.details.maxPreparedSpells = max;
setProperty(this.raw.character, "flags.tidy5e-sheet.maxPreparedSpells", max);
setProperty(this.raw.character, "flags.tidy5e-sheet-kgar.maxPreparedSpells", max);
};
6 changes: 6 additions & 0 deletions src/parser/spells/CharacterSpellFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export default class CharacterSpellFactory {
"spell-class-filter-for-5e": {
parentClass: classInfo.definition.name.toLowerCase(),
},
"tidy5e-sheet-kgar": {
parentClass: classInfo.definition.name.toLowerCase(),
},
// "spellbook-assistant-manager": {
// class: classInfo.definition.name.toLowerCase(),
// }
Expand Down Expand Up @@ -162,6 +165,9 @@ export default class CharacterSpellFactory {
forceMaterial: klass?.definition?.name === "Artificer",
},
},
"tidy5e-sheet-kgar": {
parentClass: (klass) ? klass.definition.name : undefined,
},
};

// Check for duplicate spells, normally domain ones
Expand Down
1 change: 1 addition & 0 deletions src/parser/spells/parseSpell.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export async function parseSpell(data, character) {
},
// "spellbook-assistant-manager": data.flags["spellbook-assistant-manager"],
"spell-class-filter-for-5e": data.flags["spell-class-filter-for-5e"],
"tidy5e-sheet-kgar": data.flags["tidy5e-sheet-kgar"],
},
};

Expand Down
1 change: 1 addition & 0 deletions src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const SUPPORTED_FLAG_GROUPS = [
"obsidian",
"siftoolkit",
"spell-class-filter-for-5e",
"tidy5e-sheet-kgar",
"spellbook-assistant-manager",
"tagger",
"tidy5e-sheet",
Expand Down

0 comments on commit d35716f

Please sign in to comment.